Ordered sequence of MIDI events with editing operations.
More...
#include <midi_message_sequence.hpp>
|
| | MidiMessageSequence ()=default |
| void | add_event (const TimestampedMidiEvent &event) |
| | Add an event (maintains sorted order by timestamp).
|
| void | add_note_on (double timestamp, int channel, int note, int velocity) |
| | Add a note-on event.
|
| void | add_note_off (double timestamp, int channel, int note) |
| | Add a note-off event.
|
| void | add_cc (double timestamp, int channel, int cc, int value) |
| | Add a CC event.
|
| int | size () const |
| | Number of events.
|
| const TimestampedMidiEvent & | operator[] (int i) const |
| | Access event by index.
|
| void | clear () |
| | Clear all events.
|
| double | duration () const |
| | Duration (timestamp of last event).
|
| std::vector< const TimestampedMidiEvent * > | events_in_range (double start, double end) const |
| | Find events in a time range [start, end).
|
| std::optional< int > | find_note_off (int note_on_index) const |
| | Find matching note-off for a note-on event.
|
| void | offset_timestamps (double offset) |
| | Shift all timestamps by an offset.
|
| const std::vector< TimestampedMidiEvent > & | events () const |
| | Get all events (const).
|
| auto | begin () const |
| | Iterator support.
|
| auto | end () const |
Ordered sequence of MIDI events with editing operations.
◆ MidiMessageSequence()
| pulp::midi::MidiMessageSequence::MidiMessageSequence |
( |
| ) |
|
|
default |
◆ add_cc()
| void pulp::midi::MidiMessageSequence::add_cc |
( |
double | timestamp, |
|
|
int | channel, |
|
|
int | cc, |
|
|
int | value ) |
|
inline |
◆ add_event()
Add an event (maintains sorted order by timestamp).
◆ add_note_off()
| void pulp::midi::MidiMessageSequence::add_note_off |
( |
double | timestamp, |
|
|
int | channel, |
|
|
int | note ) |
|
inline |
◆ add_note_on()
| void pulp::midi::MidiMessageSequence::add_note_on |
( |
double | timestamp, |
|
|
int | channel, |
|
|
int | note, |
|
|
int | velocity ) |
|
inline |
◆ begin()
| auto pulp::midi::MidiMessageSequence::begin |
( |
| ) |
const |
|
inline |
◆ clear()
| void pulp::midi::MidiMessageSequence::clear |
( |
| ) |
|
|
inline |
◆ duration()
| double pulp::midi::MidiMessageSequence::duration |
( |
| ) |
const |
|
inline |
Duration (timestamp of last event).
◆ end()
| auto pulp::midi::MidiMessageSequence::end |
( |
| ) |
const |
|
inline |
◆ events()
◆ events_in_range()
| std::vector< const TimestampedMidiEvent * > pulp::midi::MidiMessageSequence::events_in_range |
( |
double | start, |
|
|
double | end ) const |
|
inline |
Find events in a time range [start, end).
◆ find_note_off()
| std::optional< int > pulp::midi::MidiMessageSequence::find_note_off |
( |
int | note_on_index | ) |
const |
|
inline |
Find matching note-off for a note-on event.
◆ offset_timestamps()
| void pulp::midi::MidiMessageSequence::offset_timestamps |
( |
double | offset | ) |
|
|
inline |
Shift all timestamps by an offset.
◆ operator[]()
◆ size()
| int pulp::midi::MidiMessageSequence::size |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: