Yes might be
Anyways, your method works, and now I have quite primitive, but still usable control over ADSR envelope, so my PICs can have some iconic 80s synth sounds
btw, if anyone wants simple way to play two musical notes together with PBP, there's a simple trick to do it, with built in PWM generator. All you need to do, is start hardware PWM with frequency/duty cycle of 1st note, and restart it with frequency of 2nd note. Something like this:
The exact numbers had to be adjusted according to actual frequencies, but general idea is this, and it works. I'm making a "tetris" music playback this way, and will post video later.Code:ASDF: HPWM 1,127,440 'frequency of 1st note pauseus 110 'period of 2nd note frequency goto ASDF






Bookmarks