# Can somebody replicate this problem I see with Euro Reakt Stereo Sample Looper?

Member Posts: 7 Member

I think there's a bug in this object. This is in Euro Reakt 4.3, in the samplers section the object called "Stereo Sample Looper".

When I drop a sample into it, it begins playing as expected. When the play head reaches the center of the sample window, there's a slight increase in pitch. So the left half of the sample plays at a lower pitch than the right half.

You can find Euro Reakt in the user library. You can download it, and then just open the file "Stereo Sample Looper.ism" to test.

I just need to know if this is a bug in the instrument, or if I'm doing something stupid.

I'm using Reaktor 6.4.3 on MacOS Catalina.

• Member Posts: 555 Guru

Is it a long sample?

I had a look, I have a very old version of Euro Reakt, so it might be updated, but afaikt, all the processing in this Block is 32bit. This can cause problems with long samples. There just aren't enough bits to accurately update the position.

In the case of this Block, everything is scaled so that the start of the sample is position 0 and the end is 1. each audio clock tick, a step value is added to the current position. So with a long sample - like a 4 minute song - the step value is tiny with respect to e.g the position at half way

4 minutes at 44100Hz is 10584000 samples, so the audio clock step increment would be the reciprocal = 9.448223733938e-8

A tiny number!

32bit floats are accurate to 7 decimal digits

imagine the song position is at 0.5, 9.44822e-8 is 0.0000000944822 (I think that right?), adding that to 0.5 would be 0.5000000944822, but we can only handle 7 significant digits to it will be rounded (or truncated?)) to 0.5000001... we lost most of the position information...

Early on, when the song position is e.g. 0.0001, we'd get 0.0001000945 so not too bad

then after a while, say 0.003, we'd get 0.003000094, not great, but still maybe ok... but by the time we get to 0.03 we would start to lose pitch and timing accuracy, and that's only a few seconds into our hypothetical 4 minute song!

Short sample will work just fine because the step value is much larger, so there is no numerical mismatch.

What to do?

Fortunately it's an easy fix. Go into edit mode. In structure view, double click on the Block to go into its structure, then double click on the core cell called 'Process'. Now click on the background of the structure, and look at its properties pane on the left. Under the function tab, you should see 'signal type'. It will be 32bit or default, change it to 64 bit.

Now save the Block as an instrument - give it a different name rather than overwriting the original, or make a backup of the original.

• Member Posts: 7 Member

Wow, thanks so much! That did the trick, and I never would have found this simple solution.

• Member Posts: 555 Guru

Is it a long sample?

I had a look, I have a very old version of Euro Reakt, so it might be updated, but afaikt, all the processing in this Block is 32bit. This can cause problems with long samples. There just aren't enough bits to accurately update the position.

In the case of this Block, everything is scaled so that the start of the sample is position 0 and the end is 1. each audio clock tick, a step value is added to the current position. So with a long sample - like a 4 minute song - the step value is tiny with respect to e.g the position at half way

4 minutes at 44100Hz is 10584000 samples, so the audio clock step increment would be the reciprocal = 9.448223733938e-8

A tiny number!

32bit floats are accurate to 7 decimal digits

imagine the song position is at 0.5, 9.44822e-8 is 0.0000000944822 (I think that right?), adding that to 0.5 would be 0.5000000944822, but we can only handle 7 significant digits to it will be rounded (or truncated?)) to 0.5000001... we lost most of the position information...

Early on, when the song position is e.g. 0.0001, we'd get 0.0001000945 so not too bad

then after a while, say 0.003, we'd get 0.003000094, not great, but still maybe ok... but by the time we get to 0.03 we would start to lose pitch and timing accuracy, and that's only a few seconds into our hypothetical 4 minute song!

Short sample will work just fine because the step value is much larger, so there is no numerical mismatch.

What to do?

Fortunately it's an easy fix. Go into edit mode. In structure view, double click on the Block to go into its structure, then double click on the core cell called 'Process'. Now click on the background of the structure, and look at its properties pane on the left. Under the function tab, you should see 'signal type'. It will be 32bit or default, change it to 64 bit.

Now save the Block as an instrument - give it a different name rather than overwriting the original, or make a backup of the original.

• Member Posts: 7 Member

Wow, thanks so much! That did the trick, and I never would have found this simple solution.

• Member Posts: 7 Member

My sample is 38 seconds long. This looper is probably overkill for what I want, as I only need it to play at normal speed, in the forward direction.

• Member Posts: 555 Guru

There are some Factory components, but to create something simple you 'd need to use macro level components and there's a bit more setup going that way. Most ready made instruments and Blocks are somewhat more complicated because 'features'!

And you're still likely to find the same type of problem, because mostly folk are using short samples, at most a 4 bar drum loop, and in that context the 32bit precision issue is not so noticeable.

I guess it's a case of finding something that works, or rolling your own ;). I think there was a thread on the old forum about using the table framework to build a basic sample player... you might be able to find that on archive.org. I really don't have the motivation to start recreating it from scratch :)