Class: Array

Inherits:
Object
  • Object
show all
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

Instance Method Details

#channelObject



76
77
78
# File 'lib/patchmaster/predicates.rb', line 76

def channel
  self[0].channel
end

#channel?Boolean Also known as: chan?

Returns:

  • (Boolean)


80
81
82
# File 'lib/patchmaster/predicates.rb', line 80

def channel?
  self[0].channel?
end

#controller?Boolean Also known as: ctrl?

Returns:

  • (Boolean)


106
107
108
# File 'lib/patchmaster/predicates.rb', line 106

def controller?
  self[0].controller?
end

#high_nibbleObject



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).

Returns:

  • (Boolean)


102
103
104
# File 'lib/patchmaster/predicates.rb', line 102

def note?
  self[0].note?
end

#note_off?Boolean Also known as: off?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


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?

Returns:

  • (Boolean)


111
112
113
# File 'lib/patchmaster/predicates.rb', line 111

def program_change?
  self[0].program_change?
end

#realtime?Boolean Also known as: rt?

Returns:

  • (Boolean)


126
127
128
# File 'lib/patchmaster/predicates.rb', line 126

def realtime?
  self[0].realtime?
end

#system?Boolean Also known as: sys?

Returns:

  • (Boolean)


121
122
123
# File 'lib/patchmaster/predicates.rb', line 121

def system?
  self[0].system?
end