Tag Archives: ruby

Interval – a ruby library for musical interval arithmetic

Interval interval is a tiny library that provides simple musical note pitch and interval arithmetic. It is intended to do one thing: given a pitch add (or subtract) an interval and give the resulting pitch. Observe: p = Interval::Pitch.from_string("c") i = Interval::Interval.from_string("M3") p2 = p + i p2.to_short_name # => "e"   i.to_s # => [...]
Posted in music | Also tagged , | Leave a comment

git-style-binaries screencast

Just released: git-style-binaries ruby gem. Checkout the README on github. Checkout the screencast.
Posted in code | Also tagged , , | Leave a comment

Ruby’s #each_with_index for Erlang

Ruby has a great method for enumerations called #each_with_index. It’s a handy way to iterate over a list of elements and and know where you’re at while doing it. Erlang has a group of highly optimized list operations in the lists module (Try erl -man lists to see them all). We’re going to be using [...]
Posted in erlang | Tagged | 2 Comments