lib/music-transcription/tempo.rb in music-transcription-0.5.9 vs lib/music-transcription/tempo.rb in music-transcription-0.5.10

- old
+ new

@@ -9,9 +9,14 @@ def initialize beats_per_minute, beat_duration = Rational(1,4) @beats_per_minute = beats_per_minute @beat_duration = beat_duration end + def ==(other) + (other.beats_per_minute == @beats_per_minute) && + (other.beat_duration == @beat_duration) + end + def notes_per_second (@beats_per_minute * @beat_duration) / 60.0 end def between? a, b