Enveloping the cicada
This commit is contained in:
parent
ed11b9c5e6
commit
24885df532
|
@ -75,7 +75,7 @@ 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() % 1000000 < 5) {
|
||||
if ((rand() % 10000) < 5) {
|
||||
*timer = rand() % (16000 * 100);
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +170,7 @@ int main() {
|
|||
}
|
||||
|
||||
update_cicada_osc(&cicadaOsc, &randOsc, &cicadaTimer);
|
||||
update_tape_osc(&tapeOsc, &randOsc);
|
||||
|
||||
out = zero_oh_five*randOsc.value/2 +
|
||||
zero_oh_five*oscbank[0].value +
|
||||
|
|
Loading…
Reference in New Issue