-
Notifications
You must be signed in to change notification settings - Fork 2
/
constants.lib
56 lines (55 loc) · 3.77 KB
/
constants.lib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//-----------------------------------------------
// contants
//-----------------------------------------------
// general:
nrBands = 16:max(4*nrOutChan);// Number of bands for the vocoders
nrOutChan = 2; // number of outputs
ambisonicsOn = 0; // do we want an ambisonic synth.
ambisonicsOrder = 3; // order of the ambisonics
para = 0; // whether we want a parametric mid
enableGainCompare = 0; // correct the loudness of the individual bands after they've been created
enableGainScale = 1; // expand or compress the spectrum: make it more or less resonant
autoQ = 1; // enable correction of the filter-Q depending on the distance between the bands
enableDeEsser = 1+ enableReEsser:min(1); // enable the multi-band deEsser, is needed for reEsser
enableReEsser = 0; // enable the multi-band reEsser: experimental: not well tested in multichannel and ambisonics
stableFilters = 1; // 0=unstable band pass filters, 1 = stable bamd pass filters
enableAutosat = 0; // put a saturator at the output
enableLimiter = 0; // put a limiter at the output
enableVUmeter = 0; // put a VU meter at the output
outputRoutingEnabled = 1; // have flexible routing between the bands and the outputs
inputRoutingEnabled = 1; // have flexible routing between the osclilators and the filters.
maxNrOutRoutings = select2(ambisonicsOn,6,3); // the maximum amount of different output routings
SRmax = 96000.0; // assumed upper limit on sampling rate
// pitch tracking:
enablePitchTracker = 0; // internal pitch tracker
enablePitchQuantise = 0; // a simple 'autotune': only chromatic
enablegainedSmootherPitch = 1; // choose between normal smoothing of th pitch (0), and a psuedo Kalman filter that looks at the fidelity
// MinInputPitch = 25; // temp for tracking bass
MinInputPitch = 48.9994; // = G1, the lowest frequency that helmholtz~ can track is 51 Hz
MaxInputPitch = 2093.00; // = C7, the highest frequency that helmholtz~ can track is 1992 Hz
maxTimeWithoutPitch = 2*ma.SR; // longest time the OSC pitch tracker can be silent before we switch to the intenal one. (in samples, so 2*ma.SR is 2 seconds)
maxTimeWithoutFidelity = 265*4 ; // is 4*6ms @ 44100. the time between 4 fid messages
PTsmooth = 0.9984; // si.smooth() factor for simple pitch smoother
// analizer:
analizerTop = 128;
analizerBottom = (0.5*pow(2,0.5))+0.0;
// analizerTop = defaultTop;
// analizerBottom = defaultBottom;
// classicVocoder:
enableFeedback = 1; // feedback around the filters of the classicVocoder
enableFilterAutosat = 1; // put a saturator in the filter of the classicVocoder
vocoderN = 2; // order of anti aliasing
// vocoders based on oscilators
doubleOscs = 1; // whether a vocoder has nrBands or nrBands * nrOutChan oscilators
enablePhaseNoise = 1; // 0 = no no.noise and 1 = no.noise modulates phase
enablePhaseNoiseFilter = 1; // 0 = no.noise:si.smooth(fixed) and 1 = no.noise:fi.lowpass(variable)
noisesFilterN = 4; // the order of the no.noise fi.lowpass
defaultTop = 128:pow(0.5); // using these two values with 16 bands, gives integer formant ratios
defaultBottom = ((0.25*pow(2,0.5))+0.5):pow(0.5);
// FOF
// the maximum number of octaves of the fof oscilators
// carefull: the CPU usage will go up with pow(2,maxOctavation) !
// and be prepared for extremely long compile times.
maxOctavation = 1;
// KarplusStrong:
nlfOrder = 16; // order of the non linear modulator