877 |
if (pSamplerChannel->GetMidiInputChannel() == midi_chan_all) result.Add("MIDI_INPUT_CHANNEL", "ALL"); |
if (pSamplerChannel->GetMidiInputChannel() == midi_chan_all) result.Add("MIDI_INPUT_CHANNEL", "ALL"); |
878 |
else result.Add("MIDI_INPUT_CHANNEL", pSamplerChannel->GetMidiInputChannel()); |
else result.Add("MIDI_INPUT_CHANNEL", pSamplerChannel->GetMidiInputChannel()); |
879 |
|
|
880 |
result.Add("INSTRUMENT_FILE", |
// convert the filename into the correct encoding as defined for LSCP |
881 |
(InstrumentFileName != "NONE" && InstrumentFileName != "") ? |
// (especially in terms of special characters -> escape sequences) |
882 |
Path::fromPosix(InstrumentFileName).toLscp() : // TODO: assuming POSIX |
if (InstrumentFileName != "NONE" && InstrumentFileName != "") { |
883 |
InstrumentFileName |
#if WIN32 |
884 |
); |
InstrumentFileName = Path::fromWindows(InstrumentFileName).toLscp(); |
885 |
|
#else |
886 |
|
// assuming POSIX |
887 |
|
InstrumentFileName = Path::fromPosix(InstrumentFileName).toLscp(); |
888 |
|
#endif |
889 |
|
} |
890 |
|
|
891 |
|
result.Add("INSTRUMENT_FILE", InstrumentFileName); |
892 |
result.Add("INSTRUMENT_NR", InstrumentIndex); |
result.Add("INSTRUMENT_NR", InstrumentIndex); |
893 |
result.Add("INSTRUMENT_NAME", _escapeLscpResponse(InstrumentName)); |
result.Add("INSTRUMENT_NAME", _escapeLscpResponse(InstrumentName)); |
894 |
result.Add("INSTRUMENT_STATUS", InstrumentStatus); |
result.Add("INSTRUMENT_STATUS", InstrumentStatus); |
1832 |
std::map<midi_prog_index_t,MidiInstrumentMapper::entry_t>::iterator iter = mappings.find(idx); |
std::map<midi_prog_index_t,MidiInstrumentMapper::entry_t>::iterator iter = mappings.find(idx); |
1833 |
if (iter == mappings.end()) result.Error("there is no map entry with that index"); |
if (iter == mappings.end()) result.Error("there is no map entry with that index"); |
1834 |
else { // found |
else { // found |
1835 |
|
|
1836 |
|
// convert the filename into the correct encoding as defined for LSCP |
1837 |
|
// (especially in terms of special characters -> escape sequences) |
1838 |
|
#if WIN32 |
1839 |
|
const String instrumentFileName = Path::fromWindows(iter->second.InstrumentFile).toLscp(); |
1840 |
|
#else |
1841 |
|
// assuming POSIX |
1842 |
|
const String instrumentFileName = Path::fromPosix(iter->second.InstrumentFile).toLscp(); |
1843 |
|
#endif |
1844 |
|
|
1845 |
result.Add("NAME", _escapeLscpResponse(iter->second.Name)); |
result.Add("NAME", _escapeLscpResponse(iter->second.Name)); |
1846 |
result.Add("ENGINE_NAME", iter->second.EngineName); |
result.Add("ENGINE_NAME", iter->second.EngineName); |
1847 |
result.Add("INSTRUMENT_FILE", Path::fromPosix(iter->second.InstrumentFile).toLscp()); //TODO: assuming POSIX |
result.Add("INSTRUMENT_FILE", instrumentFileName); |
1848 |
result.Add("INSTRUMENT_NR", (int) iter->second.InstrumentIndex); |
result.Add("INSTRUMENT_NR", (int) iter->second.InstrumentIndex); |
1849 |
String instrumentName; |
String instrumentName; |
1850 |
Engine* pEngine = EngineFactory::Create(iter->second.EngineName); |
Engine* pEngine = EngineFactory::Create(iter->second.EngineName); |