2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* * |
* * |
7 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
8 |
* 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 * |
52 |
%token <Char> CHAR |
%token <Char> CHAR |
53 |
%token <Dotnum> DOTNUM |
%token <Dotnum> DOTNUM |
54 |
%token <Number> NUMBER |
%token <Number> NUMBER |
55 |
%token SP LF CR |
%token SP LF CR HASH |
56 |
%token ADD GET LOAD REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT |
%token ADD GET LOAD REMOVE SET SUBSCRIBE UNSUBSCRIBE RESET QUIT |
57 |
%token CHANNEL NOTIFICATION |
%token CHANNEL NOTIFICATION |
58 |
%token AVAILABLE_ENGINES CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT |
%token AVAILABLE_ENGINES CHANNELS INFO BUFFER_FILL STREAM_COUNT VOICE_COUNT |
62 |
%token ALSA JACK |
%token ALSA JACK |
63 |
|
|
64 |
%type <Dotnum> volume |
%type <Dotnum> volume |
65 |
%type <Number> sampler_channel instrument_index udp_port audio_output_channel midi_input_channel midi_input_type |
%type <Number> sampler_channel instrument_index udp_port audio_output_channel midi_input_channel |
66 |
%type <String> string alpha_num_string filename engine_name session_id midi_input_port command get_instruction load_instruction set_chan_instruction load_instr_args load_engine_args |
%type <String> string alpha_num_string filename engine_name session_id midi_input_port command get_instruction load_instruction set_chan_instruction load_instr_args load_engine_args |
67 |
%type <FillResponse> buffer_size_type |
%type <FillResponse> buffer_size_type |
68 |
%type <AudioOutput> audio_output_type |
%type <AudioOutput> audio_output_type |
69 |
|
%type <MidiInput> midi_input_type |
70 |
|
|
71 |
%start input |
%start input |
72 |
|
|
80 |
; |
; |
81 |
|
|
82 |
line : /* epsilon (empty line ignored) */ |
line : /* epsilon (empty line ignored) */ |
83 |
|
| comment |
84 |
| command { LSCPSERVER->AnswerClient($1); } |
| command { LSCPSERVER->AnswerClient($1); } |
85 |
| error { LSCPSERVER->AnswerClient("Err:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; } |
| error { LSCPSERVER->AnswerClient("Err:0:Unknown command.\r\n"); RESTART; return LSCP_SYNTAX_ERROR; } |
86 |
; |
; |
87 |
|
|
88 |
|
comment : HASH |
89 |
|
| comment HASH |
90 |
|
| comment SP |
91 |
|
| comment NUMBER |
92 |
|
| comment string |
93 |
|
; |
94 |
|
|
95 |
command : ADD SP CHANNEL { $$ = LSCPSERVER->AddChannel(); } |
command : ADD SP CHANNEL { $$ = LSCPSERVER->AddChannel(); } |
96 |
| GET SP get_instruction { $$ = $3; } |
| GET SP get_instruction { $$ = $3; } |
97 |
| LOAD SP load_instruction { $$ = $3; } |
| LOAD SP load_instruction { $$ = $3; } |
120 |
| AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type { $$ = LSCPSERVER->SetAudioOutputType($5, $3); } |
| AUDIO_OUTPUT_TYPE SP sampler_channel SP audio_output_type { $$ = LSCPSERVER->SetAudioOutputType($5, $3); } |
121 |
| MIDI_INPUT_PORT SP sampler_channel SP midi_input_port { $$ = LSCPSERVER->SetMIDIInputPort($5, $3); } |
| MIDI_INPUT_PORT SP sampler_channel SP midi_input_port { $$ = LSCPSERVER->SetMIDIInputPort($5, $3); } |
122 |
| MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3); } |
| MIDI_INPUT_CHANNEL SP sampler_channel SP midi_input_channel { $$ = LSCPSERVER->SetMIDIInputChannel($5, $3); } |
123 |
| MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type { $$ = "Err:0:Not implemented yet\r\n"; } |
| MIDI_INPUT_TYPE SP sampler_channel SP midi_input_type { $$ = LSCPSERVER->SetMIDIInputType($5, $3); } |
124 |
| VOLUME SP sampler_channel SP volume { $$ = LSCPSERVER->SetVolume($5, $3); } |
| VOLUME SP sampler_channel SP volume { $$ = LSCPSERVER->SetVolume($5, $3); } |
125 |
; |
; |
126 |
|
|
134 |
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |
load_engine_args : engine_name SP sampler_channel { $$ = LSCPSERVER->LoadEngine($1, $3); } |
135 |
; |
; |
136 |
|
|
137 |
audio_output_type : ALSA { $$ = audio_output_type_alsa; } |
audio_output_type : ALSA { $$ = AudioOutputDevice::type_alsa; } |
138 |
| JACK { $$ = audio_output_type_jack; } |
| JACK { $$ = AudioOutputDevice::type_jack; } |
139 |
; |
; |
140 |
|
|
141 |
midi_input_type : ALSA { $$ = ALSA; } |
midi_input_type : ALSA { $$ = MidiInputDevice::type_alsa; } |
142 |
; |
; |
143 |
|
|
144 |
volume : DOTNUM |
volume : DOTNUM |