Jump to content
Sign in to follow this  
ivop

Alternative pokey sawtooth

Recommended Posts

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

 

post-20947-0-82263800-1341880935_thumb.png

 

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 by ivop
  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by analmux

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...