MuseScore  3.4
Music composition and notation
Classes | Namespaces | Macros | Enumerations | Functions
fluid.h File Reference
#include "synthesizer/synthesizer.h"
#include "synthesizer/midipatch.h"
Include dependency graph for fluid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FluidS::BankOffset
 
class  FluidS::Channel
 
class  FluidS::Fluid
 
class  FluidS::Generator
 SoundFont generator structure. More...
 
struct  FluidS::fluid_interp_coeff_t
 
struct  FluidS::Mod
 
struct  FluidS::Phase
 

Namespaces

 FluidS
 

Macros

#define FLUID_NUM_PROGRAMS   129
 
#define FLUID_CHORUS_DEFAULT_N   3
 
#define FLUID_CHORUS_DEFAULT_LEVEL   2.0f
 
#define FLUID_CHORUS_DEFAULT_SPEED   0.3f
 
#define FLUID_CHORUS_DEFAULT_DEPTH   8.0f
 
#define FLUID_CHORUS_DEFAULT_TYPE   FLUID_CHORUS_MOD_SINE
 
#define fluid_sample_refcount(_sample)   ((_sample)->refcount)
 
#define FLUID_NUM_MOD   64
 
#define fluid_check_fpe(expl)
 
#define fluid_mod_has_source(mod, cc, ctrl)
 
#define fluid_mod_has_dest(mod, gen)   ((mod)->dest == gen)
 
#define FLUID_INTERP_BITS   8
 
#define FLUID_INTERP_BITS_MASK   0xff000000
 
#define FLUID_INTERP_BITS_SHIFT   24
 
#define FLUID_INTERP_MAX   256
 
#define FLUID_FRACT_MAX   ((double)4294967296.0)
 
#define fluid_phase_fract_to_tablerow(_x)   ((int)(((_x).fract() & FLUID_INTERP_BITS_MASK) >> FLUID_INTERP_BITS_SHIFT))
 
#define fluid_phase_double(_x)   ((double)((_x).index()) + ((double)((_x).fract()) / FLUID_FRACT_MAX))
 
#define fluid_phase_steps(_phase, _idx, _incr)   (int)(((double)(_idx) - fluid_phase_double(_phase)) / (double)_incr)
 
#define fluid_phase_index_plusplus(a)   (((a)._index)++)
 

Enumerations

enum  FluidS::fluid_loop { FluidS::FLUID_UNLOOPED = 0, FluidS::FLUID_LOOP_DURING_RELEASE = 1, FluidS::FLUID_NOTUSED = 2, FluidS::FLUID_LOOP_UNTIL_RELEASE = 3 }
 
enum  FluidS::fluid_synth_status { FluidS::FLUID_SYNTH_CLEAN, FluidS::FLUID_SYNTH_PLAYING, FluidS::FLUID_SYNTH_QUIET, FluidS::FLUID_SYNTH_STOPPED }
 
enum  FluidS::fluid_midi_control_change {
  FluidS::BANK_SELECT_MSB = 0x00, FluidS::MODULATION_MSB = 0x01, FluidS::BREATH_MSB = 0x02, FluidS::FOOT_MSB = 0x04,
  FluidS::PORTAMENTO_TIME_MSB = 0x05, FluidS::DATA_ENTRY_MSB = 0x06, FluidS::VOLUME_MSB = 0x07, FluidS::BALANCE_MSB = 0x08,
  FluidS::PAN_MSB = 0x0A, FluidS::EXPRESSION_MSB = 0x0B, FluidS::EFFECTS1_MSB = 0x0C, FluidS::EFFECTS2_MSB = 0x0D,
  FluidS::GPC1_MSB = 0x10, FluidS::GPC2_MSB = 0x11, FluidS::GPC3_MSB = 0x12, FluidS::GPC4_MSB = 0x13,
  FluidS::BANK_SELECT_LSB = 0x20, FluidS::MODULATION_WHEEL_LSB = 0x21, FluidS::BREATH_LSB = 0x22, FluidS::FOOT_LSB = 0x24,
  FluidS::PORTAMENTO_TIME_LSB = 0x25, FluidS::DATA_ENTRY_LSB = 0x26, FluidS::VOLUME_LSB = 0x27, FluidS::BALANCE_LSB = 0x28,
  FluidS::PAN_LSB = 0x2A, FluidS::EXPRESSION_LSB = 0x2B, FluidS::EFFECTS1_LSB = 0x2C, FluidS::EFFECTS2_LSB = 0x2D,
  FluidS::GPC1_LSB = 0x30, FluidS::GPC2_LSB = 0x31, FluidS::GPC3_LSB = 0x32, FluidS::GPC4_LSB = 0x33,
  FluidS::SUSTAIN_SWITCH = 0x40, FluidS::PORTAMENTO_SWITCH = 0x41, FluidS::SOSTENUTO_SWITCH = 0x42, FluidS::SOFT_PEDAL_SWITCH = 0x43,
  FluidS::LEGATO_SWITCH = 0x45, FluidS::HOLD2_SWITCH = 0x45, FluidS::SOUND_CTRL1 = 0x46, FluidS::SOUND_CTRL2 = 0x47,
  FluidS::SOUND_CTRL3 = 0x48, FluidS::SOUND_CTRL4 = 0x49, FluidS::SOUND_CTRL5 = 0x4A, FluidS::SOUND_CTRL6 = 0x4B,
  FluidS::SOUND_CTRL7 = 0x4C, FluidS::SOUND_CTRL8 = 0x4D, FluidS::SOUND_CTRL9 = 0x4E, FluidS::SOUND_CTRL10 = 0x4F,
  FluidS::GPC5 = 0x50, FluidS::GPC6 = 0x51, FluidS::GPC7 = 0x52, FluidS::GPC8 = 0x53,
  FluidS::PORTAMENTO_CTRL = 0x54, FluidS::EFFECTS_DEPTH1 = 0x5B, FluidS::EFFECTS_DEPTH2 = 0x5C, FluidS::EFFECTS_DEPTH3 = 0x5D,
  FluidS::EFFECTS_DEPTH4 = 0x5E, FluidS::EFFECTS_DEPTH5 = 0x5F, FluidS::DATA_ENTRY_INCR = 0x60, FluidS::DATA_ENTRY_DECR = 0x61,
  FluidS::NRPN_LSB = 0x62, FluidS::NRPN_MSB = 0x63, FluidS::RPN_LSB = 0x64, FluidS::RPN_MSB = 0x65,
  FluidS::ALL_SOUND_OFF = 0x78, FluidS::ALL_CTRL_OFF = 0x79, FluidS::LOCAL_CONTROL = 0x7A, FluidS::ALL_NOTES_OFF = 0x7B,
  FluidS::OMNI_OFF = 0x7C, FluidS::OMNI_ON = 0x7D, FluidS::POLY_OFF = 0x7E, FluidS::POLY_ON = 0x7F
}
 
enum  FluidS::fluid_gen_type {
  FluidS::GEN_STARTADDROFS, FluidS::GEN_ENDADDROFS, FluidS::GEN_STARTLOOPADDROFS, FluidS::GEN_ENDLOOPADDROFS,
  FluidS::GEN_STARTADDRCOARSEOFS, FluidS::GEN_MODLFOTOPITCH, FluidS::GEN_VIBLFOTOPITCH, FluidS::GEN_MODENVTOPITCH,
  FluidS::GEN_FILTERFC, FluidS::GEN_FILTERQ, FluidS::GEN_MODLFOTOFILTERFC, FluidS::GEN_MODENVTOFILTERFC,
  FluidS::GEN_ENDADDRCOARSEOFS, FluidS::GEN_MODLFOTOVOL, FluidS::GEN_UNUSED1, FluidS::GEN_CHORUSSEND,
  FluidS::GEN_REVERBSEND, FluidS::GEN_PAN, FluidS::GEN_UNUSED2, FluidS::GEN_UNUSED3,
  FluidS::GEN_UNUSED4, FluidS::GEN_MODLFODELAY, FluidS::GEN_MODLFOFREQ, FluidS::GEN_VIBLFODELAY,
  FluidS::GEN_VIBLFOFREQ, FluidS::GEN_MODENVDELAY, FluidS::GEN_MODENVATTACK, FluidS::GEN_MODENVHOLD,
  FluidS::GEN_MODENVDECAY, FluidS::GEN_MODENVSUSTAIN, FluidS::GEN_MODENVRELEASE, FluidS::GEN_KEYTOMODENVHOLD,
  FluidS::GEN_KEYTOMODENVDECAY, FluidS::GEN_VOLENVDELAY, FluidS::GEN_VOLENVATTACK, FluidS::GEN_VOLENVHOLD,
  FluidS::GEN_VOLENVDECAY, FluidS::GEN_VOLENVSUSTAIN, FluidS::GEN_VOLENVRELEASE, FluidS::GEN_KEYTOVOLENVHOLD,
  FluidS::GEN_KEYTOVOLENVDECAY, FluidS::GEN_INSTRUMENT, FluidS::GEN_RESERVED1, FluidS::GEN_KEYRANGE,
  FluidS::GEN_VELRANGE, FluidS::GEN_STARTLOOPADDRCOARSEOFS, FluidS::GEN_KEYNUM, FluidS::GEN_VELOCITY,
  FluidS::GEN_ATTENUATION, FluidS::GEN_RESERVED2, FluidS::GEN_ENDLOOPADDRCOARSEOFS, FluidS::GEN_COARSETUNE,
  FluidS::GEN_FINETUNE, FluidS::GEN_SAMPLEID, FluidS::GEN_SAMPLEMODE, FluidS::GEN_RESERVED3,
  FluidS::GEN_SCALETUNE, FluidS::GEN_EXCLUSIVECLASS, FluidS::GEN_OVERRIDEROOTKEY, FluidS::GEN_PITCH,
  FluidS::GEN_LAST
}
 Generator (effect) numbers (SoundFont 2.01 specifications section 8.1.3) More...
 
enum  { FluidS::FLUID_GROUP = 0 }
 
enum  FluidS::fluid_chorus_mod { FluidS::FLUID_CHORUS_MOD_SINE = 0, FluidS::FLUID_CHORUS_MOD_TRIANGLE = 1 }
 
enum  FluidS::fluid_interp {
  FluidS::FLUID_INTERP_NONE = 0, FluidS::FLUID_INTERP_LINEAR = 1, FluidS::FLUID_INTERP_DEFAULT = 4, FluidS::FLUID_INTERP_4THORDER = 4,
  FluidS::FLUID_INTERP_7THORDER = 7, FluidS::FLUID_INTERP_HIGHEST = 7
}
 
enum  {
  FluidS::FLUID_SAMPLETYPE_MONO = 1, FluidS::FLUID_SAMPLETYPE_RIGHT = 2, FluidS::FLUID_SAMPLETYPE_LEFT = 4, FluidS::FLUID_SAMPLETYPE_LINKED = 8,
  FluidS::FLUID_SAMPLETYPE_OGG_VORBIS = 0x10, FluidS::FLUID_SAMPLETYPE_ROM = 0x8000
}
 Sample types. More...
 
enum  FluidS::fluid_gen_flags { FluidS::GEN_UNUSED, FluidS::GEN_SET, FluidS::GEN_ABS_NRPN }
 Enum value for 'flags' field of #_Generator (not really flags). More...
 
enum  FluidS::fluid_voice_add_mod { FluidS::FLUID_VOICE_OVERWRITE, FluidS::FLUID_VOICE_ADD, FluidS::FLUID_VOICE_DEFAULT }
 
enum  FluidS::fluid_mod_flags {
  FluidS::FLUID_MOD_POSITIVE = 0, FluidS::FLUID_MOD_NEGATIVE = 1, FluidS::FLUID_MOD_UNIPOLAR = 0, FluidS::FLUID_MOD_BIPOLAR = 2,
  FluidS::FLUID_MOD_LINEAR = 0, FluidS::FLUID_MOD_CONCAVE = 4, FluidS::FLUID_MOD_CONVEX = 8, FluidS::FLUID_MOD_SWITCH = 12,
  FluidS::FLUID_MOD_GC = 0, FluidS::FLUID_MOD_CC = 16
}
 
enum  FluidS::fluid_mod_src {
  FluidS::FLUID_MOD_NONE = 0, FluidS::FLUID_MOD_VELOCITY = 2, FluidS::FLUID_MOD_KEY = 3, FluidS::FLUID_MOD_KEYPRESSURE = 10,
  FluidS::FLUID_MOD_CHANNELPRESSURE = 13, FluidS::FLUID_MOD_PITCHWHEEL = 14, FluidS::FLUID_MOD_PITCHWHEELSENS = 16
}
 

Functions

int FluidS::fluid_sample_set_sound_data (Sample *sample, short *data, unsigned int nbframes, short copy_data, int rootkey)
 
void FluidS::fluid_gen_set_default_values (Generator *gen)
 Set an array of generators to their default values. More...
 
unsigned int FluidS::fluid_check_fpe_i386 (char *explanation_in_case_of_fpe)
 
bool FluidS::test_identity (const Mod *mod1, const Mod *mod2)
 
void FluidS::fluid_dump_modulator (Mod *mod)
 

Macro Definition Documentation

◆ fluid_check_fpe

#define fluid_check_fpe (   expl)

◆ FLUID_CHORUS_DEFAULT_DEPTH

#define FLUID_CHORUS_DEFAULT_DEPTH   8.0f

◆ FLUID_CHORUS_DEFAULT_LEVEL

#define FLUID_CHORUS_DEFAULT_LEVEL   2.0f

◆ FLUID_CHORUS_DEFAULT_N

#define FLUID_CHORUS_DEFAULT_N   3

◆ FLUID_CHORUS_DEFAULT_SPEED

#define FLUID_CHORUS_DEFAULT_SPEED   0.3f

◆ FLUID_CHORUS_DEFAULT_TYPE

#define FLUID_CHORUS_DEFAULT_TYPE   FLUID_CHORUS_MOD_SINE

◆ FLUID_FRACT_MAX

#define FLUID_FRACT_MAX   ((double)4294967296.0)

◆ FLUID_INTERP_BITS

#define FLUID_INTERP_BITS   8

◆ FLUID_INTERP_BITS_MASK

#define FLUID_INTERP_BITS_MASK   0xff000000

◆ FLUID_INTERP_BITS_SHIFT

#define FLUID_INTERP_BITS_SHIFT   24

◆ FLUID_INTERP_MAX

#define FLUID_INTERP_MAX   256

◆ fluid_mod_has_dest

#define fluid_mod_has_dest (   mod,
  gen 
)    ((mod)->dest == gen)

◆ fluid_mod_has_source

#define fluid_mod_has_source (   mod,
  cc,
  ctrl 
)
Value:
( ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) != 0) && (cc != 0)) \
|| ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) == 0) && (cc == 0)))) \
|| ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) != 0) && (cc != 0)) \
|| ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) == 0) && (cc == 0)))))
Definition: fluid.h:558

◆ FLUID_NUM_MOD

#define FLUID_NUM_MOD   64

◆ FLUID_NUM_PROGRAMS

#define FLUID_NUM_PROGRAMS   129

◆ fluid_phase_double

#define fluid_phase_double (   _x)    ((double)((_x).index()) + ((double)((_x).fract()) / FLUID_FRACT_MAX))

◆ fluid_phase_fract_to_tablerow

#define fluid_phase_fract_to_tablerow (   _x)    ((int)(((_x).fract() & FLUID_INTERP_BITS_MASK) >> FLUID_INTERP_BITS_SHIFT))

◆ fluid_phase_index_plusplus

#define fluid_phase_index_plusplus (   a)    (((a)._index)++)

◆ fluid_phase_steps

#define fluid_phase_steps (   _phase,
  _idx,
  _incr 
)    (int)(((double)(_idx) - fluid_phase_double(_phase)) / (double)_incr)

◆ fluid_sample_refcount

#define fluid_sample_refcount (   _sample)    ((_sample)->refcount)