Method: Note#inspect
- Defined in:
- lib/kuromusic/Track/Measure/Chord/Note.rb
#inspect(key = nil) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/kuromusic/Track/Measure/Chord/Note.rb', line 35 def inspect(key = nil) if key.nil? "<:degree=>" + @degree.to_s + ", :octave=>" + @octave.to_s + ", :velocity:=>" + @velocity.to_s + ", :duration=>" + @dur.to_s + ">" else gdeg, goct = get_gdeg_and_goct(key) "<:note=>" + Key::degree_to_key(gdeg) + ", :octave=>" + goct.to_s + ", :velocity:=>" + @velocity.to_s + ", :duration=>" + @dur.to_s + ">" end end |