A question about ”playing” sample loop durations like musical scala-notes

Hello there.

I’ve been trying for a while to figure this out, but has so far been unable to crack it.

What I’d like to be able to do is this:

I press a key on a midi-controller, and a VST sampler automatically shortens/elongates the sample-loop to a duration that corresponds to the wavelength of a note in a musical scale.

…but without pitching the sample itself.

The sampler always triggers at the same pitch, but uses the midi notes to adjust loop-length instead.

So, for example, if I press a low A (A1 = 55Hz), the sampler adjusts the sample-loop duration to apprx. 18.18 milliseconds (one wavelength at 55Hz).

The idea is to be able use the loop lengths as ”synth-oscillators”, where every scale note has a unique (but closely related) wave-shape.

I suppose that, in order it to work, the sample-instrument would need to be highly configurable, and able receive data from two different MIDI controllers at the same time.

One to trig the sampler, and one to adjust loop lengths.

With Ableton’s stock instruments, using two different controllers for the same instrument simultaneously isn’t possible, and there doesn’t appear to be any simple way to convert MIDI note data into loop lenghts precisely.

Does anyone know about software (or hardware) that can be configured to work like this?

Does this technique already have a name?

Any ideas you might have would be most welcome!


1 Like

I’ve never used ableton, but if I had to guess I’d say either to do it in Max 4 Live or in a Reaktor patch. It may have already been done, so I think you’d be best off checking forums for either of those software and asking around there.

1 Like


I’ve been looking through a ton of patches for m4l. Samplers, granular synth/samplers etc, but without finding anything that does what I’m after. It seems to me like Ableton’s “under the hood” functionality is too limited to achive the precision needed.

I’m not familiar with Reaktor at all, so there’ll probably be a steep learning curve if Iwant to understand how it works. But I’ll try looking into it!

The ideal thing (for me) would be a sample instument that’s configurable at the user level. It probably sounds spoiled, but complex programming is mostly beyond my abilites…

I’m not sure I’m understanding the possibilities of this, what would you expect to achieve and why couldn’t you just single cycle waveforms?

The moment that out of a sample of any length you take just a single-cycle, you need to consider that unless you get a perfect zero-crossing, you will get a buzzing sound.

I would suggest to look into single-cycle waveform synthesis (Look at the Adventure Kid pack and the first Octatrack video but any sampler will do) or look into wavetable synthesis, which takes small sections of longer waveforms to use as oscillators, allowing you to scan start/end points and duration.

1 Like

SIngle cycle waveforms are nice, but I already know what they sound like:)

I’m aware of the problem with “jumping to zero”, but consider the “buzzing sound” usable musically.

With simple waveforms, the “size” of the jump matters. Jumping from an extreme position or jumping from relatively close to zero, doesn’t sound the same.

Moreover, if the individual cycle-lengths are mathematically precise, simple fractions of a single full wavelength sample (creating just harmonic intervals), the point from where it “jumps to zero” (longer or shorter jumps) will also be directly (harmonically) related to the original sample.

It’s an idea for a needlessly complex harmonic distorion pedal, basically. And my main reason for wanting one is, first and foremost, that I don’t know what it would sound like:) ha ha!

I’ll go ahead and hard edit a mock up, using a single generated sine wave as source sample, and upload some audio.

I’ll check out the stuff you mention as well. Thanks!

1 Like

This was made using samples derived from one single cycle 44 Hz sine wave (an audio-file generated in SoundForge):

I made a total of five different loop-lenghts, corresponing to this row (pentatonic minor):

1/1 Prime: 44 Hz
32/27 Pythagorean minor 3rd: 52.14 Hz
4/3 Perfect 4th: 58.66 Hz
3/2 Perfect 5th: 66 Hz
16/9 Pythagorean minor 7th: 78.22 Hz

Note that the source sample is never pitched, but that the musical intervals arise solely as a result of the sample loop lengths.

I made a second layer, copying and transposing the same set of samplers up 2 octaves.


I like how it sounds, not sure I understand what is technically going on.

1 Like

OP, Sytrus or Harmor might have a roundabout way of doing something like this, but I cannot emphasize enough how roundabout it may be. In my experience, you can make FL studio and it’s native plugins do anything if you want to badly enough.

1 Like

The recording uses 5 different audio samples.

The first sample (prime) is simply the “source sample” (one single cycle sine wave at 44 Hz ) repeated for apprx. 5 seconds (copy paste in Sound Forge - to create a “held tone”).

The second sample (minor third) was made by taking the same “source sample”, cutting off a bit at the end, and then repeating that (copy/paste) for apprx. 5 seconds as well.

One full cycle at 44 Hz = around 0.0227 second (I’m using rounded off numbers)

To get the right interval (32/27):

44 Hz divided by 27, times 32 = apprx. 52, 14 Hz

52.14 Hz = 0.01917 second (the full length of the second cycle).

So I cut the end of the single cycle sine “source sample”, to reach that length, then copy pasted the result for about 5 seconds (to get a “held tone”).

The other samples were made the same way.

Then I opened each sample in separate samplers (in a drum rack in Ableton), so I could trigger the samples by midi and use volume envelopes.

I used filters to control the buzzing, - and a reverb effect as well.

The major downsides to this method are that it’s slow work, - and that it doesn’t allow me to alter the loop start-point (since the start points are already fixed during sample preparation).

Thanks. I don’t have FL studio, but I’ll check it out.

The biggest problem seems to be finding a sampler that allows you to set the loop length with sufficient precision.

In order to achieve consistent intervals over several octaves, the setting must allow down to at least 0.01 ms, without built in approximation (like in Ableton - where the values “jump” to the closest possible approximation after you enter the value).

I don’t believe Harmor can get below 1 ms response times. At that point, my math has you manipulating segments of 2.2 samples assuming 44.1 sampling rate. TBH this sounds like an undertaking where you’d need to upsample stuff so that you don’t have to round so much (I called 6 decimal places sufficient here, but even that was rounding).

1 Like

Have you tried mapping a macro to the clip bpm, leaving the track bpm alone. Might even be able to map it to a group of buttons for a more chromatic bit?

So basically the sample plays at x original bpm, looping, then the same sample with the clock of a macro plays at 1/2 or *2 the original bpm?

I’m just spit balling but I definitely think midi itself is a bit limited to program in loop lengths, etc. However, you might be able to do some macro stuff. Possibly macro in the adsr. Been a long time since I fucked with macroing a project but I know back when I had my launch pad, you could have a particular grid of the buttons correlate to different percentages. 0-100% and 12 buttons or however many buttons.

I don’t know. I’m just spit balling. Probably more of an experiement than anything.

1 Like

Yes, sample rate is a problem as well, since most samplers don’t accept high resolution formats.

…and the manuals/documentation for VST instruments is often not very detailed about these things. Even “brand name” commercial products often don’t mention loop resolution or supported file formats:-s

For the muck-up, I edited the samples at 96 kHz, - but then had to downsample in order to be able to use the files in Ableton’s samplers.

It’s possible that handcrafting each loop/note is the only way, - but Im not giving up just yet:)


I love the idea of manipulating loop lengths via clip BPM, - although I can’t get my head around how to make it work for this idea right now.

I’ll try it out later, though, see what happens:) Thanks!

Yea may lead somewhere, may not. Hopefully it’s be macroable thing.

If it at least works as a macro inside the clip, may lead to something neat, hopefully, even if not what you’re looking for.

I actually want to see what it does now. Hurry up work.

Automating the “segment tempo” in ableton clips doesn’t seem to be possible.

The master tempo can be automated via m4l, but since this is global, it would make recording and synching with other tracks next to impossible.

Finding a VST sampler that can handle high resolution samples precisely has been surpisingly hard. I realise it would be CPU heavy, of course, but as a precision sound design tool it would make perfect sense.

Too many toys and not enough tools. I’ll keep looking, though. Thanks.

Just to post an update on this.

My experiements with existing commercial samplers hasn’t turned up anything useful, although I did find plenty of other interesting stuff.

So, at this point I’ve basically spent too much time on looking for readymade solutions, and not enough on making music, so I’ve decided to simply use the workaround I did for the mockup (up-sample/edit every sample manually), even though it’s clunky.

Perhaps sometime in the future, computers will be able to handle much larger sample-rates, making precise time-based granular sampling a commercially available feature.

I guess we’ll have to wait and see.

PS: If anyone is interested in weird hand-made samples, I don’t mind sharing.