lib/music-transcription/part.rb in music-transcription-0.5.6 vs lib/music-transcription/part.rb in music-transcription-0.5.7
- old
+ new
@@ -44,18 +44,18 @@
# Duration of part notes.
def duration
return @notes.inject(0) { |sum, note| sum + note.duration }
end
- def transpose pitch_diff
- self.clone.transpose! pitch_diff
+ def transpose diff
+ self.clone.transpose! diff
end
- def transpose! pitch_diff
+ def transpose! diff
@notes[0...-1].each do |note|
- note.transpose_pitches_and_links! pitch_diff
+ note.transpose_pitches_and_links! diff
end
- @notes[-1].transpose_pitches_only! pitch_diff
+ @notes[-1].transpose_pitches_only! diff
return self
end
# Add on notes and dynamic_profile from another part, producing a new
# Part object. The offsets of value changes in the dynamic profile,