Class: MIDI::PolyPressure
- Inherits:
-
NoteEvent
- Object
- Event
- ChannelEvent
- NoteEvent
- MIDI::PolyPressure
- Defined in:
- lib/midilib/event.rb
Constant Summary
Constants inherited from NoteEvent
Instance Attribute Summary
Attributes inherited from NoteEvent
Attributes inherited from ChannelEvent
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
-
#initialize(channel = 0, note = 64, value = 0, delta_time = 0) ⇒ PolyPressure
constructor
A new instance of PolyPressure.
- #pressure ⇒ Object
- #pressure=(val) ⇒ Object
- #to_s ⇒ Object
Methods inherited from NoteEvent
#data_as_bytes, #note_to_s, #pch_oct
Methods inherited from Event
#<=>, #channel_to_s, #data_as_bytes, #number_to_s, #quantize_to
Constructor Details
#initialize(channel = 0, note = 64, value = 0, delta_time = 0) ⇒ PolyPressure
Returns a new instance of PolyPressure.
165 166 167 |
# File 'lib/midilib/event.rb', line 165 def initialize(channel = 0, note = 64, value = 0, delta_time = 0) super(POLY_PRESSURE, channel, note, value, delta_time) end |
Instance Method Details
#pressure ⇒ Object
169 170 171 |
# File 'lib/midilib/event.rb', line 169 def pressure return @velocity end |
#pressure=(val) ⇒ Object
172 173 174 |
# File 'lib/midilib/event.rb', line 172 def pressure=(val) @velocity = val end |
#to_s ⇒ Object
175 176 177 178 |
# File 'lib/midilib/event.rb', line 175 def to_s return super << "poly press #{channel_to_s(@channel)} #{note_to_s} #{number_to_s(@velocity)}" end |