Module: Musa::Sequencer::BaseSequencer::TickBasedTiming

Defined in:
lib/musa-dsl/sequencer/base-sequencer-tick-based.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#positionObject

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_durationObject (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_barObject (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
  @ticks_per_bar
end

Instance Method Details

#tickObject



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