Category Archives: music

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 | Tagged , , | Leave a comment