Class: HeadMusic::Notation::LilyPond::VoiceStream::Event

Inherits:
Data
  • Object
show all
Defined in:
lib/head_music/notation/lily_pond/voice_stream.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (Object) —

    the current value of 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

Returns:

  • (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