CuriousOne
- 9th December 2015, 06:28
Hello.
I'm doing some experiments with music synthesis, using hardware pwm as tone source, and it's rectified duty cycle voltage as envelope generator. The issue is that for example, when I want to change PWM duty cycle, HPWM statement "restarts" PWM generator each time, which causes undesirable sound effects. At certain point, it can be used for sound effect modulation, but I'd like to get rid of it. Here's example of it's proper usage: https://www.youtube.com/watch?v=E164zNFB378&feature=youtu.be
So, say I have a code like this:
FOR A=1 TO 100
HPWM 1,A,1000
NEXT
HPWM statement on each cycle momentarily shuts off PWM generator and re-launches it with new parameters, which causes "click" in sound. Is it possible to alter duty cycle of already running generator, without stopping it?
I'm doing some experiments with music synthesis, using hardware pwm as tone source, and it's rectified duty cycle voltage as envelope generator. The issue is that for example, when I want to change PWM duty cycle, HPWM statement "restarts" PWM generator each time, which causes undesirable sound effects. At certain point, it can be used for sound effect modulation, but I'd like to get rid of it. Here's example of it's proper usage: https://www.youtube.com/watch?v=E164zNFB378&feature=youtu.be
So, say I have a code like this:
FOR A=1 TO 100
HPWM 1,A,1000
NEXT
HPWM statement on each cycle momentarily shuts off PWM generator and re-launches it with new parameters, which causes "click" in sound. Is it possible to alter duty cycle of already running generator, without stopping it?