Module: Topaz::TempoSource
Overview
Construct a tempo source object
Instance Method Summary collapse
-
#new(tempo_or_input, options = {}) ⇒ MIDIClockInput, Timer
Construct a tempo source.
Instance Method Details
#new(tempo_or_input, options = {}) ⇒ MIDIClockInput, Timer
Construct a tempo source
14 15 16 17 18 19 20 21 22 |
# File 'lib/topaz/tempo_source.rb', line 14 def new(tempo_or_input, = {}) klass = case tempo_or_input when Numeric then Timer when UniMIDI::Input then MIDIClockInput else raise "Not a valid tempo source" end klass.new(tempo_or_input, ) end |