Class: AudioToolbox::MIDIKeyPressureMessage

Inherits:
MIDIChannelMessage show all
Defined in:
lib/music_player.rb,
ext/music_player/music_player.c

Instance Method Summary collapse

Methods inherited from MIDIChannelMessage

#==, #add, #channel, #data1, #data2, #status

Constructor Details

#initialize(opts) ⇒ MIDIKeyPressureMessage

Returns a new instance of MIDIKeyPressureMessage.



142
143
144
145
146
147
# File 'lib/music_player.rb', line 142

def initialize(opts)
  channel, note, pressure = required_opts(opts, :channel, :note, :pressure)
  super(:status => mask | channel,
        :data1  => note,
        :data2  => pressure)
end

Instance Method Details

#maskObject



140
# File 'lib/music_player.rb', line 140

def mask; 0xA0 end