Jump to content
IGNORED

RMT2LZSS: convert RMT tunes to LZSS for fast playback!


rensoup

Recommended Posts

8 minutes ago, ivop said:

Oh, now I see it :D ?

I just saw it on a 50Hz conversion. The player is not active when you see the jittering, so it's probably something else, i.e. a "bug" in the visualization?

I personally thought it was just for visual entertainment, it just gives a certain charm when combined to the VU meter :D 

Link to comment
Share on other sites

1 hour ago, VinsCool said:

Sounds great! Unfortunately there are many things wrong, like different instruments played on different keys, resulting to things sounding out of tune.
It does look very stable however, I especially like the channel 2 modulation.

Seems we have a different definition of "out of tune" . 

 

For me THIS is out of tune:

 

Listen from 0:29 to 0:31 or a little earlier to a little later . Somehow the term "thy cat hath died" comes to my mind there.

 

 

 

 

But the sanxion tune is simply sounding cool that way and offers error correction to have the tune fluent.  

  • Like 1
Link to comment
Share on other sites

10 minutes ago, emkay said:

Seems we have a different definition of "out of tune" . 

For me THIS is out of tune:

Listen from 0:29 to 0:31 or a little earlier to a little later . Somehow the term "thy cat hath died" comes to my mind there.

Yes, the A sharp at 0:31 is (modulated) somewhat out of tune. I'm amazed you can hear that ;) 

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

32 minutes ago, emkay said:

Seems we have a different definition of "out of tune" . 

 

For me THIS is out of tune:

 

Listen from 0:29 to 0:31 or a little earlier to a little later . Somehow the term "thy cat hath died" comes to my mind there.

 

 

 

 

But the sanxion tune is simply sounding cool that way and offers error correction to have the tune fluent.  

Yeah it is indeed offtune a bit. A sweet combination of portamento and slow vibrato as well as the Pulse modulation :D 
In this case it works very nicely, although I do admit it was a little more off than necessary.

  • Like 1
Link to comment
Share on other sites

5 hours ago, VinsCool said:

Basically, yeah.

It sounds a lot more stable and consistent after the conversion.

 

 

hmm... that's going to need some testing(just out of curiosity)... I don't think I can hear the difference, but I'll try using RMT's way of updating Pokey and upload a test player...

 

Another thing that's different from RMT, is that if a Pokey register doesn't change ever, it's only updated at the beginning of the song but only some songs have that "feature". It's mentioned during compression "skippking channel"... not sure if it's the case here ?

 

listened to your tunes too, I like the sounds, I wouldn't listen to the tunes in a loop because it's very often a little too cheerful for my taste ?. Your version of Cybernoid is great too!

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

3 hours ago, MrFish said:

Look closely at the different-colored bars (P/M overlays?) in the bar graph (not the CPU usage graphics). They're constantly moving left and right.

 

the 4 colored sections are 4 players and there's 3 missiles flickering between them for a smoother transition... if it isn't smooth it could be that the emulator doesn't update quickly enough or perhaps it's just NTSC colors that are slightly messed up?

  • Like 2
Link to comment
Share on other sites

3 minutes ago, rensoup said:

the 4 colored sections are 4 players and there's 3 missiles flickering between them for a smoother transition... if it isn't smooth it could be that the emulator doesn't update quickly enough or perhaps it's just NTSC colors that are slightly messed up?

Ah, makes sense now. I'm using emulation, and only seeing it on PAL.

 

Link to comment
Share on other sites

4 hours ago, emkay said:

Here is the special edit of enderdude's "sanxion redo", where I added temporary 15kHz and dedicated modulations. 

Now played in the LMSS player it sound like   "from a cast cast" or as we say in German "aus einem Guss". 

 

Not sure what you mean... it does seem very out of tune though...

 

  • Like 1
Link to comment
Share on other sites

21 minutes ago, rensoup said:

hmm... that's going to need some testing(just out of curiosity)... I don't think I can hear the difference, but I'll try using RMT's way of updating Pokey and upload a test player...

 

Another thing that's different from RMT, is that if a Pokey register doesn't change ever, it's only updated at the beginning of the song but only some songs have that "feature". It's mentioned during compression "skippking channel"... not sure if it's the case here ?

 

listened to your tunes too, I like the sounds, I wouldn't listen to the tunes in a loop because it's very often a little too cheerful for my taste ?. Your version of Cybernoid is great too!

Well that kind of technicality is above my own knowledge unfortunately.

 

All I can observe really is that, the RMT player running the song back in an emulator (and most likely hardware, I cannot confirm this one just yet) often has some jittery movements, like some frames are skipped or duplicated, and I am sure Altirra isn't the culprit because the same songs compressed as LZSS sound absolutely identical, but this time, very smooth playback, no frames skipped, better stability, as the others pointed out, and I do agree.

The compression has been doing some incredible magic!

 

As for the register not updating... My guess is the playback will simply pick up whatever was left in the register prior to executing, so I imagine this would make certain behaviours predictable, or in some cases, random, but that is only my own hypothesis, I cannot truly confirm this is the case or not :D

 

Thanks for the comments on the tunes!

 

A considerable amount of these were not finished ideas or experimental sounds, and I suppose my own composition style has a role to play in the vibe my music radiates :P

 

The Cybernoid cover was a great one by another one of my friends btw. I simply Emkayfied it (sorry, I couldn't resist making this joke!), but it wasn't all finalised so that is why around the later part it sounded a bit weird.

There were also some song ideas that got cut much earlier as well because they were made in RMT as subtunes between sections I was editing, so those were omitted.

 

Makes me wonder if subtune support could be added in order to not miss any secret tunes in a .rmt?

I would surely appreciate it so I would not worry sharing more sketch ideas and miss entire sections currently worked on :D

 

 

 

Link to comment
Share on other sites

6 hours ago, MrFish said:

Ah, makes sense now. I'm using emulation, and only seeing it on PAL.

 

oh yeah, if you set your emulator to PAL, you need to make sure to change your Monitor's refresh rate in Windows' graphics options as well. If the two don't match, you'll get very obvious flickering.

 

(I'm going to guess you didn't because it shouldn't be obvious even in PAL)

Edited by rensoup
guess
Link to comment
Share on other sites

5 hours ago, VinsCool said:

The compression has been doing some incredible magic!

Can't be the compression?

 

But ok I want to find out now if it's just the way I update the registers... could you post a RMT tune that has the issue?

 

5 hours ago, VinsCool said:

Makes me wonder if subtune support could be added in order to not miss any secret tunes in a .rmt?

I would surely appreciate it so I would not worry sharing more sketch ideas and miss entire sections currently worked on :D

I could perhaps output subtunes as separate obxs, now how do I find out if there are any subtunes  ??

 

(There's nothing in the code )

Link to comment
Share on other sites

On 1/10/2021 at 1:00 AM, rensoup said:

Can't be the compression?

 

But ok I want to find out now if it's just the way I update the registers... could you post a RMT tune that has the issue?

Well about that... It's sort of complicated to narrow down to specific .rmt, or truly explain why it feels better.

I noticed most of the things that would usually get a suddenly improved are: speed changes to make grooves, and complex instrument design precise to frame level.

I also noticed things at 15khz tend to be a bit unstable for me, but again once LZSS conversion was done, it suddenly made everything smoother!

 

It just seems like it updates fast enough that everything becomes incredibly smooth when played back, which is a really good thing to me!

 

In short, anything that sounded a bit weird in RMT, or as a .xex export, just gets a lot more stable, that's really all I can observe myself.

I like doing experimental sounds and ideas, and the stuff never played so smooth until I used RMT2LZSS to compress the modules.

There are barely any downside, other than some problematic looping in some cases, which are also very easy to fix in the .rmt themselves anyway.

 

On 1/10/2021 at 1:00 AM, rensoup said:

I could perhaps output subtunes as separate obxs, now how do I find out if there are any subtunes  ??

 

(There's nothing in the code )

Not sure...

I do know most SAP players can play rmt files, and just make subtunes out of module sections starting outside the main playback range then uses the goto jump to loop the songs.

 

EG: a song starting at line 00, looping back to 00 at line 08, the goto line, if more pattern data exists after this, for example starting at 09, and then at 0C it loops back to 09, that will be considered to be a subtune.

 

Since you already have the code for detecting loops, I imagine it wouldn't be too difficult to add a "detect" subtune kind of function so .rmt modules don't hide any secret once converted :D

 

EDIT: here's another dumb project of mine.

It was incredibly messy, and got stabilised considerably after conversion.

Okay I admit it's still pretty bad but I can improve it further, that tuning is painful, and jumping between 15khz and 64khz as seamlessly as possible is tricky :D

 

 

Sketch_32_V29.xex

Edited by VinsCool
Added another stupid song of mine lol
Link to comment
Share on other sites

Hmm, looks like I can no longer edit my post, so sorry for bumping the thread!

I improved that song further tonight and well, it's really not comparable to the file I posted earlier so please disregard it :D 
In any case, the difference is pretty amazing. The .obx runs so much better compared to the actual song played in RMT, or as a XEX export from RMT.
I hope this can be any useful.


Runs at 60hz btw :) 

Sketch 32 V37.obx Sketch 32 V37.rmt

Link to comment
Share on other sites

 

3 hours ago, VinsCool said:

I improved that song further tonight and well, it's really not comparable to the file I posted earlier so please disregard it :D 

nice and simple!

3 hours ago, VinsCool said:

n any case, the difference is pretty amazing. The .obx runs so much better compared to the actual song played in RMT, or as a XEX export from RMT.
I hope this can be any useful.

honestly I can't hear any difference between the exported RMT and the obx... So I output 2 versions of the tune, one updates pokey in the same way as RMT, the other is just the usual update... can you tell which is which ? ?

 

btw the RMT player shouldn't skip frames or anything like that (at least not the source that comes with the tracker)... makes me wonder if there could be a difference between the RMT XEX and the RMT player source... I doubt it though...

11 hours ago, VinsCool said:

I do know most SAP players can play rmt files, and just make subtunes out of module sections starting outside the main playback range then uses the goto jump to loop the songs.

sounds like a good source of bugs ?, I may look into it...

Sketch 32 V37_testA.obx Sketch 32 V37_testB.obx

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

5 hours ago, VinsCool said:

Hmm, looks like I can no longer edit my post, so sorry for bumping the thread!

I improved that song further tonight and well, it's really not comparable to the file I posted earlier so please disregard it :D 
In any case, the difference is pretty amazing. The .obx runs so much better compared to the actual song played in RMT, or as a XEX export from RMT.
I hope this can be any useful.


Runs at 60hz btw :) 

Sketch 32 V37.obx 16.66 kB · 6 downloads Sketch 32 V37.rmt 13.47 kB · 3 downloads

Nice arrangement for using 15kHz and 64kHz.  (has some volume problems though ? )

Now imagine, RMT was supporting at least one channel for 16 Bit with 1.79MHz base clocking.

100% correct melodic flow plus a wide range of FX , bass, arpeggios... whatever. 

  • Like 1
Link to comment
Share on other sites

3 hours ago, rensoup said:

honestly I can't hear any difference between the exported RMT and the obx... So I output 2 versions of the tune, one updates pokey in the same way as RMT, the other is just the usual update... can you tell which is which ? ?

 

btw the RMT player shouldn't skip frames or anything like that (at least not the source that comes with the tracker)... makes me wonder if there could be a difference between the RMT XEX and the RMT player source... I doubt it though...

it's really hard to tell between these 2 files honestly... They really do sound identical!

I tried to compare between my own obx to these 2... I believe the Test A may be RMT and Test B be the usual update. It's also quite possible I'm wrong there lol
Playing the XEX exported by RMT can immediately tell me something is slightly different in comparison ? For this one I stand by my previous statement, it does have some timing differences.
Makes me wonder if something else is related to this feeling. Or maybe I'm imagining things. :D 

Edited by VinsCool
typo
Link to comment
Share on other sites

1 hour ago, VinsCool said:

I tried to compare between my own obx to these 2... I believe the Test A may be RMT and Test B be the usual update. It's also quite possible I'm wrong there lol

that's right but that's more of a lucky guess ? ?

 

The RMT XEX does the same as the RMT player source code, so that XEX is fine...

 

I Looked at the Pokey state and it's identical in both except for interrupts flags which don't have anything to do with the problem in this case... noticed something however. Here's another test... what do you think?

Sketch 32 V37_testC.obx

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

Keep in mind that an NTSC system has a base clock of 1.79MHz and PAL 1.77. 

60Hz updates are also full different. 60Hz replay on 1.17 MHz will sound different than a replay on 1.79MHz.

I'm still thinking about a different "clocking calculation" . Not just in the Runtime, also the emulation seems to calc the clocking dependency in the "sound interface" of Windows, not hardware exact. 

It's also a part of the RMT player, to skip parts of the runtime, when CPU time is short. 

Link to comment
Share on other sites

This testtune is somewhat older. 

But also a good prove that CPU and POKEY dependency is the same in PAL and NTSC. 

 

My "Crap Banjo" never changes the face. 

Also , and here is another possibility of replay problems in RMT: The LMSS player plays continously after switching between pal / ntsc and back. 

One single write to the registers of pokey, that could change the wave dependency on each channel, will change the "overall" sound.

Tune.xex

Link to comment
Share on other sites

And another "problem". 

The RMT player always sets the filter offset one pitch off, to get the weird synth that is known as "high pass sound". 

You have to correct that with command 6 and value "ff" ... If the runtime does that for a fraction of a second, The dependency is changed again. 

The LMSS Player uses one fixed value . So there is no "accidental" pitch changing. 

 

Link to comment
Share on other sites

25 minutes ago, emkay said:

It's also a part of the RMT player, to skip parts of the runtime, when CPU time is short. 

6 minutes ago, emkay said:

The RMT player always sets the filter offset one pitch off,

Can you point me to the line(s) in the player source code where this happens?

 

At least in the external player, this could be fixed. Perhaps even the Rmt.exe binary could be patched.

 

  • Like 1
Link to comment
Share on other sites

8 minutes ago, ivop said:

Can you point me to the line(s) in the player source code where this happens?

No, but Paul Lay used that intentionally in Atari Blast. 

Using simple square waves makes it almost unrecognizable.

 

8 minutes ago, ivop said:

At least in the external player, this could be fixed. Perhaps even the Rmt.exe binary could be patched.

 

 

Just use command 6. It changes the pitch on one channel lower. To correct that, and to have two channels on the same and correct pitch, you have to set command 6 to ff. 

 

Link to comment
Share on other sites

1 hour ago, emkay said:

Keep in mind that an NTSC system has a base clock of 1.79MHz and PAL 1.77. 

All that NTSC vs PAL is rather cryptic... I'm not sure what you're getting at. As far as I understand that stability issue doesn't seem related to it...

 

The LZSS player just plays raw pokey streams but RMT2LZSS is just like the title says, it plays RMT tunes in the exact same way as the original RMT player, byte for byte...

 

...Well that's the idea anyway but, on a slightly different topic,  it turns out that initial release has a bug (at least) seemingly related to the portamento (whatever that is ?) which I fixed when cleaning up the code. To verify that all is good after I make some changes, I reoutput all 1070 tunes and compare with my initial release and after that cleanup 4 out of 1070 failed the compare test...

Believe it or not, all 4 were Emkay edits ?, so congratulations on using the portamento in ways nobody else has and exposing a bug in my code ?

 

A new release should be out soon...

  • Like 1
  • Thanks 1
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...