Jump to content
IGNORED

Complete POKEY note table for all distortion settings


Synthpopalooza

Recommended Posts

When doing the music for Pac-Man Plus's Bentley Bear game, I noticed there was scant little documentation for the frequency settings for all of the possible distortions in POKEY.

 

I sat down at it, and compiled a note table that might be helpful to those using the POKEY for music. There is a text doc file, and an excel sheet which also shows the hex values.

 

Values are for these distortion settings:

 

Distortion 10 (AUDCx=$A0 - $AF) ... square wave, pure tones.

Distortion 2 (AUDCX=$20 - $2F) ... triangle wave, bell tones.

Distortion 12a (AUDCx=$C0 - $CF) ... sawtooth wave, buzzy tones

Distortion 12b (AUDCx=$c0 - $CF) ... sawtooth wave, non-buzzy tones

 

12b is different from 12a, in that you only use frequencies for AUDFx that are divisible by 3. This produces smoother tones than other frequency settings. The bass in Donkey Kong XM uses this method.

 

Settings are for 8-bit and 16-bit mode.

 

8-bit mode uses AUDCTL=$00

When using 8-bit mode, tuning errors will increase as you get into higher frequencies.

 

16-bit mode uses AUDCTL=$50 or $28 ... 1.79 mhz clock, with either channels 1+2, or 3+4 joined. When joining channels, the first AUDC register is zeroed, and the second is used to set the control and volume. the two AUDF registers use the 16-bit frequency value in a low-order and high-order format respectively. I used this method in the Bentley Bear game for the bass track in the title music, and the level complete music. On distortions 12a and 12b, tuning errors will also increase as you get into higher frequencies.

 

All of these settings were tuned by ear, using the distortion 10 table located here, as a reference:

http://www.atarimagazines.com/compute/issue34/112_1_16-BIT_ATARI_MUSIC.php

 

I hope these prove useful. Enjoy! If anyone could double check my work, and proofread it, make sure it works ok, I'd appreciate it!

 

pokey notes.xls

pokey note table.txt

Edited by Synthpopalooza
Correction of AUDCTL settings
  • Like 9
  • Thanks 2
Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...
  • 1 year later...

New updated table, with these additions:

 

* Distortion $Ax (square wave) with AUDCTL set to $?1 (bit 1 set) ... this engages 15 khz mode on all 4 channels, and transposes distortion $Ax channels down 2 octaves.  You can play low bass notes on this setting, but anything above will have severe tuning errors.  This also affects all 4 channels, so other distortions will be basically useless for anything but noise.

 

* Distortion $2x (triangle wave) with AUDCTL bit 5 or 6 turned on ($20 or $40).  This engages 1.79 Mhz mode on channels 0 or 2.  This actually transposes notes up into a usable frequency while staying in 8-bit mode.  As you play higher, tuning errors will increase, but you have almost the same range as $Ax square tone.  The other channels 1 and 3 remain unaffected and can be played in any manner desired. 

 

As an example, you could set bit 6 to engage 1.79 mhz on channel 0, then bits 5 and 4 to engage 16-bit mode, then have a channel layout like this:

 

0 - $2x triangle wve in 1.79 mhz mode

1 - $Ax square wave, normal tuning

2 and 3:  $AX square wave, 16-bit mode, bass channel.

 

The next experiments will be with the SKCTLS 2-tone mode, which will generate all sorts of new frequency tables.  This may be used for a seperate note table.

 

 

pokey notes.xls

Edited by Synthpopalooza
  • Like 5
Link to comment
Share on other sites

  • 1 month later...

I will be updating this table again!  This time, adding in distortion $8x white noise but with AUDCTL=$C0 (9-bit polycounter plus 1.79 mhz) or $D0 (same as above plus 16-bit filter).  This produces a sawtooth type wave but of a different timbre than $Cx using frequencies divisible by 7

 

There are also settings for the $4x distortion in 1.79 khz mode which produce tones.  These will also be documented.

Edited by Synthpopalooza
Link to comment
Share on other sites

So here's the updated table.  These additions:

 

* Distortion 12a with 1.79 mhz clock (AUDCTL=$20,$40,$60).  These are the distortion 12 tones in 8-bit mode without the 3-period divisors.  This produces very high saw tones starting at $FF=A#4.  As you get up to the high end, tuning errors increase.

 

* Distortion 8 with 1.79 mhz clock plus 9-bit polycounter (AUDCTL=$80+ either $20, $40, or $60).  When set, tones in periods of 7 produce buzzy tones.  Very good for basses.  Values are for both 8 and 16-bit mode, as you get higher in both, tuning errors increase.  The timbre of the sound changes, depending on polycounter settings.

 

* Distortion 4a with 1.79 mhz clock.  Produces a very buzzy industrial bass tone.  Values are for 16 and 8 bit mode, but are virtually identical.  Again, as you get higher, tuning errors increase.

 

* Distortion 4b with 1.79 mhz clock.  As with 12b, periods of three produce the desired tones here.  This is a less buzzy bass, but with a timbre very close to 8 with the 9-bit polys.  Again the 16 bit table is very close to the 8-bit, but has a resolution of 6 extra notes in the low end.  Also as with 12b, the timbre changes randomly depending on the current polycounter setting.

 

Again these were tuned by ear, please look over this and let me know of any inaccuracies.

 

 

pokey notes.xls

Edited by Synthpopalooza
  • Like 3
Link to comment
Share on other sites

  • 7 months later...

Working up a new update to the table.  I  will be adding in settings for what I have termed  Reverse 16-bit mode.   This means that you combine two channels, but reverse it by playing the first channel and silencing the second.

 

So far, I have the $Ax, $4x, and $8x with 9-bit poly.  

 

Also going to add in some of the SKCTLS 2-tone settings.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Latest POKEY note table.

 

Changes:

 

* Fixed some errors

* Added in Reverse 16-bit tables

 

Reverse 16-bit is AUDCTL=$10 or $08, but where you play the first channel and silence the second.  This changes the timbre of the sound.  1.79 mhz is used on $4x and $8x distortions, while $Ax uses the standard 64khz clock.

 

Future revisions:  Add in $2x reverse 16 table, and additional $4x note tables.  Also planned are note tables for SKCTLS modes (SKCTLS=$8B two tone mode).

pokey notes.xls

  • Like 4
Link to comment
Share on other sites

  • 3 weeks later...
23 minutes ago, freetz said:

Ok, then I can't use these 1:1 on MidiJoy, but they will help those who use the NTSC "palette". Is there a way to mathematically calculate this table for PAL, knowing that the difference is 50/60th?

It's not about 50/60. It's about 1.77 or 1.79 MHz.

 

Link to comment
Share on other sites

  • 1 month later...

Latest release of POKEY table.

 

Additions:

 

SKCTLS modes for $Ax, using 15khz, 64khz, and 1.79 mhz.  These are accessed by storing $8B in SKCTLS, then silencing the second channel.

 

The 15 and 64khz modes exist in zones ... each zone has a semitone width, you play channel 0 using the standard $Ax square wave table, and channel 1 plays the same note but transposed up a set number of semitones.  This maintains the pulse width.

 

You can take the second channel off of zero volume.  This makes a fuller sound but introduces volume artifacts into all four channels.

 

In 1.79 mhz mode, the standard $Ax frequency is played in the second channel, while the first plays a modulation frequency.  This is the famous "Save to cassette" bell tone sound.

 

EDIT:  For PAL systems, substituting the PAL note table for $Ax will work here too.

 

pokey notes.xls

Edited by Synthpopalooza
  • Like 4
  • Thanks 1
Link to comment
Share on other sites

  • 2 months later...

Latest release of POKEY note table.

 

This version has a correction:  The 15khz note tables on page 1 (standard settings) and page 4 (SKCTL settings) were incorrect.  I erroneously just copied over the standard 8-bit tables to these.  There is actually a frequency multiplier of about 1.017 or so.  This made any music using these values sound out of tune.  The table has been corrected with new values.

 

 

pokey notes.xls

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

New update:

 

I have added 1.79 mhz settings for $Ax distortion.  This makes ultra high frequencies starting at the 7th octave.  Many of these are very high, and maybe not useful for music, but may come in handy when mapping out other POKEY modes that use hi-pass filters.

 

 

pokey notes.xls

  • Like 2
Link to comment
Share on other sites

  • 9 months later...

Major update.

 

New changes:

 

Table has been split into three separate tables.

 

1: Standard and 16-bit settings for $Ax, $Cx, $2x, $4x, and $8x plus poly 9

2: Reverse 16-bit settings

3: SKCTL settings.  So far, only $Ax distortion

 

Other changes: 

 

Added 15khz for C distortion.  These allow three stable tones, selectable at will.

Added C distortion with mod 5 ("Distortion 12c") settings.  These will play intermittent silence unless you hit the polycounter reset every time.  8-bit+64khz and 16-bit+1.79 only.

Added $8x 1.79 mhz poly 9 using non mod-7 settings, 8-bit only

 

Added an extra table to the $4x Reverse 16 setting, plus the second table allows $Ax distortion to play atop it in second channel, as does the second table in $8x plus poly 9.

Added an extra table to the $Ax Reverse 16 setting that allows playing $Ax on the second channel for harmonics.

 

These are still in beta mode, use at your own risk.

 

 

pokey notes.xls

pokey notes - reverse 16.xlsx

pokey notes - skctl.xlsx

 

Edited by Synthpopalooza
  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 2 years later...

Resurrecting an old thread.  This relates somewhat to RMT, I'm trying to replicate the triangle wave / flute sound that Analmux was able to create in his Instrumentarium piece.

 

I've loaded the RMT file, and inspected the instrument(s), but it doesn't play back properly in RMT 1.34.  I'm not sure if the emulation changed, but it's definitely nothing like a pure triangle tone - it's far more distorted.

 

I figured I would try what's suggested in this thread, but I'm struggling to translate this to something like RMT.  I assume the bits you switch are the AUDCTL parameters listed on the instrument screen in RMT (e.g., 15Khz, HPF 2+4, HPF 1+3, etc.) - is that correct?

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...