--- qsampler/trunk/src/qsamplerMainForm.ui.h 2004/06/26 14:27:25 149 +++ qsampler/trunk/src/qsamplerMainForm.ui.h 2004/09/29 09:01:35 263 @@ -601,10 +601,15 @@ ts << "ADD CHANNEL" << endl; ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannelID << " " << pChannel->audioDriver() << endl; ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannelID << " " << pChannel->midiDriver() << endl; - // ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl; - ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " " << pChannel->midiChannel() << endl; + ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl; + ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " "; + if (pChannel->midiChannel() > 0) + ts << pChannel->midiChannel(); + else + ts << "ALL"; + ts << endl; ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannelID << endl; - ts << "LOAD INSTRUMENT NON_MODAL " << pChannel->instrumentFile() << " " << pChannel->instrumentNr() << " " << iChannelID << endl; + ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannelID << endl; ts << "SET CHANNEL VOLUME " << iChannelID << " " << pChannel->volume() << endl; ts << endl; // Try to keep it snappy :) @@ -678,6 +683,34 @@ } +// Reset the sampler instance. +void qsamplerMainForm::fileReset (void) +{ + if (m_pClient == NULL) + return; + + // Ask user whether he/she want's an internal sampler reset... + if (QMessageBox::warning(this, tr("Warning"), + tr("Resetting the sampler instance will close\n" + "all device and channel configurations.\n\n" + "Please note that this operation may cause\n" + "temporary MIDI and Audio disruption\n\n" + "Do you want to reset the sampler engine now?"), + tr("Reset"), tr("Cancel")) > 0) + return; + + // Just do the reset, after closing down current session... + if (closeSession(true) && ::lscp_reset_sampler(m_pClient) != LSCP_OK) { + appendMessagesClient("lscp_reset_sampler"); + appendMessagesError(tr("Could not reset sampler instance.\n\nSorry.")); + return; + } + + // Log this. + appendMessages(tr("Sampler reset.")); +} + + // Restart the client/server instance. void qsamplerMainForm::fileRestart (void) { @@ -800,7 +833,7 @@ return; // Just invoque the channel strip procedure. - pChannel->channelSetup(); + pChannel->showChannelSetup(false); } @@ -1024,6 +1057,11 @@ sText += tr("Debugging option enabled."); sText += "
"; #endif +#ifndef CONFIG_LIBGIG + sText += ""; + sText += tr("GIG (libgig) file support disabled."); + sText += "
"; +#endif sText += "
\n"; sText += tr("Using") + ": "; sText += ::lscp_client_package(); @@ -1064,6 +1102,7 @@ fileOpenAction->setEnabled(bHasClient); fileSaveAction->setEnabled(bHasClient && m_iDirtyCount > 0); fileSaveAsAction->setEnabled(bHasClient); + fileResetAction->setEnabled(bHasClient); fileRestartAction->setEnabled(bHasClient || m_pServer == NULL); editAddChannelAction->setEnabled(bHasClient); editRemoveChannelAction->setEnabled(bHasChannel); @@ -1326,7 +1365,7 @@ // Before we show it up, may be we'll // better ask for some initial values? if (bPrompt) - pChannel->channelSetup(); + pChannel->showChannelSetup(true); // Now we show up us to the world. pChannel->show(); // Only then, we'll auto-arrange...