Quantcast
Channel: KVR Audio
Viewing all articles
Browse latest Browse all 2106

Re: Sampler that plays sample from last stopping point

$
0
0
I'm sure this could and has been scripted in Kontakt.
Something like this would do it in Kontakt:

Code:

on init    declare $start_pos := 0    declare $zone_id    $zone_id := get_zone_id(0)    declare $sample_rate    $sample_rate := get_zone_par($zone_id, $ZONE_PAR_SAMPLE_RATE)    declare $sample_length    $sample_length := get_zone_par($zone_id, $ZONE_PAR_SAMPLE_END)    declare $mod_idx    $mod_idx := get_mod_idx(0, "CV_SAMPLESTART")end onon release    $start_pos := get_event_par($EVENT_ID, $EVENT_PAR_PLAY_POS)    set_engine_par($ENGINE_PAR_MOD_TARGET_INTENSITY, int(round(sqrt(real($sample_rate) * real($start_pos) * 1.0e-6  / real($sample_length)) * 1.0e6)), 0, $mod_idx, -1)end on
It's not super accurate, but probably good enough for most use cases.
The script requires you to add a 'Constant' modulator modulating 'Sample Start' and then rename it to CV_SAMPLESTART. Also 'S.Mod' (Sample Start Modulation Range) has to be set to maximum in Kontakt's wave editor.

Statistics: Posted by bluesawsq — Mon Dec 23, 2024 7:00 pm



Viewing all articles
Browse latest Browse all 2106

Trending Articles