#define SYNTH_BIRD_STDLIB
#include "vg_audio_synth_bird.h"
+#include "vg_m.h"
#define WRAP1S( X ) (X)%44100
*
*/
-static double rand_float( double min, double max )
-{
- double r = (double)(rand()&(4096-1))*(1.0/4096.0);
- return min + r*(max-min);
-}
-
-static int rand_seconds( double min, double max )
-{
- return rand_float( min*44100.0, max*44100.0 );
-}
-
static void vg_dsp_init( void );
static void vg_dsp_process( float *stereo_in, float *stereo_out );
static struct dsp_lpf __echos_lpf[8];
static struct dsp_schroeder __diffusion_chain[8];
-static inline float vg_lerpf( float a, float b, float t )
-{
- return a + t*(b-a);
-}
-
static void vg_dsp_init( void )
{
/* temporary global design */
-
dsp_init_lpf( &__lpf_mud_free, 125.0f );
dsp_init_lpf( &__hpf_mud_free, 500.0f );
{
float reflection_time = ((sizes[i])/343.0f) * 1000.0f;
- float var = 1.0f + rand_float(-1.0,1.0) * reflection_variance,
+ float var = 1.0f + vg_randf64_range(-1.0,1.0) * reflection_variance,
total = reflection_time * var;
dsp_init_delay( &__echos[i], total / 1000.0f );