1 
2 #ifndef _FLUID_CONV_TABLES_H
3 #define _FLUID_CONV_TABLES_H
4 
5 /*
6  Attenuation range in centibels.
7  Attenuation range is the dynamic range of the volume envelope generator
8  from 0 to the end of attack segment.
9  fluidsynth is a 24 bit synth, it could (should??) be 144 dB of attenuation.
10  However the spec makes no distinction between 16 or 24 bit synths, so use
11  96 dB here.
12 
13  Note about usefulness of 24 bits:
14  1)Even fluidsynth is a 24 bit synth, this format is only relevant if
15  the sample format coming from the soundfont is 24 bits and the audio sample format
16  chosen by the application (audio.sample.format) is not 16 bits.
17 
18  2)When the sample soundfont is 16 bits, the internal 24 bits number have
19  16 bits msb and lsb to 0. Consequently, at the DAC output, the dynamic range of
20  this 24 bit sample is reduced to the the dynamic of a 16 bits sample (ie 90 db)
21  even if this sample is produced by the audio driver using an audio sample format
22  compatible for a 24 bit DAC.
23 
24  3)When the audio sample format settings is 16 bits (audio.sample.format), the
25  audio driver will make use of a 16 bit DAC, and the dynamic will be reduced to 96 dB
26  even if the initial sample comes from a 24 bits soundfont.
27 
28  In both cases (2) or (3), the real dynamic range is only 96 dB.
29 
30  Other consideration for FLUID_NOISE_FLOOR related to case (1),(2,3):
31  - for case (1), FLUID_NOISE_FLOOR should be the noise floor for 24 bits (i.e -138 dB).
32  - for case (2) or (3), FLUID_NOISE_FLOOR should be the noise floor for 16 bits (i.e -90 dB).
33  */
34 #define FLUID_PEAK_ATTENUATION  960.0f
35 
36 #define FLUID_CENTS_HZ_SIZE     1200
37 #define FLUID_VEL_CB_SIZE       128
38 #define FLUID_CB_AMP_SIZE       1441
39 #define FLUID_PAN_SIZE          1002
40 
41 #endif
42