Method: PM::Connection#initialize

Defined in:
lib/patchmaster/connection.rb

#initialize(input, input_chan, output, output_chan, filter = nil, opts = {}) ⇒ Connection

If input_chan is nil than all messages from input will be sent to output.

All channels (input_chan, output_chan, etc.) are 1-based here but are turned into 0-based channels for later use.



19
20
21
22
23
24
25
# File 'lib/patchmaster/connection.rb', line 19

def initialize(input, input_chan, output, output_chan, filter=nil, opts={})
  @input, @input_chan, @output, @output_chan, @filter = input, input_chan, output, output_chan, filter
  @bank, @pc_prog, @zone, @xpose = opts[:bank], opts[:pc_prog], opts[:zone], opts[:xpose]

  @input_chan -= 1 if @input_chan
  @output_chan -= 1 if @output_chan
end