This example demonstrates the LowPassFilter class.
#include <MozziGuts.h>
#include <Oscil.h>
#include <tables/chum9_int8.h>
#include <tables/cos2048_int8.h>
#include <LowPassFilter.h>
#include <mozzi_rand.h>
#define CONTROL_RATE 64 // powers of 2 please
void setup(){
aCrunchySound.setFreq(2.f);
kFilterMod.setFreq(1.3f);
}
void loop(){
}
kFilterMod.setFreq((
float)
rand(255)/64);
}
byte cutoff_freq = 100 + kFilterMod.next()/2;
}
char asig = lpf.
next(aCrunchySound.next());
return (int) asig;
}