Jump to content

rensoup

Members
  • Content Count

    1,066
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by rensoup


  1. 21 hours ago, VinsCool said:

    I am currently unable to give some examples because my computer fucked itself the other day but it's actually possible to do such a thing manually, which is really sloppy through RMT but does work.

    I'm going to check the vibrato and portamento code but a simple example of the limits of either of these commands would be nice whenever you get the chance.

    • Like 1

  2. On 5/6/2021 at 1:10 AM, j1mp4ck said:

    Nice!

    Sure is, but that's a regular sample playback routine on one of the channels, meaning high frequency so not very useful for use with anything but a static screen

    • Like 3

  3. 19 minutes ago, Stephen said:

    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

     

    yes but we've been there before, and lots of those tunes don't sound that different when played back at lower frequencies, it's super easy to test with RMT2LZSS with the "Output frequency option"

    You could perhaps try some of those tunes at 50hz and check if you hear major differences with your audio setup ?


  4. 6 hours ago, ivop said:

    I think he means commands for glissandos, vibrato, and arpeggios at 16-bit resolution with AUDCTL linked channels. This is something RMT does not support.

     

    Glad you're always able to clarify 🙂

     

    Yes but for that you would need 16bit input on those parameters as well right ? Right now the RMT command argument allows for 8bit only, so with 8bit as input you can't get 16 bit precision 🤔

     

    if the inputs are changed to 8bits+8bit fixed point, then should be pretty easy in the code to support that kind of precision (basically change all the "byte" to  "int16" and >>8 when looking up the note in the note tables)

    That way you'd get 16bit precision even in 8bit mode too.

     

    Another thing: In 16bit mode, the final 16bit frequency is looked up in the 16 bit table from the 8 bit note but if you have 8bit fixed point precision, would it make sense to do a bilinear interpolation between the 2 closest 16 bit frequencies ? or would that sound totally wrong ?

     

    One thing I noted is that 16bit mode is perhaps not as used as the filter for instance ? So is it really worth it ?

    • Like 1

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

  6. 21 hours ago, VinsCool said:

    That's what I think, yeah.
    I don't know if that's a coincidence or not but clearly having zeros everywhere saves space to me!

    There's the possibility that for a volume of 0 (and without 16bit nor Highpass) on a given channel the frequency could indeed be set to 0, I tried automating that and while the processes finds lots of values to reset to 0, it doesn't produce a better compression or even makes it worse 😐

    Would have been nice to save some bytes but it's not a big deal...

     

    21 hours ago, VinsCool said:

    Yes and no, if the third channel was muted, then sure! But in my tune I also used it on top of the filter voice, so it won't sound good if it's discarded.
    If only the frequency was used, then AUDC wouldn't be needed, indeed, since AUDF seems to be the only thing needed is what modulates the filter voice.
    I could be wrong, however.

    You're saying you can use the filter on a channel to filter frequencies on the other channel yet output sound with the filter value ?? Wouldn't that be quite random ?

    Any explanation on that ? Can you explain what the filter does in simple terms  ( What kind of effect it gives you on the sound) ?

     

    21 hours ago, VinsCool said:

    Not sure of the exact divisions I need to achieve a speed of 50hz on 800hz, but yeah it seems to work :D 
    I'll keep trying out numbers until I get what may work.
    I thought 0.0625 would work, but I get some weird noise that was not part of my instrument... not really important for now at least

    yeah it should be 0.0625... if you have a simple example that doesn't work, I could take a look.


  7. 22 hours ago, VinsCool said:

    I really depends on the use intended for the instruments/samples in question, I believe.

    I've come to similar conclusions regarding the necessity of making new samples for certain notes, too, which was the reason I wondered.

     

    Maybe an additional line in the .erti such as "PitchedByAUDF=" with a value of 0 or 1 could be a fair compromise? 

    Ok, you got it... SampleStep <= 0 means SampleStep of 1 without taking AUDF into account... how's that for a birthday gift 😃 ?

     

    (1.73 is available!)

     

    I also fixed the sampleStep formula above, so hopefully a sampleStep of 0.5 and AUDF=0 should still be 1... let me know...

    22 hours ago, VinsCool said:

    This also gives me a few clues for further optimisations in tunes... If a pattern is empty, or its frequency not needed, I could keep using my "null" instrument forcing Distortion 0, volume 0 and AUDF 00 to save a considerable amount of space, since when a channel is mute, usually its frequency remains carried over, which can fill up the memory really quick as a result.

    Weird... are you saying you can save space for pretty much every tune even if it doesn't use samples ?

     

    Space saving related question: when using the HP filter for let's channel 1 & 3, shouldn't it be possible to discard AUDC3, since only AUDC1 is used ? I tried with your BS tune and that didn't really work...

     

    23 hours ago, VinsCool said:

    What exactly would this envelope speed affect? I kinda expected volume, and commands, at least, to be able to keep the same instrument sound from 50hz to 800hz easily, but again I probably just tested that poorly so it's possible this is my own errors lol

    I'll make sure to try that out properly next time now that samples is mostly figured out now.

    Did you get the chance to try it because envelope speed should affect everything envelope related: basically if the envelope index hasn't moved this frame, no command or envelope effect gets processed.

     

    4 hours ago, VinsCool said:

    I did it with RMT2LZSS 1.72 and I noticed an important issue for this design: I absolutely need to use a frequency of 7F to get the proper sample step of 1, trying to use anything else becomes choppy, so 00 being 2 I assume will play back the waves wrong, even if I then make sure to force 0.5 in the .erti, for some reason.
    Not that this is a really big problem, but that's worth mentioning to avoid any unpleasant surprise.

    like I said above, hopefully this should work better now ?

     

    23 minutes ago, VinsCool said:

    Figured some values that do work for pitch :) 

    This used the same 16 samples long waveforms, tested with a square wave, at frequency 7F again for 
    sample step of 1.

    Aren't you taking this a little too far 😀 ? That formula I made up for the frequency was just a test !

    • Thanks 1

  8. 21 hours ago, emkay said:

    Yes.

    You could describe the problem more accurately perhaps?

     

    I'm guessing 16bit here has nothing to do with AUDCTL linked channels ?

     

    Are You talking about command parameters having a finer accuracy than 1 step per update ? 


  9. 3 hours ago, emkay said:

    In RMT 

    -timing incorrect

    -note values incorrect

    -filter setting incorrect

    -volume setting incorrect

    ...

    😏

    it's all experimental stuff, I'm not into music technology nor a musician so I don't know what's useful or not... I'm not going to write editors for every feature I add because that'd be a lot of wasted time... So you're stuck with text files and a crap workflow... (for now at least)

    • Like 1

  10. 2 hours ago, VinsCool said:

    What should be the expected sample rate to be fed in? and most importantly, at what speed?
    The newer sample "pitch" system really makes me confused right now. outputting on a frequency 00 plays too slow, and FF plays too fast, but I could have sworn I had figured out the speed in version 1.7, which I manually provided the output at step speed 1, and the content of AUDF didn't seem to matter, it was simply kept in memory, so I was able to sort of manipulate other channels from the frequencies it carried that way.

     

    sample rate is whatever you want, then you adjust the base playback frequency with the SampleStep, just like the previous 1.7 revision but now you're also able to adjust the playback frequency by using the note in RMT with 128 being 1 and 255 being 1.5 and 0 being 0.5:

     

                               double freqMul = AudF ; // 0-> 255
                                freqMul / 255; // 0-> 1
                                freqMul + 0.5f; // 0.5 -> 1.5

                                sampleIdx += SampleStep * freqMul;
     

    The SampleStep is multiplied by the note Frequency.

     

    Yes AUDF didn't matter but I thought if I took into account you'd be able to play various notes just like regular trackers. So there was no need to create an individual instrument for each note... But Ivop's tests show that it's better to create a new sample per note.

    Not sure which way to go... and if it's actually worth it at all...

     

    3 hours ago, VinsCool said:

    Is it possible to simply have a check to values of 00? and not change the pitch when it's detected?

    I'm bit reluctant to add arbitrary rules like that especially since you can just set your SampleStep to 1 and AUDF to 128 to get the same thing.

    3 hours ago, VinsCool said:

    Something else I observed was that frequency FF seems to be the highest point, then incrementing makes the sample pitch go lower in a linear way. I don't see any problem about linearly changing it, but wouldn't it be more logical to do it the in reverse?

    I have no idea 😀 I guess the frequency is actually a divisor so it would make more sense indeed.

     

    3 hours ago, VinsCool said:

    Another observation I made is, playing a sample stream at frequency 00, and convert to executable using RMT2LZSS, seems to output a much smaller file size, without any loss other than the pitch related things I mentioned above, so that's another important point to consider if saving space is crucial :D 

    hmm... I guess that makes sense since the sample plays much slower resulting in identical AUDC values which would help compression ?

    3 hours ago, VinsCool said:

    Playing a hacked module to speeds greater than 200hz seems to literally make everything run faster, unlike the way RMT was coded from 50hz to 200hz, where only the instruments ran faster envelopes, keeping the patterns at the same original speed matching 50hz playback.
    I don't really have a problem with that, I could simply adjust the speed values in the tracker pattern in a multiple of 2 (400hz) or 4 (800hz) to compensate, but I thought it was worth pointing out.

    hmm.. bug I think... I added values 5 and 6 but really I should have converted them internally to 8 and 16 ! So while the A8 player plays 8/16 updates per frame, the RMT player only does 5/6... That needs fixing!

     

    3 hours ago, VinsCool said:

    Also regarding the envelope speed recently implemented, I am not sure if I was doing something incorrectly, or if those were intended only to samples, any confirmation about this?
    I was under the assumption this was for any instrument, which really would have helped adjusting a song playback to still sound correct at higher speeds like 800hz, but it seems to not be the case?
    If that was a misunderstanding from my part, nevermind this, hahaha.

    envelope step is for every kind of envelope, I split it in 1.71 since the sample isn't stored in the envelope anymore but it's still there: EnvelopeStep and SampleStep are just 2 different things now.

    So you could have a 15 step envelope playing very slowly and changing AUDF which would affect a sample's playback speed.

     

    Honestly the sample playback is more of an afterthought... I was more interested in 400/800hz playback frequency for regular Pokey, I just figured maybe it would be possible to shape sounds more finely and get digi like sounds...

     

     

     

    • Thanks 1

  11. 16 hours ago, VinsCool said:

    I'm surprised this even works, even if it's really noisy I tell this is a loop playing in the background :D 
    theoretically, what could be the highest sample rate possible? that doesn't render screen update routine impossible I mean.

    hmm... with 4 channels updates, maybe 1200Hz... with a 3channels at 50hz the 4th could perhaps go as high as 3-5Khz

    • Thanks 1

  12. I just posted a new release:

     

    1.71 May 2021
        -sample playback now takes into account channel volume as well as frequency (in a simple linear way)
     

    in the .erti example

    Quote

    [instrument$02]
    Sample=bass.wav
    SampleStep=15.565334
    EnvelopeLoop=0

    should be 

    Quote

    [instrument$02]
    Sample=bass.wav
    SampleStep=15.565334
    SampleLoop=0

     

    I'd put the sample data into the envelope but it wasn't really necessary, just somewhat convenient. I decided to store the sample data in its own buffer with this latest release so the envelope should be available as usual.

     

    I now take into account the track volume to modulate the sample volume. And I also take into account the track note to modulate the playback frequency... just like a regular tracker but in a crappier way.

     

    So you can apply regular envelope effects (and still update the envelope pointer with steps < 1) to the note then the final note will alter the sample playback frequency. I just grab AUDF, with value 128 being regular playback frequency (= 1), 255 = 2(so twice faster), 0 = 0(that would play the same value forever). 

    I should of course change the playback frequency to real note's frequency for correctness but I'd need a table for that...

     

     

    • Thanks 1

  13. 15 hours ago, VinsCool said:

    I will figure it out eventually :P 

    the wave is pretty nice in that version but it's still quite chunky, especially compared to your sawtooth at 50hz which was much steeper. Would there be a way to use regular Pokey sound at higher frequencies to be able to play sounds that are close to samples ? 

    (ie convert sampled sound into regular pokey sounds)

     

    3 hours ago, VinsCool said:

    turns out bitcrushing to 4-bit then saving as 16-bit did a huge amount of improvement, the sampling technique is the same I used yesterday, which was a lot more noisy.

    interesting that the filesize is okayish at 800hz !

    • Thanks 1

  14. 9 hours ago, ivop said:

    I'd say, start simple. Waveform buffer: #$1f (128 times), #$10 (128 times). Volume only, do not set any tonegenerator yet. Now play this buffer round-robin at 800Hz, increase pointer by fixed point math, loop at overflow. Depending the increment of the pointer, you get different sound frequencies. Mixing in the tone generator is for later.

    I'm guessing you meant $f and $0 | VolumeOnlyBit ?

     

    here's a test I did with just a single $f and $0 (128 was way too long to sound interesting) and varying volumes as well as frequencies... wouldn't say there's any improvement...

     

    2 hours ago, ivop said:

    @rensoup how do you synchronize a 800Hz replay routine? Seems hard to me. There's a reason HARDbass is 1950Hz on PAL, without sacrificing an IRQ timer.

    I added the source in the latest release, it' just VCount so it's not super accurate indeed but I doubt that it's going to make much difference... it's fixed point so sometimes it's on the right scanline, sometimes on the scanline before.

     

    You could just set the increment to 13 for that 650hz playback.

     

    sampletestsquare.obx

    • Like 1

  15. I added an EnvelopeLoop command in the .erti file to try looping samples

     

    I also left the dist setting in AUDC instead of setting it to 0 even though it doesn't seem to make any difference

     

    I also modulated the sample volume with the RMT volume table just like regular Pokey sounds so the sample volume can be set in the editor volume column.

     

    Sounds meh 😑 so I'm a bit reluctant to package yet another release just for that...

     

     

    sampletest.obx

    • Thanks 1

  16. 9 hours ago, ivop said:

    Sort of. You can store your 4-bit samples with ora'd with $10, and then ora $a0 if you want to hear the tonegenerator, too.

    Sure, but right now it's all LZSSed so... I tried forcing the pure tone generator but it made no difference to the sound ?

    Or should a regular Pokey sound be played with $a0 then switch to volume only + $a0 to get some better sound ?

     

    9 hours ago, ivop said:

    256-bytes is enough for a repeating wave to get a pure tone. The 512 bytes I use in AtariSid contains the same 256 bytes twice! That way it is easier, and faster, to index without checking for overflow everytime, at the cost of usiing double the amount of memory.

    I tried generating some super short sine waves with audacity (200+ bytes) and low pass filtered it and it still sounds crap 😃

     

    8 hours ago, ivop said:

    Also, if you are still going on using true samples, be sure to filter them properly before downsampling. For example, if you are going to replay the samples at 800Hz, 400Hz is the maximum frequency it can capture. It's best too filter out every frequency above that, to avoid aliasing when downsampling to 800Hz. Set a low-pass filter to something like 380Hz with a very sharp knee, or run the filter a few times. After that, normalize to the volume you want

    tried lowpass filtering that bass... still crap 🙂

    (but I had the volume normalized before though I don't think it would have made any difference)

     

×
×
  • Create New...