1
0
Fork 0

Cicadas are way rare now

This commit is contained in:
Rodrigo Franco 2023-12-04 16:13:54 -03:00
parent 720139fdd0
commit 39a07adb9d
1 changed files with 2 additions and 3 deletions

View File

@ -75,15 +75,14 @@ void update_cicada_osc(cicada_osc_t* c, osc_t* o, int* timer) {
c->saturation=0;
o->value = tanh(c->saturation * o->value);
// Cicada sound is inactive, check if it should start
if ((rand() % 10000) < 5) {
if ((rand() % 8000000) < 5) {
*timer = rand() % (16000 * 100);
}
}
}
int main() {
FILE *fp;
osc_t oscbank[5];
FILE *fp; osc_t oscbank[5];
osc_t lfobank[4];
osc_t lisa[3];
osc_t env;