Timestamped MIDI event combining a choc::midi::ShortMessage with timing info. More...
#include <message.hpp>
Public Member Functions | |
| const uint8_t * | data () const |
| Raw MIDI byte data (for format adapters that need direct byte access). | |
| uint32_t | size () const |
| Number of bytes in the MIDI message (1-3). | |
| bool | is_note_on () const |
| bool | is_note_off () const |
| bool | is_cc () const |
| bool | is_pitch_bend () const |
| bool | is_program_change () const |
| bool | is_poly_pressure () const |
| uint8_t | channel () const |
| MIDI channel (0-15). | |
| uint8_t | note () const |
| uint8_t | velocity () const |
| uint8_t | cc_number () const |
| uint8_t | cc_value () const |
Static Public Member Functions | |
| static MidiEvent | note_on (uint8_t channel, uint8_t note, uint8_t velocity) |
| Create a Note On event. | |
| static MidiEvent | note_off (uint8_t channel, uint8_t note, uint8_t velocity=0) |
| Create a Note Off event. | |
| static MidiEvent | cc (uint8_t channel, uint8_t controller, uint8_t value) |
| Create a Control Change event. | |
| static MidiEvent | pitch_bend (uint8_t channel, uint16_t value) |
| Create a Pitch Bend event. | |
| static MidiEvent | poly_pressure (uint8_t channel, uint8_t note, uint8_t pressure) |
| Create a Polyphonic Key Pressure (poly aftertouch) event. | |
| static MidiEvent | program_change (uint8_t channel, uint8_t program) |
| Create a Program Change event. | |
Public Attributes | |
| choc::midi::ShortMessage | message |
| int32_t | sample_offset = 0 |
| Sample position within the current buffer block. | |
| double | timestamp = 0.0 |
| Absolute time in seconds (for device I/O). | |
Timestamped MIDI event combining a choc::midi::ShortMessage with timing info.
Two timing fields serve different contexts:
sample_offset for sample-accurate positioning within a processing block.timestamp for absolute time in device I/O scenarios.Factory methods create common message types. Query methods delegate to choc::midi for parsing.
|
inlinestatic |
Create a Control Change event.
| controller | CC number (0-127). |
| value | CC value (0-127). |
|
inline |
|
inline |
|
inline |
MIDI channel (0-15).
|
inline |
Raw MIDI byte data (for format adapters that need direct byte access).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Create a Note Off event.
|
inlinestatic |
Create a Note On event.
| channel | MIDI channel (0-15). |
| note | Note number (0-127). |
| velocity | Velocity (0-127). |
|
inlinestatic |
Create a Pitch Bend event.
| value | 14-bit pitch bend value (0-16383, center = 8192). |
|
inlinestatic |
Create a Polyphonic Key Pressure (poly aftertouch) event.
Distinct from channel pressure (status 0xD0), which applies to every sounding note on the channel: poly pressure targets one key.
| note | Note number (0-127) the pressure applies to. |
| pressure | Pressure (0-127). |
|
inlinestatic |
Create a Program Change event.
|
inline |
Number of bytes in the MIDI message (1-3).
|
inline |
| choc::midi::ShortMessage pulp::midi::MidiEvent::message |
| int32_t pulp::midi::MidiEvent::sample_offset = 0 |
Sample position within the current buffer block.
| double pulp::midi::MidiEvent::timestamp = 0.0 |
Absolute time in seconds (for device I/O).