I have the following patch. But whenever I click on the toggle the sound is interrupted and then I can't turn it back on by clicking on the same toggle. How to solve it?
[toggle]
|
[osc~ 440]
|
[dac~]
How to turn an [osc~ 440] on and off using a toggle?
I have the following patch. But whenever I click on the toggle the sound is interrupted and then I can't turn it back on by clicking on the same toggle. How to solve it?
[toggle]
|
[osc~ 440]
|
[dac~]
Use the toggle not as a frequency control, but rather as a volume control -- multiply the osc~ by the toggle.
More precisely: In a synthesizer, the thing that turns notes on and off is an envelope, controlling the volume. The idea of "turning off the oscillator" isn't the modular synthesis way. I guess... start with toggle-as-volume and then later discuss how to change that into an envelope.
hjh
@lucassilveira When you use the [toggle] to the left inlet of the [osc~ 440] you are changing its frequency...... to 1Hz when the [toggle] is on and 0Hz when it is off.
You can hear neither.
Two methods are shown below..
BUT..... you should use the second, as @ddw_music suggests..... because with the first method the oscillator will output 0Hz when the [toggle] is off...... but depending on when you toggled it off within its cycle it will be sending a DC signal between +1 and -1 which is bad for your speakers when sent to the [dac~]
I other circumstances you might want that though..... to freeze a bouncing ball animation for example.
David.
@whale-av ddw_music
This is awesome. I made this little change and it works.
Thank you very much, guys. You're great.
@whale-av Works for me too
Oops! Looks like something went wrong!