Jump to content
IGNORED

Moving beyond RMT ?


rensoup

Recommended Posts

IMHO WSYNC wastes way too much cycles. You only have 114-9 = 105 cycles per scanline. To waste 4 on the STA and several more on the wait time is not economic. AtariSid6 would not have been possible that way. I know MTP is only 7.6kHz. That might help if the player code is interleaved with the sample playing, but that is very specific to this player. AtariSid1 and 2 were done this way, when I still played the SAP-R equivalent of SID, i.e. register dumps. Once you start calling generic 6502 player routines, you have to invert what you would normally do. Now you call the player in the main loop, synced to VCOUNT, and play the (generated or full) samples driven by an interrupt.

 

Edited by ivop
Not SAP, but SAP-R
  • Like 1
Link to comment
Share on other sites

9 hours ago, Irgendwer said:

A lot of additional libraries need to be installed. That's all.

Just to clarify, there's no need to install another desktop which would be based on QT ? You could run a QT app inside a GTK env and vice versa ? Is that common ?

 

(Sorry to be a noob, googling seem to give al sorts of different and outdated answers)

Link to comment
Share on other sites

8 hours ago, Sandor / HARD said:

The slight modification I did for the RMT playback code will switch HardBASS on/off on channel #4 depending on whether or not any RMT sound is playing on channel #4 and if any RMT instrument is playing on another channel that's using channel #4 as its filter.

Ah thanks for clarifying... I thought somehow you mixed both regular pokey sound and volume only sound...

 

8 hours ago, Sandor / HARD said:

I hope this helps. I wish you a lot of luck and success with your efforts. I hope it plays out very nicely!

It does, maybe I could be inspired to look more into those cheap analog synths and the tech you use in Reharden, thanks!

Link to comment
Share on other sites

7 hours ago, ivop said:

Also, don't forget that if you use true samples, that'll cost a lot of memory. Playing a softsynth in the back (either HARDBass, or something else, like a stripped AtariSid6), uses a lot less memory, because it repeats small waves 256 or 512 bytes. And as Sandor says, those waves can be anything. Not just a sawtooth bass, but can contain thirds and fifths to simulate a chord or organ sound. Think the original "Softsynth" program.

Yes but we're still dealing with LZSS so far, so samples or softsynth would take the same space (and probably a lot too!) but perhaps a hybrid LZSS/ 1 softsynth channel could be interesting. Though that would be a decent amount of work for a single feature.

 

Despite its name (Softsynth), I thought the software was purely a sample based soundtracker, the demo disk posted earlier has a bunch of songs which I guessed all used the same sample set. But if it's all generated on the fly, that's even cooler.

 

One thing I forgot is that for volume mode only, AUDF would not be required and would compress very nicely.

Edited by rensoup
Link to comment
Share on other sites

7 hours ago, R0ger said:

IMHO only reasonable way to do samples or softsynth is WSYNC. MTP does it that way. It's cheap, simple, and can be easily combined with simple screen modes. Not so much with DLI of course.

 

7 hours ago, ivop said:

IMHO WSYNC wastes way too much cycles. You only have 114-9 = 105 cycles per scanline. To waste 4 on the STA and several more on the wait time is not economic. AtariSid6 would not have been possible that way. I know MTP is only 7.6kHz. That might help if the player code is interleaved with the sample playing, but that is very specific to this player. AtariSid1 and 2 were done this way, when I still played the SAP-R equivalent of SID, i.e. register dumps. Once you start calling generic 6502 player routines, you have to invert what you would normally do. Now you call the player in the main loop, synced to VCOUNT, and play the (generated or full) samples driven by an interrupt.

 

Like I mentioned a few times, LZSS can probably be pushed to decode 4 channels at 800hz, that's only 16 updates per frame so a strict sync method may not be required.

There would probably be very little time to do anything else anyway. At 400hz you'd have about half a frame left. 

 

I believe I might have already asked but is 400hz enough for interesting bass sound ?

Edited by rensoup
Link to comment
Share on other sites

25 minutes ago, rensoup said:

Just to clarify, there's no need to install another desktop which would be based on QT ? You could run a QT app inside a GTK env and vice versa ? Is that common ?

No, you don't need a desktop based on the same toolkit. Purist don't like a somewhat different look and feel, but it's very common to use QT apps in a Gnome/GTK environment and GTK apps in KDE/QT one.

You could install f.e. "KMag" or "Tiled" on your xfce machine and try out these QT apps for yourself...

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

6 hours ago, rensoup said:

 

Like I mentioned a few times, LZSS can probably be pushed to decode 4 channels at 800hz, that's only 16 updates per frame so a strict sync method may not be required.

There would probably be very little time to do anything else anyway. At 400hz you'd have about half a frame left. 

 

I believe I might have already asked but is 400hz enough for interesting bass sound ?

The lower, the better ;)

Using "400Hz" sampling means to have the clicking noise at 400Hz. The resulting wave gets starting clean below 100Hz and even more impressive at 50Hz... 800Hz sampling would be killer :)

Also, It is lesser working as some kind of PWM. It is an LFO added to the generator sound.  

 

Depending on the speed of the sampling, one could change the length of the "samples" to get the fitting resulting tone frequency. 

  • Like 1
Link to comment
Share on other sites

16 hours ago, rensoup said:

Despite its name (Softsynth), I thought the software was purely a sample based soundtracker, the demo disk posted earlier has a bunch of songs which I guessed all used the same sample set. But if it's all generated on the fly, that's even cooler.

It's actually a mix.  It uses small snippets (preferably exactly one wave period), and loops those at different speeds (i.e. jumping through it with a different delta and loop). AtariSid6 also has different snippets for different volumes, but that is not strictly necessary.

 

Quote

One thing I forgot is that for volume mode only, AUDF would not be required and would compress very nicely.

Indeed, you only need AUDC, but with full samples you can forget about decent compression with LZSS, or any lossless format for that matter. That's why FFT/DCT based lossy compression schemes were invented :)  BUT! The small windows of 256 or 512 bytes can be compressed pretty effecient, for example with delta compression and RLE, which is what AtariSid6 already does.

 

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

16 hours ago, rensoup said:

I believe I might have already asked but is 400hz enough for interesting bass sound ?

The Nyquist–Shannon sampling theorem states that the sampling frequency must be at least twice the frequency you want to capture. So if your capture and replay frequency is 400Hz, the maximum you can capture is a 200Hz square wave with a 50/50 duty cycle. If you want sawtooths for example, your maximum decreases, or it'll turn into a square wave.

 

Square wave: $1C, $ 10, $1C, $10, .... repeat and replay at 400Hz, note will be 200Hz

 

Sawtooth: $1C, $18, $14, $10, .... repeat and replay at 400Hz, note will be 100Hz.

 

And so on...

 

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

4 hours ago, ivop said:

The Nyquist–Shannon sampling theorem states that the sampling frequency must be at least twice the frequency you want to capture. So if your capture and replay frequency is 400Hz, the maximum you can capture is a 200Hz square wave with a 50/50 duty cycle. If you want sawtooths for example, your maximum decreases, or it'll turn into a square wave.

 

Square wave: $1C, $ 10, $1C, $10, .... repeat and replay at 400Hz, note will be 200Hz

 

Sawtooth: $1C, $18, $14, $10, .... repeat and replay at 400Hz, note will be 100Hz.

 

And so on...

 

Not really. 

If using 400Hz sampling frequency, one could set

 

1,2,3,4  

or 

1,2,1,2

or

1,2,3,1  2,3,1,2 3,1,2,3 ... to get waves inbetween.

 

And, btw. There seems to be an adaption mistake somehow. 

 

Sampling rate  at 16kHz means a sampling frequency at 8kHz. And, if there is a special waveform to get, it's half of the sampling frequency. 

Things get technically completely weird, if a "Frequency" means to have a "cycle completed" while a "rate" means to get a  "sample" frequently at some point on a specific time. 

So where did the frequently getting of a sample the name of "Sampling Frequency"?

I see it also in German named "Frequency" instead of "Rate" . 

 

Edited by emkay
Link to comment
Share on other sites

And to make things looking even more weird: 

The 400Hz rate that is resulting by 8 times of VBI programming, is really acting as a frequency, if the generators were used and changed at that speed.

800 times changing the volume on the generator, means 800Hz changes. 

Link to comment
Share on other sites

On 4/15/2021 at 1:49 PM, Irgendwer said:

 

Ah, I was wrong, they seem to use the Win api exclusively for display... so not a problem to have a scrolling pattern window then... too bad it's C++ because sneventracker (famitracker) seems very similar to RMT.

 

Anybody knows of a tracker similar to RMT/famitracker with a very small exe size and with source code available ?

Link to comment
Share on other sites

15 hours ago, emkay said:

Depending on the speed of the sampling, one could change the length of the "samples" to get the fitting resulting tone frequency. 

You mean like Ivop says below ?

6 hours ago, ivop said:

It's actually a mix.  It uses small snippets (preferably exactly one wave period), and loops those at different speeds (i.e. jumping through it with a different delta and loop). AtariSid6 also has different snippets for different volumes, but that is not strictly necessary.

I was thinking I could use an instrument with AUDC set to volume mode and have the volumes/samples in the envelope (envelope length is not limited in RMT2LZSS). I could make the envelope speed variable (like Vinscool mentioned earlier) for different playback frequencies...

 

6 hours ago, ivop said:

Indeed, you only need AUDC, but with full samples you can forget about decent compression with LZSS, or any lossless format for that matter. That's why FFT/DCT based lossy compression schemes were invented :)  BUT! The small windows of 256 or 512 bytes can be compressed pretty effecient, for example with delta compression and RLE, which is what AtariSid6 already does.

Probably won't compress well indeed... but we're talking 800hz max... might be worth a try!

Link to comment
Share on other sites

3 minutes ago, rensoup said:

You mean like Ivop says below ?

Very close ;)

3 minutes ago, rensoup said:

I was thinking I could use an instrument with AUDC set to volume mode and have the volumes/samples in the envelope (envelope length is not limited in RMT2LZSS). I could make the envelope speed variable (like Vinscool mentioned earlier) for different playback frequencies...

 

For the sampling, only the speed of volume changes is relevant. Changing the whole instrument envelope is a huge wasting of ressources. So I hope there will be a fitting solution.

 

3 minutes ago, rensoup said:

Probably won't compress well indeed... but we're talking 800hz max... might be worth a try!

800Hz is more than sufficient. 

The question still is the flexibility of different speeds inbetween. 

Link to comment
Share on other sites

1 hour ago, emkay said:

Not really. 

Well, REALLY : https://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theorem

 

1 hour ago, emkay said:

If using 400Hz sampling frequency, one could set

 

1,2,3,4  

or 

1,2,1,2

or

1,2,3,1  2,3,1,2 3,1,2,3 ... to get waves inbetween.

 

Yes, but NEVER a tone above 200Hz if your sampling/replay frequency is 400Hz.

 

1 hour ago, emkay said:

And, btw. There seems to be an adaption mistake somehow. 

What do you mean by that?

 

1 hour ago, emkay said:

Sampling rate  at 16kHz means a sampling frequency at 8kHz. And, if there is a special waveform to get, it's half of the sampling frequency. 

No, a sampling frequency of 16kHz means a sampling rate of 16khz. It's the same. Half the sampling frequency, or rate, is the maximum (analog) frequency that can be captured at that rate. Or frequency ;)

 

1 hour ago, emkay said:

Things get technically completely weird, if a "Frequency" means to have a "cycle completed" while a "rate" means to get a  "sample" frequently at some point on a specific time. 

So where did the frequently getting of a sample the name of "Sampling Frequency"?

I see it also in German named "Frequency" instead of "Rate" .

 

See above. You are confusing sampling frequency/rate and the note-that-you-are-hearing frequency. The latter can never be higher than half of the former.

 

 

 

  • Like 2
Link to comment
Share on other sites

 

 

4 hours ago, Wrathchild said:

Why is small exe size a constraint in this day and age :D

I was thinking it'd be easier to potentially convert a smaller project to C# 

 

4 hours ago, Wrathchild said:

Not sure if the Goat-tracker UI is too basic for Pokey needs?

 

It seems pretty different... What do other people think ?

Edited by rensoup
Link to comment
Share on other sites

5 hours ago, emkay said:

800 times changing the volume on the generator, means 800Hz changes.

hmm.. that's saying the same thing ? 800 times per second is 800Hz

 

4 hours ago, emkay said:

For the sampling, only the speed of volume changes is relevant. Changing the whole instrument envelope is a huge wasting of ressources. So I hope there will be a fitting solution.

 

Not if it gets converted to LZSS (which may or may not compress well)

 

4 hours ago, emkay said:

800Hz is more than sufficient. 

The question still is the flexibility of different speeds inbetween.

800hz means 16 times at equal intervals per VBL at 50fps. Having "flexible intervals" between those 16 times per frame would be some kind of hybrid 800hz. I don't think it's a good idea for 2 reasons:

 

-In a project that uses DLis for different purposes, that could cause DLi clashes.

-You may want a variable interval for one channel but you probably don't want the same interval for the 3 other channels unless you play them at lower frequency.

 

Hopefully 800hz fixed intervals should be nice enough.

  • Like 1
Link to comment
Share on other sites

8 hours ago, ivop said:

Well, REALLY : https://en.wikipedia.org/wiki/Nyquist–Shannon_sampling_theorem

 

 

Yes, but NEVER a tone above 200Hz if your sampling/replay frequency is 400Hz.

 

What do you mean by that?

 

No, a sampling frequency of 16kHz means a sampling rate of 16khz. It's the same. Half the sampling frequency, or rate, is the maximum (analog) frequency that can be captured at that rate. Or frequency ;)

 

 

See above. You are confusing sampling frequency/rate and the note-that-you-are-hearing frequency. The latter can never be higher than half of the former.

 

 

 

I just wonder where that definition mistake did take place. 

Link to comment
Share on other sites

3 hours ago, rensoup said:

 

Hopefully 800hz fixed intervals should be nice enough.

It seems to be too much though.

Particular, if programs were using a lot CPU , and special DLIs to change things on the screen. 

If you run that thing at 800Hz , the decompression has to do all 5 pokey registers. 

Doing that just with volume of one channel, the decompresion will get 5 times faster at that point 

Link to comment
Share on other sites

17 hours ago, emkay said:

It seems to be too much though.

Particular, if programs were using a lot CPU , and special DLIs to change things on the screen. 

If you run that thing at 800Hz , the decompression has to do all 5 pokey registers. 

Doing that just with volume of one channel, the decompresion will get 5 times faster at that point 

Yes there should be just enough juice for 800hz with 4 channels which like you said is probably not very useful. A single 800hz channel (at fixed updates) would be nicer but it may require changes to LZSS

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 4/19/2021 at 1:42 AM, rensoup said:

Yes there should be just enough juice for 800hz with 4 channels which like you said is probably not very useful. A single 800hz channel (at fixed updates) would be nicer but it may require changes to LZSS

Perhaps you can have two separate LZSS streams? One for channel 2-4 at 50/60Hz, and one high speed stream for channel 1.

 

Another option is to just run your LZSS player at 50/60Hz, but use escape sequences (i.e. certain AUDF/AUDC combinations that make no sense) that trigger a parallel waveform player that is run every x scanlines.

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, ivop said:

Perhaps you can have two separate LZSS streams? One for channel 2-4 at 50/60Hz, and one high speed stream for channel 1.

Possibly but I don't know if there would be any advantage... I'm thinking LZSS can be modified to output all 4 channels at different frequencies so it would be very similar ( in terms of efficiency and code simplicity )

 

5 hours ago, ivop said:

Another option is to just run your LZSS player at 50/60Hz, but use escape sequences (i.e. certain AUDF/AUDC combinations that make no sense) that trigger a parallel waveform player that is run every x scanlines.

That could be interesting and a nice space saver... But are there any combo that are invalid ? It seems that those registers can be abused in all sorts of ways... Vinscool mentioned that you can use Volume only and still use AUDF for different purposes.

If you're talking about redundant dist modes, they're taken care of by the spacing saving code that dmsc added to LZSS.

 

I'm also waiting for that killer tune that proves 200+hz updates are actually useful ?

  • Like 2
Link to comment
Share on other sites

13 minutes ago, rensoup said:

I'm also waiting for that killer tune that proves 200+hz updates are actually useful ?

Notes I took when checking out various RMT archives:

200Hz RMT examples I enojyed:
    Hightide (rmt128\songs\hightide.rmt)
    Deluxe Dream (rmt119\rmt119\songs\tatqoo\deluxe8ch.rmt)
    Ninja Starts School (rmt119\songs\tatqoo\ninjas.rmt)
    Forgotten Sounds (Drmt119\songs\tatqoo\forgotten_low.rmt)
    I think the entire rmt119\songs\tatqoo\ is 200Hz

 

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