Class: JSound::Midi::Devices::Repeater

Inherits:
JSound::Midi::Device show all
Defined in:
lib/jsound/midi/devices/repeater.rb

Overview

A device which repeats the input message to multiple outputs.

Instance Method Summary collapse

Methods inherited from JSound::Midi::Device

#<=, #>>, #close, #open, #open?, #output, #to_s, #type

Methods included from JSound::Mixins::TypeFromClassName

included

Instance Method Details

#message(message) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/jsound/midi/devices/repeater.rb', line 16

def message(message)
  if @output
    for device in @output
      device.message(message)
    end
  end
end

#output=(device) ⇒ Object

connect device(s) as the outputs for this device

Parameters:

  • the (Enumberable, Device)

    device or devices to connect, or nil to disconnect the currently connected device

See Also:

  • JSound::Midi::Devices::Repeater.{{#>>}


11
12
13
14
# File 'lib/jsound/midi/devices/repeater.rb', line 11

def output= device
  device = [device] if not device.is_a? Enumerable
  super
end