NI Kontakt- Timemachine pro and bpm changes...

Sampler and Sampling discussion (techniques, tips and tricks, etc.)
Post Reply New Topic
RELATED
PRODUCTS

Post

hey,

I think timemachine pro does a pretty good job in Kontakt if I have f.e. a guitar loop and
I change the tempo in my host...if changes aren`t too big it will sound pretty realistic.
I thought it would sound even better though if Kontakt would use a different
sample groups DEPENDEND on Tempo changes..like this

sample1 recorded at 60 bpm -> Kontakt uses for tempo 50 - 99bpm
sample 2 recoded at 110 bpm -> Kontakt uses this for tempo 100 - 150bpm

etc.

is this only possibly by scripting?

thanks!
forw

Post

Yes, you gotta script it.

Post

ok, thanks for the superfast reply :)

Post

How can I make Kontakt constantly check
host bpm? If it executes this it will only check the
tempo once:

on init
declare ui_label $bpm(1,1)
set_text($bpm,ms_to_ticks(60000000)/960)
end on

I guess it has to do with "listener callback" but
couldn`t figure out..
thanks alot if anybody can help me out!

forw

Post

Code: Select all

on init
	declare ui_label $bpm(1,1)
	declare $keep_checking
end on

on persistence_changed
	while ($keep_checking =0)
		set_text($bpm,ms_to_ticks(60000000)/960)
		wait(ticks_to_ms(240))
	end while
end on
There, checking tempo every 240 ticks.

Post

cool! THANKS ALOT, zombie queen!!

:)

Are there any reasons against lowering the 240 ticks?

Post

No. Make it one tick, if you like. Or you can specify interval in microseconds, but I think it would be pointless to go below one tick.

Post

Listener callback is a better solution than an endless while loop in persistence_changed. Run it at 24 ticks per quarter, it will suffice. Honestly. persistence_changed is not made to run all the time in the background, it was made for post-init function calls and refreshing things after a snapshot is loaded. DO NOT use it for anything else, it is not bulletproof for use-cases it was not intended for.

Code: Select all

on init
    declare $BPM
    set_listener_par($NI_SIGNAL_TIMER_BEAT,24)
end on

on listener
    if ($NI_SIGNAL_TYPE = $NI_SIGNAL_TIMER_BEAT)
        if (60000000 + $DURATION_QUARTER / 2) / $DURATION_QUARTER # $BPM)
            $BPM := (60000000 + $DURATION_QUARTER / 2) / $DURATION_QUARTER

            { do other stuff if necessary }
        end if
    end if
end on

Post

EvilDragon wrote:DO NOT use it for anything else, it is not bulletproof for use-cases it was not intended for.
Could you elaborate? What is the pitfall of using persistance_changed to run a loop?

Post

I just got word from NI themselves that it is not advised since certain scenarios could hang Kontakt or make it behave unpredictably. It might end up in KSP reference eventually.

Anyways, for any tempo stuff, use listener, not persistence changed. Persistence changed is there solely for things that I mentioned above.

Post

THANKS ALOT, EvilDragon!! :tu:
much appreciated..

forw

Post Reply

Return to “Samplers, Sampling & Sample Libraries”