MIDI file handling.
More...
#include <src/gui/backend/io/midi_file.h>
|
| enum class | Format { MIDI0
, MIDI1
, MIDI2
} |
| using | TrackIndex = unsigned int |
|
|
| MidiFile (Format format) |
| | Construct a new Midi File object for writing.
|
| | MidiFile (const std::filesystem::path &path) |
| | Construct a new Midi File object for reading.
|
|
bool | track_has_midi_note_events (TrackIndex track_idx) const |
| | Returns whether the given track in the midi file has data.
|
|
int | get_num_tracks (bool non_empty_only) const |
| | Returns the number of tracks in the MIDI file.
|
|
Format | get_format () const |
| int | get_ppqn () const |
| | Get the PPQN (Parts Per Quarter Note) of the MIDI file.
|
| void | into_clip (structure::arrangement::MidiClip &clip, int midi_track_idx) const |
| | Reads the contents of the MIDI file into a clip.
|
MIDI file handling.
Definition at line 34 of file midi_file.h.
◆ TrackIndex
| using zrythm::MidiFile::TrackIndex = unsigned int |
◆ Format
| enum class zrythm::MidiFile::Format |
|
strong |
◆ MidiFile()
| zrythm::MidiFile::MidiFile |
( |
const std::filesystem::path & | path | ) |
|
Construct a new Midi File object for reading.
- Parameters
-
- Exceptions
-
◆ export_midi_clip_to_midi_file()
| void zrythm::MidiFile::export_midi_clip_to_midi_file |
( |
const structure::arrangement::MidiClip & | clip, |
|
|
const std::filesystem::path & | full_path, |
|
|
int | midi_version, |
|
|
bool | export_full ) |
|
static |
Exports the Clip to a specified MIDI file.
FIXME: this needs refactoring. taken out of MidiClip class.
- Parameters
-
| full_path | Absolute path to the MIDI file. |
| export_full | Traverse loops and export the MIDI file as it would be played inside Zrythm. If this is false, only the original clip (from true start to true end) is exported. |
◆ get_ppqn()
| int zrythm::MidiFile::get_ppqn |
( |
| ) |
const |
Get the PPQN (Parts Per Quarter Note) of the MIDI file.
- Returns
- int
- Exceptions
-
◆ into_clip()
Reads the contents of the MIDI file into a clip.
- Parameters
-
| clip | A freshly created clip to fill. |
| midi_track_idx | The index of this track, starting from 0. This will be sequential, ie, if idx 1 is requested and the MIDI file only has tracks 5 and 7, it will use track 7. |
- Exceptions
-
The documentation for this class was generated from the following file: