KSP - How to express a decimal point

VST, AU, AAX, CLAP, etc. Plugin Virtual Instruments Discussion
Post Reply New Topic
RELATED
PRODUCTS
Kontakt

Post

Hi

I have noticed that I cannot express values with decimals on a script for Kontakt, something like $val := 1.5

So how do I express this?
set_engine_par($ENGINE_PAR_VOLUME,$val / 1.5,-1,-1,-1)

I also tried:
set_engine_par($ENGINE_PAR_VOLUME,$val / (3/2) ,-1,-1,-1)
but i don't get the right result.

Post

A while since I used KSP but does it actually handle floats now? It never used to. Big Bob's library was useful for the maths stuff and required scaling to represent (pseudo)floats.

I could be wrong about this though :(

Post

Thanks for the quick reply resynthesis. I was looking for the library last night at his website but I got a "Dropbox -404 - file no found message". I did a search now again and I found it on vi-control, here's the link:
https://dl.dropboxusercontent.com/u/804 ... thPack.zip

Anyway, so far I have no idea of how it works.

Post

Since Kontakt 5.6 KSP can handle floating point numbers. However, for engine parameters you still need to use integers (0-1000000), so you gotta use real_to_int() to cast your FP calculation into int. See KSP reference.

Post

:tu:

Post Reply

Return to “Instruments”