Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/patchmaster/predicates.rb
Overview
All the methods here delegate to the first byte in the array, so for example the following two are equivalent:
my_array.note_on?
my_array[0].note_on?
Instance Method Summary collapse
- #channel ⇒ Object
- #channel? ⇒ Boolean (also: #chan?)
- #controller? ⇒ Boolean (also: #ctrl?)
- #high_nibble ⇒ Object
-
#note? ⇒ Boolean
Returns true if self is a message that targets a note (note on, note off, or poly pressure).
- #note_off? ⇒ Boolean (also: #off?)
- #note_on? ⇒ Boolean (also: #on?)
- #pitch_bend? ⇒ Boolean (also: #pb?)
- #poly_pressure? ⇒ Boolean (also: #poly_press?)
- #program_change? ⇒ Boolean (also: #pc?)
- #realtime? ⇒ Boolean (also: #rt?)
- #system? ⇒ Boolean (also: #sys?)
Instance Method Details
#channel ⇒ Object
76 77 78 |
# File 'lib/patchmaster/predicates.rb', line 76 def channel self[0].channel end |
#channel? ⇒ Boolean Also known as: chan?
80 81 82 |
# File 'lib/patchmaster/predicates.rb', line 80 def channel? self[0].channel? end |
#controller? ⇒ Boolean Also known as: ctrl?
106 107 108 |
# File 'lib/patchmaster/predicates.rb', line 106 def controller? self[0].controller? end |
#high_nibble ⇒ Object
72 73 74 |
# File 'lib/patchmaster/predicates.rb', line 72 def high_nibble self[0].high_nibble end |
#note? ⇒ Boolean
Returns true if self is a message that targets a note (note on, note off, or poly pressure).
102 103 104 |
# File 'lib/patchmaster/predicates.rb', line 102 def note? self[0].note? end |
#note_off? ⇒ Boolean Also known as: off?
90 91 92 |
# File 'lib/patchmaster/predicates.rb', line 90 def note_off? self[0].note_off? end |
#note_on? ⇒ Boolean Also known as: on?
85 86 87 |
# File 'lib/patchmaster/predicates.rb', line 85 def note_on? self[0].note_on? end |
#pitch_bend? ⇒ Boolean Also known as: pb?
116 117 118 |
# File 'lib/patchmaster/predicates.rb', line 116 def pitch_bend? self[0].pitch_bend? end |
#poly_pressure? ⇒ Boolean Also known as: poly_press?
95 96 97 |
# File 'lib/patchmaster/predicates.rb', line 95 def poly_pressure? self[0].poly_pressure? end |
#program_change? ⇒ Boolean Also known as: pc?
111 112 113 |
# File 'lib/patchmaster/predicates.rb', line 111 def program_change? self[0].program_change? end |
#realtime? ⇒ Boolean Also known as: rt?
126 127 128 |
# File 'lib/patchmaster/predicates.rb', line 126 def realtime? self[0].realtime? end |
#system? ⇒ Boolean Also known as: sys?
121 122 123 |
# File 'lib/patchmaster/predicates.rb', line 121 def system? self[0].system? end |