Class: SMF::ScaleTuningAdjust1ByteFormNonRealTime
- Inherits:
-
ExclusiveF0
- Object
- Event
- SystemMessage
- ExclusiveMessage
- ExclusiveF0
- SMF::ScaleTuningAdjust1ByteFormNonRealTime
- Defined in:
- lib/smf/toy/gm.rb
Instance Attribute Summary
Attributes inherited from ExclusiveF0
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(offset, ch, ss, dev = 0x7f) ⇒ ScaleTuningAdjust1ByteFormNonRealTime
constructor
A new instance of ScaleTuningAdjust1ByteFormNonRealTime.
Methods inherited from ExclusiveF0
Methods inherited from Event
Constructor Details
#initialize(offset, ch, ss, dev = 0x7f) ⇒ ScaleTuningAdjust1ByteFormNonRealTime
Returns a new instance of ScaleTuningAdjust1ByteFormNonRealTime.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/smf/toy/gm.rb', line 234 def initialize(offset, ch, ss, dev=0x7f) # ch:0/2**16-1, ss:-2**6/2**6-1 ff = ch & 0x3 gg = (ch >> 2) & 0x7f hh = (ch >> 9) & 0x7f ss.collect! do |x| x + 0x40 end super(offset, [0x7e, dev, 0x08, 0x08, ff, gg, hh, ss, 0xf7]. flatten.pack('C*')) end |