Class: MusaLCEServer::MIDIDevice
- Inherits:
-
Object
- Object
- MusaLCEServer::MIDIDevice
- Defined in:
- lib/midi-devices.rb
Instance Attribute Summary collapse
-
#low_level_device ⇒ Object
readonly
Returns the value of attribute low_level_device.
Instance Method Summary collapse
- #channels ⇒ Object
-
#initialize(sequencer, low_level_device) ⇒ MIDIDevice
constructor
A new instance of MIDIDevice.
- #name ⇒ Object
- #panic! ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(sequencer, low_level_device) ⇒ MIDIDevice
Returns a new instance of MIDIDevice.
52 53 54 55 |
# File 'lib/midi-devices.rb', line 52 def initialize(sequencer, low_level_device) @low_level_device = low_level_device @voices = Musa::MIDIVoices::MIDIVoices.new(sequencer: sequencer, output: low_level_device, channels: 0..15, do_log: true) end |
Instance Attribute Details
#low_level_device ⇒ Object (readonly)
Returns the value of attribute low_level_device.
57 58 59 |
# File 'lib/midi-devices.rb', line 57 def low_level_device @low_level_device end |
Instance Method Details
#channels ⇒ Object
67 68 69 |
# File 'lib/midi-devices.rb', line 67 def channels @voices.voices end |
#name ⇒ Object
59 60 61 |
# File 'lib/midi-devices.rb', line 59 def name @low_level_device.name end |
#panic! ⇒ Object
63 64 65 |
# File 'lib/midi-devices.rb', line 63 def panic! @voices.panic reset: true end |
#to_s ⇒ Object
71 72 73 |
# File 'lib/midi-devices.rb', line 71 def to_s @low_level_device.display_name end |