Page 1 of 1
Can square wave echoes cancel the other wave?
Posted: Thu Jul 09, 2009 3:44 pm
by Sivak
I have seen this issue with a few tracks in the game, but it seems to happen randomly, but when it does, it's kinda annoying.
I like to use the echoing of square waves as it has a nice sound, but don't like that square 2 cancels square 1's sound.
Can anything be done about this?
Posted: Thu Jul 09, 2009 4:48 pm
by Memblers
Change the frequency by a small amount on the 2nd channel, or perhaps use a light vibrato on one of them. Instead of canceling out, you'll get a really cool phasing effect.

Posted: Thu Jul 09, 2009 7:30 pm
by Jarhmander
If you do some writes in $4003/$4007 to both square waves to the start of the note, they will be always sync'd, since writing to these registers reset the phase, so no wave cancelling is possible.
Posted: Fri Jul 10, 2009 3:47 am
by Bregalad
Yeah but if they almost cancel, a very annoying sound is heard. One solution is to use a different duty cycle for the echo, or do what memblers says if your sound engine is complex enough to support that. (when 50% square echoes a 75% or 87.5% rectangle wave it sounds cool).
Posted: Fri Jul 10, 2009 4:21 am
by tepples
It could be as simple as raising square 2's period by 1 if it equals that of square1.
Posted: Fri Jul 10, 2009 1:44 pm
by Memblers
Also it's kind of interesting that this phasing effect is present in the hardware, if you hit the sweep registers it automatically adds 1 to the 2nd pulse channel. The only thing that really shows that effect, that I can think of, is The Guardian Legend - the "alarm sound" before you fight a boss. It used to sound canceled on emulators before that was discovered.