75 |
LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_stream_count, "STREAM_COUNT"); |
76 |
LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_buffer_fill, "BUFFER_FILL"); |
77 |
LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_channel_info, "CHANNEL_INFO"); |
78 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_count, "FX_SEND_COUNT"); |
79 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_fx_send_info, "FX_SEND_INFO"); |
80 |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_count, "MIDI_INSTRUMENT_MAP_COUNT"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_count, "MIDI_INSTRUMENT_MAP_COUNT"); |
81 |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_info, "MIDI_INSTRUMENT_MAP_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_map_info, "MIDI_INSTRUMENT_MAP_INFO"); |
82 |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_count, "MIDI_INSTRUMENT_COUNT"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_count, "MIDI_INSTRUMENT_COUNT"); |
83 |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_info, "MIDI_INSTRUMENT_INFO"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_midi_instr_info, "MIDI_INSTRUMENT_INFO"); |
84 |
LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_misc, "MISCELLANEOUS"); |
85 |
LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT"); |
LSCPEvent::RegisterEvent(LSCPEvent::event_total_voice_count, "TOTAL_VOICE_COUNT"); |
86 |
|
LSCPEvent::RegisterEvent(LSCPEvent::event_global_info, "GLOBAL_INFO"); |
87 |
hSocket = -1; |
hSocket = -1; |
88 |
} |
} |
89 |
|
|
151 |
if ((*itEngineChannel)->StatusChanged()) { |
if ((*itEngineChannel)->StatusChanged()) { |
152 |
SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex)); |
SendLSCPNotify(LSCPEvent(LSCPEvent::event_channel_info, (*itEngineChannel)->iSamplerChannelIndex)); |
153 |
} |
} |
154 |
|
|
155 |
|
for (int i = 0; i < (*itEngineChannel)->GetFxSendCount(); i++) { |
156 |
|
FxSend* fxs = (*itEngineChannel)->GetFxSend(i); |
157 |
|
if(fxs != NULL && fxs->IsInfoChanged()) { |
158 |
|
int chn = (*itEngineChannel)->iSamplerChannelIndex; |
159 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, chn, fxs->Id())); |
160 |
|
fxs->SetInfoChanged(false); |
161 |
|
} |
162 |
|
} |
163 |
} |
} |
164 |
} |
} |
165 |
|
|
2022 |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
2023 |
|
|
2024 |
pFxSend->SetDestinationChannel(FxSendChannel, DeviceChannel); |
pFxSend->SetDestinationChannel(FxSendChannel, DeviceChannel); |
2025 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID)); |
2026 |
} catch (Exception e) { |
} catch (Exception e) { |
2027 |
result.Error(e); |
result.Error(e); |
2028 |
} |
} |
2049 |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
2050 |
|
|
2051 |
pFxSend->SetMidiController(MidiController); |
pFxSend->SetMidiController(MidiController); |
2052 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID)); |
2053 |
} catch (Exception e) { |
} catch (Exception e) { |
2054 |
result.Error(e); |
result.Error(e); |
2055 |
} |
} |
2076 |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
if (!pFxSend) throw Exception("There is no FxSend with that ID on the given sampler channel"); |
2077 |
|
|
2078 |
pFxSend->SetLevel((float)dLevel); |
pFxSend->SetLevel((float)dLevel); |
2079 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_fx_send_info, uiSamplerChannel, FxSendID)); |
2080 |
} catch (Exception e) { |
} catch (Exception e) { |
2081 |
result.Error(e); |
result.Error(e); |
2082 |
} |
} |
2156 |
try { |
try { |
2157 |
if (dVolume < 0) throw Exception("Volume may not be negative"); |
if (dVolume < 0) throw Exception("Volume may not be negative"); |
2158 |
GLOBAL_VOLUME = dVolume; // see common/global.cpp |
GLOBAL_VOLUME = dVolume; // see common/global.cpp |
2159 |
|
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_global_info, "VOLUME", GLOBAL_VOLUME)); |
2160 |
} catch (Exception e) { |
} catch (Exception e) { |
2161 |
result.Error(e); |
result.Error(e); |
2162 |
} |
} |