# Can the sample start time be adjusted using a MIDI CC?



## PaulWood (Mar 4, 2009)

Hi guys,

As the subject says really... Is it possible to adjust the sample start offset using a MIDI CC (either incrementally or "snap to" a certain point)?

Thanks,

Paul


----------



## oldbrian (Mar 4, 2009)

Switch to Sampler mode, add a new Modulation source for the necessary group, select external, midi cc and set the destination to Sample Start.


----------



## PaulWood (Mar 4, 2009)

Thank you!


----------



## kotori (Mar 15, 2009)

Ned Bouhalassa @ Sun Mar 15 said:


> Oh great! :roll: Bad news for me. I have to devote 90% of my time to composing these days, so forget this level of programming. What a bummer that you can't just select-all and adjust-all zones.
> 
> Thanks for the info, Nils.



Yes, it's very unfortunate that one cannot adjust a parameter for multiple zones at once. Another solution could be to use my http://nilsliberg.se/ksp/tools/SampleStartOffset/ (SampleOffsetTool) which I have now extended to support not only the sample start but also the modulation range. Since it's a UI automation tool please be careful if you use it.


----------



## Ned Bouhalassa (Mar 15, 2009)

Wow, looks like a very useful tool, Nils - too bad I'm Mac-exclusive.


----------



## Cinemascore (Mar 16, 2009)

Please be aware - with LOOPED samples - setting the sample start mod points too close to the loop start causes the subsequent playback to studder/click/generally misbehave around the the loop point area of playback. To alleviate, distance the sample mod pointer further away from the loop start point will eventually make this go away (I found about a second gap between the two points to be the most comfortable, sometimes I can get away with it a little closer - just have to try each one). I've replicated the 'bug' on three machines (Win only - don't know if it affects the Mac version) running the latest K3. Reported it to N.I. as a bug and they have asked for more info and samples, which I've since provided.


----------



## Big Bob (Mar 16, 2009)

> Yes, it's very unfortunate that one cannot adjust a parameter for multiple zones at once. Another solution could be to use my SampleOffsetTool which I have now extended to support not only the sample start but also the modulation range. Since it's a UI automation tool please be careful if you use it.



Hey Nils,

I downloaded this but it won't install. There is an error message saying that the setup files are corrupted. Could you please check the download?

Bob


----------



## kotori (Mar 17, 2009)

Big Bob @ Tue Mar 17 said:


> I downloaded this but it won't install. There is an error message saying that the setup files are corrupted. Could you please check the download?


Works fine here. Maybe there was some problem with the download. Please try to clear the browser cache and download the file again.


----------



## Fernando Warez (Mar 17, 2009)

kotori @ Sun Mar 15 said:


> Ned Bouhalassa @ Sun Mar 15 said:
> 
> 
> > I'm trying to modulate the start point with CC1 while in DFD mode. There are two possible destinations for modulation: pitch and start point. I have no problem getting pitch to modulate, but I can't for the life of me get the start point modulating, even though it's offered in DFD mode. Is this a bug? Can anyone confirm that they _can_ modulate the start point in DFD mode, and if so, what did you do? I don't want to resort to Sampler mode because I have many instruments loaded and therefore prefer to stream.
> ...



Can you, or anyone else, tell me how to do this? I really have no idea how to do this and I'd rather do it directly in K3. 

I seem to remember Bob talking about this i while back.


----------



## kotori (Mar 17, 2009)

Fernando Warez @ Tue Mar 17 said:


> Can you, or anyone else, tell me how to do this? I really have no idea how to do this and I'd rather do it directly in K3.



First you need to set the Sample Start Modulation Range (S.Mod), it's a setting which is set per zone (i.e. sample), see for example http://www.soundonsound.com/sos/jan08/images/NIKontakt3_04_l.jpg (this image) - at the top you have fields for Sample, S.Start and _*S.Mod*_.

Then you add a modulator in the Source section of your group(s) that modulates "sample start" (press the Mod button to expand the list of modulators). I hope this helps.


----------



## Fernando Warez (Mar 17, 2009)

Ok, i think i found the thread i was talking about.

http://vi-control.net/forum/viewtopic.p ... highlight=

I''ll reed it and see if the info I'm looking for is in there.


----------



## Fernando Warez (Mar 17, 2009)

kotori @ Tue Mar 17 said:


> Fernando Warez @ Tue Mar 17 said:
> 
> 
> > Can you, or anyone else, tell me how to do this? I really have no idea how to do this and I'd rather do it directly in K3.
> ...



Ooops! I missed that! Yea, i finally found the S.Mod parameter. 



> Then you add a modulator in the Source section of your group(s) that modulates "sample start" (press the Mod button to expand the list of modulators). I hope this helps.



So then it's just like in sampler mode? Meaning you add a constant mod in the source module and set it to what ever value? I suppose the same value as S.Mod.

BTW, my instrument has a fix constant value of 5.8%(in sampler mode) so i guess that would translate to 5800 in S.Mod? That inst. use close to 500 mb of ram so i would really like to pull this off.

Cheers.


----------



## Fernando Warez (Mar 17, 2009)

Well either my 5800 figure is wrong or I'm not doing it right as the attack is not the same at all as the one in sampler mode.

I'm going to try a different # but I'll delete a few zone to test it first!


----------



## Pzy-Clone (Mar 17, 2009)

hey.

I dont realy know this at all, but i would imagine that in order to get the same result as in sampler mode, you would need to set the S.mod range to cover the entire lenght of the sample, beginning at the very start of the sample?

if you set a offset to the S.mod range, then add another 5.8% constant offset , you will probably get an offset on the offset, as it were. (5.8% constant offset within the S.mod RANGE u just specified...)

And in any event, the constant source modulation uses a % parameter setting, and the sample editor is measured in MS, right?
So i dont think your equation is quite right...

But i might be very wrong on this...i usualy am


----------



## Fernando Warez (Mar 17, 2009)

Pzy-Clone @ Tue Mar 17 said:


> hey.
> 
> I dont realy know this at all, but i would imagine that in order to get the same result as in sampler mode, you would need to set the S.mod range to cover the entire lenght of the sample, beginning at the very start of the sample?
> 
> ...



Hehe! I think you may be right. I tried it and it's very close. And it's much faster to setup. lol... I think the difference I'm hearing is due to a layer i deleted. 

Cheers!


----------



## Fernando Warez (Mar 17, 2009)

The only problem is that i hardly save any ram at all
that way.


----------



## Pzy-Clone (Mar 17, 2009)

huh?
you need to set it to DFD mode offcourse...

Then, set the S.mod range to cover the Entire sample(s).
The 5.8% will be reletive the S.mod selection, so offcourse...5.8 percent is depending on the range you set...if the s.mod covers the enitre sample, the percentage is equal to that in sampler mode. ( i think....)

You should save bundles of RAM when setting the groups to DFD instead of Sampler mode. 500MB should be reduced to a 5-6 MB or so, depending on your settings.


----------



## Fernando Warez (Mar 17, 2009)

Big Bob @ Tue Mar 17 said:


> > BTW, my instrument has a fix constant value of 5.8%(in sampler mode) so i guess that would translate to 5800 in *S.Mod*? That inst. use close to 500 mb of ram so i would really like to pull this off.
> 
> 
> 
> I'm not sure I'm following why you would want to set S.Mod to 5800 because you were using a 5.8% constant offset :?



You"re confuse? That"s normal! :lol: That obviously because i didn't get it...





> Why not look at it this way, determine the maximum time, *t*, you want to be able to offset the sample start by (in secs). Multiply* t* by the sample rate,* f*, in samples per second (ie 44.1K or whatever the instrument is sampled at). So, if you want to be able to offset the start by 250ms = 0.25 seconds and the instrument is sampled at 44.1KHz, the max number of samples that need to be offset is *t*f* = 11,025 samples. This then would be the number of samples you need to set *S.Mod *to (for each zone to be offset).
> 
> Now when you assign a CC as a sample-start modulator (assuming you set the intensity slider to 100%), when the CC is pushed to max (127), the sample-start offset will become 0.25 secs. When the CC is pushed to midway (64), the offset will become 0.125 secs, etc. At least that's how I vaguely remember that it works :lol:
> 
> To get an idea of how much additional RAM the preload will occupy, multiply 11,025 by the number of zones (and by another factor of 2 if the samples are stereo). Then multiply that by 2 for 16 bit or 3 for 24 bit sample precision and you will have roughly the number of RAM bytes needed for the preload. If you know the number of bytes used in DFD mode before you edited the S.Mod values, you can subtract that and you will have the increase required to accomodate the dynamic offset in DFD mode.



Don't go all mathematics on me now! Cause i don't know how that works either! :lol: 

Seriously, i think i got it now. First, I've changed my constant settings from 5.8 to 3.4% because it sounds better that way. I did this in sampler mode of course. Then, in DFD mode, I've set each zone to 34000(S.mod) and set the constant to 100%. I have no CC assign so it's fix at 100%. I compared both instruments and it sounds the same. Does that make sense? I know it works here.

Thanks a lot for you explanation, Bob. I'll look into it.

One word of advise(if you can believe it? :lol: ), is to not use the ram save function as when you try to reload all samples, it loads the instrument with out the preload buffer thing.. what ever that's called. Basically, it loads the instrument in DFD mode without taking into account the offset settings. So then you have to reload the instrument to fix this.

BTW, I've saved 400= mb! o=< 

Cheers! :mrgreen:


----------



## Pzy-Clone (Mar 17, 2009)

aha... i see.
But then it would be right to say that sample offset doesnt realy "work" in DFD mode, as it has to load the S.mod range into ram as well...?

But thats supposed to change in K3.5, right?
AT least thats what i have been told...


----------



## Big Bob (Mar 18, 2009)

> But thats supposed to change in K3.5, right?
> AT least thats what i have been told...



Considering the physics of the situation, I wouldn't count on it :lol:


----------

