How to control sample start time with the audio loop player?
-
- So im making my second vst, and I have this audio file - its the only one I'll be using,
to do a bunch of things with. I want the ability to only play a section of that and loop it. I got some ideas about how to do this via modulating a start time property of the audio loop player, only to find the only one that exists is "Random start time."
I don't think it makes sense to use a sampler when I only have the one short audio file.
Also, I tried using the sampler and couldn't really figure out a way to do what I wanted anywho.I know there has got to be a way to do this.
Any ideas?
- So im making my second vst, and I have this audio file - its the only one I'll be using,
-
@Quemis said in How to control sample start time with the audio loop player?:
I don't think it makes sense to use a sampler when I only have the one short audio file.
Also, I tried using the sampler and couldn't really figure out a way to do what I wanted anywho.put a constant in the sample start modulation slots and use that - it will map its 0-1 values to 0-100% if the sample length...
-
@Lindon 's answer is definitely the easier option. But just for some further information, in case you want to go down the scripting route, you can read about the AudioSampleProcessor API and the list of available functions.
So reference the Audio Looper as an AudioSampleProcessor:
const var AudioLoopPlayer1 = Synth.getAudioSampleProcessor("Audio Loop Player1");That gives you access to this API and you can use
Audiofile.SampleRange(int startSample, int endSample);to adjust the start position. It will also give you a lot more control over the Audio Looper. -
I always have a problem with constants!
Knobs wont point at them, macros wont point at them. They are so confusing.
Usually I use the autolink thing, and point a dummy knob at it, and then point my actual knob at the dummy knob.. very confusing.I figured out how to use the sampler it turns out anyway.
Thank you both for your help though! <3
And in the future I will for sure use those scripts HISEnberg!