Jump to content
IGNORED

Journey into POKEY


emkay

Recommended Posts

This setting seems to work for many 4 channel tunes.

This time an originated tune by Michael Jackson (R.I.P.).

 

And I want to point out that Rob Hubbard perhaps was a "god" (C64 guys statement) when it comes to SID Music.... but only there... ;)

Seeing me doing those conversions without being a musician, what could a musician with full POKEY knowledge have done back in the 80s?

Remember that the 4channel MODs were built with fully independend voices. So sometimes the harmonics don't work with Pokey as needed.

 

This tune works imho very good, and it sounds sometimes like using 5 channels ....

It's a crux that we cannot have filter and 16 bit together for playing music.

 

I just ran some of your stuff. Are you using some sort of high-level language and compiling to an EXE? It seems quick to be coming up with all these EXEs.

 

Isn't hardware filter bits independent of 16-bit mode at location 53768 or are you talking about some software filter?

Link to comment
Share on other sites

I just ran some of your stuff. Are you using some sort of high-level language and compiling to an EXE? It seems quick to be coming up with all these EXEs.

One of the finest features in RMT is the MOD import. After that you have to adjust all instruments and patterns. After adjusting you can save the tune directly to an EXE.

 

Isn't hardware filter bits independent of 16-bit mode at location 53768 or are you talking about some software filter?

The main problem is that filter only works with voices 1 and 3 or 2 and 4, while 16 bit joins voices 1+2 and 3+4....

The only benefit there is, if you use one or two voices through digitizing, you can join voices 1,2, and 3 for additional finetuning of the filter voice.

Edited by emkay
Link to comment
Share on other sites

Another funny thing with the 16 bit channel....

When changing the low channel, it interferes the high channel (logical thing, because it's the 16 bit channel ;) )

And when using a generator it works quite different: It adjusts the high voice in some "autotune" case.... so you can use a clean baseline and simply add some noise on the high channel for a perfect drum....

 

Another shorty...

flim4ch.zip

Link to comment
Share on other sites

Another funny thing with the 16 bit channel....

When changing the low channel, it interferes the high channel (logical thing, because it's the 16 bit channel ;) )

And when using a generator it works quite different: It adjusts the high voice in some "autotune" case.... so you can use a clean baseline and simply add some noise on the high channel for a perfect drum....

 

Another shorty...

 

Did someone work out the exact cycle by cycle of how those polynomials for distortion work?

Link to comment
Share on other sites

Another funny thing with the 16 bit channel....

When changing the low channel, it interferes the high channel (logical thing, because it's the 16 bit channel ;) )

And when using a generator it works quite different: It adjusts the high voice in some "autotune" case.... so you can use a clean baseline and simply add some noise on the high channel for a perfect drum....

 

Another shorty...

 

Did someone work out the exact cycle by cycle of how those polynomials for distortion work?

 

I guess, no....

 

But here is a slightly changed version of the Cantbe tune . What do you think, does it fit better or worse? There is another small part I'd have to work on then.

cantbpan.zip

Edited by emkay
Link to comment
Share on other sites

Starting converting the Rubicon and seeing the title impossible for Pokey, the main intention was to show the bass and the FX.

Now I paid some more attention to the main voice and the attending voice. Well, it seems not possible to have some ring modulated filter or else, but we can have some nicer "flute" sounds for a roundup of the tune.

 

In the current state we have already something impossible, but I'm sure it could be done better. So , with reservations, I call it final.

The main problem here is , even with standard 4ch usage, the sound combinations sound slightly different in RMT and A800+4.

cantfin.zip

Link to comment
Share on other sites

Did someone work out the exact cycle by cycle of how those polynomials for distortion work?

 

The bit-patterns are known and the logic circuits for all polycounters are also known. So, could you be more precise?

 

Like when I start an audio playing, computing the waveform and at what cpu cycle what the amplitude will be. Take a simple note like 440hz with some distortion setting.

Link to comment
Share on other sites

The Poly-counters are LFSRs. IIRC, the bit coming in on the right is determined by the values of the 2 least significant bits before the shift occurs. The repetition rate has a fairly direct relation to however many bits are used by the poly-counter.

 

The in-depth stuff, I'm not sure of... like: Do poly counters tick at 1.77 Mhz irrespective of the mode the voice is in?

Are the poly-counters shared by all voices. What actual operation takes place to determine if a logic 0 or 1 is output on a voice - is it AND of the logic state of the voice with the lsb of Poly, or an XOR ?

Link to comment
Share on other sites

The Poly-counters are LFSRs. IIRC, the bit coming in on the right is determined by the values of the 2 least significant bits before the shift occurs. The repetition rate has a fairly direct relation to however many bits are used by the poly-counter.

 

The in-depth stuff, I'm not sure of... like: Do poly counters tick at 1.77 Mhz irrespective of the mode the voice is in?

Are the poly-counters shared by all voices. What actual operation takes place to determine if a logic 0 or 1 is output on a voice - is it AND of the logic state of the voice with the lsb of Poly, or an XOR ?

 

I was looking for cycle-exact stuff. For example, when I write 0xF# to 53761 using STA, you can be sure that in 4 cycles the value went to the DAC/speaker. So if I play a note, at what phase does the waveform start at and after how many cycles does it start playing...

Link to comment
Share on other sites

I was looking for cycle-exact stuff. For example, when I write 0xF# to 53761 using STA, you can be sure that in 4 cycles the value went to the DAC/speaker. So if I play a note, at what phase does the waveform start at and after how many cycles does it start playing...

Well, maybe this isn't exactly the right answer, but have a look at this:

http://www.atariage.com/forums/topic/116835-polycounter-reset-on-pokey/page__st__50__p__1415976entry1415976

 

To partially answer your question: I don't know the cycle-exact stuff or bit patterns, but there is a method to choose one of the bit-patterns with 100% certainty.

 

Remember that all polys run at 1.79mhz, but a pokey voice 'samples' the poly registers.

f.e. as the 5bit poly generates a 31 step bit sequence, it will always be the same bit-pattern 'up to permutations'.

 

The poly5 sequence is something like this:

1111011010011000001110010001010

 

Sampling with pitch 2 will pick position 0,2,4,...30,1,3,5,...,29,0, etc.

This yields:

1 1 0 1 1 0 1 0 0 1 1 0 0 0 0 0
1 1 1 0 0 1 0 0 0 1 0 1 0 1 1 

=

1101101001100000111001000101011

which is actually the same sequence, but only shifted a few bits

 

Sampling with pitch 3 will pick position 0,3,6,...30,1,4,7,...,28,2,5,000,29,0, etc.

This yields:

1110101001010000010001111001101

 

The permutation isn't easily detectible by the ear, but the sequence can differ between different pitchvalues.

But anyway, the new pattern is the same as the base pattern, up to permutations.

 

 

This gets somewhat more complex in case of the 4bit poly.

The poly4 sequence (15 steps)is something like this:

000010100110111

 

When pitch is a multiple of 3 (let's say 3 itself), we get degeneracy:

 

0--0--1--1--1--

-0--1--0--1--1-

--0--0--0--0--1

 

We see that there are 3 different 'orbits' now, depending on the relative timing between the voice timer and the poly4 loop.

With the poly reset trick we can choose one of the desired orbits.

 

More about this:

http://www.atariage.com/forums/topic/116835-polycounter-reset-on-pokey/

Link to comment
Share on other sites

I was planning hooking a 'scope to the Audio out of Pokey so we could answer the old question of whether the "non-square" looking waveform of pure-tone is a result of the innards of Pokey or just because of the external audio circuitry.

 

Doing that might also help with the exact cycle "fraction" that an audio event starts.

 

The problem is... in the real world, we have this external circuitry, not to mention the option of RF modulation, which would likely skew the thresholds out.

 

I experienced a similar "problem" when doing 'scope monitoring of the luma signal when doing Interlace experiments... I was using PORTA output to trigger sweeps, but there was annoying jittering on the screen, largely thanks to the fact that the resistors and other crap in the joystick port circuit causes a delay in the time for a "1" Logic Voltage threshold to be acheived. Simple solution of course was to just change my software and use a 1->0 transition instead, which is almost instant and gave a smooth result.

Link to comment
Share on other sites

The in-depth stuff, I'm not sure of... like: Do poly counters tick at 1.77 Mhz irrespective of the mode the voice is in? Are the poly-counters shared by all voices. What actual operation takes place to determine if a logic 0 or 1 is output on a voice - is it AND of the logic state of the voice with the lsb of Poly, or an XOR ?

 

All polys tick at 1.77 (or 1.79) Mhz, regardless of which modes the voices are using.

 

There is only one 4bit poly, only one 5bit, only one 17bit etc. and they are shared by all voices.

Voice 1 directly samples the chosen poly.

Voice 2 has a 1-cycle delay.

Voice 3 has a 2-cycle delay.

Voice 4 has a 3-cycle delay.

 

If I'm correct poly 4 is level-triggered (I hope this is the right usage of this word), i.e. when timer of a voice counts down it simply samples if a 0 or 1 is loaded in bit 0 of the poly4 register.

 

The poly 5, 17 should be edge-triggered, so when the voice timer samples poly5, it will keep level if bit 0 of poly5 is a zero, and changes level if it is a one. We should note that after 31 steps an odd number of level changes occurs, so the effective sound is 62 steps before repeating.

 

Just to be sure I made it clear:

 

Poly4

000010100110111000010100110111000010100110111000010100110111000010100110111000010100110111 : Poly4 bit-sequence (15 steps)
*   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *  : f.e. pitch = 4
0   1   0   1   0   0   1   1   0   1   1   1   0   0   0   0   1   0   1   0   0   1   1  : samples
000011110000111100000000111111110000111111111111000000000000000011110000111100000000111111 : result (output to 'speaker')

 

...but, Poly5

111101101001100000111001000101011110110100110000011100100010101111011010011000001110010001010 : Poly5 bit-sequence (31 steps)
*     *     *     *     *     *     *     *     *     *     *     *     *     *     *     *   : f.e. pitch = 6
1     1     1     1     0     0     1     1     0     1     1     0     0     0     0     0   : samples
111111000000111111000000000000000000111111000000000000111111000000000000000000000000000000000 : result (output to 'speaker')

Link to comment
Share on other sites

Well, I think I've sorted the old question so far as funny looking square waves...

 

With an oscillosope hooked directly to the Audio Out pin of Pokey, you get perfect square output, no decay on the output.

I couldn't do a lot... using the 800XL to do this, the RF output is screwed and I don't have a proper monitor cable for it so I was typing blind.

Link to comment
Share on other sites

Well, I think I've sorted the old question so far as funny looking square waves...

 

With an oscillosope hooked directly to the Audio Out pin of Pokey, you get perfect square output, no decay on the output.

 

 

Since the sounds were generated by simple voltage turning on and off, the result must end in squares, on the chip side.

We should be kind of thankful that the external circuitry does this decay, making the sound a bit softer.

The real worse part is the missing control of the intensity of this effect.

Link to comment
Share on other sites

Did you use a hacked RMT for this one?

 

I started thinking about another idea.

Maybe it is fun to make a list of possible pokey sounds/instruments and recordings of them.

 

Patch 2 . The "C" generator used for "2" at 1.79mhz . This put sometimes into the "A" based instrument envelope , gives some addtional reverb effect, making 2 voices sounding like 4 voices.

Link to comment
Share on other sites

  • 4 weeks later...

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