Last active
August 3, 2018 18:27
-
-
Save henrikj242/0d24905f2d07f63b0c643d65df685720 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
This code is for the Native Instruments Kontakt sampler v4 or above. | |
It may assist in converting between the ksp-specific range (0 - 1_000_000) and decibel (as used to set the volume for groups). | |
I've also published a list of some values between 100_000 and 1_000_000 in steps of 10_000: | |
https://docs.google.com/spreadsheets/d/1JmXV9E0mrHkd7ZTm2n1LCRxZPhiueFGVP4dtLR6U04Y | |
} | |
on init | |
declare ui_knob $Volume (100000, 1000000, 1) | |
set_knob_unit ($Volume,$KNOB_UNIT_DB) | |
$Volume := 100000 | |
{ ui_text_edit requires Kontakt 5. It allows copy pasting, but has some other limitations } | |
{ declare ui_text_edit @log } | |
declare @msg | |
declare ui_label $log(2, 4) | |
set_text($log, "") | |
while($Volume < 1000000) | |
set_engine_par($ENGINE_PAR_VOLUME,$Volume,-1,-1,-1) | |
@msg := $Volume & ": " & get_engine_par_disp ($ENGINE_PAR_VOLUME,-1,-1,-1) | |
add_text_line($log, @msg) | |
$Volume := $Volume + 10000 | |
end while | |
end on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment