Method: PM::DSL#input
- Defined in:
- lib/patchmaster/dsl.rb
#input(port_num, sym, name = nil) ⇒ Object Also known as: inp
35 36 37 38 39 40 41 42 43 |
# File 'lib/patchmaster/dsl.rb', line 35 def input(port_num, sym, name=nil) raise "input: two inputs can not have the same symbol (:#{sym})" if @inputs[sym] input = InputInstrument.new(sym, name, port_num, @pm.use_midi?) @inputs[sym] = input @pm.inputs << input rescue => ex raise "input: error creating input instrument \"#{name || sym}\" on input port #{port_num}: #{ex}" end |