Problem with every sampler.

Actually my Tape Recorder does pretty much the same, on Tape Recoder you can grab a reel with the mouse for doing weird scratch effects. I don’t think resampling based on interpolation would make a big difference here.

could be. on the other hand, the wierd inharmonic tones generated by low quality interpolation are pretty easy to hear, even to my old ears which are pretty shot. So, sure you grab the reel and speed it up, maybe you don’t hear those tones going down in pitch when everything else it going up. Just for the comfort of knowing I’m not getting those funny noises, I’d probably pick a sampler with a better interpolator, but that’s just me. Here’s the output of a sampler with a pure sine wave file, speed changed, played from a sampler with a drop/repeat interpolator, fwiw:


I’ll check it out. Even if it can’t resample it’s good if it can just play back the audio file as recorded, at the same samplerate.

That would be awesome!. Hope you’ll do it…


Just a couple of thoughts… If one were to make a sampler / player that works much better when the sample rates match and no shifting is applied, then I think a great feature would be an LED on the panel that told you if this were happening.

FWIW, I have found (in the 90’s?) that no interpolation (what I call drop/repeat) usually adds a lot of weird tones and noises that are pretty easy to hear. But even simple linear interpolation is much, much closer to “the truth”. DSP ppl consider linear interpolation “a joke”, but as long as your wave doesn’t have a ton of super high frequency energy is works pretty well. I always use a cubic polynomial for the reasons a lot of ppl do: it’s no harder than linear interpolation and it measures better.

Of course a “real” audio player, like whatever you use for listening to music, will usually have a “very good” interpolator in it - often a polyphase FIR filter.

I really like the 7 Seas approach where you can control the quality to make your own trade-off for CPU usage vs quality.


doesn’t appear to have been back yet

A long time ago I had an Ensoniq Mirage sampler, very charming machine, but that uses drop/repeat samples (at 32kHz) and it sounds very very rough…

I grew up with the Amiga, and its sound chip also does repeat samples but it does it at Mhz-rate (with a single pole low-pass-filter after), so it has a special sound (still rough though) (

Most hardware-samplers (still today) use linear interpolation,at their native sample-rate (often 44 or 48kHz) since it’s a great bang-for-the-buck, but you will definitely hear a low-pass (tiny boxcar style) filter effect of the playback.

1 Like

As well as some interpolation noise. But totally acceptable in many cases. Btw, hardware samplers still exist?

In addition to having had an Ensoniq Mirage sampler, I also still have a Kurzweil K2000RS rack mounted sampler. But…, it is not embedded in my studio any longer.

1 Like

Btw, hardware samplers still exist?

I actually had the electribe 2 sampler for a short while… but sold it after being put off by the obvious low pass effect… (of just sampling and playing back)

My first sampler was an Ensoniq EPS. If you wiggled the sample start and end positions just right, you could get it to freak out. :man_dancing:

1 Like

An easter-egg feature for one of your samplers, perhaps?

Yes, you’re right. Even just linear interpolation makes a huge audible differenz, at least on pure sine waves.

Implementing linear interpolation is quite simple. Just call rack::math::crossfade() or rack::simd::crossfade() for multitrack samples.

It’s simple as long as you always have the right two samples in memory. That’s why I say cubic is just was easy. The hard part is having the right 4 samples in memory.

1 Like

Influenced by this thread, I’m starting to add linear interpolation to all of my modules. I think that it’s working? I’m starting with the looper module. I’ve added an option to select which interpolation to use, and I hope to add more options as I learn more about them.

My question is: I can’t really hear the difference. Is there some easy way that I can tell if it’s working?


Just for fun, here’s my code:

  void readLI(double position, float *left_audio_ptr, float *right_audio_ptr)
    unsigned int index = std::floor(position); // convert float to int

    // If out of bounds, return zeros
    if((index >= (left_buffer.size() - 1)) || ((index >= right_buffer.size() - 1)))
      *left_audio_ptr = 0;
      *right_audio_ptr = 0;
    // Else, compute and return the interpolated values
      float distance = position - (float) index;
      *left_audio_ptr = left_buffer[index] + ((left_buffer[index + 1] - left_buffer[index]) * distance);
      *right_audio_ptr = right_buffer[index] + ((right_buffer[index + 1] - right_buffer[index]) * distance);

If you look up higher in this thread you can see a plot where I did this. Take a wave file of a pure sine at a reasonably high pitch, then transpose it a little until you see all the tones that aren’t supposed to be there pop in.

btw, It seem a couple of ppl were influenced by this thread. It would be great to be credited by name for contributing good ideas.

1 Like

I used a 2 kHz sine wave for testing purpose, and the audible difference was incredible.

My apologies. I didn’t mean to be rude. Thank you Squinky, Ahornberg, augment, jnorberg, k-chaffin, ablaut, LarsBjerregaard, Eurikon, synthi, pachde, and wacheski. If I don’t show my appreciation in the future, please understand that I always appreciate your help and ideas.


I’m sorry for hijacking the posting, but I wanted to follow up and thank you all again. Ahornberg’s suggestion of using a 2 kHz sine wav, mixed with Squinky’s suggestion of transposing seems to have worked.

When I mismatched the sine wav’s frequency with rack’s frequency, I was able to observe the effectiveness of the linear interpolation. Pretty cool stuff!


Ok, that took longer than expected… but it’s finally done… please check it out here:


Awesome, thanks! Looking forward to trying it out asap…

1 Like