Idea for saving SDRAM when using tables


#1

I just had a thought about how one can save SDRAM when loading samples into tables.

The idea is to make the sample half the size that it actually is, then load it into a table and then set a phasor that reads back the table to half the speed.

Example:
I have a drum loop which fits perfectly into a table. The loop is 262144 samples long. But then instead of loading the file as is into a table, I double the speed of the sample by using Audacitys speed function, then the sample is only 131072 samples long. And then I set the speed of the phasor to only half the speed, to compensate for the double speed, so it plays it back at the right speed and not double speed.

Tomorrow I am going to do an experiment with it. If it works problem free, it i going to be a simple way of saving SDRAM resources for other purposes, like delays and reverbs.

Have any one tried this?


#2

hey, interestong technique but isn't what you're achieving basically just cutting the sample rate in half? of course with the pleasent "side effect" of only usin ghalf the memory...


#3

Yeah I was thinking that it might affect the quality.

I think I need to test it to find out :slight_smile:


#4

sure it will affect the quality, as @weasel79 says you are basically reading half as many points, so you will have to interpolate more data. depending on the material this could sound ok or pretty bad...


#5

Yeahafter thinking about it and reading Weasels comment I realised what I was actually doing.

But I guess for some things it probably is okay. I will test it and see how bad/good it is.


#6

Like the old Sp1200 sampling trick, very curious about your results


#7

Yeah I think some samplers do it, especially older models.

I am just going to load the same sample at orignal and double speed into 2 different tables and check the result. Will probably do a phase cancelling test and see how that goes.


#8

matter of fact what i am doing in my main synth project is the exact opposite: i use a lot of tonal one shot samples that get pitched over the whole keyboard, so i export the samples from my computer at c0 or even lower ("oversample") , so i'll have better quality source material when pitching in the extremes in axoloti. the default c3 when played by my synth willl play the sample at 8x speed already (iirc). which in return means that my 1mb table at c3 is only about 2 seconds ish long. call it an "idea for wasting SDRAM when using tables".

the other way around i had too much aliasing noise at extreme pitches.


#9

Yeah, aliasing is very much present esecially when lowering the pitch of samples.


#10

Ahh I totally forgot about this thread.

But today I actually did the test, testing the same sample at 2 different speeds/sizes.

I have a drumloop sample which is 262144 samples long. I loaded it into a table and play it back as usual, at the original speed.

And then I took the SAME exact sample and changed the speed of it in Audacity, so it's 131072 samples long, so its double speed/pitch of the original so it only takes half the table space. Then i loaded it into a table and pitched it one octave down, so both loops are played back at the same speed.

The result I am hearing is that the sample that is 2 x speed and pitched down sounds seems to be more muffled/rounded. It seems to be a little bit lower in volume and it also seems like some of the high frequencies are cut.

I think it actually does not sound bad, as it cuts out some of the highs for the drums. Personally I can work with it and I think actually especially on drum sounds it can make it sound better, give it a bit of 8 bit sound :slight_smile:

I then got curious about making one version that was 4 X speed. That did not sound too nice, very muffled and too rounded. Again tested it on some drums. It might work better on other types of sounds, who know.

So the 2 x speed is definitely something I am going to explore more in the future. If I can get double out of the sd-ram by for example having alle drums samples running at double speed and pitching them down I a going to do that.


#11

Just did a bit more testing, this time I took the same drumloop and simply converted it to 8 bit as someone mentioned that speeding/pitching it up X2 was basically the same as making the file 8 bit.

And to be honest I hear pretty much ZERO difference between the original 16 bit file and the 8 bit file. Where there was a noticeable difference on the original 16 bit sample and pitching it up X2.

So there is definitely a difference between loading the files as 8 bit wave into 8 bit tabe and simply jus taking a 16 bit sample and speeding it up X 2 and lading it into a 16 bit table.

The pitched up version has it's own character. 8 bit file sounds pretty much the same as the original.


#12

In sampling, bit depth defines dynamic range, sample rate determines bandwidth.
So, doubling or halving the sample rate is not the same as doubling or halving bit depth.

The bit depth required depends on the dynamic range needed. Depending on material, it should not be surprising that 8 bit is indistinguishable from 16 bit.


#13

Oh yeah, I see I remembered the message from weasel wrongly, it said samplerate not bit depth. So that makes sense.

Yeah that's pretty much what I noticed.

I just made a whole bunch of loops at double speed. I think most of them actually sounds better than at normal speed :slight_smile:

So I guess thats a win win side effect, besides saving sd-ram.


#14

the factual quality loss you experience when reducing either sample rate or bitrate can indeed subjectively sound pleasing, mostly due to historical training - for example people just like the 8bit/12bit "grittyness" of vintage drum machinees or samples, wheere realy it's just a bunch of noise added. or vinyl noise. this could also be said about most other "analog qualities".
so yeah. working on a lower sample rate can totally work. just like addding constant background noise to a full song can sound "good". might work better better or worse on certain sounds/playback speeds. it's a compromise and again all comes down if you are happy with what you hear i guess. and if hey, if ou save RAM it can't be all wrong.

as i said earlier, i do the exact opposite, i pitch down my source material before exporting to axoloti, so i can keep a somewhat high sample rate at extreme playback pitches. uses 4x RAM but 4x less noise :poop:


#15

Yes true there is some "color" there to gain for sure.

I guess that's also why a lot of older samplers that uses lower rates/bits are sought after, there is that "natural coloring" going on, that you don't have to work for :slight_smile:

I knew about it, just never really had a chance to test it or try it in real life, before I did this test.


#16

That sounds like a nice idea. When pitching samples a lot in Axo world the samples to tend to sound not so good. Especially at lower pitch.

I really hope that the new axoboard from Urklang is soon ready to ship, so we can use all the higher quality objects, higher sample rate and so on and still build complex patches :slight_smile:


#17

I'm currently experimenting with an 8 bit table and a samplerate reducer for audio looping in a Basinski style tape degradation looper, based on user 11253's deterioratelooper patch, to add further noise and colour, prior to that I used a bit rate reduction to add different flavours 8bit, 12bit and normal 24bit for clean, I like better to choose to add the bit rate reduction but it's hard to argue with a larger looping time and sdram savings afforded by an 8bit table when the patch itself is embracing the beauty in the noise

deterioratelooper thread