Jump to content
IGNORED

POKEY timbres: Sound programming info needed! (Is there a FAQ?)


Recommended Posts

:?: Is there anywhere a FAQ about the individual timbres of the POKEY sound chip on Atari XL?

 

The POKEY is a really unique sounding device which can do a lot of bizarre timbres (shift register feedback noises) those do not exist on normal analogue or digital synthesizers. It can do e.g. noises like crunching crusty cookies, like a bumblebee in a paper bag or like lighting a match on a matchbox, like scraping a butter knife on a sesame crisp bread, like pulling a pine cone over sand paper - it can sound like overrolling a dry scone with a bike, like peeing on burning sausages on a coal grill or like a leaky gas boiler almost about to explode... Short - it is an as special sound machine like the Roland TB-303. Unfortunately the behaviour of the most interesting mode ("distortion" mode 12 in Basic) is extremely irregular, i.e. the pitch range from 0..255 is shared among many different waveforms those seem to follow no obvious scheme and break out of the conventional chromatic scale. Is there anywhere a chart that lists all available pitch values per waveform? Is there a mathematical formula that clearly explains which pitch value outputs which waveform (e.g. are certain bits of this register reserved to switch them?).

 

-Has anybody a complete copy of the POKEY data sheet?

 

I already tried to download the POKEY chip data sheet. Unfortunately the site that hosted it seems to be dead, thus I could only recover it from the Google cache where all the diagram pictures are missing (was http://homepage.ntlworld.com/kryten_droid/...ri_hw/pokey.htm ).

 

However the formulas in it look very technical and don't obviously explain the irregular order of the waveforms. It seems to be something like that the selected squarewave frequency is bitwise XORed with the output of the shift register noise generator that runs on a fixed clock frequency, and the result depends on the ratio between both frequencies or the like. (It has been very long ago when I learned about polynomic stuff, div() ans mod() operations on the university.) Also the implementation of the "highpass filter" looks very strange; does it basically shorten too long pulses by doing binary operations between 2 sound channels?

 

I own the German "Atari BASIC Referenzkarten" (reference cards) from my Atari 400, which lists note values for the plain squarewave voice ("distortion" 10); here apparently doubling the value (and adding 1?) halves the pitch frequency. But in mode 12 this scheme does not work. I already experimented a bit with Basic sound loops but could not identify the scheme behind distortion mode 12.

 

-Too loud volume damages POKEY?

 

In the "Atari Program Exchange Program Author's Handbook" stands an odd warning: "Never let the sum of the volume levels of the four sound channels exceed 15; doing so damages POKEY (the sound generating chip)." Is this really true? So far I remember, every Basic novice cranked up the volume of all channels to the max without that ever anything bad happened. It may distort and thus might fry a hifi tweeter by the harshness when turned too loud, but certainly not fry a POKEY. I only remember that keyboard and joystick matrix scanning lines could be switched to output and thus short each other when keys/ joystick contacts were closed, but did this cause dangerous currents? Has anybody ever toasted his POKEY chip by too high volume settings?

 

-About me and the POKEY sound...

 

I grew up with Atari VCS, 400 and 800XL, thus since my childhood the POKEY tone scale set my melodical perception; I would love to use them to create a software synthesizer based on POKEY sound style, and I am about to modify an old concert zither to imitate the special detuned bass voices. (I found out that nickel wound strings sound brighter than the original copper wound ones and want to re-string the zither alternatingly according to typical POKEY sound structures instead of the original chord pattern. I have to discard some rusty strings anyway those cause splinters in the fingers.)

 

I am collector of strange music keyboards and sound toys and operate a huge website about them (WarrantyVoid), which includes a detailed circuit-bending FAQ with some basics about squarewave music and POKEY timbres. I also composed some music in that style on Amiga. (See http://Weltenschule.de/TableHooters/index.html )

 

I also collect historical videogames and homecomputers. By Atari I own various VCS2600 versions, VCS7800, Atari 400, 2x 800XL, 65XE, 260ST, Lynx.

 

Currently I have not learned Atari 8bit assembly language, but can only do some Atari Basic. Long ago I went through electrical engineering and software engineering studies. It may be that in farer future I will program a software synthesizer for PC based on POKEY sound (with many additions), but at the moment I have enough other things to do. (On PC there is already the "Raster Music Tracker" for making POKEY music, which I haven't examined closer yet.)

Link to comment
Share on other sites

I think the volume exceeding 15 advice is just a myth - virtually all software out there would be running a combined amplitude around 30-40 or more.

 

IIRC, low-pass filtering just performs an AND operation between the logic output (not the actual amplitudes) of the two voices. Typically, you will have the filtered voice with volume set to some level and the other voice at 0.

 

In the case that non-pure tones are used (AUDCn), the particular voice just outputs whatever logic level is present on the selected poly counter at the time of transition - ie when it's counter hits zero (?)

 

Probably the best way to experience what filtering does would be to set 15 KHz mode in AUDCTL, then use 2 adjacent frequencies on the AUDF registers on the voices involved in filtering.

 

Just remember that POKEY (excluding the volume-only software controlled "forced output" modes) only really generates square waves, with the transitions being altered dependant on filtering and employing the poly-counters by using the non-pure settings in AUDCn. Of course the resultant output (as viewed by hearing or sampling) isn't exactly a square wave. Actual sound tends to have a peak followed by a slight amount of decay in the duty cycle.

 

Frequency? Just think of the POKEY voices as counters which count from the value in (AUDFn +1), down to zero. At that point, a level transition is triggered (pure tone), or the level (0 or 1) is decided upon dependant on the AUDCn and/or AUDCTL filtering settings. The rate of the counters is determined by the settings of AUDCTL - ie either 15 KHz, 64 KHz, 1.79 MHz.

Edited by Rybags
Link to comment
Share on other sites

Has anybody a table which "pitch" values of non-pure modes produce the same timbres? Especially I am looking for the bass timbres in "distortion" mode 12. Which genuine note pitch frequencies are available for each of these timbres? Why do various pitch values make no sound at all (at least on emulator)? Does their bit combination switch into "volume only" mode (for CPU controlled sample playback) and thus produce no waveform?

 

Which pure tone frequencies were also available on the TIA of VCS2600? (I read it had only 32 pitch values available instead of 256.)

Link to comment
Share on other sites

Thanks for the info.

 

Unstable timbres? - Is that the timbre change effect heard in the great "Mr. Robot and his Robot Factory" tune? Or are these other types of phase changes among multiple layered pure tone channels? (It has been very long ago now when I used div() and mod() mathematics.)

Link to comment
Share on other sites

About Pokey: Did you know there's also a very interesting type of sound available? It's the sawtooth waveform, caused by an analogue electronic effect of the internal circuits inside Pokey. This signal integrating effect (windowed integrating, or integrating over 'mollifyer') is a hidden feature that can give a lot of other weird and interesting waveforms or soundeffects. Especially when using polycounter distortions on channels clocked at 1.79 MHz and some filter settings things get very interesting.

Whow, I didn't know that POKEY isn't completely researched yet and still hides some unheard timbres. That seems to be like the flageolett timbres on string instruments, those behaviour is also very unobvious and hard to use musically. I only know that the MAME team managed to completely decrypt and simulate the formula of the POKEY random number generator (shift register feedback line) because Atari arcade games used it for copy protection. It's in the MAME source code, thus it also should be easy to make correct sounding other emulators from it.

 

The maths behind finding the right pitches when using plain distortion 12 is a lot easier compared to the maths you need for getting any interesting and tunable sounds in the advanced modes involving polycounters.

Wouldn't it be possible to write on PC a brute force algorithm similar like a code cacker that tries all combinations, simulates the output with the MAME POKEY emulator code, makes an FFT from it and analyzes the pitch and overtones of each timbres to generate a sorted table of all available note pitches and waveforms? Unlike in the 8 bit age, with modern PCs computing power it shouldn't be too hard to write such an exploration tool.

Edited by CYBERYOGI =CO=Windler
Link to comment
Share on other sites

  • 3 years later...

...

 

Wouldn't it be possible to write on PC a brute force algorithm similar like a code cracker that tries all combinations, simulates the output with the MAME POKEY emulator code, makes an FFT from it and analyzes the pitch and overtones of each timbres to generate a sorted table of all available note pitches and waveforms? Unlike in the 8 bit age, with modern PCs computing power it shouldn't be too hard to write such an exploration tool.

 

That is a really cool idea. That would totally document the POKEY, and could be made into a database. Incidentally, does anyone know of a modern database front-end that is similar to the old "Microfiche Filer", on the Amiga? It was a cool program, because you could rapidly create multimedia-oriented databases, with Text, Images, Sounds, etc in separate screen areas. Something like that would be perfect for automatically organizing the output of the Brute Force Cracker that he describes.

Link to comment
Share on other sites

I doubt the MESS Pokey emulation is very accurate.

 

Aside from that "Every combination" would mean:

 

2 x 16 bit voices = over 4 billion combinations.

 

Same again for 4 x 8 bit voices.

 

Then same again for each bitsetting combination of AUDCTL. And we also have all the AUDCn combinations, and you get different results e.g. for interaction between 2 voices where one voice is half the volume of the other.

 

A better solution would be a technical document like the Altirra HW Manual but focussing on Pokey.

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...