|
lmms
Cross-platform music production software
|
Represents a MIDI track. More...
#include <MidiFile.h>
Public Member Functions | |
| void | setChannel (std::uint8_t channel) |
| void | addNote (std::uint8_t pitch, std::uint8_t volume, double realTime, double duration) |
| Add both NOTE_ON and NOTE_OFF effects. | |
| void | addTempo (std::uint32_t tempo, tick_t time) |
| Add a tempo mark. | |
| void | addPatch (MidiPatch patch, tick_t time) |
| Add bank select and program change events. | |
| void | addName (std::string name, tick_t time) |
| Add a track name event. | |
| void | writeToBuffer () |
| Write MIDI track to buffer. | |
Private Member Functions | |
| void | addEvent (Event &&event, tick_t time) |
| Append a single event to vector. | |
| void | writeMIDIToBuffer () |
| Write the meta data and note data to buffer. | |
| void | writeEventsToBuffer () |
| Write the sorted events in m_events to buffer. | |
| void | writeSingleEventToBuffer (Event &event) |
| Write a single event to buffer. | |
Private Attributes | |
| std::vector< Event > | m_events |
| Variable-length vector of events. | |
| std::uint8_t | m_channel = 0 |
| Track channel number. | |
Additional Inherited Members | |
| Public Attributes inherited from lmms::MidiFile::Section | |
| std::vector< std::uint8_t > | m_buffer |
| Constant-capacity buffer vector to be written to stream. | |
| Protected Member Functions inherited from lmms::MidiFile::Section | |
| Section () | |
| Reserve constant space for BufferSize capacity vector. | |
| void | writeBytes (std::span< const std::uint8_t > bytes) |
| Write bytes to buffer. | |
| void | writeBytes (std::initializer_list< std::uint8_t > bytes) |
| Write bytes to buffer. | |
| void | writeVarLength (std::uint32_t val) |
| Write a MIDI-compatible variable length stream. | |
| void | writeBigEndian4 (std::uint32_t val) |
| Buffer gets four 8-bit values from left to right. | |
| void | writeBigEndian2 (std::uint16_t val) |
| Buffer gets two 8-bit values from left to right. | |
Represents a MIDI track.
Append a single event to vector.
| void lmms::MidiFile::Track::addName | ( | std::string | name, |
| tick_t | time ) |
Add a track name event.
| void lmms::MidiFile::Track::addNote | ( | std::uint8_t | pitch, |
| std::uint8_t | volume, | ||
| double | realTime, | ||
| double | duration ) |
Add bank select and program change events.
| void lmms::MidiFile::Track::addTempo | ( | std::uint32_t | tempo, |
| tick_t | time ) |
Add a tempo mark.
|
inline |
|
private |
Write the sorted events in m_events to buffer.
|
private |
Write the meta data and note data to buffer.
|
private |
Write a single event to buffer.
|
virtual |
Write MIDI track to buffer.
Reimplemented from lmms::MidiFile::Section.
|
private |
Track channel number.
|
private |
Variable-length vector of events.