Jump to content
IGNORED

Trying to make some PoKEY music!


VinsCool

Recommended Posts

6 hours ago, Pat Brady said:

 

I am glad you find it useful. :)

 

It's all based on formulas. There are formulas to figure out what frequency each note should be, and formulas to calculate the AUDF value closest to each frequency. Now that all of that stuff is established, adding tables is much much faster than doing it by hand.

 

For now it is just distortion A (16-bit and both 8-bit clocks) and distortion C (3 different pattern lengths). I think my formula for distortion 2 is incorrect, so I need to sort that out. Then I hope to eventually add some of the more esoteric settings.

Awesome!
I pretty much did a mix of calculation and doing tests by hand, and that has been painfully slow for the progress I got so far, so having these calculated tables at hand will drastically make that stuff much faster!

The other distortions aren't a top priority for me since they can only be as good as they already were anyway, so as long as there is a decent amount of compatibility to the distortion A tables that will work for me :D 
 

5 hours ago, tane said:

That I really don't know! I am not too advanced in hacking RMT around in the first place, and really don't want to be for many reasons, however these files will be incredibly useful to have around, so thanks for sharing!
Stuff like that really makes me wish we could actually load custom notes tables for instruments, honestly ?. Things would be so much easier for everyone.
There's too many things to consider and it feels a bit underwhelming to be limited by things like tuning to be able to make tunes sound good.
 

  • Like 1
Link to comment
Share on other sites

17 hours ago, VinsCool said:
22 hours ago, tane said:

That I really don't know! I am not too advanced in hacking RMT around in the first place, and really don't want to be for many reasons, however these files will be incredibly useful to have around, so thanks for sharing!

This is the RMT player code which is located in the source folder of every RMT release...  (I converted it to C# for RMT2LZSS). There's no 'best' version really... 1.28 is the last version, the patched versions are just different.

 

Although adding new tables to the player isn't that difficult, the player is embedded in the RMT editor (I'm 99% sure) and it's quite messy to follow because it is optimized for space (just have a  look at rmtplayr.a65 !).

So even after modifying the player you'd have to reinject it into RMT, that could be very messy...or not but I'm guessing that since Analmux didn't do it, it's probably the latter.

Then you'd have to modify the editor interface to be able to select those tables and pass that back to the player... Without the editor source code, that would probably take a good chunk of time.

 

The editor source code is the minimum requirement for making any significant modification and even then, it's a completely custom GUI ?  but seeing that someone other than Raster made v1.30 with the larger editor window, it may not be that bad... (but I don't want to touch C personally...)

 

Perhaps @pseudografx can help ?

 

Edited by rensoup
Link to comment
Share on other sites

2 hours ago, rensoup said:

This is the RMT player code which is located in the source folder of every RMT release...  (I converted it to C# for RMT2LZSS). There's no 'best' version really... 1.28 is the last version, the patched versions are just different.

 

Although adding new tables to the player isn't that difficult, the player is embedded in the RMT editor (I'm 99% sure) and it's quite messy to follow because it is optimized for space (just have a  look at rmtplayr.a65 !).

So even after modifying the player you'd have to reinject it into RMT, that could be very messy...or not but I'm guessing that since Analmux didn't do it, it's probably the latter.

Then you'd have to modify the editor interface to be able to select those tables and pass that back to the player... Without the editor source code, that would probably take a good chunk of time.

I just looked at the source files you mentioned... damn that looks surprisingly straightforward, I really don't see why there couldn't be any more slots available by the look of it, other than memory concern, but that's not a massive amount of data... right? 
I can also see vibrato tables (and frankly it looks like it could have more options), a nice implementation of 16 bit (with unique tables for both low and high byte! Clearly there is much more potential for that alone), volume levels table (which is actually something I wish I had known before, it was always annoying to guess proper volume levels being adjusted, I also wonder if there isn't a way to optimise that in order to save precious space to maybe use elsewhere ?)... and then the manual AUDCTL settings, which were the ones I have personally been using in the tracker itself for a while now.
 

Most interestingly, only 3 unique tables for notes, which happen to be 2 bass tables (as C and E), and 1 "pure" table, and each one seem used for several setting, which explains why editing a table breaks other things, that's literally because they're used more than once, and I do know that everything requires a unique table to actually sound good! ?
 

 dta frqtabpure-frqtab,$00
 dta frqtabpure-frqtab,$20
 dta frqtabpure-frqtab,$40
 dta frqtabbass1-frqtab,$c0       
 dta frqtabpure-frqtab,$80
 dta frqtabpure-frqtab,$a0    
 dta frqtabbass1-frqtab,$c0
 dta frqtabbass2-frqtab,$c0

So just by the look of it, that makes sense, now I know why several things "broke" from only editing the "pure" table, it is also used in instrument type 0, 2, 4, 8! ?
It's pretty clear to me, there are more tables that should exist in the first place... I mean, each ones of these distortions need its own table, otherwise stuff sounds out of tune, or just plain wrong. 
Another interesting thing I have noticed from my own experiments, thanks to POKEY Explorer, different modes (15khz, 64khz, 1.79mhz), combinations (16-bit, Joined 1+2/3+4, Filter 1+3/2+4, even several things at once!) really produce different results, and so there is simply no way a single table of notes could work for everything, this is the opposite of how it was implemented in RMT! ?

And so, that probably sums up my observations, considering the tracker is not open source (to my knowledge), it's really not a great time to hack around, since it's literally going to be required to use several hacked versions to get certain specific things to work, and doing them by hand in the instrument editor is painfully slow for a musician who doesn't know how to code... :D and just now I realise how handling tuning becomes even more difficult due to its implementation ?

To get optimal results, it's clear to me that having a way to load custom notes tables could go a really, really long way, especially if each ones could be used for specific cases.
For example, I was able to prove that tuning Distortion A notes to a certain set of frequencies could be improved, and then noticed around the same time that a table working well for 64khz mode will sound weird in 15khz, and vice versa, same for 1.79, or the other distortions themselves, since they pretty much all live with similar behaviours.

It looks like everything is there, so clearly editing the player code may be a very easy task, like you said earlier, it's the tracker itself that is pretty much out of reach.
I mean even an idiot like myself, who hardly knows any programming, was able to edit the executable to replace the Distortion A table for my own. But this is about as much as I am capable of doing :P 

Now, I wonder if I am not getting into a rabbit hole, regarding tuning and other complicated stuff, instead of just trying to make music ?

I can clearly see how it good that chip could be, that I am the most definitely certain about! So much potential to understand and make use, hopefully.

  • Like 1
Link to comment
Share on other sites

18 hours ago, VinsCool said:

I just looked at the source files you mentioned... damn that looks surprisingly straightforward, I really don't see why there couldn't be any more slots available by the look of it, other than memory concern, but that's not a massive amount of data... right? 

it's just 64(62?) bytes per table (because that's the 3 octaves supported by pokey, right ? ). RMT 1.28 patch 8 has more but shorter tables in the same space... it's not massive but it adds up.

 

18 hours ago, VinsCool said:

I can also see vibrato tables (and frankly it looks like it could have more options), a nice implementation of 16 bit (with unique tables for both low and high byte! Clearly there is much more potential for that alone), volume levels table (which is actually something I wish I had known before, it was always annoying to guess proper volume levels being adjusted, I also wonder if there isn't a way to optimise that in order to save precious space to maybe use elsewhere ?)... and then the manual AUDCTL settings, which were the ones I have personally been using in the tracker itself for a while now.

I'm going to guess Raster did those things to save some space, because a lot of the design seems to be geared towards that (the rmt_feat.a65 file being a good clue, where every player feature not used for a particular tune can be turned off to save some bytes). The more features you add, the messier it gets though...

 

Fiddling with the player is a dead end because you'll always have to balance between features and speed+space. Doing that -without- the tracker source is probably ?.

With the tracker source it's possible to just give up on space saving and have shitloads of tables (at the risk of not being able to load the tune though) then rely on LZSS.

 

(The better solution being to use LZSS from the beginning of course but that's a bigger project)

 

18 hours ago, VinsCool said:

Most interestingly, only 3 unique tables for notes, which happen to be 2 bass tables (as C and E), and 1 "pure" table, and each one seem used for several setting, which explains why editing a table breaks other things, that's literally because they're used more than once, and I do know that everything requires a unique table to actually sound good! ?
 


 dta frqtabpure-frqtab,$00
 dta frqtabpure-frqtab,$20
 dta frqtabpure-frqtab,$40
 dta frqtabbass1-frqtab,$c0       
 dta frqtabpure-frqtab,$80
 dta frqtabpure-frqtab,$a0    
 dta frqtabbass1-frqtab,$c0
 dta frqtabbass2-frqtab,$c0

So just by the look of it, that makes sense, now I know why several things "broke" from only editing the "pure" table, it is also used in instrument type 0, 2, 4, 8! ?

Hmm... yes 3 tables but I'm not sure what instrument types are. The table above is indexed with the dist parameter from the instrument envelope.  The first parameter is the table, the 2nd one value that's fed into AUDC (If I'm reading the source correctly)... so that'd be those 5/17bits polynomials, so I guess those are the instruments type ?

 

18 hours ago, VinsCool said:

To get optimal results, it's clear to me that having a way to load custom notes tables could go a really, really long way, especially if each ones could be used for specific cases.

Say that loud enough and maybe the guy who's sitting tightly on the source code will hear you ?

 

(but again: LZSS rules!)

  • Haha 1
Link to comment
Share on other sites

16 hours ago, rensoup said:

Say that loud enough and maybe the guy who's sitting tightly on the source code will hear you ?

Oh, yeah, I forget that everytime. I thought the source was lost for ever after Raster's unfortunate passing away. IIRC the family could not find it. But rumours are that apparently there's somebody else that has the source code. Why he keeps it to him- or herself is a complete mistery to me.

 

"We" should just build a plain pattern, song and instrument editor that does LZSS conversion on the fly for replay on Altirra or atari800. There's my old idea again, both emulators should have an easy API to the outside world when they are running. A local socket, or something, with commands to clear memory, reset machine, load binary, fill memory, set PC, run, stop, et cetera. That way, it can act as a backend to a tracker/editor.

 

Yeah, we, should, and just ;)

 

Another option might be writing an RMT patcher which knows where the assembled RMT player and all the tables reside in the binary. Load Rmt.exe, replace player and or tables, export new Rmt.exe

 

Oh, I believe the tracker itself has all the options enabled in the 6502 player. That might also a cause for different replay sound by an exported and assembled, because the code paths through the player are different from within the tracker.

 

  • Like 2
Link to comment
Share on other sites

Of course I did not mean to sound ungrateful and demanding when I posted my rambling the other day! :D

 

Just what is available to use is already excellent, and a lot of fun to play with.

it's getting into "expert tricks" territory that makes me realise how much things could have seen improvements :P

 

Speaking of which I have still been trying to get better tuning going... Made little progress but valuable thoughts from friends has been very helpful.

That's about getting more for personal usage at this point, but thankfully it's the results that really matter :)

 

Anyway with new knowledge at hand I wonder what my next finished tune will be, and how I will be able to execute it... I mean I got way too many projects I didn't finalise for a reason or another ?

 

  • Like 1
Link to comment
Share on other sites

13 minutes ago, VinsCool said:

Of course I did not mean to sound ungrateful and demanding when I posted my rambling the other day! :D

 

Just what is available to use is already excellent, and a lot of fun to play with.

it's getting into "expert tricks" territory that makes me realise how much things could have seen improvements :P

Sure! We'll get there in the future :) Just listen to Synthpopalooza's exo-area5. Some parts sound almost like a SNES.

 

13 minutes ago, VinsCool said:

Speaking of which I have still been trying to get better tuning going... Made little progress but valuable thoughts from friends has been very helpful.

That's about getting more for personal usage at this point, but thankfully it's the results that really matter :)

 

Anyway with new knowledge at hand I wonder what my next finished tune will be, and how I will be able to execute it... I mean I got way too many projects I didn't finalise for a reason or another ?

Somehow I'm "working" on an 800XL keyboard replacement for over a year now :ponder: So many unfinished projects. But I did Pokey Explorer last year, so not all was lost ;) I like it that you use it, too. Thanks for the compliment the other day. That really means a lot to me.

  • Like 1
Link to comment
Share on other sites

38 minutes ago, ivop said:

Sure! We'll get there in the future :) Just listen to Synthpopalooza's exo-area5. Some parts sound almost like a SNES.

I have, it's really awesome stuff, he's been sharing a lot of his research on the Atari Chiptune discord lately, and that stuff was exactly what motivated myself to get a lot further with the POKEY sound generation, and a lot of his own tables had helped me greatly for several of my own tunes already!
It's so much fun to create "impossible sounds", even more when it makes sense as to how and why it can be done :P 
 

40 minutes ago, ivop said:

Somehow I'm "working" on an 800XL keyboard replacement for over a year now :ponder: So many unfinished projects. But I did Pokey Explorer last year, so not all was lost ;) I like it that you use it, too. Thanks for the compliment the other day. That really means a lot to me.

You're welcome! Yeah I can get ahead of myself too many times, and get lost in some ambitious projects I need to put in stand by simply for either being too difficult to realise (my rambles regarding RMT's implementations of several things is in direct relation to that!), or take so much time that I simply couldn't get it done, or when I manage to, it takes an eternity to complete (the Battle Squadron cover, for example, took me nearly 2 weeks of evenings I had available as free time!), or just get halted to a full stop for a combination of every reasons (Electric City anyone? :D ).

I seriously love POKEY explorer! It truly lets me experiment with sounds so easily, and it has helped so much for my own research regarding frequencies tuning, impossible sounds and very creative sound design too!

One of my WIP tunes called "A Permanent Temporary Solution" relied heavily on ideas I got when I was poking around in the program. A Permanent Temporary Solution V2.xex
That thing is also unfinished but I think you get the idea behind it :D

It's also one of the few projects that relied on my "hacked up" workflow which consists of manual AUDCTL settings, hacked up instrunents based on serious usage of commands 1 and 2, duplicate instruments, and more instruments, just to get the exact tones and frequencies I needed.
And that is the exact kind of projects that make me scream out of (exaggerated) frustration due to being limited by the music tracker itself :D 
Thankfully, as Rensoup said: LZSS rules! ?

  • Like 2
Link to comment
Share on other sites

39 minutes ago, VinsCool said:

Thankfully, as Rensoup said: LZSS rules! ?

Yeah, dmsc's and Rensoup's work on this should not be forgotten :)

 

If dmsc hadn't open sourced his work, we wouldn't have this right now! Another example where opening up your project leads to other projects :)

 

@rensoup I see an MIT license in your ZIP file. Is your source code available somewhere?

 

 

Edit: BTW I know that the MIT license doesn't require that, but I was just wondering if it is available. Or if you plan on releasing it in the future.

 

Edited by ivop
  • Thanks 1
Link to comment
Share on other sites

7 hours ago, ivop said:

Oh, yeah, I forget that everytime. I thought the source was lost for ever after Raster's unfortunate passing away. IIRC the family could not find it. But rumours are that apparently there's somebody else that has the source code. Why he keeps it to him- or herself is a complete mistery to me.

Well I was told it was to prevent a bunch of incompatible versions from popping up...

 

Like I've said before: Good job on that front because we now have a bunch of patched versions which aren't compatible... The only reason we don't have more is because Analmux passed away as well ?

 

7 hours ago, ivop said:

"We" should just build a plain pattern, song and instrument editor that does LZSS conversion on the fly for replay on Altirra or atari800. There's my old idea again, both emulators should have an easy API to the outside world when they are running. A local socket, or something, with commands to clear memory, reset machine, load binary, fill memory, set PC, run, stop, et cetera. That way, it can act as a backend to a tracker/editor.

I'm not sure LZSS is snappy enough for that... I'm thinking that my C# rmt player/converter could be turned into an actual native PC rmt player with the help of Pokey.dll, or even better Altirra's pokey emulation... Didn't you mention you wanted to rip out Pokey out of Altirra ??

 

Then bolt on instrument editing features which aren't available in RMT and that player becomes the new RMT play command ?

 

7 hours ago, ivop said:

Another option might be writing an RMT patcher which knows where the assembled RMT player and all the tables reside in the binary. Load Rmt.exe, replace player and or tables, export new Rmt.exe

 

yeah that sounds like a dead end ? 

 

(you still need to be able to edit those extra parameters from the editor)

 

7 hours ago, ivop said:

Oh, I believe the tracker itself has all the options enabled in the 6502 player. That might also a cause for different replay sound by an exported and assembled, because the code paths through the player are different from within the tracker.

The problem is between RMT or an exported player.xex and RMT2LZSS ( which has all features enabled too). Supposedly RMT2LZSS produces more stable sounds ?

Edited by rensoup
  • Like 2
Link to comment
Share on other sites

7 hours ago, VinsCool said:

Of course I did not mean to sound ungrateful and demanding when I posted my rambling the other day! :D

 

Just what is available to use is already excellent, and a lot of fun to play with.

it's getting into "expert tricks" territory that makes me realise how much things could have seen improvements :P

The proof's in the pudding and you've produced quite a bit of tasty pudding lately ? so it's good to hear where improvements are required and possibly figure out a way of implementing them...

Edited by rensoup
tasty!
  • Thanks 1
Link to comment
Share on other sites

Hello rensoup

 

25 minutes ago, rensoup said:

I'm thinking that my C# rmt player/converter could be turned into an actual native PC rmt player with the help of Pokey.dll, or even better Altirra's pokey emulation... Didn't you mention you wanted to rip out Pokey out of Altirra ??

 

We have this little Atari 8 bit meeting in Germany in September.  Many people use it to get some quality time with their Atari computer.  Finish projects, that kind of stuff.  Imagine having a whole week just to work on this and/or Prince of Persia and in the mean time meeting lots of Atari users, with lots of Atari knowledge.  And maybe even the person holding the source code of RMT...

 

Sincerely

 

Mathy

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, ivop said:

@rensoup I see an MIT license in your ZIP file. Is your source code available somewhere?

It's because LZSS is included, and dmsc released it under the MIT license...

 

Code's not available but perhaps in the future...

 

The C# RMT player started pretty much as 6502 assembly looking C# code ( with stuff such as m_regA = GetMemory(offset) ) and while I've cleaned it up a lot it still has parts where it accesses the 6502 memory at runtime (instead of just during init), for setting up instruments and getting tracklines mostly.

 

I used 2 textfiles which contained reversee engineered info about the RMT format, one of them from 2012 by a certain Ivop dude ?... can't believe you did that and then... nothing with it !

 

Now if you were going to rip out Altirra Pokey, perhaps I could let you have a peek ?

 

  • Like 1
  • Haha 1
Link to comment
Share on other sites

Been recording some more stuff on hardware :D 
Corridors of Time (Alternate Tuning) This one sounded great on the real thing!

 


 

 

Some tunes by Spring, which were then converted exported from my sloppy tuning changes in RMT, also sounding great!

 

 


 

 

Some tests based on the manual 15khz tuning, and the original WIP version of the same tune:

 

 

 

 

 

And some tuning fail due to a mistake i made in the hex editor earlier, everything was off by 1 semitone, but I thought it still sounded nice after I transposed the bass down so here is it :D 

 

 


Wow Atari Age really did not like me making this post. Too me several attempts to upload the audio files ._. 
I hope this time it will work lol

 

Edited by VinsCool
Site being slow... 3rd edit, I hope it works...
  • Like 2
Link to comment
Share on other sites

On 2/2/2021 at 2:20 AM, emkay said:

Hey Vins

 

How about something completely different. 

Have a listen to this one:

 

 

 

 

It's sometimes unbelievable , what this old chip can do, using all available channels. 

You know, I'm not good ( ;) at  ) creating arrangements. 

Here is a proposal for a 4 channel POKEY version. 

64kHz

channel 1 and 2 playing the lead, but channel 2 is playing one octave higher, while channel one keeps the lowest possible octave. 

Channel 3 and 4 used for bass, fx, and drums. 

Some nifty AUDCTL usage given ;)

What program is that? Is someone making an alternative to RMT finally?

 

Link to comment
Share on other sites

10 minutes ago, NeoNZJ_Slayer said:

What program is that? Is someone making an alternative to RMT finally?

That's a tracker for the NES. Here you hear the stock sound chip plus an external Konami VCR6 soundchip. Nothing Atari at all.

  • Thanks 1
Link to comment
Share on other sites

1 minute ago, ivop said:

That's a tracker for the NES. Here you hear the stock sound chip plus an external Konami VCR6 soundchip. Nothing Atari at all.

I was starting to wonder how it sounded different. Other than the Emkay "patch8" modification, no one did any major updates to RMT since Raster was killed in an accident. 

 

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