Sample Start
-
@Casmat said in Sample Start:
Hey!
How's my favorite forum doing?? I'm trying to add a control on my ui that changes the sample start times in a samplemap. Basically when the knob is turned, the samplestart value in the sampler changes all the samples in the samplemap. Currently I have this:
for(i in sampler0.asSampler().createSelectionFromIndexes(-1)) { //what goes here? };
I found that samples have a .set function, but i tried a couple properties, nothing came up right, any idea how to do this?
Note: Also planning to do the same thing but pitchwise, so what do you think the parameter for that would be? I tried
"pitch"
and"Pitch"
, but I have no clue if the cent value is required...Edit: Tried
i.get("pitch");
in the for loop to get the value format, but i just got the midi note numbersThanks!
OK if you look at the sampler theres a modulation target called Sample Start - open that and add a constant modulator to it... now target that to change the smaple start position(offset)
-
@Lindon feels like it was put there just for me! Thanks!
-
-
-
@Lindon oops, still need help, how do I control the constant modulator. For example I have a knob on my ui, and i've went into the parameters and set the processer id and set the parameter id to intensity, but moving the knob doesnt change the sample start times of the samples. Any ideas?
-
@Casmat said in Sample Start:
@Lindon oops, still need help, how do I control the constant modulator. For example I have a knob on my ui, and i've went into the parameters and set the processer id and set the parameter id to intensity, but moving the knob doesnt change the sample start times of the samples. Any ideas?
you must set the range of sample start in each sample itself... like you set loop points - its the SampleStartMod setting in each zone
-
@Lindon hmmm found the samplestartmod setting, is there no way i can select them all and set them all at once? And i set them, but moving the knob doesnt do anything still. The knob is set to linear with min as 0 and max as 5000. I've set the samplestartmod to go till 5000 and nothing happens with the knob...
Thanks!
-
@Casmat yes just drag across and highlight all the zones, then go to SampleStartMod and type in the value you want, then press enter.
-
@Lindon that’s odd, I dragged and selected but only one zone/rrgroup got modified
-
@Casmat Works here. Did you have all groups visible for editing?
-
@d-healey @Lindon Got it working after re-enabling the enable button! I'm starting to rethink this sample start thing, how would I make it so I have a knob on my ui, which controls the sample start, but based on percentages of the sample time?
For example:
SCENARIO 1:
knob value: 0%
sample 1 length after mod: 1 second length
sample 2 length after mod: 2 seconds lengthSCENARIO 2:
knob value: 50%
sample 1 length after mod: 0.5 Second
sample 2 length after mod: 1 second -
@Casmat said in Sample Start:
@d-healey @Lindon Got it working after re-enabling the enable button! I'm starting to rethink this sample start thing, how would I make it so I have a knob on my ui, which controls the sample start, but based on percentages of the sample time?
For example:
SCENARIO 1:
knob value: 0%
sample 1 length after mod: 1 second length
sample 2 length after mod: 2 seconds lengthSCENARIO 2:
knob value: 50%
sample 1 length after mod: 0.5 Second
sample 2 length after mod: 1 secondConnect your UI knob to your Offset constant modulator
-
@Lindon connected with processer id, put parameter as intensity, and mode as linear. have put my min as 0 and max as 50000 with middle as 25000. However, when the knob is at 0, the samples don't play at the start, i feel like turning the knob does something as the sound slightly changes, but it doesn't feel right. just to reinforce and make sure, by percentage and what I hope to happen is that when the knob is at zero, I want it to be at the very start of the sample, the normal playback, and when the knob is turned all the way up to the max, the start is at the very end of the sample. The middle on the knob represents the middle sample start point of all samples regardless of their sample length, hence the percentages.
-
@Casmat look at the modulator you are using for sample start - it's values are 0 to 1. this is a percentage of the length of the sample - so attach this to a percentage knob in your UI and it should set the start point accordingly, where 1 = start and 0 = end of your offset range
-
@Lindon ahh, yup, makes sense, the values seem flipped such that 100% is 0% and reverse, way to flip without code in parameter settings?
-
@Casmat said in Sample Start:
@Lindon ahh, yup, makes sense, the values seem flipped such that 100% is 0% and reverse, way to flip without code in parameter settings?
-write the code
-
@Lindon darn! Thanks!
-
@Casmat really..?
theSamplerOffsetModulator.setIntensity(1-value);
-
@Lindon as a way to prove my thanks, here's a hise doubloon:
-
I feel another t-shirt coming on...
-
-
-