ivop #1 Posted July 10, 2012 (edited) Recently I have been "collecting" all the different ways to generate pulse, sawtooth and triangle waves with the pokey chip, and while doing that, I thought of a new way to approximate a sawtooth wave. Well, I think it's a new way because I did not read about it somewhere else, but I'm not sure. It works like this: play frequency divider F on channel a, distortion 10 play frequency divider F/2 on channel b, distortion 10, half volume F/2 must be an integer, so F&1 == 0 (i.e. only even numbers for F) AUDFx are loaded with F-1 and (F/2)-1 after setting AUDFx's, restart the polycounters by writing to STIMER This results is one channel playing exactly double the frequency of the other and both are almost exactly in-phase. The result is as follows: a: 001100110011 b: 010101010101 r: 012301230123 To the ear, this sounds a lot like a sawtooth wave. Basically, both waves add up if they're in sync. There is no decrease in volume as is the case with interfering 1.79MHz based waves resulting in a sawtooth. Edited July 10, 2012 by ivop 1 Quote Share this post Link to post Share on other sites
Rybags #2 Posted July 10, 2012 Using STimer isn't desirable in a lot of cases though. It would have been an infinitely more useful function if it had bit control to include only the channels you wanted synced. An alternate way to get voice syncing is to play 2 max frequency notes in the used voices at zero volume, then short delay then change both to the wanted lower frequency. Quote Share this post Link to post Share on other sites
emkay #3 Posted July 10, 2012 Have you checked, playing high frequencies on that channels, then switch to the wanted pitch? As the high frequency usage closes the waves together in their envelope? In RMT it works only with the filter channels. Btw. Filter makes exactly, as you described. One channel is playing standard frequency, filtered voice play at an exact "integer" .... make the lower frequency channel playing at half volume.... And so on.... http://www.youtube.com/watch?v=Q6iNF7WwA5M Would be interesting, if this is reachable without filter, when directly programming of POKEY is used. Quote Share this post Link to post Share on other sites
analmux #4 Posted July 10, 2012 (edited) Exactly emkay: We already did a few experiments about this. It can be done WITH or WITHOUT using filter. In a similar way we can get approximately bass triangle waves, without filter. Then you can get a desired volume ratio, f.e. 1:2 or another one. Using WSYNC is the key. As WSYNC is the key for multiple things, it would be the best to use shadow registers in a tracker. When using WSYNC, then you can adjust all 4 registers at once. EDIT: By the way, not using WSYNC but filter instead, using the approximate method, so that WSYNC won't disturb the other channels, is an alternative possibility. Edited July 10, 2012 by analmux Quote Share this post Link to post Share on other sites