Sha256: dda871890c2a673b4c071c2aac3fbd5d64558e8f4635b4bcd545a5a3ac89541f
Contents?: true
Size: 590 Bytes
Versions: 4
Compression:
Stored size: 590 Bytes
Contents
class HeadMusic::Note attr_accessor :pitch, :rhythmic_value, :voice, :position def initialize(pitch, rhythmic_value, voice = nil, position = nil) @pitch = HeadMusic::Pitch.get(pitch) @rhythmic_value = HeadMusic::RhythmicValue.get(rhythmic_value) @voice = voice || Voice.new @position = position || HeadMusic::Position.new(@voice.composition, '1:1') end def placement @placement ||= HeadMusic::Placement.new(voice, position, rhythmic_value, pitch) end def method_missing(method_name, *args, &block) placement.send(method_name, *args, &block) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
head_music-0.11.3 | lib/head_music/note.rb |
head_music-0.11.2 | lib/head_music/note.rb |
head_music-0.11.1 | lib/head_music/note.rb |
head_music-0.10.0 | lib/head_music/note.rb |