2
Copyright (C) 2005 Fons Adriaensen <fons.adriaensen@skynet.be>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include <clthreads.h>
36
Asect (void) { *_label = 0; }
56
enum { HAS_SWELL = 1, HAS_TREM = 2, NRANK = 32 };
57
enum { SWELL, TFREQ, TMODD, NPARAM };
67
Fparm _param [NPARAM];
76
enum { IS_PEDAL = 256 };
78
Keybd (void) : _flags (0) { *_label = 0; }
89
enum { DIVRANK, KBDRANK, COUPLER, TREMUL };
91
Ifelm (void) : _state (0) { *_label = *_mnemo = 0; }
107
enum { NIFELM = 32 };
109
Group (void) : _nifelm (0) { *_label = 0; }
113
Ifelm _ifelms [NIFELM];
121
Chconf (void) { memset (_bits, 0, 16 * sizeof (U16)); }
131
Preset (void) { memset (_bits, 0, NGROUP * sizeof (U32)); }
138
class Model : public A_thread
142
Model (Lfq_u32 *commq, const char *appid, const char *stops, const char *instr, const char *waves, bool uhome);
143
virtual ~Model (void);
145
U16 *chconf (void) const { return (U16 *) _chbits; }
146
void terminate (void) { put_event (EV_EXIT, 1); }
152
virtual void thr_main (void);
156
void proc_mesg (ITC_mesg *M);
157
void init_audio (void);
158
void init_iface (void);
159
void init_ranks (int comm);
160
void proc_rank (int g, int i, int comm);
161
void set_ifelm (int g, int i, int m);
162
void clr_group (int g);
163
void set_aupar (int s, int a, int p, float v);
164
void set_dipar (int s, int d, int p, float v);
165
void set_mconf (int i, U16 *d);
166
void get_state (U32 *bits);
167
void set_state (int bank, int pres);
168
void midi_off (int mask);
169
void retune (float freq, int temp);
170
void recalc (int g, int i);
172
Rank *find_rank (int g, int i);
173
int read_instr (void);
174
int write_instr (void);
175
int get_preset (int bank, int pres, U32 *bits);
176
void set_preset (int bank, int pres, U32 *bits);
177
void ins_preset (int bank, int pres, U32 *bits);
178
void del_preset (int bank, int pres);
179
int read_presets (void);
180
int write_presets (void);
190
Asect _asect [NASECT];
191
Keybd _keybd [NKEYBD];
192
Divis _divis [NDIVIS];
193
Group _group [NGROUP];
208
Preset *_preset [NBANK][NPRES];
209
M_audio_info *_audio;