Class: HeadMusic::Notation::LilyPond::VoiceStream::Event
- Inherits:
-
Data
- Object
- Data
- HeadMusic::Notation::LilyPond::VoiceStream::Event
- Defined in:
- lib/head_music/notation/lily_pond/voice_stream.rb
Instance Attribute Summary collapse
-
#fraction ⇒ Object
readonly
Returns the value of attribute fraction.
-
#key_signature ⇒ Object
readonly
Returns the value of attribute key_signature.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#meter ⇒ Object
readonly
Returns the value of attribute meter.
-
#pitches ⇒ Object
readonly
Returns the value of attribute pitches.
-
#rhythmic_value ⇒ Object
readonly
Returns the value of attribute rhythmic_value.
Instance Method Summary collapse
-
#initialize(kind:, line:, pitches: nil, rhythmic_value: nil, fraction: nil, key_signature: nil, meter: nil) ⇒ Event
constructor
A new instance of Event.
- #music? ⇒ Boolean
Constructor Details
#initialize(kind:, line:, pitches: nil, rhythmic_value: nil, fraction: nil, key_signature: nil, meter: nil) ⇒ Event
Returns a new instance of Event.
9 10 11 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 9 def initialize(kind:, line:, pitches: nil, rhythmic_value: nil, fraction: nil, key_signature: nil, meter: nil) super end |
Instance Attribute Details
#fraction ⇒ Object (readonly)
Returns the value of attribute fraction
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def fraction @fraction end |
#key_signature ⇒ Object (readonly)
Returns the value of attribute key_signature
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def key_signature @key_signature end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def kind @kind end |
#line ⇒ Object (readonly)
Returns the value of attribute line
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def line @line end |
#meter ⇒ Object (readonly)
Returns the value of attribute meter
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def meter @meter end |
#pitches ⇒ Object (readonly)
Returns the value of attribute pitches
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def pitches @pitches end |
#rhythmic_value ⇒ Object (readonly)
Returns the value of attribute rhythmic_value
8 9 10 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 8 def rhythmic_value @rhythmic_value end |
Instance Method Details
#music? ⇒ Boolean
13 14 15 |
# File 'lib/head_music/notation/lily_pond/voice_stream.rb', line 13 def music? %i[note rest whole_bar_rest].include?(kind) end |