Class: MIDI::ChannelEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/midilib/event.rb

Overview

The abstract superclass of all channel events (events that have a MIDI channel, like notes and program changes).

Instance Attribute Summary collapse

Attributes inherited from Event

#delta_time, #print_decimal_numbers, #print_note_names, #status, #time_from_start

Instance Method Summary collapse

Methods inherited from Event

#<=>, #channel?, #data_as_bytes, #meta?, #note?, #note_off?, #note_on?, #number_to_s, #quantize_to, #realtime?, #system?

Instance Attribute Details

#channelObject

MIDI channel, 0-15.



118
119
120
# File 'lib/midilib/event.rb', line 118

def channel
  @channel
end

Instance Method Details

#to_sObject



127
128
129
# File 'lib/midilib/event.rb', line 127

def to_s
	return super << "ch #{number_to_s(@channel)} "
end