Fix MIDI export (#3733)
* Re-enable MIDI export * Fix logic for processing BB tracks and BB notes * Consider master pitch and base note in MIDI export. * Cut BB notes at the end of BB pattern.
This commit is contained in:
@@ -1444,14 +1444,15 @@ void Song::exportProjectMidi()
|
||||
|
||||
// instantiate midi export plugin
|
||||
TrackContainer::TrackList tracks;
|
||||
tracks += Engine::getSong()->tracks();
|
||||
tracks += Engine::getBBTrackContainer()->tracks();
|
||||
TrackContainer::TrackList tracks_BB;
|
||||
tracks = Engine::getSong()->tracks();
|
||||
tracks_BB = Engine::getBBTrackContainer()->tracks();
|
||||
ExportFilter *exf = dynamic_cast<ExportFilter *> (Plugin::instantiate("midiexport", NULL, NULL));
|
||||
if (exf==NULL) {
|
||||
qDebug() << "failed to load midi export filter!";
|
||||
return;
|
||||
}
|
||||
exf->tryExport(tracks, Engine::getSong()->getTempo(), export_filename);
|
||||
exf->tryExport(tracks, tracks_BB, getTempo(), m_masterPitchModel.value(), export_filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -300,12 +300,11 @@ void MainWindow::finalize()
|
||||
SLOT( exportProjectTracks() ),
|
||||
Qt::CTRL + Qt::SHIFT + Qt::Key_E );
|
||||
|
||||
// temporarily disabled broken MIDI export
|
||||
/*project_menu->addAction( embed::getIconPixmap( "midi_file" ),
|
||||
project_menu->addAction( embed::getIconPixmap( "midi_file" ),
|
||||
tr( "Export &MIDI..." ),
|
||||
Engine::getSong(),
|
||||
SLOT( exportProjectMidi() ),
|
||||
Qt::CTRL + Qt::Key_M );*/
|
||||
Qt::CTRL + Qt::Key_M );
|
||||
|
||||
// Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071
|
||||
#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000) && (QT_VERSION < 0x050600))
|
||||
|
||||
Reference in New Issue
Block a user