Class: SMF::KeyBasedInstrumentControllers

Inherits:
ExclusiveF0 show all
Defined in:
lib/smf/toy/gm.rb

Instance Attribute Summary

Attributes inherited from ExclusiveF0

#data

Attributes inherited from Event

#offset

Instance Method Summary collapse

Methods inherited from ExclusiveF0

#==

Methods inherited from Event

#<=>, #==, #eql?, #hash

Constructor Details

#initialize(offset, ch, kk, nn_vv, dev = 0x7f) ⇒ KeyBasedInstrumentControllers

Returns a new instance of KeyBasedInstrumentControllers.



293
294
295
296
297
# File 'lib/smf/toy/gm.rb', line 293

def initialize(offset, ch, kk, nn_vv, dev=0x7f)
  # kk:0/2**7-1, nn:7|10|91|93, vv:0/2**7-1
  super(offset, [0x7f, dev, 0x0a, 0x01, ch, kk, nn_vv, 0xf7].
   flatten.pack('C*'))
end