- improved limiter - VCO: Waveform "Impulse" hase now amplitude of 100 git-svn-id: http://moon:8086/svn/software/trunk/projects/JaySynth@715 b431acfa-c32f-4a4a-93f1-934dc6c82436
80 lines
1.9 KiB
C
80 lines
1.9 KiB
C
// --------------------------------------------------------------
|
|
// --------------------------------------------------------------
|
|
#ifndef _SYNTH_DEFS_H_
|
|
#define _SYNTH_DEFS_H_
|
|
|
|
#include "synth_types.h"
|
|
|
|
// --------------------------------------------------------------
|
|
// Defs
|
|
// --------------------------------------------------------------
|
|
#define GAIN_EPSILON 10.0
|
|
#define MAX_POLYPHONY 256
|
|
|
|
#define SYNTH_BANDWIDTH 0.833
|
|
|
|
#define NUM_PROGRAMS 64
|
|
#define NUM_FREQS 128
|
|
#define NUM_MIDI_CONTROLLERS 128
|
|
|
|
#define VOICE_NUM_OSC 2
|
|
#define VOICE_NUM_LFO 4
|
|
#define VOICE_NUM_ENV 4
|
|
|
|
#define FILTER_ORDER 2
|
|
#define FILTER_SWEEP_BASE ((synth_float_t)10)
|
|
#define FILTER_MAX_ORDER 4
|
|
#define FILTER_F_MIN ((synth_float_t)18)
|
|
#define FILTER_F_MAX ((synth_float_t)18000)
|
|
#define FILTER_Q_MIN 0.7
|
|
#define FILTER_Q_MAX 100
|
|
#define FILTER_TABLE_SIZE (4096)
|
|
#define FILTER_INTEROLATION_ORDER 1
|
|
|
|
#define BLIT_NUM_HARM_MAX (900)
|
|
#define BLIT_TABLE_SIZE_MIN (1024)
|
|
#define BLIT_TABLE_SIZE_MAX (4096)
|
|
#define BLIT_TABLE_OVERSAMPLING (4)
|
|
#define BLIT_INTEROLATION_ORDER (2)
|
|
|
|
#define SYNTH_LIMITER_RISE_TIME 0.010 //s
|
|
#define SYNTH_LIMITER_FALL_TIME 1.000 //s
|
|
#define SYNTH_LIMITER_THRESHOLD -6 // dbFS
|
|
|
|
#define SYNTH_MAX_BUFSIZE 8192
|
|
|
|
#ifndef pi
|
|
#define pi 3.1415926535897932384626433832795
|
|
#define pi_mult_2 (2*pi)
|
|
#define pi_div_2 (0.5*pi)
|
|
#endif
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C" {
|
|
#endif
|
|
void SynthDebug(const char *fmtstr, ...);
|
|
#if defined(__cplusplus)
|
|
}
|
|
#endif
|
|
|
|
#ifndef max
|
|
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|
#endif
|
|
|
|
#ifndef min
|
|
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|
#endif
|
|
|
|
|
|
#include "voice.h"
|
|
#include "vco.h"
|
|
#include "noise.h"
|
|
#include "smooth.h"
|
|
#include "vcf.h"
|
|
#include "lfo.h"
|
|
#include "env.h"
|
|
#include "param_scale.h"
|
|
|
|
#endif // _SYNTH_DEFS_H_
|
|
|