Class: Sunniesnow::Charter::TimeDependent::DataPoint
- Inherits:
-
Object
- Object
- Sunniesnow::Charter::TimeDependent::DataPoint
- Includes:
- Metronomic
- Defined in:
- lib/sscharter/charter/event.rb
Instance Attribute Summary collapse
Attributes included from Metronomic
#beat, #bpm_changes, #duration_beats, #offset
Instance Method Summary collapse
-
#initialize(beat, bpm_changes, value) ⇒ DataPoint
constructor
A new instance of DataPoint.
- #to_sunniesnow ⇒ Hash
Methods included from Metronomic
#<=>, #beat_state, #end_time, #time, #time_at_relative_beat
Constructor Details
#initialize(beat, bpm_changes, value) ⇒ DataPoint
Returns a new instance of DataPoint.
106 107 108 109 110 111 |
# File 'lib/sscharter/charter/event.rb', line 106 def initialize beat, bpm_changes, value @offset = 0.0 @beat = beat @bpm_changes = bpm_changes @value = value end |
Instance Attribute Details
#value ⇒ Float, String
101 102 103 |
# File 'lib/sscharter/charter/event.rb', line 101 def value @value end |
Instance Method Details
#to_sunniesnow ⇒ Hash
114 115 116 |
# File 'lib/sscharter/charter/event.rb', line 114 def to_sunniesnow {time: time, value: @value} end |