Jump to content
IGNORED

Tuning POKEY


analmux

Recommended Posts

We all know that Pokey generates notes out of tune at the high end of the sound spectrum. But not all pokey-songs that use high notes sound out of tune. Some songs are extremely accurate, and others seem to be more out of tune.

 

Is it because of the use of 16bit registers or is there another trick??

 

How about LFO modulating the pitch (emkay??), that means, varying the pitch a little between f.e. 38 and 39 (with a 50 hz frequency) if we would need pitch 38.5.

 

Would this be the right way to tackle the tuning problem? Can this trick be used with RMT?

 

-----

mux

Link to comment
Share on other sites

The main problem is that people try to think a fast updated 438 and 442 Hz will result in 440Hz. All that you get is a 438 and 442 Hz sounding with a resulting frequency depending on how fast the updatings are....

 

Let's take a small look:

 

 

............**********.......

*******.................*****

 

Let's say this are 200Hz and now you are switchin to another frequency.

 

...........******......

*******.........****.

.....................| switch point with a short tone of 333Hz...

 

 

In the worst case you built more high noise than you had before, and a pure square-wave has a high sounding colour though...

(Alltough a good linearized audio circuit for line out would have been a great thing...)

Trying updatings slower as the played note, will make it sound better in some cases (vibrato, arpeggio, etc.) but it still keeps the main note.

 

....

 

What never has been done with the pokey is a low digitizing on every channel with allways co-related voice pitches, that gives a "deeper" note to the sound and the notes will be more reliable...

I think that the biggest problem is to keep the varieties in updatings for the notes.

 

 

BTW.: Tuning POKEY .... I updated a converted song with some new test-sounds...

Link to comment
Share on other sites

Trying updatings slower as the played note...

 

Which is always the case. Luckily we only have detuned high notes, so updatings on 50 or 200 hz basis would work better.

 

What never has been done with the pokey is a low digitizing on every channel with allways co-related voice pitches, that gives a "deeper" note to the sound and the notes will be more reliable...

I think that the biggest problem is to keep the varieties in updatings for the notes.

 

Sounds interesting, but can you elaborate on that a little more? What pitches should I choose to make them co-related?

 

I remember me making a Pokey-AUDF-timer-IRQ routine in which the timer pitch (If we may call it that way!) is dynamically changing. I remember getting very interesting sounds (almost real heavy metal electric guitar sounds). I used the timer of channel 4 while the corresponding Pokey-voice played a sound. Every waveform has a periodic shape, and the advantage of this self-induced waveform/pitch-changing, is that every waveform-cycle is played exactly a whole number of times, before changing pitch and waveform.

 

---------

 

Check this topic out too:...

 

Cool, I'll run your testroutine right now. thanks.

 

-----

mux

Link to comment
Share on other sites

 

Sounds interesting, but can you elaborate on that a little more? What pitches should I choose to make them co-related?

 

 

I'll try to explain.

With square-waves everything you try, you will get noise in the resulting tone. What is happening when switching the frequencies, you can test with bryede's small tool.

 

But there is another ... better way to form the notes : Loudness changings

 

Here is another small scheme:

 

.............*******........

.................................

.....*****...........*****

 

Playing the square-wave unchanged and setting the loudness to the half will endup like this:

 

.................**.....

............**.....**...

.....****............*****

............|...|...|...|......

loudness8 f 8 0

 

 

OK.... you cannot always hit that perfect wave, but you will get this "new" waveform with some noise and sounding characteristics...

The main problem is that the updatings have to be always co-related to the generated Square-Wave

Link to comment
Share on other sites

Okay, now I think I understand, but then you'd better play digital samples at once for waves with arbitrary complexity.

 

Wavetable synths should be a good option.

 

But....let me experiment again with the dynamical timer-IRQ synthesized waveforms. It will be my next little project.

 

 

-----

mux

Link to comment
Share on other sites

Here some wave-diagrams:

 

picture 1:

 

just a (almost) square wave at 440 hz (A) == pitch 72. at constant volume, played by voice 4 (AUDF4)

 

We can generate an IRQ with the same register. The IRQs occur at 880 hz. With volume only we can simulate a squarewave, by poking to the volume nybble of AUDC4.

 

 

picture 2:

 

an alternating frequency square wave.

 

We can ignore the first 2 IRQs. Then at the 3rd IRQ we change the freq. to 880 hz ( --> 1760 hz IRQs), and we ignore the next 3 IRQs, then switch back to 440 hz again. So when exactly 1/2 of a wave-phase is played, we can change things (like pitch, volume, waveform). When you do this you'll never get any aliase effects /distortions, as the waves are exactly played an interger multiple of 1/2 phase, independent of the chosen pitch (they should off course not be too high pitched, as we need time to execute IRQ code).

 

 

picture 3:

 

Now we can, for example, use lookup-tables to make some complex waveforms. After a certain sequence we can start over again, to get some looped sounds (like wavetable synthesis). In this way I created some rock guitar sounds.

 

 

picture 4:

 

suppose we have a waveloop (blue line), then we must approximate this with squarewaves (orange line) to make them playable on atari. This would be some kind of pseudo-sampling, as it's based on (estimated) 1000 updates per second, and we don't use the volume-only bit.

 

 

So it's all based on a pitch that's generating its own changes (self-modulation via IRQ).

 

-----

mux

Link to comment
Share on other sites

To use "enhanced" Pokey programming... it would be always a good thing to think about combining it with G2F.

It is an easy thing to put a "DLI" G2F together with a "VBI" RMT .

 

But what is happening when using G2F together with a 200Hz (or more) tune?

In this case I think that the POKEY-Timers aren't useful.

a) they will be interruptet by ANTIC DMA and DLI every time

b) Belonging to the correct quantization of the sound, the most sound-register updates have to be done while ANTIC is working

 

What to do?

 

Just create a VBI Runtime with ... let's say .... two "normal" 50Hz Voices for percussions and simple attendance.

The other two voices will be handled faster in the function of Voice-updatings.

For every voice the manipulations like vibrato, arpeggio etc. can be handled with 50Hz programming.

 

While in VBI, the sound-runtime can play directly all voices by 50Hz.

For higher "sound-clocking" ;) it has to write the pitch and volume for each channel in fixed registers. Those registers will be read and put to the POKEY's Sound- and Volume- registers in fixed positions "on the screen" and when in "DLI".

 

Well... in those positions it will not be possible to change colors or else... but, nothing is more timing accurate than the DLI programming in the A8 and also is nothing more reliable for creating always similar sounding when using faster soundupdates than 50Hz. (or 60Hz in NTSC)

 

In theory the RMT Runtime needs some timing-finetuning only, and in G2F's GED mode one could set the registers like putting a new colour on the screen.

Link to comment
Share on other sites

Okay, it sounds better on the emulator. On the real thing it's still heavily detuned.  

 

By the way, why does the bass melody sound like it's detuned half a note? It would still need a little more work emkay, maybe yout bass melody is in the wrong key???

 

-----

mux

 

Well .... I am not shure what you mean this time.

I once made a song "POKEY christmas" (which was played on KOHINA Radio while christmas 2002) on the "real machine", and i noticed that it sounded as it should sound from the real machine ....

 

Perhaps my problem is, that for me every "8-Bit" Chip (including ST's YM) has it's "out of tune character". Even the SID is quite a bit besides the real thing. But people learned to use this to create music and gave SID his own character as an Instrument.

 

Another thing is, what are you expecting when you want to hear Chip-Sounds, especially POKEY tunes? Last year when I was at the eighternet Party, I tried to explain, how to increase the sound-quality of the pokey. First time i was shocked for myself while hearing playing "my" demo-song over -that small speakers- . Then we used some bigger speakers and everything was fine.

 

So... if it is not possible for me to create musix that people are expecting from the pokey.... a musician that is able to do so and wants take a real look at those "enhancements"... is always welcome.

Link to comment
Share on other sites

Yeah alright, but...

 

You might use some unusual sounds, which is off course great, but the music itself seems to be faulty. It's IMHO wrongly composed, and that's not Pokey's fault. You should try to transpose the Bass-melody in some parts.

 

I've relistened today, and I can't help saying that this song has a higher than usual level of detuning. It's like I described at the start of this thread: some pokeysongs seem to be very well tuned, while others have a maximum detuning.

 

About the sound of the percussion: It sounds better and clearer on emulators. On the real hardware the bassdrum sound gets far more distorted than it should be, and sometimes that's rather ugly too.

 

-----

mux

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