Module: Musa::Sequencer::BaseSequencer::TickBasedTiming
- Defined in:
- lib/musa-dsl/sequencer/base-sequencer-tick-based.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
Returns the value of attribute position.
-
#tick_duration ⇒ Object
readonly
Returns the value of attribute tick_duration.
-
#ticks_per_bar ⇒ Object
readonly
Returns the value of attribute ticks_per_bar.
Instance Method Summary collapse
Instance Attribute Details
#position ⇒ Object
Returns the value of attribute position.
7 8 9 |
# File 'lib/musa-dsl/sequencer/base-sequencer-tick-based.rb', line 7 def position @position end |
#tick_duration ⇒ Object (readonly)
Returns the value of attribute tick_duration.
7 8 9 |
# File 'lib/musa-dsl/sequencer/base-sequencer-tick-based.rb', line 7 def tick_duration @tick_duration end |
#ticks_per_bar ⇒ Object (readonly)
Returns the value of attribute ticks_per_bar.
7 8 9 |
# File 'lib/musa-dsl/sequencer/base-sequencer-tick-based.rb', line 7 def @ticks_per_bar end |
Instance Method Details
#tick ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/musa-dsl/sequencer/base-sequencer-tick-based.rb', line 9 def tick if @hold_public_ticks @hold_ticks += 1 else _tick @position_mutex.synchronize { @position += @tick_duration } end end |