Jump to content
analmux

A new Pokey tune: Unusual instruments?

Recommended Posts

Earlier this year I wrote a Pokey tune for the Music Compo 2009. Today I slightly redefined a handful of instruments to 'complete' the tune. It was supposed to be a Pokey-instrument demo, and at the same time an attempt to use these instruments in a complete tune.

 

Here's a list of (some of) Pokey's features used in the instruments of the tune:

-Normal square wave and noise (of course)

-Sawtooth wave

-1.79 MHz distortion 2 (= 5-bit polycounter)

-Triangle wave

-Pulse (& multi-step pulse) wave

-Filterchords

-Combi Saw & Noise percussions

-Polycounters & 16-bit filter ('guitar'/'clarinet')

-2 Tone filter

 

When composing this tune I used a (new) RMT hack which supports 16-bit filter effects like the distortion guitar near the end, and which allows better notation for the triangle and sawtooth wave. The 2-tone filter is 'activated' by another simple hack after exporting to a .xex file.

 

When listening on emulator, the triangle wave will be silent and the 2-tone filter will give wrong notes. So please be sure to run the tune on a real machine. I also made a recording for people who have no real machine. All files can be found here:

http://www.phys.uu.nl/~bpos/IR1/

 

The purpose of this 'pokey music experiment' was trying to find out if any of the unusual and undocumented pokey features are of any use for tunes.

 

Enjoy the listen. If anyone has questions, feel free to ask.

  • Like 4

Share this post


Link to post
Share on other sites

Love it :) Being a total SID fanatic stuff like this makes me think POKEY isn't so bad after all. Is it heavy on cpu/multiple calls?

 

 

Pete

Share this post


Link to post
Share on other sites

Excellent work. especially from 2:18 onwards. Listened to the mp3 but will check also on my XE. If the talent from the emulation world creates accurate Pokey emulation it would make a lot of people very happy.

Share this post


Link to post
Share on other sites
Is it heavy on cpu/multiple calls?

 

Not that heavy...I forgot to add this comment, but it does not make use of any sampling. And, it is standard Pokey programming at 100Hz updates. It should use 10 to 12% of CPU, so it should be possible to use it as a background track for a game. No heavy calculations & register stuffing, just unusual usage ;)

Share this post


Link to post
Share on other sites

Awesome!

 

Analmux, I would like to send you a PM but I get this message:

The member analmux can not use the messaging system

This personal message has not been sent

Share this post


Link to post
Share on other sites

Awesome!

 

Analmux, I would like to send you a PM but I get this message:

The member analmux can not use the messaging system

This personal message has not been sent

 

OK, checked & changed some accounts settings...now my PM service should be active.

Share this post


Link to post
Share on other sites

Love it :) Being a total SID fanatic stuff like this makes me think POKEY isn't so bad after all. Is it heavy on cpu/multiple calls?

 

Pete

It's amazing how most C64 people disregard Atari POKEY chip, which is actually, besides other things, very good sound chip.

Share this post


Link to post
Share on other sites

That is amazing! I love the sound that goes from 2:18 on. Is it possible to reproduce it in standard RMT? Also the triangle waveform that preceeds it is very nice.

Share this post


Link to post
Share on other sites

Love it :) Being a total SID fanatic stuff like this makes me think POKEY isn't so bad after all. Is it heavy on cpu/multiple calls?

 

Pete

It's amazing how most C64 people disregard Atari POKEY chip, which is actually, besides other things, very good sound chip.

 

Forget the SID - at times it's starting to sound like the FM chip in the megadrive/genesis. nice work :)

Share this post


Link to post
Share on other sites

I don't want to kick off the whole C64 vs A8, SID vs POKEY thing again but please, there is no comparison in the design and therefore implementation of the SID. Saying "it's starting to sound like.." just discounts the last 20 years tunes. It's nothing to do with being a C64 guy, it's nothing to do with fanboyism it's just my opinion as a musician, a music fan, a user/player of games machines/computers since the early 80s and if people were honest pretty much the truth. I love this tune as an example of what POKEY can do and it's one of the only things I've heard recently that was in tune, actually musical and very well written, but I love any music for the same reasons ;) Maybe it is just that you guys have never had a player routine whereas the C64 nearly everyone had their own that was capable of producing amazing sounds. I suppose that's because there were more people working on C64 ;)

 

As I say, I'm a music fan so please do me a favour and prove me wrong, point me to some of the A8's best music. You won't change the facts but you might surprise me :)

 

 

Pete

Share this post


Link to post
Share on other sites

OK, maybe it is time for some more detailed explanations (extracted from another text):

 

In technical terms, my tune is based on the Hardsynth approach (from emkay's experiments), but it is extended with custom notation tables for other instruments.

 

After examining Pokey for a few years now, I can say I have a clear picture of nearly all of its sound possibilities and undocumented features. Many features were already 'known' before me, but maybe not fully 'understood' or surveyed. The way I see Pokey itself is like an Instrumentarium, or orchestra. All features and instruments have their own use and their own operative piece of the tone-ladder.

 

 

As far as I can see now, Pokey has three types of basic waveforms, and three types of filtering.

 

Waveforms:

-First Kind: Square Wave, Noises (Polycounters)

-Second Kind: Sawtooth Wave

-Third Kind: Triangle Wave

 

Filters:

-"High-pass Filter" (has the most resemblance to SID's Ring mod function)

-"16 bit filter"

-"2-Tone Filter" (has the most resemblance to SID's Sync function)

 

When combining any waveform of the first kind with any filter, a large spectrum of different sound-types is possible.

 

Examples:

-Square + high pass & certain pitchvalues = Pulse waveform

-Square at 1,79 MHz + high pass & certain other pitchvalues = Bell/Gong sounds

-Poly9 + 16 bit filter & special pitchvalues = Distortion Guitar

-Poly4 + 16 bit filter & special pitchvalues = Clarinet

etc.etc.

 

It turns out that Pokey has a lot more features like SID has, than people thought. Most of them aren't even possible on SID, talking about the forest of more complex waveform combinations. And, last but not least: Also on Pokey there is a way to get 8 or even 9 bit sampling, by just using 2 channels, but this is still in development ;) ...the only secret I can give now is that it works thanks to the sawtooth wave feature, in fact nearly like how 8 bit sampling on SID works.

 

 

 

And here is a complete list of what instruments I used in my tune:

(...and it is by far not all of what's possible :)...)

 

-----------------------------------------

Sawtooth Wave: (0:00 - 0:07, 1:09 - 1:24)

 

Channel 1 & 3

Pokey Distortion: 10 ($a) (on channel 1)

AUDCTL settings: x11001xx (from msb to lsb...x means free to choose 0 or 1)

 

Remarks:

-Channel 3 is silent

-Custom Notation Table 2

 

----------------------------------------------

Pulse Wave (Synth): (0:07 - 0:38, 1:24 - 1:32)

 

Channel 1 & 3, or 2 & 4

Pokey Distortion: 10 ($a) (on channel 1, or 2)

AUDCTL settings: x0000101, or x0000011 (15 kHz mode selected through the whole tune!)

 

Remarks:

-This instrument works thanks to Pokey's so-called "High-pass Filter"

-Channel 3, or 4 is silent

-Pulse-width can be controlled

 

-----------------------------

Noise Sawtooth: (0:38 - 0:54)

 

Function: Background percussion

Channel: 1 & 3

Pokey Distortion: 8 (on channel 1)

AUDCTL settings: 011001xx

 

Remarks:

-Channel 3 is silent

-The resulting wave-form is really some mixture between sawtooth and noise

 

----------------------------------------------------

Distortion 2 at 1.79 MHz: (0:46 - 1:09, 1:32 - 1:39)

 

Channel: 1 or 3

Pokey Distortion: 2

AUDCTL settings: x1x0x0xx or xx1x00xx

Custom Notation Table 1

 

Remarks:

-This instrument gives better-tuned high notes, independent of 15 kHz or 64 kHz mode

 

----------------------------------------

Filterchords: (0:54 - 1:09, 3:11 - 3:24)

 

Channel: 2 & 4

Pokey Distortion: 10 ($a)

AUDCTL settings: xxx00x11

 

Remarks:

-Channel 4 is not totally silent!

 

---------------------------------------

Low Clean Notes In Canon: (1:39 - 2:10)

 

Channel: 1,2,3

Pokey Distortion: 10 ($a)

AUDCTL settings: x0000001

 

----------------------------

Triangle Wave: (2:10 - 2:17)

 

Channel: 1 & 3

Pokey Distortion: 10 ($a)

AUDCTL settings: x11000xx

 

Remarks:

-Channel 1 and 3 are both at maximum volume

-Custom Notation Table 2 (same as sawtooth wave!)

-This instrument should be used with some care, as Pokey's analog behaviour distorts volume levels

-Not supported in emulation: Silence instead

 

-----------------------------------------

Electric Distortion Guitar: (2:18 - 2:56)

 

Channel: 1 & 2

Pokey Distortion: 8

AUDCTL settings: 11x1x00x

Description: 16bit filter effect

 

Remarks:

-Channel 2 is silent, Channel 1 not!

-Custom Notation Table 3

-Poly 9 used instead of Poly 17

 

-----------------------

Clarinet: (2:26 - 2:56)

 

Channel: 1 & 2

Pokey Distortion: 12 ($c)

AUDCTL settings: x1x1x00x

Description: 16bit filter effect

 

Remarks

-Channel 2 is silent, Channel 1 not!

-Programmed by using 'Table of Frequencies' feature of RMT

-Frequencies computed using custom formula

-Possibility to make a new RMT hack including notation tables for this one

-The sound is not stable. Everytime this part could sound a bit different. There is uncertainty in the timing, just like distortion 12 basses. This can be controlled however with the Polycounter-reset mechanism I found, but RMT does not support it

 

----------------------------

2-Tone-Filter: (2:56 - 3:11)

 

Channel: 1 & 2

Pokey Distortion: 10 ($a)

AUDCTL settings: x0x0x001

SKCTL settings: 10001011 (instead of 00000011)

Description: 2-Tone-Filter effect

 

Remarks:

-Channel 2 is silent, Channel 1 not

-The silent channel (2) is the 'note carrier' for channel 1, which is the 'modulator'

-Channel 1 plays same melody as channel 2, but only transposed some semitones higher

-This undocumented pokey-feature has the most resemblance to SID's sync-feature

-Not supported in RMT, but to make it work I did a bypass hack after exporting to .xex

-Not supported in the present emulation: handled incorrectly

-Bypass hack used afterwards, to check whether songline $17 or $18 is playing: this switches the 2-tone filter on and off

 

(this list sounds a bit like the end part of Tubular Bells)

 

Final Remark: Custom Notation Tables are tuned in with the standard distortion 10 (squarewave) tables (of RMT) in 15 kHz mode.

 

this was all extracted from the original text I wrote earlier this year (2009.03.21):

http://www.phys.uu.nl/~bpos/IR1/Explanation.txt

  • Like 2

Share this post


Link to post
Share on other sites

Forget the SID - at times it's starting to sound like the FM chip in the megadrive/genesis. nice work :)

 

Awwww, so all my work over the last 2 weeks adding true audio rate FM to SID voices was in vain ? Do you 100% stand by that comment ? ;)

 

If you want to really hear what 2 operator FM stuff can do, go find Oxygenstar on 8bit Collective.. His FM stuff is astonishing, and I mean that from the bottom of my heart..

 

But what blows my mind totally is that in tunes that embraces the harshness of the YM stuff, and use it like and instrument, instead of trying to be something that it isn't and will never be.. SID's guilty of that as well ;)

 

Some tunes I've heard recently, mixing FM voices, raw square waves, and rough samples are truly amazing.. It's just a shame these have to be produced on tools that are never destined to run on the native hardware, I mean as a stand alone piece of executable music.. People like:

Check out stuff like this..

OxygenStar - Look How I Go OxygenStar - Left Out

And utilising lovely square wave beauty tat it can be at times..

trash80 - icarus trash80 - missing_you

Plus, Mr.Spastic.. I hope there's a very good reason we're not hearing stuff like this from the A8 ;) In C64 land there seems to be some resentment towards lovely square waves ;)

And yes, I like Oxygenstar because of his penchant for simple FM synths ;) But how he uses them is mind-boggling..

In the early 90s I spent far too much time writing FM drivers, and the stuff they get out now is fecking amazing to say the least..

 

But overall I just love that way simple sounds are used to make amazing tunes, rather than trying to bend those basic sounds into something they're not...

 

And yes (according to Atariksi) I'm c64 nut, but SID I find too familiar in that it reminds me too much of the original (subtractive) synths back in the early 80s that I learnt synth programming on but with not enough ooomph to it.. I don't want that :)

 

Anyway, I'm in the bar and shouldn't be in control of a keyboard connected to the internet right now, so forgive me.. Just must say that FM is horribly underrated, and that (square waves and lots of them!) are incredibly powerful.. Just go look up Walsh Synthesis if you don't believe me ;)

Share this post


Link to post
Share on other sites

That is amazing! I love the sound that goes from 2:18 on. Is it possible to reproduce it in standard RMT? Also the triangle waveform that preceeds it is very nice.

 

Thanks. Nearly nothing of this tune can be reproduced in a simple way in standard RMT, or one should use 'table of pitches' command.

For the sawtooth/triangle/guitar instruments I used custom pitch tables, in my 3rd RMT hack. Without these tables, using standard RMT, one should just forget the notes and be very patient :).

Share this post


Link to post
Share on other sites
So, any progress on the 8-bit waveforms?

No progress...still this:

 

The sawtooth at volume 1 can be used to put on top op a standard 4bit volume only sample.

We'd get something like this (see picture at http://www.phys.uu.nl/~bpos/SAMPLE8/1.gif)

The red part (upper) is the standard 4bit test sample, and the blue part (lower) is the same + sawtooth.

 

A nice pokey feature is that we can choose the direction of the sawtooth, so we should be able to 'finetune' any 4bit sample.

Of course we're not restricted to using vol. 1 for the saw, as sometimes we need larger volume steps etc.

 

The downside is the exponential decay effect which is clearly visible here, but I think it should be possible to do some kind of 'alpha correction', to compensate for the decay. Another correction is needed to resynchronize the saw and the pulse, as now the sawtooth is still a few cycles too late, resulting in sharp peeks...

 

It is not really 8bit sampling, but something with similar or higher quality.

 

However, working on this stuff has really low priority for me.

Edited by analmux

Share this post


Link to post
Share on other sites

This is a masterpiece pokey song. Very nice composition and contains all the new great sounds that I've heard on a pokey chip.

Congratulations!

 

Now, I think we can say... we need a software tracker supporting those sounds.

Share this post


Link to post
Share on other sites

Developing those sounds in double VBI Speed and for ingame usage needs much more than a "simple RMT".

If someone wants to create a tune for a dedicated game, the Tracker must have an ANTIC/DLI timing programming ability, simulating the ingame screen.

On the real hardware, it is as simple a setting playing points into the screen range, via DLI code.

The tune uses double VBI speed and has fixed playing positions by the used player. This results in one playing-point somewhere in the screen range. Having the fixed player running, the play-points will remain at the same position. But DMA reads and DLIs move the playing point, which results in different offsets of Pokey's generators, which results in different sounds.

Share this post


Link to post
Share on other sites

I think RMT has jitter by default anyway with it's timing. Don't the sound register stores all occur at the end of the play routine?

 

Since the CPU time the play routine uses each frame can vary considerably, that puts the timing out.

 

In both cases, my suggestion would be to just change things around. Store the AUDF/C stuff right at the start, then do the processing and save the next set of values.

 

For games and stuff where you want 100 Hz playback, there's always the option to just do both processing sweeps in VBlank, and store the sounds at the appropriate time.

 

Of course, you're talking a hacked player there.

Share this post


Link to post
Share on other sites
link doesn't work ! :/

 

Yes, I noticed, I think the .phys server is down here in Utrecht. I hope it gets back online soon, as there was already another problem a week ago.

 

...but, here is another file, just attached here.

 

 

Indeed, emkay, it is as if you were reading my mind, and I already tried to integrate the tune into an old demo (scrolling MCS remember?)....so, here it is again.

 

Indeed, when trying to integrate it, there were some minor timing deviations, and the best would be to do the pokey-register stuffing at fixed times (like Rybags suggested). This is though still a simple modification I could do. But this one is just checking for a vcount value (at middle of the screen) in the keycheck mainloop. It should work on both PAL & NTSC. The odd RMT play calls will be in vblank (at scanline 248).

 

It is possible that the filter voices have a little timing defect, especially when running on an NTSC machine.

To fix this, indeed I'd need to do another simple modification.

 

If the program runs, one can again press some keys (1,2,3) to change gfx contents.

 

Edit:

-It is just a demo, there's no character, only scrolling when using the joystick.

-I used the technique of PM underlays for colour enhancements.

Edited by analmux

Share this post


Link to post
Share on other sites

In the demo you can switch to 'help screen' by pressing the help-key.

 

A fun thing is that then the RMT player calls at the middle of the screen won't run, so the tune will play at half speed :)

 

Good for people who don't like 'busy tunes' (I must admit I suffer a bit from ADHD) :D

Share this post


Link to post
Share on other sites

Love it :) Being a total SID fanatic stuff like this makes me think POKEY isn't so bad after all. Is it heavy on cpu/multiple calls?

 

Pete

It's amazing how most C64 people disregard Atari POKEY chip, which is actually, besides other things, very good sound chip.

 

 

To be fair some people rate machines' soundchips based on music files they can run and play on hardware/emulators and if the tunes all sound a bit samey then people will make judgements on that hardware rightly or wrongly....but are still always open minded about any new techniques.

 

Nice unusual instruments, you are onto something good here keep up the good work :) Out of the 3000 or so Pokey chip tunes I have trawled through this sounds the least like a stock Pokey tune so your work is done. You are doing for Pokey here what the four great SID musicians did...ie make their own individual and unique sound....and that's what it's all about really ha

 

(and for the record my favourite sound chip is actually nothing more than a 4-channel DAC under DMA control...flexibility = ultimate creativity and originality IMO)

Share this post


Link to post
Share on other sites

Forget the SID - at times it's starting to sound like the FM chip in the megadrive/genesis. nice work :)

 

Awwww, so all my work over the last 2 weeks adding true audio rate FM to SID voices was in vain ? Do you 100% stand by that comment ? ;)

 

If you want to really hear what 2 operator FM stuff can do, go find Oxygenstar on 8bit Collective.. His FM stuff is astonishing, and I mean that from the bottom of my heart..

 

But what blows my mind totally is that in tunes that embraces the harshness of the YM stuff, and use it like and instrument, instead of trying to be something that it isn't and will never be.. SID's guilty of that as well ;)

 

Some tunes I've heard recently, mixing FM voices, raw square waves, and rough samples are truly amazing.. It's just a shame these have to be produced on tools that are never destined to run on the native hardware, I mean as a stand alone piece of executable music.. People like:

Check out stuff like this..

OxygenStar - Look How I Go OxygenStar - Left Out

And utilising lovely square wave beauty tat it can be at times..

trash80 - icarus trash80 - missing_you

Plus, Mr.Spastic.. I hope there's a very good reason we're not hearing stuff like this from the A8 ;) In C64 land there seems to be some resentment towards lovely square waves ;)

And yes, I like Oxygenstar because of his penchant for simple FM synths ;) But how he uses them is mind-boggling..

In the early 90s I spent far too much time writing FM drivers, and the stuff they get out now is fecking amazing to say the least..

 

But overall I just love that way simple sounds are used to make amazing tunes, rather than trying to bend those basic sounds into something they're not...

 

And yes (according to Atariksi) I'm c64 nut, but SID I find too familiar in that it reminds me too much of the original (subtractive) synths back in the early 80s that I learnt synth programming on but with not enough ooomph to it.. I don't want that :)

 

Anyway, I'm in the bar and shouldn't be in control of a keyboard connected to the internet right now, so forgive me.. Just must say that FM is horribly underrated, and that (square waves and lots of them!) are incredibly powerful.. Just go look up Walsh Synthesis if you don't believe me ;)

 

I know this will cause howls of protest but the best FM SEGA Megadrive/Genesis music ever produced in the world is on the game Gauntlet 4...absolutely incredible sounds as well as artistic skill of course, will totally blow you away and a must have $2 cart to pick up from a flea market :)

 

4 example Gauntlet IV tunes of 20

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