/[svn]/linuxsampler/trunk/src/network/lscp.y
ViewVC logotype

Diff of /linuxsampler/trunk/src/network/lscp.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 705 by schoenebeck, Wed Jul 20 21:43:23 2005 UTC revision 1108 by iliev, Thu Mar 22 20:39:04 2007 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *   *   Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck   *
6   *   Copyright (C) 2005 Christian Schoenebeck                              *   *   Copyright (C) 2005 - 2007 Christian Schoenebeck                       *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 21  Line 21 
21   *   MA  02111-1307  USA                                                   *   *   MA  02111-1307  USA                                                   *
22   ***************************************************************************/   ***************************************************************************/
23    
24  /* Note: don't forget to run 'make parser' after you changed this file, */  /* CAUTION: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
25  /*       otherwise the parser will not be regenerated!                  */  /*                                                                         */
26    /*     don't forget to run 'make parser' after you changed this file,      */
27    /*     otherwise the parser will not be regenerated !                      */
28    /*                                                                         */
29    /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
30    
31  %{  %{
32    
# Line 68  int yylex(YYSTYPE* yylval) { Line 72  int yylex(YYSTYPE* yylval) {
72    
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 audio_channel_index device_index midi_input_channel_index midi_input_port_index  %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 filename engine_name command 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 set_instruction subscribe_event unsubscribe_event  %type <String> string text stringval digits param_val_list param_val 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
77  %type <FillResponse> buffer_size_type  %type <FillResponse> buffer_size_type
78  %type <KeyValList> key_val_list  %type <KeyValList> key_val_list
79    %type <LoadMode> instr_load_mode
80    %type <Bool> modal_arg
81    
82  %start input  %start input
83    
# Line 80  int yylex(YYSTYPE* yylval) { Line 86  int yylex(YYSTYPE* yylval) {
86  //TODO: return more meaningful error messages  //TODO: return more meaningful error messages
87    
88  /*  /*
89    The LSCP specification input file (Documentation/lscp.xml) is automatically    The LSCP specification document input file (Documentation/lscp.xml) is
90    updated with this file using the scripts/update_grammar.pl script. Do not    automatically updated with this file using the scripts/update_grammar.pl
91    modify or delete the GRAMMAR_BNF_BEGIN and GRAMMAR_BNF_END lines !    script. Do not modify or delete the GRAMMAR_BNF_BEGIN and GRAMMAR_BNF_END
92      lines !
93  */  */
94    
95  // GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!!  // GRAMMAR_BNF_BEGIN - do NOT delete or modify this line !!!
# Line 104  comment               :  '#' Line 111  comment               :  '#'
111                        |  comment string                        |  comment string
112                        ;                        ;
113    
114  command               :  ADD SP CHANNEL                        { $$ = LSCPSERVER->AddChannel();                          }  command               :  ADD SP add_instruction                { $$ = $3;                                                }
115                          |  MAP SP map_instruction                { $$ = $3;                                                }
116                          |  UNMAP SP unmap_instruction            { $$ = $3;                                                }
117                        |  GET SP get_instruction                { $$ = $3;                                                }                        |  GET SP get_instruction                { $$ = $3;                                                }
118                        |  CREATE SP create_instruction          { $$ = $3;                                                }                        |  CREATE SP create_instruction          { $$ = $3;                                                }
119                        |  DESTROY SP destroy_instruction        { $$ = $3;                                                }                        |  DESTROY SP destroy_instruction        { $$ = $3;                                                }
120                        |  LIST SP list_instruction              { $$ = $3;                                                }                        |  LIST SP list_instruction              { $$ = $3;                                                }
121                        |  LOAD SP load_instruction              { $$ = $3;                                                }                        |  LOAD SP load_instruction              { $$ = $3;                                                }
122                        |  REMOVE SP CHANNEL SP sampler_channel  { $$ = LSCPSERVER->RemoveChannel($5);                     }                        |  REMOVE SP remove_instruction          { $$ = $3;                                                }
123                        |  SET SP set_instruction                { $$ = $3;                                                }                        |  SET SP set_instruction                { $$ = $3;                                                }
124                        |  SUBSCRIBE SP subscribe_event          { $$ = $3;                                                }                        |  SUBSCRIBE SP subscribe_event          { $$ = $3;                                                }
125                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }                        |  UNSUBSCRIBE SP unsubscribe_event      { $$ = $3;                                                }
126                        |  SELECT SP text                        { $$ = LSCPSERVER->QueryDatabase($3);                     }                        |  SELECT SP text                        { $$ = LSCPSERVER->QueryDatabase($3);                     }
127                        |  RESET SP CHANNEL SP sampler_channel   { $$ = LSCPSERVER->ResetChannel($5);                      }                        |  RESET SP reset_instruction            { $$ = $3;                                                }
128                          |  CLEAR SP clear_instruction            { $$ = $3;                                                }
129                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }                        |  RESET                                 { $$ = LSCPSERVER->ResetSampler();                        }
130                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }                        |  QUIT                                  { LSCPSERVER->AnswerClient("Bye!\r\n"); return LSCP_QUIT; }
131                        ;                        ;
132    
133  subscribe_event       :  CHANNEL_COUNT                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_count); }  add_instruction       :  CHANNEL                               { $$ = LSCPSERVER->AddChannel();                          }
134                        |  VOICE_COUNT                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count);   }                        |  MIDI_INSTRUMENT_MAP                   { $$ = LSCPSERVER->AddMidiInstrumentMap();                }
135                        |  STREAM_COUNT                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count);  }                        |  MIDI_INSTRUMENT_MAP SP map_name       { $$ = LSCPSERVER->AddMidiInstrumentMap($3);              }
136                        |  BUFFER_FILL                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill);   }                        ;
137                        |  CHANNEL_INFO                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_info);  }  
138                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);          }  subscribe_event       :  AUDIO_OUTPUT_DEVICE_COUNT             { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_audio_device_count);   }
139                        ;                        |  AUDIO_OUTPUT_DEVICE_INFO              { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_audio_device_info);    }
140                          |  MIDI_INPUT_DEVICE_COUNT               { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_count);    }
141  unsubscribe_event     :  CHANNEL_COUNT                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_count); }                        |  MIDI_INPUT_DEVICE_INFO                { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_device_info);     }
142                        |  VOICE_COUNT                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count);   }                        |  CHANNEL_COUNT                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_count);        }
143                        |  STREAM_COUNT                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count);  }                        |  VOICE_COUNT                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_voice_count);          }
144                        |  BUFFER_FILL                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill);   }                        |  STREAM_COUNT                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_stream_count);         }
145                        |  CHANNEL_INFO                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_info);  }                        |  BUFFER_FILL                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_buffer_fill);          }
146                        |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);          }                        |  CHANNEL_INFO                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_channel_info);         }
147                          |  FX_SEND_COUNT                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_fx_send_count);        }
148                          |  FX_SEND_INFO                          { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_fx_send_info);         }
149                          |  MIDI_INSTRUMENT_MAP_COUNT             { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_map_count); }
150                          |  MIDI_INSTRUMENT_MAP_INFO              { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_map_info);  }
151                          |  MIDI_INSTRUMENT_COUNT                 { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_count);     }
152                          |  MIDI_INSTRUMENT_INFO                  { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_midi_instr_info);      }
153                          |  MISCELLANEOUS                         { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_misc);                 }
154                          |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_total_voice_count);    }
155                          |  GLOBAL_INFO                           { $$ = LSCPSERVER->SubscribeNotification(LSCPEvent::event_global_info);          }
156                          ;
157    
158    unsubscribe_event     :  AUDIO_OUTPUT_DEVICE_COUNT             { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_audio_device_count);   }
159                          |  AUDIO_OUTPUT_DEVICE_INFO              { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_audio_device_info);    }
160                          |  MIDI_INPUT_DEVICE_COUNT               { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_count);    }
161                          |  MIDI_INPUT_DEVICE_INFO                { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_device_info);     }
162                          |  CHANNEL_COUNT                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_count);        }
163                          |  VOICE_COUNT                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_voice_count);          }
164                          |  STREAM_COUNT                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_stream_count);         }
165                          |  BUFFER_FILL                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_buffer_fill);          }
166                          |  CHANNEL_INFO                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_channel_info);         }
167                          |  FX_SEND_COUNT                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_fx_send_count);        }
168                          |  FX_SEND_INFO                          { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_fx_send_info);         }
169                          |  MIDI_INSTRUMENT_MAP_COUNT             { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_map_count); }
170                          |  MIDI_INSTRUMENT_MAP_INFO              { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_map_info);  }
171                          |  MIDI_INSTRUMENT_COUNT                 { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_count);     }
172                          |  MIDI_INSTRUMENT_INFO                  { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_midi_instr_info);      }
173                          |  MISCELLANEOUS                         { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_misc);                 }
174                          |  TOTAL_VOICE_COUNT                     { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_total_voice_count);    }
175                          |  GLOBAL_INFO                           { $$ = LSCPSERVER->UnsubscribeNotification(LSCPEvent::event_global_info);          }
176                          ;
177    
178    map_instruction       :  MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,MidiInstrumentMapper::VOID,"",$3); }
179                          |  MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,$18,"",$3); }
180                          |  MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,MidiInstrumentMapper::VOID,$18,$3); }
181                          |  MIDI_INSTRUMENT SP modal_arg midi_map SP midi_bank SP midi_prog SP engine_name SP filename SP instrument_index SP volume_value SP instr_load_mode SP entry_name { $$ = LSCPSERVER->AddOrReplaceMIDIInstrumentMapping($4,$6,$8,$10,$12,$14,$16,$18,$20,$3); }
182                          ;
183    
184    unmap_instruction     :  MIDI_INSTRUMENT SP midi_map SP midi_bank SP midi_prog  { $$ = LSCPSERVER->RemoveMIDIInstrumentMapping($3,$5,$7); }
185                          ;
186    
187    remove_instruction    :  CHANNEL SP sampler_channel       { $$ = LSCPSERVER->RemoveChannel($3);             }
188                          |  MIDI_INSTRUMENT_MAP SP midi_map  { $$ = LSCPSERVER->RemoveMidiInstrumentMap($3);   }
189                          |  MIDI_INSTRUMENT_MAP SP ALL       { $$ = LSCPSERVER->RemoveAllMidiInstrumentMaps(); }
190                        ;                        ;
191    
192  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }  get_instruction       :  AVAILABLE_ENGINES                                                          { $$ = LSCPSERVER->GetAvailableEngines();                          }
# Line 160  get_instruction       :  AVAILABLE_ENGIN Line 213  get_instruction       :  AVAILABLE_ENGIN
213                        |  CHANNEL SP VOICE_COUNT SP sampler_channel                                  { $$ = LSCPSERVER->GetVoiceCount($5);                              }                        |  CHANNEL SP VOICE_COUNT SP sampler_channel                                  { $$ = LSCPSERVER->GetVoiceCount($5);                              }
214                        |  ENGINE SP INFO SP engine_name                                              { $$ = LSCPSERVER->GetEngineInfo($5);                              }                        |  ENGINE SP INFO SP engine_name                                              { $$ = LSCPSERVER->GetEngineInfo($5);                              }
215                        |  SERVER SP INFO                                                             { $$ = LSCPSERVER->GetServerInfo();                                }                        |  SERVER SP INFO                                                             { $$ = LSCPSERVER->GetServerInfo();                                }
216                          |  TOTAL_VOICE_COUNT                                                          { $$ = LSCPSERVER->GetTotalVoiceCount();                                }
217                          |  TOTAL_VOICE_COUNT_MAX                                                      { $$ = LSCPSERVER->GetTotalVoiceCountMax();                        }
218                          |  MIDI_INSTRUMENTS SP midi_map                                               { $$ = LSCPSERVER->GetMidiInstrumentMappings($3);                  }
219                          |  MIDI_INSTRUMENTS SP ALL                                                    { $$ = LSCPSERVER->GetAllMidiInstrumentMappings();                 }
220                          |  MIDI_INSTRUMENT SP INFO SP midi_map SP midi_bank SP midi_prog              { $$ = LSCPSERVER->GetMidiInstrumentMapping($5,$7,$9);             }
221                          |  MIDI_INSTRUMENT_MAPS                                                       { $$ = LSCPSERVER->GetMidiInstrumentMaps();                        }
222                          |  MIDI_INSTRUMENT_MAP SP INFO SP midi_map                                    { $$ = LSCPSERVER->GetMidiInstrumentMap($5);                       }
223                          |  FX_SENDS SP sampler_channel                                                { $$ = LSCPSERVER->GetFxSends($3);                                 }
224                          |  FX_SEND SP INFO SP sampler_channel SP fx_send_id                           { $$ = LSCPSERVER->GetFxSendInfo($5,$7);                           }
225                          |  VOLUME                                                                     { $$ = LSCPSERVER->GetGlobalVolume();                              }
226                        ;                        ;
227    
228  set_instruction       :  AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }  set_instruction       :  AUDIO_OUTPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list             { $$ = LSCPSERVER->SetAudioOutputDeviceParameter($3, $5, $7);      }
# Line 167  set_instruction       :  AUDIO_OUTPUT_DE Line 230  set_instruction       :  AUDIO_OUTPUT_DE
230                        |  MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);        }                        |  MIDI_INPUT_DEVICE_PARAMETER SP number SP string '=' param_val_list               { $$ = LSCPSERVER->SetMidiInputDeviceParameter($3, $5, $7);        }
231                        |  MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);      }                        |  MIDI_INPUT_PORT_PARAMETER SP number SP number SP string '=' param_val_list       { $$ = LSCPSERVER->SetMidiInputPortParameter($3, $5, $7, $9);      }
232                        |  CHANNEL SP set_chan_instruction                                                  { $$ = $3;                                                         }                        |  CHANNEL SP set_chan_instruction                                                  { $$ = $3;                                                         }
233                          |  MIDI_INSTRUMENT_MAP SP NAME SP midi_map SP map_name                              { $$ = LSCPSERVER->SetMidiInstrumentMapName($5, $7);               }
234                          |  FX_SEND SP AUDIO_OUTPUT_CHANNEL SP sampler_channel SP fx_send_id SP audio_channel_index SP audio_channel_index  { $$ = LSCPSERVER->SetFxSendAudioOutputChannel($5,$7,$9,$11); }
235                          |  FX_SEND SP MIDI_CONTROLLER SP sampler_channel SP fx_send_id SP midi_ctrl         { $$ = LSCPSERVER->SetFxSendMidiController($5,$7,$9);              }
236                          |  FX_SEND SP LEVEL SP sampler_channel SP fx_send_id SP volume_value                { $$ = LSCPSERVER->SetFxSendLevel($5,$7,$9);                       }
237                        |  ECHO SP boolean                                                                  { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3);  }                        |  ECHO SP boolean                                                                  { $$ = LSCPSERVER->SetEcho((yyparse_param_t*) yyparse_param, $3);  }
238                          |  VOLUME SP volume_value                                                           { $$ = LSCPSERVER->SetGlobalVolume($3);                            }
239                        ;                        ;
240    
241  create_instruction    :  AUDIO_OUTPUT_DEVICE SP string SP key_val_list  { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); }  create_instruction    :  AUDIO_OUTPUT_DEVICE SP string SP key_val_list  { $$ = LSCPSERVER->CreateAudioOutputDevice($3,$5); }
242                        |  AUDIO_OUTPUT_DEVICE SP string                  { $$ = LSCPSERVER->CreateAudioOutputDevice($3);    }                        |  AUDIO_OUTPUT_DEVICE SP string                  { $$ = LSCPSERVER->CreateAudioOutputDevice($3);    }
243                        |  MIDI_INPUT_DEVICE SP string SP key_val_list    { $$ = LSCPSERVER->CreateMidiInputDevice($3,$5);   }                        |  MIDI_INPUT_DEVICE SP string SP key_val_list    { $$ = LSCPSERVER->CreateMidiInputDevice($3,$5);   }
244                        |  MIDI_INPUT_DEVICE SP string                    { $$ = LSCPSERVER->CreateMidiInputDevice($3);      }                        |  MIDI_INPUT_DEVICE SP string                    { $$ = LSCPSERVER->CreateMidiInputDevice($3);      }
245                          |  FX_SEND SP sampler_channel SP midi_ctrl        { $$ = LSCPSERVER->CreateFxSend($3,$5);            }
246                          |  FX_SEND SP sampler_channel SP midi_ctrl SP fx_send_name  { $$ = LSCPSERVER->CreateFxSend($3,$5,$7); }
247                          ;
248    
249    reset_instruction     :  CHANNEL SP sampler_channel  { $$ = LSCPSERVER->ResetChannel($3); }
250                          ;
251    
252    clear_instruction     :  MIDI_INSTRUMENTS SP midi_map   { $$ = LSCPSERVER->ClearMidiInstrumentMappings($3);  }
253                          |  MIDI_INSTRUMENTS SP ALL        { $$ = LSCPSERVER->ClearAllMidiInstrumentMappings(); }
254                        ;                        ;
255    
256  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }  destroy_instruction   :  AUDIO_OUTPUT_DEVICE SP number  { $$ = LSCPSERVER->DestroyAudioOutputDevice($3); }
257                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }                        |  MIDI_INPUT_DEVICE SP number    { $$ = LSCPSERVER->DestroyMidiInputDevice($3);   }
258                          |  FX_SEND SP sampler_channel SP fx_send_id  { $$ = LSCPSERVER->DestroyFxSend($3,$5); }
259                        ;                        ;
260    
261  load_instruction      :  INSTRUMENT SP load_instr_args  { $$ = $3; }  load_instruction      :  INSTRUMENT SP load_instr_args  { $$ = $3; }
# Line 195  set_chan_instruction  :  AUDIO_OUTPUT_DE Line 273  set_chan_instruction  :  AUDIO_OUTPUT_DE
273                        |  VOLUME SP sampler_channel SP volume_value                                                           { $$ = LSCPSERVER->SetVolume($5, $3);                 }                        |  VOLUME SP sampler_channel SP volume_value                                                           { $$ = LSCPSERVER->SetVolume($5, $3);                 }
274                        |  MUTE SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelMute($5, $3);            }                        |  MUTE SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelMute($5, $3);            }
275                        |  SOLO SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelSolo($5, $3);            }                        |  SOLO SP sampler_channel SP boolean                                                                  { $$ = LSCPSERVER->SetChannelSolo($5, $3);            }
276                          |  MIDI_INSTRUMENT_MAP SP sampler_channel SP midi_map                                                  { $$ = LSCPSERVER->SetChannelMap($3, $5);             }
277                          |  MIDI_INSTRUMENT_MAP SP sampler_channel SP NONE                                                      { $$ = LSCPSERVER->SetChannelMap($3, -1);             }
278                          |  MIDI_INSTRUMENT_MAP SP sampler_channel SP DEFAULT                                                   { $$ = LSCPSERVER->SetChannelMap($3, -2);             }
279                          ;
280    
281    modal_arg             :  /* epsilon (empty argument) */  { $$ = true;  }
282                          |  NON_MODAL SP                    { $$ = false; }
283                        ;                        ;
284    
285  key_val_list          :  string '=' param_val_list                  { $$[$1] = $3;          }  key_val_list          :  string '=' param_val_list                  { $$[$1] = $3;          }
# Line 211  list_instruction      :  AUDIO_OUTPUT_DE Line 296  list_instruction      :  AUDIO_OUTPUT_DE
296                        |  AVAILABLE_ENGINES               { $$ = LSCPSERVER->ListAvailableEngines();            }                        |  AVAILABLE_ENGINES               { $$ = LSCPSERVER->ListAvailableEngines();            }
297                        |  AVAILABLE_MIDI_INPUT_DRIVERS    { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }                        |  AVAILABLE_MIDI_INPUT_DRIVERS    { $$ = LSCPSERVER->ListAvailableMidiInputDrivers();   }
298                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS  { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }                        |  AVAILABLE_AUDIO_OUTPUT_DRIVERS  { $$ = LSCPSERVER->ListAvailableAudioOutputDrivers(); }
299                          |  MIDI_INSTRUMENTS SP midi_map    { $$ = LSCPSERVER->ListMidiInstrumentMappings($3);    }
300                          |  MIDI_INSTRUMENTS SP ALL         { $$ = LSCPSERVER->ListAllMidiInstrumentMappings();   }
301                          |  MIDI_INSTRUMENT_MAPS            { $$ = LSCPSERVER->ListMidiInstrumentMaps();          }
302                          |  FX_SENDS SP sampler_channel     { $$ = LSCPSERVER->ListFxSends($3);                   }
303                        ;                        ;
304    
305  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);       }
# Line 220  load_instr_args       :  filename SP ins Line 309  load_instr_args       :  filename SP ins
309  load_engine_args      :  engine_name SP sampler_channel  { $$ = LSCPSERVER->SetEngineType($1, $3); }  load_engine_args      :  engine_name SP sampler_channel  { $$ = LSCPSERVER->SetEngineType($1, $3); }
310                        ;                        ;
311    
312    instr_load_mode       :  ON_DEMAND       { $$ = MidiInstrumentMapper::ON_DEMAND;      }
313                          |  ON_DEMAND_HOLD  { $$ = MidiInstrumentMapper::ON_DEMAND_HOLD; }
314                          |  PERSISTENT      { $$ = MidiInstrumentMapper::PERSISTENT;     }
315                          ;
316    
317  device_index              :  number  device_index              :  number
318                            ;                            ;
319    
# Line 239  midi_input_channel_index  :  number Line 333  midi_input_channel_index  :  number
333  midi_input_type_name      :  string  midi_input_type_name      :  string
334                            ;                            ;
335    
336    midi_map                  :  number
337                              ;
338    
339    midi_bank                 :  number
340                              ;
341    
342    midi_prog                 :  number
343                              ;
344    
345    midi_ctrl                 :  number
346                              ;
347    
348  volume_value              :  dotnum  volume_value              :  dotnum
349                            |  number  { $$ = $1; }                            |  number  { $$ = $1; }
350                            ;                            ;
# Line 249  sampler_channel           :  number Line 355  sampler_channel           :  number
355  instrument_index          :  number  instrument_index          :  number
356                            ;                            ;
357    
358    fx_send_id                :  number
359                              ;
360    
361  engine_name               :  string  engine_name               :  string
362                            ;                            ;
363    
364  filename                  :  stringval  filename                  :  stringval
365                            ;                            ;
366    
367    map_name                  :  stringval
368                              ;
369    
370    entry_name                :  stringval
371                              ;
372    
373    fx_send_name              :  stringval
374                              ;
375    
376  param_val_list            :  param_val  param_val_list            :  param_val
377                            |  param_val_list','param_val  { $$ = $1 + "," + $3; }                            |  param_val_list','param_val  { $$ = $1 + "," + $3; }
378                            ;                            ;
379    
380  param_val                 :  string  param_val                 :  string
381                            |  '\'' string '\''  { $$ = "\'" + $2 + "\'"; }  // we eleminate encapsulating (apostrophe) limiters later                            |  stringval
                           |  '\"' string '\"'  { $$ = "\"" + $2 + "\""; }  // s.a.  
382                            |  number            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }                            |  number            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
383                            |  dotnum            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }                            |  dotnum            { std::stringstream ss; ss << "\'" << $1 << "\'"; $$ = ss.str(); }
384                            ;                            ;
# Line 392  ADD                   :  'A''D''D' Line 509  ADD                   :  'A''D''D'
509  GET                   :  'G''E''T'  GET                   :  'G''E''T'
510                        ;                        ;
511    
512    MAP                   :  'M''A''P'
513                          ;
514    
515    UNMAP                 :  'U''N''M''A''P'
516                          ;
517    
518    CLEAR                 :  'C''L''E''A''R'
519                          ;
520    
521  CREATE                :  'C''R''E''A''T''E'  CREATE                :  'C''R''E''A''T''E'
522                        ;                        ;
523    
# Line 407  LOAD                  :  'L''O''A''D' Line 533  LOAD                  :  'L''O''A''D'
533  ALL                   :  'A''L''L'  ALL                   :  'A''L''L'
534                        ;                        ;
535    
536    NONE                  :  'N''O''N''E'
537                          ;
538    
539    DEFAULT               :  'D''E''F''A''U''L''T'
540                          ;
541    
542  NON_MODAL             :  'N''O''N''_''M''O''D''A''L'  NON_MODAL             :  'N''O''N''_''M''O''D''A''L'
543                        ;                        ;
544    
# Line 440  CHANNELS             :  'C''H''A''N''N'' Line 572  CHANNELS             :  'C''H''A''N''N''
572  INFO                 :  'I''N''F''O'  INFO                 :  'I''N''F''O'
573                       ;                       ;
574    
575    AUDIO_OUTPUT_DEVICE_COUNT :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''C''O''U''N''T'
576                         ;
577    
578    AUDIO_OUTPUT_DEVICE_INFO  :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''I''N''F''O'
579                         ;
580    
581    MIDI_INPUT_DEVICE_COUNT   :  'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''_''C''O''U''N''T'
582                         ;
583    
584    MIDI_INPUT_DEVICE_INFO    :  'M''I''D''I''_''I''N''P''U''T''_''D''E''V''I''C''E''_''I''N''F''O'
585                         ;
586    
587    MIDI_INSTRUMENT_MAP_COUNT :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''_''C''O''U''N''T'
588                         ;
589    
590    MIDI_INSTRUMENT_MAP_INFO  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''_''I''N''F''O'
591                         ;
592    
593    MIDI_INSTRUMENT_COUNT     :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''C''O''U''N''T'
594                         ;
595    
596    MIDI_INSTRUMENT_INFO      :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''I''N''F''O'
597                         ;
598    
599  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'
600                       ;                       ;
601    
602  CHANNEL_INFO         :  'C''H''A''N''N''E''L''_''I''N''F''O'  CHANNEL_INFO         :  'C''H''A''N''N''E''L''_''I''N''F''O'
603                       ;                       ;
604    
605    FX_SEND_COUNT        :  'F''X''_''S''E''N''D''_''C''O''U''N''T'
606                         ;
607    
608    FX_SEND_INFO         :  'F''X''_''S''E''N''D''_''I''N''F''O'
609                         ;
610    
611  BUFFER_FILL          :  'B''U''F''F''E''R''_''F''I''L''L'  BUFFER_FILL          :  'B''U''F''F''E''R''_''F''I''L''L'
612                       ;                       ;
613    
# Line 455  STREAM_COUNT         :  'S''T''R''E''A'' Line 617  STREAM_COUNT         :  'S''T''R''E''A''
617  VOICE_COUNT          :  'V''O''I''C''E''_''C''O''U''N''T'  VOICE_COUNT          :  'V''O''I''C''E''_''C''O''U''N''T'
618                       ;                       ;
619    
620    TOTAL_VOICE_COUNT    :  'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T'
621                         ;
622    
623    TOTAL_VOICE_COUNT_MAX:  'T''O''T''A''L''_''V''O''I''C''E''_''C''O''U''N''T''_''M''A''X'
624                         ;
625    
626    GLOBAL_INFO          :  'G''L''O''B''A''L''_''I''N''F''O'
627                         ;
628    
629  INSTRUMENT           :  'I''N''S''T''R''U''M''E''N''T'  INSTRUMENT           :  'I''N''S''T''R''U''M''E''N''T'
630                       ;                       ;
631    
632  ENGINE               :  'E' 'N' 'G' 'I' 'N' 'E'  ENGINE               :  'E' 'N' 'G' 'I' 'N' 'E'
633                       ;                       ;
634    
635    ON_DEMAND            :  'O''N''_''D''E''M''A''N''D'
636                         ;
637    
638    ON_DEMAND_HOLD       :  'O''N''_''D''E''M''A''N''D''_''H''O''L''D'
639                         ;
640    
641    PERSISTENT           :  'P''E''R''S''I''S''T''E''N''T'
642                         ;
643    
644  AUDIO_OUTPUT_DEVICE_PARAMETER  :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''P''A''R''A''M''E''T''E''R'  AUDIO_OUTPUT_DEVICE_PARAMETER  :  'A''U''D''I''O''_''O''U''T''P''U''T''_''D''E''V''I''C''E''_''P''A''R''A''M''E''T''E''R'
645                                 ;                                 ;
646    
# Line 503  MIDI_INPUT_DEVICE     :  'M''I''D''I''_' Line 683  MIDI_INPUT_DEVICE     :  'M''I''D''I''_'
683  MIDI_INPUT_DRIVER_PARAMETER  :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R''_''P''A''R''A''M''E''T''E''R'  MIDI_INPUT_DRIVER_PARAMETER  :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R''_''P''A''R''A''M''E''T''E''R'
684                               ;                               ;
685    
686    MIDI_INSTRUMENT  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T'
687                     ;
688    
689    MIDI_INSTRUMENTS  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''S'
690                      ;
691    
692    MIDI_INSTRUMENT_MAP  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P'
693                         ;
694    
695    MIDI_INSTRUMENT_MAPS  :  'M''I''D''I''_''I''N''S''T''R''U''M''E''N''T''_''M''A''P''S'
696                          ;
697    
698  MIDI_INPUT_DRIVER     :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R'  MIDI_INPUT_DRIVER     :  'M''I''D''I''_''I''N''P''U''T''_''D''R''I''V''E''R'
699                        ;                        ;
700    
# Line 518  MIDI_INPUT_TYPE       :  'M''I''D''I''_' Line 710  MIDI_INPUT_TYPE       :  'M''I''D''I''_'
710  MIDI_INPUT            :  'M''I''D''I''_''I''N''P''U''T'  MIDI_INPUT            :  'M''I''D''I''_''I''N''P''U''T'
711                        ;                        ;
712    
713    MIDI_CONTROLLER       :  'M''I''D''I''_''C''O''N''T''R''O''L''L''E''R'
714                          ;
715    
716    FX_SEND               :  'F''X''_''S''E''N''D'
717                          ;
718    
719    FX_SENDS              :  'F''X''_''S''E''N''D''S'
720                          ;
721    
722  SERVER                :  'S''E''R''V''E''R'  SERVER                :  'S''E''R''V''E''R'
723                        ;                        ;
724    
725  VOLUME                :  'V''O''L''U''M''E'  VOLUME                :  'V''O''L''U''M''E'
726                        ;                        ;
727    
728    LEVEL                 :  'L''E''V''E''L'
729                          ;
730    
731  MUTE                  :  'M''U''T''E'  MUTE                  :  'M''U''T''E'
732                        ;                        ;
733    
# Line 542  RESET                 :  'R''E''S''E''T' Line 746  RESET                 :  'R''E''S''E''T'
746  MISCELLANEOUS         :  'M''I''S''C''E''L''L''A''N''E''O''U''S'  MISCELLANEOUS         :  'M''I''S''C''E''L''L''A''N''E''O''U''S'
747                        ;                        ;
748    
749    NAME                  :  'N''A''M''E'
750                          ;
751    
752  ECHO                  :  'E''C''H''O'  ECHO                  :  'E''C''H''O'
753                        ;                        ;
754    

Legend:
Removed from v.705  
changed lines
  Added in v.1108

  ViewVC Help
Powered by ViewVC