305 |
if (bDecode) { |
if (bDecode) { |
306 |
files = QStringList::split('\n', sText); |
files = QStringList::split('\n', sText); |
307 |
for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) |
for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) |
308 |
*iter = (*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null); |
*iter = QUrl((*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null)).path(); |
309 |
} |
} |
310 |
} |
} |
311 |
|
|
329 |
return; |
return; |
330 |
|
|
331 |
for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) { |
for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) { |
332 |
const QString& sPath = QUrl(*iter).path(); |
const QString& sPath = *iter; |
333 |
if (qsamplerChannel::isInstrumentFile(sPath)) { |
if (qsamplerChannel::isInstrumentFile(sPath)) { |
334 |
// Try to create a new channel from instrument file... |
// Try to create a new channel from instrument file... |
335 |
qsamplerChannel *pChannel = new qsamplerChannel(this); |
qsamplerChannel *pChannel = new qsamplerChannel(this); |
647 |
if (pChannelStrip) { |
if (pChannelStrip) { |
648 |
qsamplerChannel *pChannel = pChannelStrip->channel(); |
qsamplerChannel *pChannel = pChannelStrip->channel(); |
649 |
if (pChannel) { |
if (pChannel) { |
650 |
int iChannelID = pChannel->channelID(); |
ts << "# Channel " << iChannel << endl; |
|
ts << "# " << pChannelStrip->caption() << endl; |
|
651 |
ts << "ADD CHANNEL" << endl; |
ts << "ADD CHANNEL" << endl; |
652 |
ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannelID << " " << pChannel->audioDriver() << endl; |
ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannel << " " << pChannel->audioDriver() << endl; |
653 |
ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannelID << " " << pChannel->midiDriver() << endl; |
ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannel << " " << pChannel->midiDriver() << endl; |
654 |
ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl; |
// ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannel << " " << pChannel->midiPort() << endl; |
655 |
ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " "; |
ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannel << " "; |
656 |
if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) |
if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) |
657 |
ts << "ALL"; |
ts << "ALL"; |
658 |
else |
else |
659 |
ts << pChannel->midiChannel(); |
ts << pChannel->midiChannel(); |
660 |
ts << endl; |
ts << endl; |
661 |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannelID << endl; |
ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl; |
662 |
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannelID << endl; |
ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannel << endl; |
663 |
ts << "SET CHANNEL VOLUME " << iChannelID << " " << pChannel->volume() << endl; |
ts << "SET CHANNEL VOLUME " << iChannel << " " << pChannel->volume() << endl; |
664 |
ts << endl; |
ts << endl; |
665 |
} |
} |
666 |
} |
} |