francis1661
New member
hi there, posting for the first time so nice to meet you all!
i have a question regarding reseting the phase of the sine object from the audio lib, im pretty much new to the teensy so i ask for your kind forgiveness if i ask obvious / stupied stuff ,
im attempting to set the phase of sine to 0 upon midi note receive,
whereas (sphase) is basically 0 which is sent to the object everytime midi note 60 is received
this resides in a loop and the outcome is a saw wave because i assume that im doing something wrong and the phase resets everytime the loop is executed
how could i "tell" the phase to reset to 0 momentarily when the midi note is received and proceed from there?
thank you very much!
i have a question regarding reseting the phase of the sine object from the audio lib, im pretty much new to the teensy so i ask for your kind forgiveness if i ask obvious / stupied stuff ,
im attempting to set the phase of sine to 0 upon midi note receive,
Code:
AudioNoInterrupts();
sine1.amplitude(amp_env_exp);
sine1.frequency(200*pitch_env_exp+60);
sine1.phase(sphase);
AudioInterrupts();
whereas (sphase) is basically 0 which is sent to the object everytime midi note 60 is received
this resides in a loop and the outcome is a saw wave because i assume that im doing something wrong and the phase resets everytime the loop is executed
how could i "tell" the phase to reset to 0 momentarily when the midi note is received and proceed from there?
thank you very much!