void trigger(){
   sine->setFrequency(freq);
   chirp->setFrequency(freq*2);
   env1->setDecay(decay);
   env2->setDecay(decay*snare*0.5);
   chirp->setDecay(decay);
   env1->trigger();
   env2->trigger();
   chirp->trigger();
   impulse->trigger();
 }
Пример #2
0
 void setFrequency(float freq){
   osc.setFrequency(freq*ratio+offset);
   // osc.setFrequency(freq);
 }