class MIDI::PitchBend
Attributes
value[RW]
Public Class Methods
new(channel = 0, value = 0, delta_time = 0)
click to toggle source
Calls superclass method
MIDI::ChannelEvent::new
# File lib/midilib/event.rb, line 246 def initialize(channel = 0, value = 0, delta_time = 0) super(PITCH_BEND, channel, delta_time) @value = value end
Public Instance Methods
data_as_bytes()
click to toggle source
# File lib/midilib/event.rb, line 251 def data_as_bytes data = [] data << (@status + @channel) data << (@value & 0x7f) # lsb data << ((@value >> 7) & 0x7f) # msb end
to_s()
click to toggle source
Calls superclass method
MIDI::ChannelEvent#to_s
# File lib/midilib/event.rb, line 258 def to_s super << "pb #{number_to_s(@value)}" end