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_channel_numbers_from_one, #print_decimal_numbers, #print_note_names, #status, #time_from_start

Instance Method Summary collapse

Methods inherited from Event

#<=>, #channel_to_s, #data_as_bytes, #number_to_s, #quantize_to

Instance Attribute Details

#channelObject

MIDI channel, 0-15.


86
87
88
# File 'lib/midilib/event.rb', line 86

def channel
  @channel
end

Instance Method Details

#to_sObject


94
95
96
# File 'lib/midilib/event.rb', line 94

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