mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
Import MIDI markers direct to the source (3/4)
This commit is contained in:
parent
4e77bbdd96
commit
c8711aacc6
1 changed files with 9 additions and 0 deletions
|
|
@ -729,6 +729,15 @@ Session::import_files (ImportStatus& status)
|
|||
} else if (smf_reader) { // midi
|
||||
status.doing_what = string_compose(_("Loading MIDI file %1"), *p);
|
||||
write_midi_data_to_new_files (smf_reader.get(), status, newfiles, status.split_midi_channels);
|
||||
|
||||
if (status.import_markers) {
|
||||
smf_reader->load_markers ();
|
||||
for (auto const& m : smf_reader->markers ()) {
|
||||
Temporal::Beats beats = Temporal::Beats::from_double (m.time_pulses / (double) smf_reader->ppqn ());
|
||||
// XXX import to all sources (in case split_midi_channels is set)?
|
||||
newfiles.front()->add_cue_marker (CueMarker (m.text, timepos_t (beats)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++status.current;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue