73 |
%type <Char> char digit |
%type <Char> char digit |
74 |
%type <Dotnum> dotnum volume_value boolean |
%type <Dotnum> dotnum volume_value boolean |
75 |
%type <Number> number sampler_channel instrument_index fx_send_id audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_map midi_bank midi_prog midi_ctrl |
%type <Number> number sampler_channel instrument_index fx_send_id audio_channel_index device_index midi_input_channel_index midi_input_port_index midi_map midi_bank midi_prog midi_ctrl |
76 |
%type <String> string text stringval digits param_val_list param_val pathname dirname filename map_name entry_name fx_send_name engine_name command add_instruction create_instruction destroy_instruction get_instruction list_instruction load_instruction set_chan_instruction load_instr_args load_engine_args audio_output_type_name midi_input_type_name remove_instruction unmap_instruction set_instruction subscribe_event unsubscribe_event map_instruction reset_instruction clear_instruction move_instruction |
%type <String> string text stringval digits param_val_list param_val query_val pathname dirname filename map_name entry_name fx_send_name engine_name command add_instruction create_instruction destroy_instruction get_instruction list_instruction load_instruction set_chan_instruction load_instr_args load_engine_args audio_output_type_name midi_input_type_name remove_instruction unmap_instruction set_instruction subscribe_event unsubscribe_event map_instruction reset_instruction clear_instruction find_instruction move_instruction copy_instruction scan_mode edit_instruction |
77 |
%type <FillResponse> buffer_size_type |
%type <FillResponse> buffer_size_type |
78 |
%type <KeyValList> key_val_list |
%type <KeyValList> key_val_list query_val_list |
79 |
%type <LoadMode> instr_load_mode |
%type <LoadMode> instr_load_mode |
80 |
%type <Bool> modal_arg |
%type <Bool> modal_arg |
81 |
|
|
125 |
| UNSUBSCRIBE SP unsubscribe_event { $$ = $3; } |
| UNSUBSCRIBE SP unsubscribe_event { $$ = $3; } |
126 |
| RESET SP reset_instruction { $$ = $3; } |
| RESET SP reset_instruction { $$ = $3; } |
127 |
| CLEAR SP clear_instruction { $$ = $3; } |
| CLEAR SP clear_instruction { $$ = $3; } |
128 |
|
| FIND SP find_instruction { $$ = $3; } |
129 |
| MOVE SP move_instruction { $$ = $3; } |
| MOVE SP move_instruction { $$ = $3; } |
130 |
|
| COPY SP copy_instruction { $$ = $3; } |
131 |
|
| EDIT SP edit_instruction { $$ = $3; } |
132 |
| RESET { $$ = LSCPSERVER->ResetSampler(); } |
| RESET { $$ = LSCPSERVER->ResetSampler(); } |
133 |
| QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; } |
| QUIT { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; } |
134 |
; |
; |
135 |
|
|
136 |
add_instruction : CHANNEL { $$ = LSCPSERVER->AddChannel(); } |
add_instruction : CHANNEL { $$ = LSCPSERVER->AddChannel(); } |
137 |
| DB_INSTRUMENT_DIRECTORY SP pathname { $$ = LSCPSERVER->AddDbInstrumentDirectory($3); } |
| DB_INSTRUMENT_DIRECTORY SP pathname { $$ = LSCPSERVER->AddDbInstrumentDirectory($3); } |
138 |
| DB_INSTRUMENTS SP FLAT SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstrumentsFlat($5,$7); } |
| DB_INSTRUMENTS SP NON_MODAL SP scan_mode SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } |
139 |
| DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstrumentsNonrecursive($5,$7); } |
| DB_INSTRUMENTS SP scan_mode SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } |
140 |
| DB_INSTRUMENTS SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($3,$5); } |
| DB_INSTRUMENTS SP NON_MODAL SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($5,$7, -1, true); } |
141 |
| DB_INSTRUMENTS SP pathname SP pathname SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } |
| DB_INSTRUMENTS SP NON_MODAL SP pathname SP pathname SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($5,$7,$9, true); } |
142 |
|
| DB_INSTRUMENTS SP pathname SP pathname { $$ = LSCPSERVER->AddDbInstruments($3,$5); } |
143 |
|
| DB_INSTRUMENTS SP pathname SP pathname SP instrument_index { $$ = LSCPSERVER->AddDbInstruments($3,$5,$7); } |
144 |
| MIDI_INSTRUMENT_MAP { $$ = LSCPSERVER->AddMidiInstrumentMap(); } |
| MIDI_INSTRUMENT_MAP { $$ = LSCPSERVER->AddMidiInstrumentMap(); } |
145 |
| MIDI_INSTRUMENT_MAP SP map_name { $$ = LSCPSERVER->AddMidiInstrumentMap($3); } |
| MIDI_INSTRUMENT_MAP SP map_name { $$ = LSCPSERVER->AddMidiInstrumentMap($3); } |
146 |
; |
; |
164 |
| DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_info); } |
| DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_dir_info); } |
165 |
| DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_count); } |
| DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_count); } |
166 |
| DB_INSTRUMENT_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info); } |
| DB_INSTRUMENT_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instr_info); } |
167 |
|
| DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_db_instrs_job_info); } |
168 |
| MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc); } |
| MISCELLANEOUS { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc); } |
169 |
| TOTAL_VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count); } |
| TOTAL_VOICE_COUNT { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count); } |
170 |
| GLOBAL_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info); } |
| GLOBAL_INFO { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info); } |
189 |
| DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_info); } |
| DB_INSTRUMENT_DIRECTORY_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_dir_info); } |
190 |
| DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_count); } |
| DB_INSTRUMENT_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_count); } |
191 |
| DB_INSTRUMENT_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info); } |
| DB_INSTRUMENT_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instr_info); } |
192 |
|
| DB_INSTRUMENTS_JOB_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_db_instrs_job_info); } |
193 |
| MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc); } |
| MISCELLANEOUS { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc); } |
194 |
| TOTAL_VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); } |
| TOTAL_VOICE_COUNT { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count); } |
195 |
| GLOBAL_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info); } |
| GLOBAL_INFO { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info); } |
245 |
| MIDI_INSTRUMENT_MAP SP INFO SP midi_map { $$ = LSCPSERVER->GetMidiInstrumentMap($5); } |
| MIDI_INSTRUMENT_MAP SP INFO SP midi_map { $$ = LSCPSERVER->GetMidiInstrumentMap($5); } |
246 |
| FX_SENDS SP sampler_channel { $$ = LSCPSERVER->GetFxSends($3); } |
| FX_SENDS SP sampler_channel { $$ = LSCPSERVER->GetFxSends($3); } |
247 |
| FX_SEND SP INFO SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->GetFxSendInfo($5,$7); } |
| FX_SEND SP INFO SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->GetFxSendInfo($5,$7); } |
248 |
| DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($3); } |
| DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($5, true); } |
249 |
|
| DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryCount($3, false); } |
250 |
| DB_INSTRUMENT_DIRECTORY SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryInfo($5); } |
| DB_INSTRUMENT_DIRECTORY SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectoryInfo($5); } |
251 |
| DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstrumentCount($3); } |
| DB_INSTRUMENTS SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentCount($5, true); } |
252 |
|
| DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstrumentCount($3, false); } |
253 |
| DB_INSTRUMENT SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentInfo($5); } |
| DB_INSTRUMENT SP INFO SP pathname { $$ = LSCPSERVER->GetDbInstrumentInfo($5); } |
254 |
|
| DB_INSTRUMENTS_JOB SP INFO SP number { $$ = LSCPSERVER->GetDbInstrumentsJobInfo($5); } |
255 |
| VOLUME { $$ = LSCPSERVER->GetGlobalVolume(); } |
| VOLUME { $$ = LSCPSERVER->GetGlobalVolume(); } |
256 |
; |
; |
257 |
|
|
288 |
| MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); } |
| MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); } |
289 |
; |
; |
290 |
|
|
291 |
|
find_instruction : DB_INSTRUMENTS SP NON_RECURSIVE SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstruments($5,$7, false); } |
292 |
|
| DB_INSTRUMENTS SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstruments($3,$5, true); } |
293 |
|
| DB_INSTRUMENT_DIRECTORIES SP NON_RECURSIVE SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($5,$7, false); } |
294 |
|
| DB_INSTRUMENT_DIRECTORIES SP pathname SP query_val_list { $$ = LSCPSERVER->FindDbInstrumentDirectories($3,$5, true); } |
295 |
|
; |
296 |
|
|
297 |
move_instruction : DB_INSTRUMENT_DIRECTORY SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); } |
move_instruction : DB_INSTRUMENT_DIRECTORY SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrumentDirectory($3,$5); } |
298 |
| DB_INSTRUMENT SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrument($3,$5); } |
| DB_INSTRUMENT SP pathname SP pathname { $$ = LSCPSERVER->MoveDbInstrument($3,$5); } |
299 |
; |
; |
300 |
|
|
301 |
|
copy_instruction : DB_INSTRUMENT_DIRECTORY SP pathname SP pathname { $$ = LSCPSERVER->CopyDbInstrumentDirectory($3,$5); } |
302 |
|
| DB_INSTRUMENT SP pathname SP pathname { $$ = LSCPSERVER->CopyDbInstrument($3,$5); } |
303 |
|
; |
304 |
|
|
305 |
destroy_instruction : AUDIO_OUTPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); } |
destroy_instruction : AUDIO_OUTPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); } |
306 |
| MIDI_INPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyMidiInputDevice($3); } |
| MIDI_INPUT_DEVICE SP number { $$ = LSCPSERVER->DestroyMidiInputDevice($3); } |
307 |
| FX_SEND SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->DestroyFxSend($3,$5); } |
| FX_SEND SP sampler_channel SP fx_send_id { $$ = LSCPSERVER->DestroyFxSend($3,$5); } |
327 |
| MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT { $$ = LSCPSERVER->SetChannelMap($3, -2); } |
| MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT { $$ = LSCPSERVER->SetChannelMap($3, -2); } |
328 |
; |
; |
329 |
|
|
330 |
|
edit_instruction : INSTRUMENT SP sampler_channel { $$ = LSCPSERVER->EditSamplerChannelInstrument($3); } |
331 |
|
; |
332 |
|
|
333 |
modal_arg : /* epsilon (empty argument) */ { $$ = true; } |
modal_arg : /* epsilon (empty argument) */ { $$ = true; } |
334 |
| NON_MODAL SP { $$ = false; } |
| NON_MODAL SP { $$ = false; } |
335 |
; |
; |
342 |
| PERCENTAGE { $$ = fill_response_percentage; } |
| PERCENTAGE { $$ = fill_response_percentage; } |
343 |
; |
; |
344 |
|
|
345 |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
list_instruction : AUDIO_OUTPUT_DEVICES { $$ = LSCPSERVER->GetAudioOutputDevices(); } |
346 |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDevices(); } |
| MIDI_INPUT_DEVICES { $$ = LSCPSERVER->GetMidiInputDevices(); } |
347 |
| CHANNELS { $$ = LSCPSERVER->ListChannels(); } |
| CHANNELS { $$ = LSCPSERVER->ListChannels(); } |
348 |
| AVAILABLE_ENGINES { $$ = LSCPSERVER->ListAvailableEngines(); } |
| AVAILABLE_ENGINES { $$ = LSCPSERVER->ListAvailableEngines(); } |
349 |
| AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableMidiInputDrivers(); } |
| AVAILABLE_MIDI_INPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableMidiInputDrivers(); } |
350 |
| AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); } |
| AVAILABLE_AUDIO_OUTPUT_DRIVERS { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); } |
351 |
| MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->ListMidiInstrumentMappings($3); } |
| MIDI_INSTRUMENTS SP midi_map { $$ = LSCPSERVER->ListMidiInstrumentMappings($3); } |
352 |
| MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ListAllMidiInstrumentMappings(); } |
| MIDI_INSTRUMENTS SP ALL { $$ = LSCPSERVER->ListAllMidiInstrumentMappings(); } |
353 |
| MIDI_INSTRUMENT_MAPS { $$ = LSCPSERVER->ListMidiInstrumentMaps(); } |
| MIDI_INSTRUMENT_MAPS { $$ = LSCPSERVER->ListMidiInstrumentMaps(); } |
354 |
| FX_SENDS SP sampler_channel { $$ = LSCPSERVER->ListFxSends($3); } |
| FX_SENDS SP sampler_channel { $$ = LSCPSERVER->ListFxSends($3); } |
355 |
| DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($3); } |
| DB_INSTRUMENT_DIRECTORIES SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($5, true); } |
356 |
| DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstruments($3); } |
| DB_INSTRUMENT_DIRECTORIES SP pathname { $$ = LSCPSERVER->GetDbInstrumentDirectories($3); } |
357 |
|
| DB_INSTRUMENTS SP RECURSIVE SP pathname { $$ = LSCPSERVER->GetDbInstruments($5, true); } |
358 |
|
| DB_INSTRUMENTS SP pathname { $$ = LSCPSERVER->GetDbInstruments($3); } |
359 |
; |
; |
360 |
|
|
361 |
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } |
load_instr_args : filename SP instrument_index SP sampler_channel { $$ = LSCPSERVER->LoadInstrument($1, $3, $5); } |
445 |
| dotnum { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); } |
| dotnum { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); } |
446 |
; |
; |
447 |
|
|
448 |
|
query_val_list : string '=' query_val { $$[$1] = $3; } |
449 |
|
| query_val_list SP string '=' query_val { $$ = $1; $$[$3] = $5; } |
450 |
|
; |
451 |
|
|
452 |
|
query_val : string |
453 |
|
| stringval |
454 |
|
; |
455 |
|
|
456 |
|
scan_mode : RECURSIVE { $$ = "RECURSIVE"; } |
457 |
|
| NON_RECURSIVE { $$ = "NON_RECURSIVE"; } |
458 |
|
| FLAT { $$ = "FLAT"; } |
459 |
|
; |
460 |
|
|
461 |
// GRAMMAR_BNF_END - do NOT delete or modify this line !!! |
// GRAMMAR_BNF_END - do NOT delete or modify this line !!! |
462 |
|
|
463 |
|
|
593 |
CLEAR : 'C''L''E''A''R' |
CLEAR : 'C''L''E''A''R' |
594 |
; |
; |
595 |
|
|
596 |
|
FIND : 'F''I''N''D' |
597 |
|
; |
598 |
|
|
599 |
MOVE : 'M''O''V''E' |
MOVE : 'M''O''V''E' |
600 |
; |
; |
601 |
|
|
602 |
|
COPY : 'C''O''P''Y' |
603 |
|
; |
604 |
|
|
605 |
CREATE : 'C''R''E''A''T''E' |
CREATE : 'C''R''E''A''T''E' |
606 |
; |
; |
607 |
|
|
689 |
DB_INSTRUMENT_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O' |
DB_INSTRUMENT_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O' |
690 |
; |
; |
691 |
|
|
692 |
|
DB_INSTRUMENTS_JOB_INFO : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B''_''I''N''F''O' |
693 |
|
; |
694 |
|
|
695 |
CHANNEL_COUNT : 'C''H''A''N''N''E''L''_''C''O''U''N''T' |
CHANNEL_COUNT : 'C''H''A''N''N''E''L''_''C''O''U''N''T' |
696 |
; |
; |
697 |
|
|
827 |
DB_INSTRUMENT : 'D''B''_''I''N''S''T''R''U''M''E''N''T' |
DB_INSTRUMENT : 'D''B''_''I''N''S''T''R''U''M''E''N''T' |
828 |
; |
; |
829 |
|
|
830 |
|
DB_INSTRUMENTS_JOB : 'D''B''_''I''N''S''T''R''U''M''E''N''T''S''_''J''O''B' |
831 |
|
; |
832 |
|
|
833 |
DESCRIPTION : 'D''E''S''C''R''I''P''T''I''O''N' |
DESCRIPTION : 'D''E''S''C''R''I''P''T''I''O''N' |
834 |
; |
; |
835 |
|
|
839 |
FLAT : 'F''L''A''T' |
FLAT : 'F''L''A''T' |
840 |
; |
; |
841 |
|
|
842 |
|
RECURSIVE : 'R''E''C''U''R''S''I''V''E' |
843 |
|
; |
844 |
|
|
845 |
NON_RECURSIVE : 'N''O''N''_''R''E''C''U''R''S''I''V''E' |
NON_RECURSIVE : 'N''O''N''_''R''E''C''U''R''S''I''V''E' |
846 |
; |
; |
847 |
|
|
866 |
PERCENTAGE : 'P''E''R''C''E''N''T''A''G''E' |
PERCENTAGE : 'P''E''R''C''E''N''T''A''G''E' |
867 |
; |
; |
868 |
|
|
869 |
|
EDIT : 'E''D''I''T' |
870 |
|
; |
871 |
|
|
872 |
RESET : 'R''E''S''E''T' |
RESET : 'R''E''S''E''T' |
873 |
; |
; |
874 |
|
|