Class: MIDIDevice
- Inherits:
-
Object
- Object
- 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
- #to_s ⇒ Object
Constructor Details
#initialize(sequencer, low_level_device) ⇒ MIDIDevice
Returns a new instance of MIDIDevice.
51 52 53 54 |
# File 'lib/midi-devices.rb', line 51 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.
56 57 58 |
# File 'lib/midi-devices.rb', line 56 def low_level_device @low_level_device end |
Instance Method Details
#channels ⇒ Object
62 63 64 |
# File 'lib/midi-devices.rb', line 62 def channels @voices.voices end |
#name ⇒ Object
58 59 60 |
# File 'lib/midi-devices.rb', line 58 def name @low_level_device.name end |
#to_s ⇒ Object
66 67 68 |
# File 'lib/midi-devices.rb', line 66 def to_s @low_level_device.display_name end |