Class: Diamond::MIDI::Node

Inherits:
Object
  • Object
show all
Includes:
Input, Output
Defined in:
lib/diamond/midi.rb

Overview

An access point for dealing with all MIDI functionality for the instrument

Instance Method Summary collapse

Methods included from Output

#enable_output, included

Methods included from Input

#add, #enable_note_control, #enable_parameter_control, included, #remove

Constructor Details

#initialize(devices, options = {}) ⇒ Node

Initialize MIDI input and output

Parameters:

  • devices (Hash)
  • options (Hash) (defaults to: {})

Options Hash (options):

  • :channel (Fixnum)

    The receive channel (also: :rx_channel)

  • :tx_channel (Fixnum)

    The transmit channel



160
161
162
163
164
165
# File 'lib/diamond/midi.rb', line 160

def initialize(devices, options = {})
  @debug = options.fetch(:debug, false)
  @midi = MIDIInstrument::Node.new
  initialize_input(devices[:input], options)
  initialize_output(devices[:output], options)
end