MuseScore  3.4
Music composition and notation
fluid.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2003 Peter Hanappe and others.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * as published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18  * 02111-1307, USA
19  */
20 
21 
22 #ifndef __FLUID_S_H__
23 #define __FLUID_S_H__
24 
26 #include "synthesizer/midipatch.h"
27 
28 namespace FluidS {
29 
30 using namespace Ms;
31 
32 class Voice;
33 class SFont;
34 class Preset;
35 class Sample;
36 class Channel;
37 struct Mod;
38 class Fluid;
39 
40 #define FLUID_NUM_PROGRAMS 129
41 
42 enum fluid_loop {
47  };
48 
54  };
55 
56 //---------------------------------------------------------
57 // BankOffset
58 //---------------------------------------------------------
59 
60 struct BankOffset {
61  int sfont_id;
62  int offset;
63  };
64 
68  BREATH_MSB = 0x02,
69  FOOT_MSB = 0x04,
72  VOLUME_MSB = 0x07,
73  BALANCE_MSB = 0x08,
74  PAN_MSB = 0x0A,
76  EFFECTS1_MSB = 0x0C,
77  EFFECTS2_MSB = 0x0D,
78  GPC1_MSB = 0x10, /* general purpose controller */
79  GPC2_MSB = 0x11,
80  GPC3_MSB = 0x12,
81  GPC4_MSB = 0x13,
84  BREATH_LSB = 0x22,
85  FOOT_LSB = 0x24,
88  VOLUME_LSB = 0x27,
89  BALANCE_LSB = 0x28,
90  PAN_LSB = 0x2A,
92  EFFECTS1_LSB = 0x2C,
93  EFFECTS2_LSB = 0x2D,
94  GPC1_LSB = 0x30,
95  GPC2_LSB = 0x31,
96  GPC3_LSB = 0x32,
97  GPC4_LSB = 0x33,
103  HOLD2_SWITCH = 0x45,
104  SOUND_CTRL1 = 0x46,
105  SOUND_CTRL2 = 0x47,
106  SOUND_CTRL3 = 0x48,
107  SOUND_CTRL4 = 0x49,
108  SOUND_CTRL5 = 0x4A,
109  SOUND_CTRL6 = 0x4B,
110  SOUND_CTRL7 = 0x4C,
111  SOUND_CTRL8 = 0x4D,
112  SOUND_CTRL9 = 0x4E,
113  SOUND_CTRL10 = 0x4F,
114  GPC5 = 0x50,
115  GPC6 = 0x51,
116  GPC7 = 0x52,
117  GPC8 = 0x53,
126  NRPN_LSB = 0x62,
127  NRPN_MSB = 0x63,
128  RPN_LSB = 0x64,
129  RPN_MSB = 0x65,
131  ALL_CTRL_OFF = 0x79,
134  OMNI_OFF = 0x7C,
135  OMNI_ON = 0x7D,
136  POLY_OFF = 0x7E,
137  POLY_ON = 0x7F
138  };
139 
204  /* the initial pitch is not a "standard" generator. It is not
205  * mentioned in the list of generator in the SF2 specifications. It
206  * is used, however, as the destination for the default pitch wheel
207  * modulator. */
210  };
211 
212 //---------------------------------------------------------
213 // Channel
214 //---------------------------------------------------------
215 
216 class Channel {
218 
219  unsigned int sfontnum;
220  unsigned int banknum;
221  unsigned int prognum;
223 
224  public:
225  int channum;
228  short pitch_bend;
230 
231  short cc[128]; // controller values
232 
233  /* cached values of last MSB values of MSB/LSB controllers */
234  unsigned char bank_msb;
236 
237  /* NRPN system */
238  short nrpn_select;
239 
240  /* The values of the generators, set by NRPN messages, or by
241  * fluid_synth_set_gen(), are cached in the channel so they can be
242  * applied to future notes. They are copied to a voice's generators
243  * in fluid_voice_init(), which calls fluid_gen_init(). */
244 
245  float gen[GEN_LAST];
246 
247  /* By default, the NRPN values are relative to the values of the
248  * generators set in the SoundFont. For example, if the NRPN
249  * specifies an attack of 100 msec then 100 msec will be added to the
250  * combined attack time of the sound font and the modulators.
251  *
252  * However, it is useful to be able to specify the generator value
253  * absolutely, completely ignoring the generators of the sound font
254  * and the values of modulators. The gen_abs field, is a boolean
255  * flag indicating whether the NRPN value is absolute or not.
256  */
257  char gen_abs[GEN_LAST];
258 
259  public:
260  Channel(Fluid* synth, int num);
261 
262  bool sustained() const { return cc[SUSTAIN_SWITCH] >= 64; }
263  void setGen(int n, float v, char a) { gen[n] = v; gen_abs[n] = a; }
264  float getGen(int n) const { return gen[n]; }
265  char getGenAbs(int n) const { return gen_abs[n]; }
266  void init();
267  void initCtrl();
268  void setCC(int n, int val) { cc[n] = val; }
269  void reset();
270  void setPreset(Preset* p);
271  Preset* preset() const { return _preset; }
272  unsigned int getSfontnum() const { return sfontnum; }
273  void setSfontnum(unsigned int s) { sfontnum = s; }
274  unsigned int getBanknum() const { return banknum; }
275  void setBanknum(unsigned int b) { banknum = b; }
276  void setPrognum(int p) { prognum = p; }
277  int getPrognum() const { return prognum; }
278  void setcc(int ctrl, int val);
279  void pitchBend(int val);
280  int getPitchBend() const { return pitch_bend; }
281  void pitchWheelSens(int val);
282  int getCC(int num);
283  int getNum() const { return channum; }
284  void setInterpMethod(int m) { interp_method = m; }
285  int getInterpMethod() const { return interp_method; }
286  };
287 
288 // subsystems:
289 enum {
291  };
292 
293 //---------------------------------------------------------
294 // Fluid
295 //---------------------------------------------------------
296 
297 class Fluid : public Synthesizer {
298  QList<SFont*> sfonts; // the loaded soundfonts
299  QList<MidiPatch*> patches;
300 
301  QList<Voice*> freeVoices; // unused synthesis processes
302  QList<Voice*> activeVoices; // active synthesis processes
303  QString _error; // last error message
304 
305  static bool initialized;
306 
307  double sample_rate; // The sample rate
308  float _masterTuning; // usually 440.0
309  double _tuning[128]; // the pitch of every key, in cents
310 
311  int _loadProgress = 0;
312  bool _loadWasCanceled = false;
313 
314  QMutex mutex;
315  void updatePatchList();
316 
317  //the variable is used to stop loading samples from the sf files
318  bool _globalTerminate = false;
319 
320  protected:
321  int _state; // the synthesizer state
322 
323  unsigned int sfont_id;
324 
325  QList<Channel*> channel; // the channels
326 
327  unsigned int noteid; // the id is incremented for every new note. it's used for noteoff's
328 
329  SFont* get_sfont_by_name(const QString& name);
330  SFont* get_sfont_by_id(int id);
331  SFont* get_sfont(int idx) const { return sfonts[idx]; }
332  bool sfunload(int id);
333  int sfload(const QString& filename);
334 
335  public:
336  Fluid();
337  ~Fluid();
338  virtual void init(float sampleRate);
339 
340  virtual const char* name() const { return "Fluid"; }
341 
342  virtual void play(const PlayEvent&);
343  virtual const QList<MidiPatch*>& getPatchInfo() const { return patches; }
344 
345  // get/set synthesizer state (parameter set)
346  virtual SynthesizerGroup state() const;
347  virtual bool setState(const SynthesizerGroup&);
348 
349  virtual void allSoundsOff(int);
350  virtual void allNotesOff(int);
351 
352  int loadProgress() { return _loadProgress; }
353  void setLoadProgress(int val) { _loadProgress = val; }
354  bool loadWasCanceled() { return _loadWasCanceled; }
355  void setLoadWasCanceled(bool status) { _loadWasCanceled = status; }
356 
357  Preset* get_preset(unsigned int sfontnum, unsigned int banknum, unsigned int prognum);
358  Preset* find_preset(unsigned int banknum, unsigned int prognum);
359  void modulate_voices(int chan, bool is_cc, int ctrl);
360  void modulate_voices_all(int chan);
361  void damp_voices(int chan);
362  int kill_voice(Voice * voice);
363  void print_voice();
364 
368  void update_presets();
369 
370  int get_cc(int chan, int num) const { return channel[chan]->cc[num]; }
371 
372  void system_reset();
373  void program_change(int chan, int prognum);
374 
375  void set_gen2(int chan, int param, float value, int absolute, int normalized);
376  float get_gen(int chan, int param);
377  void set_gen(int chan, int param, float value);
378  void set_interp_method(int chan, int interp_method);
379 
380  Preset* get_channel_preset(int chan) const { return channel[chan]->preset(); }
381 
382  virtual bool loadSoundFonts(const QStringList& s);
383  virtual bool addSoundFont(const QString& s);
384  virtual bool removeSoundFont(const QString& s);
385  QStringList soundFonts() const;
386  std::vector<SoundFontInfo> soundFontsInfo() const override;
387 
388  void start_voice(Voice* voice);
389  Voice* alloc_voice(unsigned id, Sample* sample, int chan, int key, int vel, double vt);
390  void free_voice_by_kill();
391 
392  virtual void process(unsigned len, float* out, float* effect1, float* effect2);
393 
394  bool program_select(int chan, unsigned sfont_id, unsigned bank_num, unsigned preset_num);
395  void get_program(int chan, unsigned* sfont_id, unsigned* bank_num, unsigned* preset_num);
396 // void sfont_select(int chan, unsigned int sfont_id) { channel[chan]->setSfontnum(sfont_id); }
397 // void bank_select(int chan, unsigned int bank) { channel[chan]->setBanknum(bank); }
398 
399  void get_pitch_wheel_sens(int chan, int* pval);
400  void pitch_wheel_sens(int chan, int val);
401  void get_pitch_bend(int chan, int* ppitch_bend);
402 
403  void freeVoice(Voice* v);
404 
405  double getPitch(int k) const { return _tuning[k]; }
406  float ct2hz_real(float cents) { return powf(2.0f, (cents - 6900.0f) / 1200.0f) * _masterTuning; }
407 
408  float act2hz(float c) { return 8.176 * pow(2.0, (double) c / 1200.0); }
409  float ct2hz(float cents) { return act2hz(qBound(1500.0f, cents, 13500.0f)); }
410 
411  virtual double masterTuning() const { return _masterTuning; }
412  virtual void setMasterTuning(double f) { _masterTuning = f; }
413 
414  QString error() const { return _error; }
415 
416  virtual SynthesizerGui* gui();
417 
418  static QFileInfoList sfFiles();
419 
420  bool globalTerminate() { return _globalTerminate; }
421  void setGlobalTerminate(bool terminate = true) { _globalTerminate = terminate; }
422 
423  friend class Voice;
424  friend class Preset;
425  };
426 
427  /*
428  *
429  * Chorus
430  *
431  */
432 
436  };
437 
438 /* Those are the default settings for the chorus. */
439 #define FLUID_CHORUS_DEFAULT_N 3
440 #define FLUID_CHORUS_DEFAULT_LEVEL 2.0f
441 #define FLUID_CHORUS_DEFAULT_SPEED 0.3f
442 #define FLUID_CHORUS_DEFAULT_DEPTH 8.0f
443 #define FLUID_CHORUS_DEFAULT_TYPE FLUID_CHORUS_MOD_SINE
444 
445 
446  /*
447  *
448  * Synthesis parameters
449  *
450  */
451 
452  /* Flags to choose the interpolation method */
454  /* no interpolation: Fastest, but questionable audio quality */
456  /* Straight-line interpolation: A bit slower, reasonable audio quality */
458  /* Fourth-order interpolation: Requires 50 % of the whole DSP processing time, good quality
459  * Default. */
464  };
465 
466 #define fluid_sample_refcount(_sample) ((_sample)->refcount)
467 
468 
471 enum {
478  };
479 
480 /* Sets the sound data of the sample
481  * Warning : if copy_data is FALSE, data should have 8 unused frames at start
482  * and 8 unused frames at the end.
483  */
484 int fluid_sample_set_sound_data(Sample* sample, short *data,
485  unsigned int nbframes, short copy_data, int rootkey);
486 
487 /*
488  *
489  * Utility functions
490  */
491 
492  /* Maximum number of modulators in a voice */
493 #define FLUID_NUM_MOD 64
494 
498 class Generator {
499  public:
500  unsigned char flags;
501  double val;
502  double mod;
503  double nrpn;
505  void set_mod(double _val) { mod = _val; }
506  void set_nrpn(double _val) { nrpn = _val; }
507  };
508 
516  };
517 
519  /*
520  * The interface to the synthesizer's voices
521  * Examples on using them can be found in fluid_defsfont.c
522  */
523 
524  /* for fluid_voice_add_mod */
529  };
530 
531 /* Disable FPE exception check */
532 #define fluid_check_fpe(expl)
533 
534 unsigned int fluid_check_fpe_i386(char * explanation_in_case_of_fpe);
535 
536 /*
537  * interpolation data
538  */
540  float a0, a1, a2, a3;
541  };
542 
543 /* Flags telling the polarity of a modulator. Compare with SF2.01
544  section 8.2. Note: The numbers of the bits are different! (for
545  example: in the flags of a SF modulator, the polarity bit is bit
546  nr. 9) */
547 
559  };
560 
561 //---------------------------------------------------------
562 // Mod
563 //---------------------------------------------------------
564 
565 struct Mod
566  {
567  unsigned char dest;
568  unsigned char src1;
569  unsigned char flags1;
570  unsigned char src2;
571  unsigned char flags2;
572  double amount;
573 
574  void clone(Mod* mod) const;
575  void dump() const;
576  int has_source(bool cc, int ctrl) {
577  return (((src1 == ctrl) && (flags1 & FLUID_MOD_CC) && cc)
578  || (((src1 == ctrl) && (!(flags1 & FLUID_MOD_CC)) && !cc)))
579  || (((src2 == ctrl) && (flags2 & FLUID_MOD_CC) && cc)
580  || (((src2 == ctrl) && (!(flags2 & FLUID_MOD_CC)) && !cc)));
581  }
582  void set_source1(int src, int flags);
583  void set_source2(int src, int flags);
584  void set_dest(int val) { dest = val; }
585  void set_amount(double val) { amount = val; }
586  int get_source1() const { return src1; }
587  int get_flags1() const { return flags1; }
588  int get_source2() const { return src2; }
589  int get_flags2() const { return flags2; }
590  int get_dest() const { return dest; }
591  double get_amount() const { return amount; }
592  float get_value(Channel* chan, Voice* voice);
593  };
594 
595 /* Flags telling the source of a modulator. This corresponds to
596  * SF2.01 section 8.2.1 */
597 
606  };
607 
608 /* Determines, if two modulators are 'identical' (all parameters
609  except the amount match) */
610 bool test_identity(const Mod * mod1, const Mod * mod2);
611 
612 void fluid_dump_modulator(Mod * mod);
613 
614 #define fluid_mod_has_source(mod,cc,ctrl) \
615 ( ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) != 0) && (cc != 0)) \
616  || ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) == 0) && (cc == 0)))) \
617 || ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) != 0) && (cc != 0)) \
618  || ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) == 0) && (cc == 0)))))
619 
620 #define fluid_mod_has_dest(mod,gen) ((mod)->dest == gen)
621 
622 /*
623  * phase
624  */
625 
626 #define FLUID_INTERP_BITS 8
627 #define FLUID_INTERP_BITS_MASK 0xff000000
628 #define FLUID_INTERP_BITS_SHIFT 24
629 #define FLUID_INTERP_MAX 256
630 
631 #define FLUID_FRACT_MAX ((double)4294967296.0)
632 
633 //---------------------------------------------------------
634 // Phase
635 /* Purpose:
636 * Playing pointer for voice playback
637 *
638 * When a sample is played back at a different pitch, the playing pointer in the
639 * source sample will not advance exactly one sample per output sample.
640 * This playing pointer is implemented using Phase.
641 * It is a 64 bit number. The higher 32 bits contain the 'index' (number of
642 * the current sample), the lower 32 bits the fractional part.
643 * Access is possible in two ways:
644 * -through the 64 bit part 'b64', if the architecture supports 64 bit integers
645 * -through 'index' and 'fract'
646 * Note: b64 and index / fract share the same memory location!
647 */
648 
649 struct Phase {
650  qint64 data;
651 
652  void operator+=(const Phase& p) { data += p.data; }
653  void setInt(qint32 b) { data = qint64(b) << 32; }
654  void setFloat(double b) {
655  data = (((qint64)(b)) << 32) | (quint32) (((double)(b) - (int)(b)) * (double)FLUID_FRACT_MAX);
656  }
657 
658  void operator-=(const Phase& b) { data -= b.data; }
659  void operator-=(int b) { data -= (qint64(b) << 32); }
660  int index() const { return data >> 32; }
661  quint32 fract() const { return quint32(data & 0xffffffff); }
662  quint32 index_round() const { return quint32((data+0x80000000) >> 32); }
663 
664  Phase() {}
665  Phase(qint64 v) : data(v) {}
666  };
667 
668 /* Purpose:
669  * Takes the fractional part of the argument phase and
670  * calculates the corresponding position in the interpolation table.
671  * The fractional position of the playing pointer is calculated with a quite high
672  * resolution (32 bits). It would be unpractical to keep a set of interpolation
673  * coefficients for each possible fractional part...
674  */
675 #define fluid_phase_fract_to_tablerow(_x) \
676  ((int)(((_x).fract() & FLUID_INTERP_BITS_MASK) >> FLUID_INTERP_BITS_SHIFT))
677 
678 #define fluid_phase_double(_x) \
679  ((double)((_x).index()) + ((double)((_x).fract()) / FLUID_FRACT_MAX))
680 
681 /* Purpose:
682  * The playing pointer is _phase. How many output samples are produced, until the point _p1 in the sample is reached,
683  * if _phase advances in steps of _incr?
684  */
685 #define fluid_phase_steps(_phase,_idx,_incr) \
686  (int)(((double)(_idx) - fluid_phase_double(_phase)) / (double)_incr)
687 
688 /* Purpose:
689  * Creates the expression a.index++.
690 */
691 #define fluid_phase_index_plusplus(a) (((a)._index)++)
692 
693 } // namespace Fluid
694 
695 #endif // __FLUID_S_H__
Definition: fluid.h:121
short pitch_bend
Definition: fluid.h:228
#define FLUID_FRACT_MAX
Definition: fluid.h:631
Reserved.
Definition: fluid.h:199
Chorus send amount.
Definition: fluid.h:159
Instrument ID (shouldn&#39;t be set by user)
Definition: fluid.h:185
void setLoadWasCanceled(bool status)
Definition: fluid.h:355
Definition: sfont.h:132
Definition: fluid.h:125
QList< SFont * > sfonts
Definition: fluid.h:298
Definition: fluid.h:96
Definition: fluid.h:290
QMutex mutex
Definition: fluid.h:314
Definition: fluid.h:603
Definition: fluid.h:68
Definition: fluid.h:463
unsigned char flags
Is the generator set or not (fluid_gen_flags)
Definition: fluid.h:500
Definition: fluid.h:599
Definition: fluid.h:70
void fluid_gen_set_default_values(Generator *gen)
Set an array of generators to their default values.
Definition: gen.cpp:97
int getPrognum() const
Definition: fluid.h:277
Fluid * synth
Definition: fluid.h:217
virtual const QList< MidiPatch * > & getPatchInfo() const
Definition: fluid.h:343
Unused.
Definition: fluid.h:164
bool globalTerminate()
Definition: fluid.h:420
Definition: fluid.h:539
Definition: fluid.h:122
Definition: fluid.h:551
int get_flags1() const
Definition: fluid.h:587
Sample end address offset (-32767-0)
Definition: fluid.h:145
Volume envelope delay.
Definition: fluid.h:177
Definition: fluid.h:50
Definition: fluid.h:216
Phase(qint64 v)
Definition: fluid.h:665
Definition: fluid.h:75
Definition: fluid.h:46
int get_source2() const
Definition: fluid.h:588
unsigned int sfontnum
Definition: fluid.h:219
Definition: fluid.h:472
Definition: synthesizer.h:41
Modulation envelope attack.
Definition: fluid.h:170
Fixed MIDI note number.
Definition: fluid.h:190
bool loadWasCanceled()
Definition: fluid.h:354
Sample start address offset (0-32767)
Definition: fluid.h:144
double mod
Change by modulators.
Definition: fluid.h:502
Modulation envelope decay.
Definition: fluid.h:172
Definition: fluid.h:109
Definition: voice.h:118
Volume envelope release.
Definition: fluid.h:182
Definition: fluid.h:79
Modulation envelope hold.
Definition: fluid.h:171
Definition: fluid.h:101
Definition: fluid.h:604
Definition: fluid.h:91
Definition: fluid.h:455
Modulation LFO frequency.
Definition: fluid.h:166
void operator-=(int b)
Definition: fluid.h:659
virtual const char * name() const
Definition: fluid.h:340
int interp_method
Definition: fluid.h:235
Definition: fluid.h:69
Stereo panning.
Definition: fluid.h:161
Key to modulation envelope hold.
Definition: fluid.h:175
float ct2hz(float cents)
Definition: fluid.h:409
Key to volume envelope hold.
Definition: fluid.h:183
Volume envelope attack.
Definition: fluid.h:178
fluid_mod_src
Definition: fluid.h:598
Definition: fluid.h:117
Definition: fluid.h:74
Definition: fluid.h:78
Modulation envelope sustain.
Definition: fluid.h:173
Definition: fluid.h:120
Sample root note override.
Definition: fluid.h:202
MIDI note range.
Definition: fluid.h:187
Modulation LFO to filter cutoff.
Definition: fluid.h:154
void setGen(int n, float v, char a)
Definition: fluid.h:263
Definition: fluid.h:92
void operator-=(const Phase &b)
Definition: fluid.h:658
Definition: fluid.h:60
Sample loop end address offset (-32767-32767)
Definition: fluid.h:147
Definition: fluid.h:97
Definition: fluid.h:557
int fluid_sample_set_sound_data(Sample *sample, short *data, unsigned int nbframes, short copy_data, int rootkey)
Definition: fluid.h:129
Initial volume attenuation.
Definition: fluid.h:192
unsigned char src1
Definition: fluid.h:568
Definition: fluid.h:134
Definition: sfont.h:52
Definition: fluid.h:527
bool sustained() const
Definition: fluid.h:262
Generator value is set.
Definition: fluid.h:514
Filter Q.
Definition: fluid.h:153
Modulation envelope delay.
Definition: fluid.h:169
Definition: fluid.h:80
double nrpn
Change by NRPN messages.
Definition: fluid.h:503
Definition: fluid.h:601
short key_pressure
Definition: fluid.h:226
Modulation envelope to filter cutoff.
Definition: fluid.h:155
Definition: fluid.h:130
Definition: fluid.h:554
fluid_mod_flags
Definition: fluid.h:548
unsigned char bank_msb
Definition: fluid.h:234
fluid_gen_type
Generator (effect) numbers (SoundFont 2.01 specifications section 8.1.3)
Definition: fluid.h:143
Definition: fluid.h:135
float act2hz(float c)
Definition: fluid.h:408
Unused.
Definition: fluid.h:162
Definition: fluid.h:136
Definition: fluid.h:457
virtual void setMasterTuning(double f)
Definition: fluid.h:412
Unused.
Definition: fluid.h:158
Definition: fluid.h:52
Sample loop start address offset (-32767-32767)
Definition: fluid.h:146
Definition: fluid.h:51
Definition: fluid.h:460
unsigned int banknum
Definition: fluid.h:220
Definition: fluid.h:297
Definition: fluid.h:549
int get_cc(int chan, int num) const
Definition: fluid.h:370
Definition: fluid.h:556
fluid_chorus_mod
Definition: fluid.h:433
Fine tuning.
Definition: fluid.h:196
Volume envelope sustain.
Definition: fluid.h:181
fluid_loop
Definition: fluid.h:42
Definition: fluid.h:137
Sample end loop address coarse offset (X 32768)
Definition: fluid.h:194
short pitch_wheel_sensitivity
Definition: fluid.h:229
Definition: fluid.h:550
Definition: fluid.h:82
Definition: fluid.h:110
Definition: fluid.h:99
Definition: model.h:126
Vibrato LFO frequency.
Definition: fluid.h:168
Definition: synthesizergui.h:24
Definition: fluid.h:77
QList< Voice * > freeVoices
Definition: fluid.h:301
Definition: fluid.h:133
void setFloat(double b)
Definition: fluid.h:654
fluid_interp
Definition: fluid.h:453
Definition: fluid.h:605
fluid_midi_control_change
Definition: fluid.h:65
Sample end address coarse offset (X 32768)
Definition: fluid.h:156
Definition: fluid.h:72
int loadProgress()
Definition: fluid.h:352
Definition: fluid.h:127
Modulation LFO delay.
Definition: fluid.h:165
unsigned char flags1
Definition: fluid.h:569
void operator+=(const Phase &p)
Definition: fluid.h:652
Sample start loop address coarse offset (X 32768)
Definition: fluid.h:189
float _masterTuning
Definition: fluid.h:308
int get_source1() const
Definition: fluid.h:586
void set_nrpn(double _val)
Definition: fluid.h:506
qint64 data
Definition: fluid.h:650
Definition: fluid.h:45
Coarse tuning.
Definition: fluid.h:195
void setCC(int n, int val)
Definition: fluid.h:268
Definition: fluid.h:555
Definition: fluid.h:113
Volume envelope hold.
Definition: fluid.h:179
Definition: fluid.h:124
Definition: fluid.h:104
unsigned int sfont_id
Definition: fluid.h:323
unsigned char dest
Definition: fluid.h:567
Definition: fluid.h:66
Definition: fluid.h:102
void setSfontnum(unsigned int s)
Definition: fluid.h:273
Value defines the count of generators (fluid_gen_type)
Definition: fluid.h:209
int index() const
Definition: fluid.h:660
Definition: fluid.h:565
float ct2hz_real(float cents)
Definition: fluid.h:406
Modulation envelope to pitch.
Definition: fluid.h:151
Definition: fluid.h:71
Vibrato LFO to pitch.
Definition: fluid.h:150
Definition: fluid.h:115
double getPitch(int k) const
Definition: fluid.h:405
Definition: fluid.h:95
Unused.
Definition: fluid.h:163
void setInt(qint32 b)
Definition: fluid.h:653
Definition: fluid.h:116
MIDI velocity range.
Definition: fluid.h:188
float getGen(int n) const
Definition: fluid.h:264
QString _error
Definition: fluid.h:303
int sfont_id
Definition: fluid.h:61
void setBanknum(unsigned int b)
Definition: fluid.h:275
unsigned char src2
Definition: fluid.h:570
void setInterpMethod(int m)
Definition: fluid.h:284
Definition: aeolus.cpp:26
QList< MidiPatch * > patches
Definition: fluid.h:299
Definition: fluid.h:558
Preset * preset() const
Definition: fluid.h:271
Definition: fluid.h:434
int _state
Definition: fluid.h:321
Definition: fluid.h:111
Definition: fluid.h:73
Definition: fluid.h:108
Definition: fluid.h:553
Definition: fluid.h:600
unsigned int prognum
Definition: fluid.h:221
Definition: fluid.h:475
int getNum() const
Definition: fluid.h:283
Modulation LFO to pitch.
Definition: fluid.h:149
Definition: fluid.h:526
Scale tuning.
Definition: fluid.h:200
void setGlobalTerminate(bool terminate=true)
Definition: fluid.h:421
Definition: fluid.h:107
float a3
Definition: fluid.h:540
Definition: fluid.h:118
short channel_pressure
Definition: fluid.h:227
int get_dest() const
Definition: fluid.h:590
fluid_synth_status
Definition: fluid.h:49
Definition: fluid.h:89
unsigned int fluid_check_fpe_i386(char *explanation_in_case_of_fpe)
Definition: fluid.h:67
Definition: fluid.h:100
QList< Voice * > activeVoices
Definition: fluid.h:302
Definition: fluid.h:105
double val
The nominal value.
Definition: fluid.h:501
Definition: fluid.h:462
Definition: fluid.h:119
Definition: synthesizerstate.h:40
Definition: fluid.h:90
Definition: fluid.h:98
Definition: fluid.h:87
int channum
Definition: fluid.h:225
Definition: fluid.h:83
Definition: fluid.h:112
Definition: fluid.h:84
Definition: fluid.h:477
Definition: fluid.h:123
Definition: fluid.h:126
Definition: fluid.h:131
Sample ID (shouldn&#39;t be set by user)
Definition: fluid.h:197
unsigned int noteid
Definition: fluid.h:327
double sample_rate
Definition: fluid.h:307
Definition: fluid.h:93
bool test_identity(const Mod *mod1, const Mod *mod2)
Definition: mod.cpp:307
int get_flags2() const
Definition: fluid.h:589
void fluid_dump_modulator(Mod *mod)
int getInterpMethod() const
Definition: fluid.h:285
QList< Channel * > channel
Definition: fluid.h:325
SFont * get_sfont(int idx) const
Definition: fluid.h:331
Definition: fluid.h:473
Definition: fluid.h:43
Reserved.
Definition: fluid.h:186
quint32 index_round() const
Definition: fluid.h:662
Phase()
Definition: fluid.h:664
unsigned char flags2
Definition: fluid.h:571
Definition: instrument.h:100
Definition: fluid.h:81
short nrpn_select
Definition: fluid.h:238
Definition: fluid.h:474
Modulation LFO to volume.
Definition: fluid.h:157
Definition: fluid.h:85
Modulation envelope release.
Definition: fluid.h:174
void set_amount(double val)
Definition: fluid.h:585
void set_dest(int val)
Definition: fluid.h:584
Definition: fluid.h:128
Exclusive class number.
Definition: fluid.h:201
Filter cutoff.
Definition: fluid.h:152
Definition: sfont.h:219
SoundFont generator structure.
Definition: fluid.h:498
Definition: fluid.h:44
Vibrato LFO delay.
Definition: fluid.h:167
unsigned int getSfontnum() const
Definition: fluid.h:272
void setPrognum(int p)
Definition: fluid.h:276
Definition: sample.h:20
Definition: chan.cpp:25
Definition: fluid.h:649
Key to volume envelope decay.
Definition: fluid.h:184
Pitch (NOTE: Not a real SoundFont generator)
Definition: fluid.h:208
QString error() const
Definition: fluid.h:414
Definition: fluid.h:94
double amount
Definition: fluid.h:572
Volume envelope decay.
Definition: fluid.h:180
Definition: fluid.h:103
virtual double masterTuning() const
Definition: fluid.h:411
Definition: fluid.h:106
int offset
Definition: fluid.h:62
fluid_voice_add_mod
Definition: fluid.h:525
Definition: fluid.h:76
DOCME.
Definition: fluid.h:515
Sample start address coarse offset (X 32768)
Definition: fluid.h:148
Definition: fluid.h:602
void set_mod(double _val)
Definition: fluid.h:505
Definition: fluid.h:435
unsigned int getBanknum() const
Definition: fluid.h:274
Definition: fluid.h:552
Fixed MIDI velocity value.
Definition: fluid.h:191
Reverb send amount.
Definition: fluid.h:160
Definition: fluid.h:461
Preset * get_channel_preset(int chan) const
Definition: fluid.h:380
Sample mode flags.
Definition: fluid.h:198
Definition: fluid.h:53
Definition: voice.h:64
Definition: event.h:219
Definition: fluid.h:114
Key to modulation envelope decay.
Definition: fluid.h:176
Reserved.
Definition: fluid.h:193
void setLoadProgress(int val)
Definition: fluid.h:353
static bool initialized
Definition: fluid.h:305
double get_amount() const
Definition: fluid.h:591
Definition: fluid.h:86
int getPitchBend() const
Definition: fluid.h:280
Definition: fluid.h:528
quint32 fract() const
Definition: fluid.h:661
Definition: fluid.h:132
fluid_gen_flags
Enum value for &#39;flags&#39; field of #_Generator (not really flags).
Definition: fluid.h:512
Preset * _preset
Definition: fluid.h:222
int has_source(bool cc, int ctrl)
Definition: fluid.h:576
Generator value is not set.
Definition: fluid.h:513
Definition: fluid.h:88
char getGenAbs(int n) const
Definition: fluid.h:265