Implement songs import function

This commit is contained in:
Jack Andersen 2018-08-09 22:11:08 -10:00
parent d24e06f101
commit 45cb6be3c5
5 changed files with 167 additions and 109 deletions

View File

@ -7,6 +7,7 @@
#include <QMouseEvent> #include <QMouseEvent>
#include <QtSvg/QtSvg> #include <QtSvg/QtSvg>
#include "amuse/ContainerRegistry.hpp" #include "amuse/ContainerRegistry.hpp"
#include "amuse/SongConverter.hpp"
#include "Common.hpp" #include "Common.hpp"
#include "SongGroupEditor.hpp" #include "SongGroupEditor.hpp"
#include "SoundGroupEditor.hpp" #include "SoundGroupEditor.hpp"
@ -56,6 +57,7 @@ MainWindow::MainWindow(QWidget* parent)
connect(m_ui.actionRevert_Project, SIGNAL(triggered()), this, SLOT(revertAction())); connect(m_ui.actionRevert_Project, SIGNAL(triggered()), this, SLOT(revertAction()));
connect(m_ui.actionReload_Sample_Data, SIGNAL(triggered()), this, SLOT(reloadSampleDataAction())); connect(m_ui.actionReload_Sample_Data, SIGNAL(triggered()), this, SLOT(reloadSampleDataAction()));
connect(m_ui.actionImport_Groups, SIGNAL(triggered()), this, SLOT(importAction())); connect(m_ui.actionImport_Groups, SIGNAL(triggered()), this, SLOT(importAction()));
connect(m_ui.actionImport_Songs, SIGNAL(triggered()), this, SLOT(importSongsAction()));
connect(m_ui.actionExport_GameCube_Groups, SIGNAL(triggered()), this, SLOT(exportAction())); connect(m_ui.actionExport_GameCube_Groups, SIGNAL(triggered()), this, SLOT(exportAction()));
for (int i = 0; i < MaxRecentFiles; ++i) for (int i = 0; i < MaxRecentFiles; ++i)
@ -258,6 +260,7 @@ bool MainWindow::setProjectPath(const QString& path)
m_ui.actionSave_Project->setEnabled(true); m_ui.actionSave_Project->setEnabled(true);
m_ui.actionRevert_Project->setEnabled(true); m_ui.actionRevert_Project->setEnabled(true);
m_ui.actionReload_Sample_Data->setEnabled(true); m_ui.actionReload_Sample_Data->setEnabled(true);
m_ui.actionImport_Songs->setEnabled(true);
m_ui.actionExport_GameCube_Groups->setEnabled(true); m_ui.actionExport_GameCube_Groups->setEnabled(true);
m_ui.actionNew_Subproject->setEnabled(true); m_ui.actionNew_Subproject->setEnabled(true);
setWindowFilePath(path); setWindowFilePath(path);
@ -745,7 +748,8 @@ void MainWindow::reloadSampleDataAction()
void MainWindow::importAction() void MainWindow::importAction()
{ {
QString path = QFileDialog::getOpenFileName(this, tr("Import Project")); QString path = QFileDialog::getOpenFileName(this, tr("Import Project"),
m_projectModel ? m_projectModel->dir().path() : QString());
if (path.isEmpty()) if (path.isEmpty())
return; return;
@ -871,6 +875,40 @@ void MainWindow::importAction()
}); });
} }
void MainWindow::importSongsAction()
{
if (!m_projectModel)
return;
QString path = QFileDialog::getOpenFileName(this, tr("Import Songs"), m_projectModel->dir().path());
if (path.isEmpty())
return;
closeEditor();
std::vector<std::pair<amuse::SystemString, amuse::ContainerRegistry::SongData>> songs =
amuse::ContainerRegistry::LoadSongs(QStringToSysString(path).c_str());
for (const auto& song : songs)
{
int version;
bool isBig;
auto midiData =
amuse::SongConverter::SongToMIDI(song.second.m_data.get(), version, isBig);
if (!midiData.empty())
{
QFileInfo fi(m_projectModel->dir(), SysStringToQString(song.first + ".mid"));
QFile f(fi.filePath());
if (f.open(QFile::WriteOnly))
{
f.write((const char*)midiData.data(), midiData.size());
m_projectModel->setMIDIPathOfSong(
song.second.m_setupId, m_projectModel->dir().relativeFilePath(fi.filePath()));
}
}
}
}
void MainWindow::exportAction() void MainWindow::exportAction()
{ {

View File

@ -170,6 +170,7 @@ public slots:
void revertAction(); void revertAction();
void reloadSampleDataAction(); void reloadSampleDataAction();
void importAction(); void importAction();
void importSongsAction();
void exportAction(); void exportAction();
void newSubprojectAction(); void newSubprojectAction();

View File

@ -283,6 +283,7 @@
<addaction name="actionReload_Sample_Data"/> <addaction name="actionReload_Sample_Data"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionImport_Groups"/> <addaction name="actionImport_Groups"/>
<addaction name="actionImport_Songs"/>
<addaction name="actionExport_GameCube_Groups"/> <addaction name="actionExport_GameCube_Groups"/>
</widget> </widget>
<widget class="QMenu" name="menuProject"> <widget class="QMenu" name="menuProject">
@ -527,6 +528,14 @@
<string>Reload Sample &amp;Data</string> <string>Reload Sample &amp;Data</string>
</property> </property>
</action> </action>
<action name="actionImport_Songs">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>I&amp;mport Songs</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View File

@ -281,7 +281,7 @@
<name>MainWindow</name> <name>MainWindow</name>
<message> <message>
<location filename="../MainWindow.ui" line="14"/> <location filename="../MainWindow.ui" line="14"/>
<location filename="../MainWindow.cpp" line="184"/> <location filename="../MainWindow.cpp" line="186"/>
<source>Amuse</source> <source>Amuse</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -296,140 +296,145 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="290"/> <location filename="../MainWindow.ui" line="291"/>
<source>Pro&amp;ject</source> <source>Pro&amp;ject</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="305"/> <location filename="../MainWindow.ui" line="306"/>
<source>&amp;Audio</source> <source>&amp;Audio</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="312"/> <location filename="../MainWindow.ui" line="313"/>
<source>&amp;MIDI</source> <source>&amp;MIDI</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="319"/> <location filename="../MainWindow.ui" line="320"/>
<source>&amp;Edit</source> <source>&amp;Edit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="335"/> <location filename="../MainWindow.ui" line="336"/>
<source>&amp;New Project</source> <source>&amp;New Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="340"/> <location filename="../MainWindow.ui" line="341"/>
<source>&amp;Open Project</source> <source>&amp;Open Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="348"/> <location filename="../MainWindow.ui" line="349"/>
<source>&amp;Cut</source> <source>&amp;Cut</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="356"/> <location filename="../MainWindow.ui" line="357"/>
<source>C&amp;opy</source> <source>C&amp;opy</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="364"/> <location filename="../MainWindow.ui" line="365"/>
<source>&amp;Paste</source> <source>&amp;Paste</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="372"/> <location filename="../MainWindow.ui" line="373"/>
<source>&amp;Delete</source> <source>&amp;Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="377"/> <location filename="../MainWindow.ui" line="378"/>
<source>&amp;Import Groups</source> <source>&amp;Import Groups</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="380"/> <location filename="../MainWindow.ui" line="381"/>
<source>Ctrl+I</source> <source>Ctrl+I</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="392"/> <location filename="../MainWindow.ui" line="393"/>
<source>New SF&amp;X Group</source> <source>New SF&amp;X Group</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="404"/> <location filename="../MainWindow.ui" line="405"/>
<source>New Son&amp;g Group</source> <source>New Son&amp;g Group</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="416"/> <location filename="../MainWindow.ui" line="417"/>
<source>New Sound &amp;Macro</source> <source>New Sound &amp;Macro</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="428"/> <location filename="../MainWindow.ui" line="429"/>
<source>New &amp;Keymap</source> <source>New &amp;Keymap</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="440"/> <location filename="../MainWindow.ui" line="441"/>
<source>New &amp;Layers</source> <source>New &amp;Layers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="448"/> <location filename="../MainWindow.ui" line="449"/>
<source>&amp;Output Device:</source> <source>&amp;Output Device:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="456"/> <location filename="../MainWindow.ui" line="457"/>
<source>&amp;Input Device:</source> <source>&amp;Input Device:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="464"/> <location filename="../MainWindow.ui" line="465"/>
<source>&amp;Export GameCube Groups</source> <source>&amp;Export GameCube Groups</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="467"/> <location filename="../MainWindow.ui" line="468"/>
<source>Ctrl+E</source> <source>Ctrl+E</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="479"/> <location filename="../MainWindow.ui" line="480"/>
<source>&amp;New Subproject</source> <source>&amp;New Subproject</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="491"/> <location filename="../MainWindow.ui" line="492"/>
<source>New &amp;ADSR</source> <source>New &amp;ADSR</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="503"/> <location filename="../MainWindow.ui" line="504"/>
<source>New &amp;Curve</source> <source>New &amp;Curve</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="511"/> <location filename="../MainWindow.ui" line="512"/>
<source>&amp;Save Project</source> <source>&amp;Save Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="519"/> <location filename="../MainWindow.ui" line="520"/>
<source>&amp;Revert Project</source> <source>&amp;Revert Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.ui" line="527"/> <location filename="../MainWindow.ui" line="528"/>
<source>Reload Sample &amp;Data</source> <source>Reload Sample &amp;Data</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../MainWindow.ui" line="536"/>
<source>I&amp;mport Songs</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../Common.cpp" line="35"/> <location filename="../Common.cpp" line="35"/>
<source>A directory at &apos;%1/%2&apos; could not be created.</source> <source>A directory at &apos;%1/%2&apos; could not be created.</source>
@ -466,264 +471,269 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="69"/> <location filename="../MainWindow.cpp" line="71"/>
<source>Clear Recent Projects</source> <source>Clear Recent Projects</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="75"/> <location filename="../MainWindow.cpp" line="77"/>
<source>Quit</source> <source>Quit</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="192"/> <location filename="../MainWindow.cpp" line="194"/>
<source>Amuse [%1/%2/%3]</source> <source>Amuse [%1/%2/%3]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="197"/> <location filename="../MainWindow.cpp" line="199"/>
<source>Amuse [%1]</source> <source>Amuse [%1]</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="228"/> <location filename="../MainWindow.cpp" line="230"/>
<location filename="../MainWindow.cpp" line="625"/> <location filename="../MainWindow.cpp" line="628"/>
<source>The directory at &apos;%1&apos; must not be empty.</source> <source>The directory at &apos;%1&apos; must not be empty.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="229"/> <location filename="../MainWindow.cpp" line="231"/>
<location filename="../MainWindow.cpp" line="626"/> <location filename="../MainWindow.cpp" line="629"/>
<source>Directory empty</source> <source>Directory empty</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="234"/> <location filename="../MainWindow.cpp" line="236"/>
<source>The directory at &apos;%1&apos; must exist for the Amuse editor.</source> <source>The directory at &apos;%1&apos; must exist for the Amuse editor.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="235"/> <location filename="../MainWindow.cpp" line="237"/>
<source>Directory does not exist</source> <source>Directory does not exist</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="238"/> <location filename="../MainWindow.cpp" line="240"/>
<source>__amuse_test__</source> <source>__amuse_test__</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="243"/> <location filename="../MainWindow.cpp" line="245"/>
<source>The directory at &apos;%1&apos; must be writable for the Amuse editor: %2</source> <source>The directory at &apos;%1&apos; must be writable for the Amuse editor: %2</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="245"/> <location filename="../MainWindow.cpp" line="247"/>
<source>Unable to write to directory</source> <source>Unable to write to directory</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="292"/> <location filename="../MainWindow.cpp" line="295"/>
<source>No Audio Devices Found</source> <source>No Audio Devices Found</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="315"/> <location filename="../MainWindow.cpp" line="318"/>
<source>No MIDI Devices Found</source> <source>No MIDI Devices Found</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="371"/> <location filename="../MainWindow.cpp" line="374"/>
<source>SUSTAIN</source> <source>SUSTAIN</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="608"/> <location filename="../MainWindow.cpp" line="611"/>
<source>New Project</source> <source>New Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="631"/> <location filename="../MainWindow.cpp" line="634"/>
<source>The directory at &apos;%1&apos; does not exist.</source> <source>The directory at &apos;%1&apos; does not exist.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="632"/> <location filename="../MainWindow.cpp" line="635"/>
<source>Bad Directory</source> <source>Bad Directory</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="647"/> <location filename="../MainWindow.cpp" line="650"/>
<source>Opening</source> <source>Opening</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="647"/> <location filename="../MainWindow.cpp" line="650"/>
<location filename="../MainWindow.cpp" line="726"/> <location filename="../MainWindow.cpp" line="729"/>
<location filename="../MainWindow.cpp" line="809"/> <location filename="../MainWindow.cpp" line="813"/>
<location filename="../MainWindow.cpp" line="854"/> <location filename="../MainWindow.cpp" line="858"/>
<source>Scanning Project</source> <source>Scanning Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="659"/> <location filename="../MainWindow.cpp" line="662"/>
<source>Opening %1</source> <source>Opening %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="672"/> <location filename="../MainWindow.cpp" line="675"/>
<source>Open Project</source> <source>Open Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="726"/> <location filename="../MainWindow.cpp" line="729"/>
<source>Reloading Samples</source> <source>Reloading Samples</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="738"/> <location filename="../MainWindow.cpp" line="741"/>
<source>Scanning %1</source> <source>Scanning %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="748"/> <location filename="../MainWindow.cpp" line="751"/>
<source>Import Project</source> <source>Import Project</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="757"/> <location filename="../MainWindow.cpp" line="761"/>
<source>The file at &apos;%1&apos; could not be interpreted as a MusyX container.</source> <source>The file at &apos;%1&apos; could not be interpreted as a MusyX container.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="758"/> <location filename="../MainWindow.cpp" line="762"/>
<source>Unsupported MusyX Container</source> <source>Unsupported MusyX Container</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="763"/> <location filename="../MainWindow.cpp" line="767"/>
<source>Sample Import Mode</source> <source>Sample Import Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="764"/> <location filename="../MainWindow.cpp" line="768"/>
<source>Amuse can import samples as WAV files for ease of editing, import original compressed data for lossless repacking, or both. Exporting the project will prefer whichever version was modified most recently.</source> <source>Amuse can import samples as WAV files for ease of editing, import original compressed data for lossless repacking, or both. Exporting the project will prefer whichever version was modified most recently.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="768"/> <location filename="../MainWindow.cpp" line="772"/>
<source>Import Compressed</source> <source>Import Compressed</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="768"/> <location filename="../MainWindow.cpp" line="772"/>
<source>Import WAVs</source> <source>Import WAVs</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="768"/> <location filename="../MainWindow.cpp" line="772"/>
<source>Import Both</source> <source>Import Both</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="784"/> <location filename="../MainWindow.cpp" line="788"/>
<source>Raw Import Mode</source> <source>Raw Import Mode</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="785"/> <location filename="../MainWindow.cpp" line="789"/>
<source>Would you like to scan for all MusyX group files in this directory?</source> <source>Would you like to scan for all MusyX group files in this directory?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="795"/> <location filename="../MainWindow.cpp" line="799"/>
<source>Project Name</source> <source>Project Name</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="795"/> <location filename="../MainWindow.cpp" line="799"/>
<source>What should this project be named?</source> <source>What should this project be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="809"/> <location filename="../MainWindow.cpp" line="813"/>
<location filename="../MainWindow.cpp" line="854"/> <location filename="../MainWindow.cpp" line="858"/>
<source>Importing</source> <source>Importing</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="821"/> <location filename="../MainWindow.cpp" line="825"/>
<location filename="../MainWindow.cpp" line="863"/> <location filename="../MainWindow.cpp" line="867"/>
<source>Importing %1</source> <source>Importing %1</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="946"/> <location filename="../MainWindow.cpp" line="883"/>
<source>Import Songs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../MainWindow.cpp" line="984"/>
<source>New Subproject</source> <source>New Subproject</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="964"/> <location filename="../MainWindow.cpp" line="1002"/>
<source>New SFX Group</source> <source>New SFX Group</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="965"/> <location filename="../MainWindow.cpp" line="1003"/>
<source>What should the new SFX group in %1 be named?</source> <source>What should the new SFX group in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="986"/> <location filename="../MainWindow.cpp" line="1024"/>
<source>New Song Group</source> <source>New Song Group</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="987"/> <location filename="../MainWindow.cpp" line="1025"/>
<source>What should the new Song group in %1 be named?</source> <source>What should the new Song group in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1034"/> <location filename="../MainWindow.cpp" line="1072"/>
<source>New ADSR</source> <source>New ADSR</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1035"/> <location filename="../MainWindow.cpp" line="1073"/>
<source>What should the new ADSR in %1 be named?</source> <source>What should the new ADSR in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1056"/> <location filename="../MainWindow.cpp" line="1094"/>
<source>New Curve</source> <source>New Curve</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1057"/> <location filename="../MainWindow.cpp" line="1095"/>
<source>What should the new Curve in %1 be named?</source> <source>What should the new Curve in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1078"/> <location filename="../MainWindow.cpp" line="1116"/>
<source>New Keymap</source> <source>New Keymap</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1079"/> <location filename="../MainWindow.cpp" line="1117"/>
<source>What should the new Keymap in %1 be named?</source> <source>What should the new Keymap in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1100"/> <location filename="../MainWindow.cpp" line="1138"/>
<source>New Layers</source> <source>New Layers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="1101"/> <location filename="../MainWindow.cpp" line="1139"/>
<source>What should the new Layers in %1 be named?</source> <source>What should the new Layers in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../MainWindow.cpp" line="947"/> <location filename="../MainWindow.cpp" line="985"/>
<source>What should this subproject be named?</source> <source>What should this subproject be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -739,107 +749,107 @@
<context> <context>
<name>NewSoundMacroDialog</name> <name>NewSoundMacroDialog</name>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="240"/> <location filename="../NewSoundMacroDialog.cpp" line="238"/>
<source>Basic Macro</source> <source>Basic Macro</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="241"/> <location filename="../NewSoundMacroDialog.cpp" line="239"/>
<source>Looped</source> <source>Looped</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="242"/> <location filename="../NewSoundMacroDialog.cpp" line="240"/>
<source>Loop Release</source> <source>Loop Release</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="243"/> <location filename="../NewSoundMacroDialog.cpp" line="241"/>
<source>Loop Soft Release</source> <source>Loop Soft Release</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="244"/> <location filename="../NewSoundMacroDialog.cpp" line="242"/>
<source>Loop Soft Release No Click</source> <source>Loop Soft Release No Click</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="245"/> <location filename="../NewSoundMacroDialog.cpp" line="243"/>
<source>Loop ADSR</source> <source>Loop ADSR</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="246"/> <location filename="../NewSoundMacroDialog.cpp" line="244"/>
<source>Loop ADSR Soft Release</source> <source>Loop ADSR Soft Release</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="247"/> <location filename="../NewSoundMacroDialog.cpp" line="245"/>
<source>Loop Hold</source> <source>Loop Hold</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="248"/> <location filename="../NewSoundMacroDialog.cpp" line="246"/>
<source>One-Shot</source> <source>One-Shot</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="249"/> <location filename="../NewSoundMacroDialog.cpp" line="247"/>
<source>One-Shot Fixed Note</source> <source>One-Shot Fixed Note</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="250"/> <location filename="../NewSoundMacroDialog.cpp" line="248"/>
<source>One-Shot No Click</source> <source>One-Shot No Click</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="251"/> <location filename="../NewSoundMacroDialog.cpp" line="249"/>
<source>One-Shot Fixed No Click</source> <source>One-Shot Fixed No Click</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="252"/> <location filename="../NewSoundMacroDialog.cpp" line="250"/>
<source>Bubbles</source> <source>Bubbles</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="253"/> <location filename="../NewSoundMacroDialog.cpp" line="251"/>
<source>Down Trigger</source> <source>Down Trigger</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="254"/> <location filename="../NewSoundMacroDialog.cpp" line="252"/>
<source>Long Fade in and Stop</source> <source>Long Fade in and Stop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="255"/> <location filename="../NewSoundMacroDialog.cpp" line="253"/>
<source>Fade in and Stop</source> <source>Fade in and Stop</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="256"/> <location filename="../NewSoundMacroDialog.cpp" line="254"/>
<source>Random Trigger</source> <source>Random Trigger</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="257"/> <location filename="../NewSoundMacroDialog.cpp" line="255"/>
<source>Simple Play Sample</source> <source>Simple Play Sample</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="270"/> <location filename="../NewSoundMacroDialog.cpp" line="268"/>
<source>New Sound Macro</source> <source>New Sound Macro</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="282"/> <location filename="../NewSoundMacroDialog.cpp" line="280"/>
<source>What should the new macro in %1 be named?</source> <source>What should the new macro in %1 be named?</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../NewSoundMacroDialog.cpp" line="284"/> <location filename="../NewSoundMacroDialog.cpp" line="282"/>
<source>Sound Macro Template</source> <source>Sound Macro Template</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>

View File

@ -939,7 +939,7 @@ void Voice::keyOff()
loadMacroObject(m_keyoffTrap.macroId, m_keyoffTrap.macroStep, m_state.m_ticksPerSec, m_state.m_initKey, loadMacroObject(m_keyoffTrap.macroId, m_keyoffTrap.macroStep, m_state.m_ticksPerSec, m_state.m_initKey,
m_state.m_initVel, m_state.m_initMod); m_state.m_initVel, m_state.m_initMod);
} }
else if (!m_curSample || m_curSample->m_loopLengthSamples) else
_macroKeyOff(); _macroKeyOff();
for (const ObjToken<Voice>& vox : m_childVoices) for (const ObjToken<Voice>& vox : m_childVoices)