Synthpopalooza Posted September 18, 2013 Share Posted September 18, 2013 (edited) 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 July 24, 2019 by Synthpopalooza Correction of AUDCTL settings 8 2 Quote Link to comment Share on other sites More sharing options...
analmux Posted January 26, 2015 Share Posted January 26, 2015 Interesting! [...] 16-bit mode uses AUDCTL=$20 or $40 [...] Of course this should be AUDCTL=$50 or AUDCTL=$28. 1 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 26, 2017 Author Share Posted July 26, 2017 I am updating this table soon with settings for 15kHz mode. This is an 8 bit setting that allows for higher octave notes in the above 4 distortion settings. 3 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted July 24, 2019 Author Share Posted July 24, 2019 (edited) 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 August 30, 2019 by Synthpopalooza 5 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted August 29, 2019 Author Share Posted August 29, 2019 (edited) 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 August 30, 2019 by Synthpopalooza Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted August 31, 2019 Author Share Posted August 31, 2019 (edited) 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 August 31, 2019 by Synthpopalooza 3 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted April 11, 2020 Author Share Posted April 11, 2020 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. 3 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted April 21, 2020 Author Share Posted April 21, 2020 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 4 Quote Link to comment Share on other sites More sharing options...
freetz Posted May 11, 2020 Share Posted May 11, 2020 Just one question: All the values are relevant for an NTSC machine only, correct? Because PAL machines would have slightly different values due to the different clock, isn't it? Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted May 11, 2020 Author Share Posted May 11, 2020 Yes these are NTSC. I have not yet calibrated these for PAL. Quote Link to comment Share on other sites More sharing options...
freetz Posted May 11, 2020 Share Posted May 11, 2020 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? Quote Link to comment Share on other sites More sharing options...
emkay Posted May 11, 2020 Share Posted May 11, 2020 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. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted May 11, 2020 Author Share Posted May 11, 2020 The frequencies used in the reverse 16 $4x and $8x 9-bit poly modes might be drastically different on PAL due to the modulation settings on the second channel. Hopefully these can be easily calculated. Quote Link to comment Share on other sites More sharing options...
freetz Posted May 12, 2020 Share Posted May 12, 2020 By the way, are you aware that the link in your signature leads to some Chinese digital devices product website? 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 15, 2020 Author Share Posted June 15, 2020 On 5/12/2020 at 2:03 AM, freetz said: By the way, are you aware that the link in your signature leads to some Chinese digital devices product website? Yep ... an old domain name that expired. I have suppressed that now. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 15, 2020 Author Share Posted June 15, 2020 Another release of the POKEY table will be made soon. Additions are, SKCTLS 2-tone modes for $Ax and $4x distortions. These are complex ... 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted June 17, 2020 Author Share Posted June 17, 2020 (edited) 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 June 17, 2020 by Synthpopalooza 4 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted August 28, 2020 Author Share Posted August 28, 2020 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 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted October 14, 2020 Author Share Posted October 14, 2020 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 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted August 6, 2021 Author Share Posted August 6, 2021 (edited) 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 August 6, 2021 by Synthpopalooza 4 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.