class Integer
Public Instance Methods
channel()
click to toggle source
# File lib/patchmaster/predicates.rb, line 9 def channel self & 0x0f end
channel?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 13 def channel? self >= PM::NOTE_OFF && self < PM::SYSEX end
Also aliased as: chan?
controller?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 39 def controller? (self & 0xf0) == PM::CONTROLLER end
Also aliased as: ctrl?
high_nibble()
click to toggle source
# File lib/patchmaster/predicates.rb, line 5 def high_nibble self & 0xf0 end
note?()
click to toggle source
Returns true if self is a status byte for a message that targets a note (note on, note off, or poly pressure).
# File lib/patchmaster/predicates.rb, line 35 def note? self >= PM::NOTE_OFF && self < PM::CONTROLLER end
note_off?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 23 def note_off? (self & 0xf0) == PM::NOTE_OFF end
Also aliased as: off?
note_on?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 18 def note_on? (self & 0xf0) == PM::NOTE_ON end
Also aliased as: on?
pitch_bend?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 49 def pitch_bend? (self & 0xf0) == PM::PITCH_BEND end
Also aliased as: pb?
poly_pressure?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 28 def poly_pressure? (self & 0xf0) == PM::POLY_PRESSURE end
Also aliased as: poly_press?
program_change?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 44 def program_change? (self & 0xf0) == PM::PROGRAM_CHANGE end
Also aliased as: pc?
realtime?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 59 def realtime? self >= 0xf8 && self <= 0xff end
Also aliased as: rt?
system?()
click to toggle source
# File lib/patchmaster/predicates.rb, line 54 def system? self >= PM::SYSEX && self <= PM::EOX end
Also aliased as: sys?