Jump to content
IGNORED

My POKEY experiments using nonstandard settings


Recommended Posts

On ‎9‎/‎29‎/‎2019 at 12:19 AM, 777ismyname said:

Nothing wrong with this tune, but “most advanced” is highly subjective.

Yeah, thanks for supporting my position ;)

 

The Tunes isn't "most advanced" . It's a very lonely place there.  There is a big space and then comes " how do you name your favorite tune" .

 

On ‎9‎/‎30‎/‎2019 at 6:11 PM, Synthpopalooza said:

Very good.  If someone makes a Miami Vice game, there you go.

 

Does this use a lot of hi pass filter?

 

RMT Patch 8  has a real tuned row of different settings of the Sound Generators. Low and high notes fit well together . Also all channels were nicely tuned together.

 

Main Clocking 15kHz, for Bass and Drums. 1.79MHz for the high FX. 16 Bit 2 Tone for one of the main Instruments. And a correct tuned gen 2 setting.  

Link to comment
Share on other sites

9 minutes ago, emkay said:

 

 

 

RMT Patch 8  has a real tuned row of different settings of the Sound Generators. Low and high notes fit well together . Also all channels were nicely tuned together.

 

Main Clocking 15kHz, for Bass and Drums. 1.79MHz for the high FX. 16 Bit 2 Tone for one of the main Instruments. And a correct tuned gen 2 setting.  

Wasn't aware you could do 16-bit with 2-tone.

Link to comment
Share on other sites

  • 5 months later...

Reviving this topic ...

 

I am spending my quarantine time doing a frequency table for $4x distortion, 1.79 mhz, and reverse 16-bit mode (0 plays, 1 is silent).  about 25% done.  Going to need some help tuning it tho.  

 

This one produces warbling electric guitars, and the frequency value in the 2nd channel increases the vibrato.  This is going to be cool when it's ready.  :)

  • Like 3
Link to comment
Share on other sites

Halfway done. :)

 

I have half of the 65,536 settings documented for the $4x Reverse 16 setting.  I have a rudimentary table ... note, these are not grouped by octave number, that will come later, but you can get from about c1 up to about c3 so far.

 

Here's how it works:

 

Put $50 in AUDCTL, silence the second channel, set first channel to $4x.  Turns on 16-bit and sets first channel to1.79 mhz.  There is some sort of averaging which goes on between the bit counters in the first two channels due to $4x bit counting, which creates the warbling guitar effects in the first channel.

 

The tunings in some of these may be off ... I did them by ear.  Also, the table is half done.  I still need to get the settings where AUDF1 (2nd channel) > 128.  Next, I will do up a frequency table, and sort these out by tuning, until finally we get a note table.

 

Emkay:  It'll be on you then ... hack this baby into RMT. :)

 

Also, anyone who wants to dig into this, and make a tuned table out of what I got ... feel free!  This is going to make some wicked guitars ...

 

I am also going to experiment with the other clocks (64 khz, 15 khz) and see what happens as well.  So far tho I think 1.79 mhz is the best bet.  Then ... modulating this stuff with a hi pass filter on channel 3.  :)

 

 

AUDCTL=$50, AUDC0=$4x.txt

  • Like 3
Link to comment
Share on other sites

More developments!

 

This time, we are dealing with Channel 0 using $4x distortion, AUDCTL=$40, and two tone mode engaged!  I have managed to decode frequency tables for two out of three possible settings.  This is huge ... :)

 

So some explanations are in order ... those of you who know how to us the $Cx distortion will remember, that you have three frequency cases to deal with:

 

(freq+1) mod 3 = 0 and (freq+1) mod 5 <> 0 ... smooth bass tones, aka RMT bass C

(freq+1) mod 5 = 0 ... either silence, or an intermittent smooth bass tone

(freq+1) mod 3 <>0 and (freq+1) mod 5 <> 0 ... rough bass tones, aka RMT bass E

 

The same thing happens with this setting, but multiplied... and we have three possible cases here.

 

For purposes of this post and the attached document, the following terminology is used:

 

AUDC1 and AUDC2:  Distortion settings of channel 0 and 1

AUDF1 and AUDF2:  Frequency settings of channel 0 and 1

 

Set AUDC1=$4x, AUDC2=$00, AUDCTL=$40 (turns on 1.79 mhz for 0) and SKCTL=$8B (two tone mode)

 

 

 

 

Case 1:  AUDF1 where (freq+4) mod 5 = 0

 

This is a fairly easy setting, very similar to $Cx distortion.  Two tables are here for AUDF2, one with a mod3 bass setting, and one without (with rough bass tones).

 

By stepping AUDF1 through multiples of 5, modulations are introduced into the note played!  This can be used to make a PWM or sample and hold type random timbre, or other interesting effects.  The mod 3 bass behaves just like RMT C, random timbres are played depending on system timers.  I have made a note table for this setting, but it differs from RMT C.  For the second table, we use non mod 3 values, like RMT E.

 

Also:  Where AUDF1 has (freq+4) mod 15=0, those settings are exactly identical, and may be considered to be your base setting in this case.

 

Case 2:  AUDF1= (freq+4) mod3=0 and (freq+4) mod 5 <>0

 

This makes some interesting results.  We have smooth bass tones, but they are interspersed into two tables for AUDF2, with an octave difference.  By altering AUDF1 by multiples of 3, modulations are introduced into the notes played in the second channel.

 

Case 3:  AUDF1= (freq +4) mod 3<>0 and (freq+4) mod 5 <>0

 

Undocumented as of yet, but there are a lot of strange frequencies, some noises, and some vibrato distorted guitars, on the order of the previous $4x setting I was playing around with.

 

I am attaching a document, and three Turbo BASIC programs:

 

FTEST48B.TUR ... steps through all 65,536 settings, and lets you compare them to a standard $Ax square table on channel 2

F48BMOD3.TUR ... steps AUDF1 through multiples of 3

F48BMOD5.TUR ... steps AUDF1 through multiples of 5

 

These controls:

 

+ or - ... changes the $Ax channel through the standard values (C3 to C4)

up and down arrow:  changes AUDF1

left and right arrow:  changes AUDF0

 

Now, let's get this modded for RMT. :)

 

One more bit of info ... AUDF1=11 and AUDF2=14 generates silence for note rests :)

 

 

F48BMOD3.TUR F48BMOD5.TUR FTEST48B.TUR AUDCTL=$40 SKCTL=$8B AUDC1=$4x AUDC2=$00.txt

Edited by Synthpopalooza
Link to comment
Share on other sites

OK, a demo tune ...

 

Took a bit of experimenting, but I came up with some modulations that make some good distorted guitars ...

 

Setup:

 

AUDCTL=$60 (1.79 mhz on 0 and 2)

SKCTL=$8B (two tone mode)

 

0 - $4x (2-tone modulation)

1 - silent (frequency carrier for 0)

2 - $Ax (standard square wave, no modulation)

3 - $Cx (1.79 mhz, high lead)

 

The tune is the stickerbrush symphony from Donkey Kong Country 2. 

 

The bass starts off with an electric guitar modulation, then when the bass starts, various modulations are cycled.  The note table used is the Case 1, mod 3 bass table.  More experimentation is needed, but this is a very promising start!

 

 

dkc-briarpatch.asm dkc-briarpatch.s dkc-briarpatch.xex

  • Like 3
Link to comment
Share on other sites

17 minutes ago, emkay said:

Not bad.

 

In the end, it shows that we need a music tracker that allows all possible combinations that POKEY offers. To get the best possible music.

 

We're a long way from that ..

 but ... maybe something customizable that let's you import your own note tables and AUDCTL/SKCTL settings.

 

There is a LOT left to document.  And most of it is gonna be donkey work of stepping through 65,536 settings each time.  ?

 

As an example ... the above setting, I haven't even added the hi pass filter to it yet.  It will eat three channels, but might even make things more interesting.  There's a lot unexplored.

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

So a few tips in this mode:

 

For Case 1 (both tables) ... AUDF1 values where (freq+4) mod 15 = 0 will produce the basic frequencies,  but as the value is stepped up by 15 each time, the sound gets slightly fuzzier and distorted.   It's actually a cool effect, like putting $Cx distortion through a fuzz box.

 

For AUDF1 where (freq+4) mod 5=0 but not mod 3 ... certain modulations on each note in the table will make the distorted guitar modulations.  If the AUDF2 note comes from the non mod3 table, then the modulated frequency played is a 4th interval up from the root note.

 

So more documentation is needed.  But now that I know the pattern, it's easier to decode frequency settings.  :)

 

 

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...
On 9/7/2019 at 10:10 PM, Synthpopalooza said:

I have started a thread over on the 7800 forums regarding experimental POKEY music using unusual settings, for purposes of improving 7800 emulation.  By request, I am starting a thread here to port some of these examples to the XL platform.

What is the status on the POKEY emulation code? Do you need help? We'll be working on POKEY emulation for Android in the near future (we're polishing 2600 audio at the moment, and plan to do 7800 in the future).

 

Link to comment
Share on other sites

1 hour ago, Synthpopalooza said:

For POKEY emulation ... the Altirra emulator is a good source to crib from ...

 

http://virtualdub.org/altirra.html

 

I use it to test all my POKEY code before it goes to a 7800 executable.  On the 8-bit platform, it is simply top of the line.

Ah, so this was more for working on a game than working on an emulator?

 

Altira is indeed nice, but we can't use it as it is GPL. We're looking to help with/contribute to a non-GPL implementation.

Link to comment
Share on other sites

OK, I am 98% close on the $4x Reverse 16-bit table ...

 

Which is:  You set AUDCTL=$50, (16-bit plus 1.79 mhz) but silence the 2nd channel (AUDC1=$00) and set AUDC1=$4x

 

This is a very complex setting, which involves 4 tables:

 

The first three come into play when you set a 0 for the frequency in the second channel (AUDF1=$00)

 

You have a mod 3, mod 5, and non mod 3 or 5 table, like in $Cx distortion.  The mod 5 table will intermittently play a note or silence, dependent on system timers.  The mod 3 table outputs random timbers, like its $Cx equivalent.

 

The frequencies are subject to these forumlas:

 

(AUDF+1) mod 3 =0

(AUDF+2) mod 5 =0

 

Where AUDF0=$08 and AUDF1=$00, silence is generated.  This can be used for note rests.

 

 

 

The 4th table is more complex.  You can make distorted guitars with warbling vibratos. 

 

I haven't yet figured out a pattern to these yet, but they are laid out in the following format:  (AUDF0, AUDF1, MOD).  The MOD setting the maximum you can add or subtract from AUDF1 value, and it introduces a vibrato to the guitar modulation.  When MOD is zero, in most cases, you get a steady tone, the timbre will vary depending on the current bitcounter sample.   This gets some very warbly guitar type tones.

 

I have attached a text file here with these settings.  In the case of table 4:  These have not been tuned yet, so are approximations.  I will go back through these later, and tune them, and then we should have a stable note table for this setting.  Then:  Hack this baby into RMT. :)  If anyone can find a pattern to these, I'd love to know ... I had to step through 65,536 settings to find all these!

 

 

AUDCTL=$50, AUDC0=$4x by octave number.txt

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

RMT would be needed to be rewritten completely.

The control bits have been used to the limit. What that means, only the Author could have explained that.

Analmux (Bernard) found the tables and control switches and did the patches. So any new setting removed old settings.

That's why patched RMT tunes don't sound really "finished" .

And even worse, the Runtime would need to have the same changes, to have the replay of a tune correct.

 

 

Link to comment
Share on other sites

Source codes do exist, but they are not public. And it wouldn't help you much anyway, as emkay said, all the limitations are hardwired through and through. Only solution would be new tracker.

 

I can do the patches though, I do it often. RMT has 4 tone tables. A distortion, C distortion, E distortion and 16 bit. Each RMT distortion then has corresponding AUDCx value. If you want new tone table, you have to swap it for one of these. AUDCTL can be set bit by bit, so that's not an issue. If you need to set some other register or do some extra initialization, like pokey reset or some channel synchronization, you have to do it in your code outside RMT.

 

Those tables are in RMT.exe on 3 places, once for the normal playback in the program, once for export into XEX, and who knows what for is the third one. I just patch them all and it works just fine. And yes, you also need to modify your ASM sources for rmtplayer in your code.

Link to comment
Share on other sites

So I would then be swapping out the 16-bit table for this $4x setting, then setting the first channel to $4x and second one to $00.

 

The other question is ... some of the frequencies in this new reverse $4x setting are set up in that if you change the frequency by a few steps on the second silent channel, a warbling vibrato effect is introduced into the sound.  Does RMT have an allowance for this, like maybe a detuning effect on the silent channel?

Link to comment
Share on other sites

5 minutes ago, Synthpopalooza said:

So I would then be swapping out the 16-bit table for this $4x setting, then setting the first channel to $4x and second one to $00.

 

The other question is ... some of the frequencies in this new reverse $4x setting are set up in that if you change the frequency by a few steps on the second silent channel, a warbling vibrato effect is introduced into the sound.  Does RMT have an allowance for this, like maybe a detuning effect on the silent channel?

Send me the table and I can try it. I think second channel is set to 0. If it's not, ti might need further modification of the code, but should be doable.

As for effect on 16bit modes, you're out of luck. RMT simply does not support them.

 

It can't even do simple detune, though Filter does something like that. But it also forces the filter bits in AUDCTL and there is poor control over the detune amount.

 

Edited by R0ger
Link to comment
Share on other sites

17 minutes ago, R0ger said:

Send me the table and I can try it. I think second channel is set to 0. If it's not, ti might need further modification of the code, but should be doable.

As for effect on 16bit modes, you're out of luck. RMT simply does not support them.

 

It can't even do simple detune, though Filter does something like that. But it also forces the filter bits in AUDCTL and there is poor control over the detune amount.

 

Standard 16-bit usage silences the first channel and plays the second.  In this instance, the second channel AUDC1 must be on 0 and AUDC0 set to $4x with 1.79 mhz engaged.

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