1 /*
2 rakarrack - a guitar efects software
3
4 global.h - Variable Definitions and functions
5 Copyright (C) 2008-2010 Josep Andreu
6 Author: Josep Andreu & Ryan Billing
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of version 2 of the GNU General Public License
10 as published by the Free Software Foundation.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License (version 2) for more details.
16
17 You should have received a copy of the GNU General Public License
18 (version2) along with this program; if not, write to the Free Software Foundation,
19 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21 */
22
23
24 #ifndef DXEMU_H
25 #define DXEMU_H
26
27
28 #define D_PI 6.283185f
29 #define PI 3.141598f
30 #define LOG_10 2.302585f
31 #define LOG_2 0.693147f
32 #define LN2R 1.442695041f
33 #define CNST_E 2.71828182845905f
34 #define AMPLITUDE_INTERPOLATION_THRESHOLD 0.0001f
35 #define FF_MAX_VOWELS 6
36 #define FF_MAX_FORMANTS 12
37 #define FF_MAX_SEQUENCE 8
38 #define MAX_FILTER_STAGES 5
39 #define RND (rand()/(RAND_MAX+1.0))
40 #define RND1 (((float) rand())/(((float) RAND_MAX)+1.0f))
41 #define F2I(f,i) (i)=((f>0) ? ( (int)(f) ) :( (int)(f-1.0f) ))
42 #define dB2rap(dB) (float)((expf((dB)*LOG_10/20.0f)))
43 #define rap2dB(rap) (float)((20*log(rap)/LOG_10))
44 #define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
45 #define INTERPOLATE_AMPLITUDE(a,b,x,size) ( (a) + ( (b) - (a) ) * (float)(x) / (float) (size) )
46 #define ABOVE_AMPLITUDE_THRESHOLD(a,b) ( ( 2.0f*fabs( (b) - (a) ) / ( fabs( (b) + (a) + 0.0000000001f) ) ) > AMPLITUDE_INTERPOLATION_THRESHOLD )
47 #define POLY 8
48 #define DENORMAL_GUARD 1e-18f // Make it smaller until CPU problem re-appears
49 #define SwapFourBytes(data) ( (((data) >> 24) & 0x000000ff) | (((data) >> 8) & 0x0000ff00) | (((data) << 8) & 0x00ff0000) | (((data) << 24) & 0xff000000) )
50 #define D_NOTE 1.059463f
51 #define LOG_D_NOTE 0.057762f
52 #define D_NOTE_SQRT 1.029302f
53 #define MAX_PEAKS 8
54 #define MAX_ALIENWAH_DELAY 100
55 #define ATTACK 0.175f //crossover time for reverse delay
56 #define MAX_DELAY 2 // Number of Seconds
57 #define MAXHARMS 8 // max number of harmonics available
58 #define MAX_PHASER_STAGES 12
59 #define MAX_CHORUS_DELAY 250.0f //ms
60 #define LN2 (1.0f) //Uncomment for att/rel to behave more like a capacitor.
61 #define MUG_CORR_FACT 0.4f
62 //Crunch waveshaping constants
63 #define Thi 0.67f //High threshold for limiting onset
64 #define Tlo -0.65f //Low threshold for limiting onset
65 #define Tlc -0.6139445f //Tlo + sqrt(Tlo/500)
66 #define Thc 0.6365834f //Thi - sqrt(Thi/600)
67 #define CRUNCH_GAIN 100.0f //Typical voltage gain for most OD stompboxes
68 #define DIV_TLC_CONST 0.002f // 1/300
69 #define DIV_THC_CONST 0.0016666f // 1/600 (approximately)
70 //End waveshaping constants
71 #define D_FLANGE_MAX_DELAY 0.055f // Number of Seconds - 50ms corresponds to fdepth = 20 (Hz). Added some extra for padding
72 #define LFO_CONSTANT 9.765625e-04 // 1/(2^LOG_FMAX - 1)
73 #define LOG_FMAX 10.0f // -- This optimizes LFO sweep for useful range.
74 #define MINDEPTH 20.0f // won't allow filter lower than 20Hz
75 #define MAXDEPTH 15000.0f // Keeps delay greater than 2 samples at 44kHz SR
76 #define MAX_EQ_BANDS 16
77 #define CLOSED 1
78 #define OPENING 2
79 #define OPEN 3
80 #define CLOSING 4
81 #define ENV_TR 0.0001f
82 #define HARMONICS 11
83 #define REV_COMBS 8
84 #define REV_APS 4
85 #define MAX_SFILTER_STAGES 12
86
87 #define TEMPBUFSIZE 1024
88
89 typedef union {
90 float f;
91 long i;
92 } ls_pcast32;
93
94 /*
95 static inline float f_pow2(float x)
96 {
97 ls_pcast32 *px, tx, lx;
98 float dx;
99
100 px = (ls_pcast32 *)&x; // store address of float as long pointer
101 tx.f = (x-0.5f) + (3<<22); // temporary value for truncation
102 lx.i = tx.i - 0x4b400000; // integer power of 2
103 dx = x - (float)lx.i; // float remainder of power of 2
104
105 x = 1.0f + dx * (0.6960656421638072f + // cubic apporoximation of 2^x
106 dx * (0.224494337302845f + // for x in the range [0, 1]
107 dx * (0.07944023841053369f)));
108 (*px).i += (lx.i << 23); // add integer power of 2 to exponent
109
110 return (*px).f;
111 }
112 */
113 /*
114 #define P2a0 1.00000534060469
115 #define P2a1 0.693057900547259
116 #define P2a2 0.239411678986933
117 #define P2a3 0.0532229404911678
118 #define P2a4 0.00686649174914722
119 #include <math.h>
120 static inline float f_pow2(float x)
121 {
122 float y,xx, intpow;
123 long xint = (int) fabs(ceil(x));
124 xx = x - ceil(x);
125 xint = xint<<xint;
126 if(x>0) intpow = (float) xint;
127 else intpow = 1.0f;
128
129 y = intpow*(xx*(xx*(xx*(xx*P2a4 + P2a3) + P2a2) + P2a1) + P2a0);
130
131 return y;
132
133 }
134 */
135
136 //The below pow function really works & is good to 16 bits, but is it faster than math lib powf()???
137 //globals
138 #include <math.h>
139 static const float a[5] = { 1.00000534060469, 0.693057900547259, 0.239411678986933, 0.0532229404911678, 0.00686649174914722 };
140 //lookup for positive powers of 2
141 static const float pw2[25] = {1.0f, 2.0f, 4.0f, 8.0f, 16.0f, 32.0f, 64.0f, 128.0f, 256.0f, 512.0f, 1024.0f, 2048.0f, 4096.0f, 8192.0f, 16384.0f, 32768.0f, 65536.0f, 131072.0f, 262144.0f, 524288.0f, 1048576.0f, 2097152.0f, 4194304.0f, 8388608.0f, 16777216.0f};
142 //negative powers of 2, notice ipw2[0] will never be indexed.
143 static const float ipw2[25] = {1.0, 5.0e-01, 2.5e-01, 1.25e-01, 6.25e-02, 3.125e-02, 1.5625e-02, 7.8125e-03, 3.90625e-03, 1.953125e-03, 9.765625e-04, 4.8828125e-04, 2.44140625e-04, 1.220703125e-04, 6.103515625e-05, 3.0517578125e-05, 1.52587890625e-05, 7.62939453125e-06, 3.814697265625e-06, 1.9073486328125e-06, 9.5367431640625e-07, 4.76837158203125e-07, 2.38418579101562e-07, 1.19209289550781e-07, 5.96046447753906e-08};
144
f_pow2(float x)145 static inline float f_pow2(float x)
146 {
147 float y = 0.0f;
148
149 if(x >=24) return pw2[24];
150 else if (x <= -24.0f) return ipw2[24];
151 else {
152 float whole = ceilf(x);
153 int xint = (int) whole;
154 x = x - whole;
155
156 if (xint>=0) {
157 y = pw2[xint]*(x*(x*(x*(x*a[4] + a[3]) + a[2]) + a[1]) + a[0]);
158
159 } else {
160
161 y = ipw2[-xint]*(x*(x*(x*(x*a[4] + a[3]) + a[2]) + a[1]) + a[0]);
162
163 }
164
165 return y;
166 }
167
168 }
169
170 #define f_exp(x) f_pow2(x * LN2R)
171
172 //#include "config.h"
173 #include <signal.h>
174 #include <dirent.h>
175 #include <search.h>
176 #include <sys/time.h>
177 #ifdef NOTLV2
178 #include <alsa/asoundlib.h>
179 #include <X11/xpm.h>
180 #include <jack/jack.h>
181 #include <jack/midiport.h>
182 #include <FL/Fl_Preferences.H>
183 #else
184 #include <stdint.h>
185 #include <string.h>
186 #include <stdio.h>
187 #include <stdlib.h>
188 #endif
189 #include "FPreset.h"
190 #if(0)
191 #include "Reverb.h"
192 #include "Chorus.h"
193 #include "Echo.h"
194 #include "Phaser.h"
195 #include "Distorsion.h"
196 #include "EQ.h"
197 #include "Compressor.h"
198 #include "Alienwah.h"
199 #include "DynamicFilter.h"
200 #include "Pan.h"
201 #include "Harmonizer.h"
202 #include "MusicDelay.h"
203 #include "Gate.h"
204 #include "Tuner.h"
205 #include "MIDIConverter.h"
206 #include "RecognizeNote.h"
207 #include "RecChord.h"
208 #include "NewDist.h"
209 #include "APhaser.h"
210 #include "Valve.h"
211 #include "Dual_Flange.h"
212 #include "Ring.h"
213 #include "Exciter.h"
214 #include "MBDist.h"
215 #include "Arpie.h"
216 #include "Expander.h"
217 #include "Shuffle.h"
218 #include "Synthfilter.h"
219 #include "MBVvol.h"
220 #include "Convolotron.h"
221 #include "Resample.h"
222 #include "Looper.h"
223 #include "RyanWah.h"
224 #include "RBEcho.h"
225 #include "CoilCrafter.h"
226 #include "ShelfBoost.h"
227 #include "Vocoder.h"
228 #include "Sustainer.h"
229 #include "Sequence.h"
230 #include "Shifter.h"
231 #include "StompBox.h"
232 #include "Reverbtron.h"
233 #include "Echotron.h"
234 #include "StereoHarm.h"
235 #include "CompBand.h"
236 #include "Opticaltrem.h"
237 #include "Vibe.h"
238 #include "Infinity.h"
239 #include "beattracker.h"
240 #endif
241
242
243 #if(0)
244 extern int Pexitprogram, preset;
245 extern int commandline, gui;
246 extern int exitwithhelp, nojack;
247 extern int maxx_len;
248 extern int error_num;
249 //extern int period;
250 extern int reconota;
251 extern int needtoloadstate;
252 extern int needtoloadbank;
253 extern int stecla;
254 extern int looper_lqua;
255 //extern unsigned int SAMPLE_RATE;
256 extern int note_active[POLY];
257 extern int rnote[POLY];
258 extern int gate[POLY];
259 //extern int pdata[50];
260 extern float val_sum;
261 //extern float fPERIOD;
262 //extern unsigned int SAMPLE_RATE;
263 //extern float fSAMPLE_RATE;
264 //extern float cSAMPLE_RATE;
265 extern float r__ratio[12];
266 //extern int Wave_res_amount;
267 //extern int Wave_up_q;
268 //extern int Wave_down_q;
269 extern Pixmap p, mask;
270 extern XWMHints *hints;
271 extern float freqs[12];
272 extern float lfreqs[12];
273 extern float aFreq;
274 extern char *s_uuid;
275 extern char *statefile;
276 extern char *filetoload;
277 extern char *banktoload;
278 class RKR
279 {
280
281
282
283 public:
284
285 RKR ();
286 ~RKR ();
287
288 void Alg (float *inl, float *inr,float *origl, float *origr ,void *);
289 void Control_Gain (float *origl, float *origr);
290 void Control_Volume (float *origl, float *origr);
291
292 void Vol_Efx (int NumEffect, float volume);
293 void Vol2_Efx ();
294 void Vol3_Efx ();
295 void cleanup_efx ();
296 void midievents();
297 void miramidi ();
298 void calculavol (int i);
299 void Bank_to_Preset (int Num);
300 void Preset_to_Bank (int i);
301 void Actualizar_Audio ();
302 void loadfile (char *filename);
303 void getbuf (char *buf, int j);
304 void putbuf (char *buf, int j);
305 void savefile (char *filename);
306 void SaveIntPreset(int num, char *name);
307 void DelIntPreset(int num, char *name);
308 void MergeIntPreset(char *filename);
309 void loadmiditable (char *filename);
310 void savemiditable (char *filename);
311 void loadskin (char *filename);
312 void saveskin (char *filename);
313 int loadbank (char *filename);
314 void loadnames();
315 int savebank (char *filename);
316 void ConvertOldFile(char *filename);
317 void ConvertReverbFile(char * filename);
318 void dump_preset_names ();
319 void New ();
320 void New_Bank ();
321 void Adjust_Upsample();
322 void add_metro();
323 void init_rkr ();
324 int Message (int prio, const char *labelwin, const char *message_text);
325 char *PrefNom (const char *dato);
326 void EQ1_setpreset (int npreset);
327 void EQ2_setpreset (int npreset);
328 int Cabinet_setpreset (int npreset);
329 void InitMIDI ();
330 void ConnectMIDI ();
331 void ActiveUn(int value);
332 void ActOnOff();
333 void jack_process_midievents (jack_midi_event_t *midievent);
334 void process_midi_controller_events(int parameter, int value);
335 int ret_Tempo(int value);
336 int ret_LPF(int value);
337 int ret_HPF(int value);
338 void Conecta ();
339 void disconectaaconnect ();
340 void conectaaconnect ();
341 int BigEndian();
342 void fix_endianess();
343 void copy_IO();
344 void convert_IO();
345 int CheckOldBank(char *filename);
346 int Get_Bogomips();
347 int checkonoff(int value);
348 int TapTempo();
349 void TapTempo_Timeout(int state);
350 void Update_tempo();
351 int checkforaux();
352 void Error_Handle(int num);
353 void update_freqs(float val);
354
355 class FPreset *Fpre;
356 class Reverb *efx_Rev;
357 class Chorus *efx_Chorus;
358 class Chorus *efx_Flanger;
359 class Phaser *efx_Phaser;
360 class Analog_Phaser *efx_APhaser;
361 class EQ *efx_EQ1;
362 class EQ *efx_EQ2;
363 class Echo *efx_Echo;
364 class Distorsion *efx_Distorsion;
365 class Distorsion *efx_Overdrive;
366 class Compressor *efx_Compressor;
367 class DynamicFilter *efx_WhaWha;
368 class Alienwah *efx_Alienwah;
369 class EQ *efx_Cabinet;
370 class Pan *efx_Pan;
371 class Harmonizer *efx_Har;
372 class MusicDelay *efx_MusDelay;
373 class Gate *efx_Gate;
374 class NewDist *efx_NewDist;
375 class Tuner *efx_Tuner;
376 class MIDIConverter *efx_MIDIConverter;
377 class metronome *M_Metronome;
378 class beattracker *beat;
379
380 class Recognize *RecNote;
381 class RecChord *RC;
382 class Compressor *efx_FLimiter;
383 class Valve *efx_Valve;
384 class Dflange *efx_DFlange;
385 class Ring *efx_Ring;
386 class Exciter *efx_Exciter;
387 class MBDist *efx_MBDist;
388 class Arpie *efx_Arpie;
389 class Expander *efx_Expander;
390 class Synthfilter *efx_Synthfilter;
391 class Shuffle *efx_Shuffle;
392 class MBVvol *efx_MBVvol;
393 class Convolotron *efx_Convol;
394 class Resample *U_Resample;
395 class Resample *D_Resample;
396 class Resample *A_Resample;
397 class AnalogFilter *DC_Offsetl;
398 class AnalogFilter *DC_Offsetr;
399 class Looper *efx_Looper;
400 class RyanWah *efx_RyanWah;
401 class RBEcho *efx_RBEcho;
402 class CoilCrafter *efx_CoilCrafter;
403 class ShelfBoost *efx_ShelfBoost;
404 class Vocoder *efx_Vocoder;
405 class Sustainer *efx_Sustainer;
406 class Sequence *efx_Sequence;
407 class Shifter *efx_Shifter;
408 class StompBox *efx_StompBox;
409 class Reverbtron *efx_Reverbtron;
410 class Echotron *efx_Echotron;
411 class StereoHarm *efx_StereoHarm;
412 class CompBand *efx_CompBand;
413 class Opticaltrem *efx_Opticaltrem;
414 class Vibe *efx_Vibe;
415 class Infinity *efx_Infinity;
416
417 jack_client_t *jackclient;
418 jack_options_t options;
419 jack_status_t status;
420 char jackcliname[64];
421
422 int db6booster;
423 int jdis;
424 int jshut;
425 int DC_Offset;
426 int Bypass;
427 int MIDIConverter_Bypass;
428 int Metro_Bypass;
429 int Tuner_Bypass;
430 int Tap_Bypass;
431 int ACI_Bypass;
432 int Reverb_Bypass;
433 int Chorus_Bypass;
434 int Flanger_Bypass;
435 int Phaser_Bypass;
436 int Overdrive_Bypass;
437 int Distorsion_Bypass;
438 int Echo_Bypass;
439 int EQ1_Bypass;
440 int EQ2_Bypass;
441 int Compressor_Bypass;
442 int WhaWha_Bypass;
443 int Alienwah_Bypass;
444 int Cabinet_Bypass;
445 int Pan_Bypass;
446 int Harmonizer_Bypass;
447 int MusDelay_Bypass;
448 int Gate_Bypass;
449 int NewDist_Bypass;
450 int APhaser_Bypass;
451 int Valve_Bypass;
452 int DFlange_Bypass;
453 int Ring_Bypass;
454 int Exciter_Bypass;
455 int MBDist_Bypass;
456 int Arpie_Bypass;
457 int Expander_Bypass;
458 int Shuffle_Bypass;
459 int Synthfilter_Bypass;
460 int MBVvol_Bypass;
461 int Convol_Bypass;
462 int Looper_Bypass;
463 int RyanWah_Bypass;
464 int RBEcho_Bypass;
465 int CoilCrafter_Bypass;
466 int ShelfBoost_Bypass;
467 int Vocoder_Bypass;
468 int Sustainer_Bypass;
469 int Sequence_Bypass;
470 int Shifter_Bypass;
471 int StompBox_Bypass;
472 int Reverbtron_Bypass;
473 int Echotron_Bypass;
474 int StereoHarm_Bypass;
475 int CompBand_Bypass;
476 int Opticaltrem_Bypass;
477 int Vibe_Bypass;
478 int Infinity_Bypass;
479 int Bypass_B;
480 int Reverb_B;
481 int Chorus_B;
482 int Flanger_B;
483 int Phaser_B;
484 int APhaser_B;
485 int DFlange_B;
486 int Overdrive_B;
487 int Distorsion_B;
488 int Echo_B;
489 int EQ1_B;
490 int EQ2_B;
491 int Compressor_B;
492 int WhaWha_B;
493 int Alienwah_B;
494 int Cabinet_B;
495 int Pan_B;
496 int Harmonizer_B;
497 int MusDelay_B;
498 int Gate_B;
499 int NewDist_B;
500 int Valve_B;
501 int Ring_B;
502 int Exciter_B;
503 int MBDist_B;
504 int Arpie_B;
505 int Expander_B;
506 int Shuffle_B;
507 int Synthfilter_B;
508 int MBVvol_B;
509 int Convol_B;
510 int Looper_B;
511 int RyanWah_B;
512 int RBEcho_B;
513 int CoilCrafter_B;
514 int ShelfBoost_B;
515 int Vocoder_B;
516 int Sustainer_B;
517 int Sequence_B;
518 int Shifter_B;
519 int StompBox_B;
520 int Reverbtron_B;
521 int Echotron_B;
522 int StereoHarm_B;
523 int CompBand_B;
524 int Opticaltrem_B;
525 int Vibe_B;
526 int Infinity_B;
527
528 int Cabinet_Preset;
529 int Selected_Preset;
530 int lv[70][20];
531 int saved_order[16];
532 int efx_order[16];
533 int new_order[16];
534 int availables[60];
535 int active[12];
536 int MidiCh;
537 int HarCh;
538 int init_state;
539 int actuvol;
540 int help_displayed;
541 int modified;
542 int autoassign;
543 int comemouse;
544 int aconnect_MI;
545 int aconnect_JA;
546 int aconnect_JIA;
547
548 int cuan_jack;
549 int cuan_ijack;
550 int IsCoIn;
551 int Cyoin;
552 int Pyoin;
553 int Ccin;
554 int Pcin;
555
556 // bank of flags telling GUI which midi controlled items to update
557 int Mcontrol[500];
558 // flag telling GUI that Mcontrol has at least one set flag
559 int RControl;
560 int ControlGet;
561 int CountWait;
562 int XUserMIDI[128][20];
563
564 int eff_filter;
565 int Har_Down;
566 int Har_U_Q;
567 int Har_D_Q;
568 int Rev_Down;
569 int Rev_U_Q;
570 int Rev_D_Q;
571 int Con_Down;
572 int Con_U_Q;
573 int Con_D_Q;
574 int Shi_Down;
575 int Shi_U_Q;
576 int Shi_D_Q;
577 int Seq_Down;
578 int Seq_U_Q;
579 int Seq_D_Q;
580 int Voc_Down;
581 int Voc_U_Q;
582 int Voc_D_Q;
583 int Ste_Down;
584 int Ste_U_Q;
585 int Ste_D_Q;
586
587 int Metro_Vol;
588 int M_Metro_Sound;
589 int deachide;
590 int font;
591 int flpos;
592 int upsample;
593 int UpQual;
594 int DownQual;
595 int UpAmo;
596 int J_SAMPLE_RATE;
597 int J_PERIOD;
598 int m_displayed;
599 int Mvalue;
600 int Mnumeff[32];
601 int OnOffC;
602
603 int sw_stat;
604 int MIDIway;
605 int NumParams;
606 int NumEffects;
607 int relfontsize;
608 int resolution;
609 int sh;
610 int sschema;
611 int slabel_color;
612 int sfore_color;
613 int sback_color;
614 int sleds_color;
615
616 int have_signal;
617 int OnCounter;
618 int t_periods;
619
620 // Recognize
621
622 int last;
623
624 // Harmonizer
625 int HarQual;
626 int SteQual;
627
628 // Tap Tempo
629
630 int tempocnt;
631 int Tap_Display;
632 int Tap_Selection;
633 int Tap_TempoSet;
634 int Tap_SetValue;
635 int t_timeout;
636 int jt_state;
637 int Tap_Updated;
638 int note_old;
639 int cents_old;
640
641 int cpufp;
642 int mess_dis;
643 int numpi, numpo, numpa, numpmi, numpmo;
644 int numpc;
645 int midi_table;
646 int a_bank;
647 int new_bank_loaded;
648
649 int Aux_Gain;
650 int Aux_Threshold;
651 int Aux_MIDI;
652 int Aux_Minimum;
653 int Aux_Maximum;
654 int Aux_Source;
655 int last_auxvalue;
656 int ena_tool;
657 int VocBands;
658 int RCOpti;
659
660 int M_Metro_Tempo;
661 int M_Metro_Bar;
662 int mtc_counter;
663 int EnableBackgroundImage;
664 int ML_filter;
665 int ML_clist[150];
666
667 long Tap_time_Init;
668
669 double Tap_timeB;
670 double Tap_timeC;
671 double jt_tempo;
672
673 double tempobuf[6];
674
675
676 double u_down;
677 double u_up;
678
679 timeval timeA;
680
681 float booster;
682 float cpuload;
683 float rtrig;
684
685 float *efxoutl;
686 float *efxoutr;
687 float *auxdata;
688 float *auxresampled;
689 float *anall;
690 float *analr;
691 float *smpl;
692 float *smpr;
693 float *denormal;
694 float *m_ticks;
695
696 float Master_Volume;
697 float Input_Gain;
698 float Fraction_Bypass;
699 float Log_I_Gain;
700 float Log_M_Volume;
701 float M_Metro_Vol;
702
703
704 float old_il_sum;
705 float old_ir_sum;
706 float old_vl_sum;
707 float old_vr_sum;
708 float val_vl_sum;
709 float val_vr_sum;
710 float val_il_sum;
711 float val_ir_sum;
712 float old_a_sum;
713 float val_a_sum;
714
715
716 float bogomips;
717 float looper_size;
718
719 // Tunner
720
721 float nfreq_old;
722 float afreq_old;
723
724 char tmpprefname[128];
725
726 char *Preset_Name;
727 char *Author;
728 char *Bank_Saved;
729 char *UserRealName;
730
731
732
733 char MID[128];
734 char BankFilename[128];
735 char UDirFilename[128];
736 char BackgroundImage[256];
737
738
739
740
741 struct Effects_Names {
742 char Nom[24];
743 int Pos;
744 int Type;
745
746 } efx_names[70];
747
748 struct Effects_Params {
749 char Nom[32];
750 int Ato;
751 int Effect;
752 } efx_params[500];
753
754
755 struct Preset_Bank_Struct {
756 char Preset_Name[64];
757 char Author[64];
758 char Classe[36];
759 char Type[4];
760 char ConvoFiname[128];
761 char cInput_Gain[64];
762 char cMaster_Volume[64];
763 char cBalance[64];
764 float Input_Gain;
765 float Master_Volume;
766 float Balance;
767 int Bypass;
768 char RevFiname[128];
769 char EchoFiname[128];
770 int lv[70][20];
771 int XUserMIDI[128][20];
772 int XMIDIrangeMin[128];
773 int XMIDIrangeMax[128];
774 } Bank[62];
775
776
777 struct MIDI_table {
778 int bank;
779 int preset;
780 } M_table[128];
781
782 struct Bank_Names {
783 char Preset_Name[64];
784 } B_Names[4][62];
785
786
787 // Alsa MIDI
788
789 snd_seq_t *midi_in, *midi_out;
790
791
792 struct JackPorts {
793 char name[128];
794 } jack_po[16],jack_poi[16];
795
796
797
798
799 };
800
801 struct list_element {
802 struct list_element *forward;
803 struct list_element *backward;
804 char *name;
805 };
806 #endif
807
808 #endif
809
810
811