# Can`t get GUI-Generator to work



## Cosmonomad (Jan 21, 2011)

*First i want to say a friendly "Hi!" to everybody, cause i am new here*.
I found this Place when i searched for Solutions to the KSP.

As a Musician i soon found out that KONTAKT "Is the one!" (IMHO) But: In german School i had (1 is best, 6 is badest):

*Grade in Music = 1
Grade in Mathematics = 5 *





So... somehow the KSP is a little similar like Mathematics for me. I really *LIKE* to learn it, but i *CAN`T soooo easy*.
Specially because my English is a little limited... when it comes to technical Issues.

Anyway: 
*I wanted to say "Hi!".... cause i got a big, huge Smile in my Face when i read through many Threads here.
Felt like i found my "2nd Home" here.
You People handle everybody very nice and friendly... you People have Knowledge...
and ....like to SHARE IT (which is NOT usual!!!)*

If you don`t mind, i would like to ask my Question now, that costs me lots of grey Hairs in the last Nights 
(YES! I can work the whole Night until the sun comes up... when i have a Thing that i really like to learn).
I found this GUI-Generator... and worked everything like the Manual said.
*My Problem:
When i paste the compiled Code into KONTAKTs Script-Editor.... it appears!
BUT: None of the Knobs can be MOVED!*

Companeros, believe me: 
I tried hundrets of variations through the Night... i always ended up with visible Knobs... *that does NOT MOVE!
*
Now i thought it might be a good Idea to write to the Support of Musikbits.com.
To explain my Problem better i did Screenshots from every single step i did... and made a PDF out of it. I sended it to 
a Guy called Ken.... but this is not that long ago, so i have to wait for his Reaction.

But if YOU ALL be so kind and would like to have a Look at the PDF... here is the Link to it:

http://www.cosmonomads.com/CNI/SS.pdf
It loads real fast... 1 MB small.

I can imagine that you all fall onto the Floor and laugh as hell, when you find my Mistakes. Thats OK!
I am a bloody Beginner.... and those People do the the most ridiculous things, i know (myself)!
BUT: 
*Would be sooo cool if you give me a Hint. Cause: When i got it in the end.... i have arrived where i wanted to go:
Making Knobs and Button FOR MY NEEDS that WORK.*
I already DID some fine Instruments... i can map... i can sample real Instruments... but:
i want to learn how to give them the needed UI.

In this very Moment its sooo unsatisfying.... to take other scripts (for Example: A Script with a Reverb and a Delay-Button, 
and other things) and re-write it... by deleting this n that... and get my desired UI more accidentally. :twisted: 

OK..... my first *little "Hi and Hello!"* was the Opposite: *Much too much text.*





*The Lord knows....I am very "SORRY!" for that!*
Usually i write not that much. But... you might see on this Text, how BIG this Problem is for me.
You may know it from *YOUR *Beginning: *You rreally LOVE that Program... but you`re sad cause you can not go on.*

*Thank you, Thank you, Thank you....*
Greetz from cold Germany,





*Cosmo*


----------



## gh (Jan 21, 2011)

Hello Reiner!

The reason why it doesn't work as expected is the "Max.Value" you have used.
The min. and max. values are not %-values! The range for a knob is 0 to 1000000.
You have to enter 1000000 for the max. value to cover the full range.

If you want the knob to show the correct value you will have to add a line:

on ui_control($K0)
set_engine_par($ENGINE_PAR_CH_PHASE,$K0,-1,0,1)
set_knob_label($K0,get_engine_par_disp($ENGINE_PAR_CH_PHASE,-1,0,1))
end on

gh


----------



## Cosmonomad (Jan 21, 2011)

*Hello GH!*
FIRST: A BIG, BIG THANK YOU for helping me!
Its a fine thing to feel not alone anymore.
OK....I did exactly what you told me.... added
the Line that you provided.
*Then the Script looked like THIS:*
_____________________________

on init
{Start of GUI Generator on init definitions}
set_ui_height_px(150)
make_perfview
message("")
declare $count := 0
declare ui_knob $K0(0,1000000,1)
set_knob_unit($K0,$KNOB_UNIT_DB)
set_knob_defval ($K0,500000)
set_text($K0,"Chorus")
move_control_px($K0,477,39)
{End of GUI Generator on init definitions}
end on
on ui_control($K0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$K0,-1,-1,-1)
set_engine_par($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$K0,-1,-1,-1)
set_engine_par($ENGINE_PAR_CH_DEPTH,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_CH_SPEED,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_FL_PHASE,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_CH_PHASE,$K0,-1,0,1)
end on

on ui_control($K0)
set_engine_par($ENGINE_PAR_CH_PHASE,$K0,-1,0,1)
set_knob_label($K0,get_engine_par_disp($ENGINE_PAR_CH_PHASE,-1,0,1))
end on
_______________________________________

*well....cooooool!!!! Worked! Happy Guy Reiner!* :D 
*BUT: *
The Knob that is moving is the Phase-Knob of the Chorus!
What have i to do to move the DEPTH-Knob?????? 
Cause Depth of Chorus is more usable for my needs.
*Thanx in advance!*

Btw:
*Now i tried on my own...*
to ADD a Delay to the existing Chorus...with the same 
command you provided!
*THAT... looked like this now:*
_______________________________________

on init
{Start of GUI Generator on init definitions}
set_ui_height_px(180)
make_perfview
message("") 
declare $count := 0
declare ui_knob $K0(0,1000000,1)
set_knob_unit($K0,$KNOB_UNIT_DB)
set_knob_defval ($K0,500000)
set_text($K0,"Chorus")
move_control_px($K0,477,39)
declare ui_knob $K1(0,1000000,1)
set_knob_unit($K1,$KNOB_UNIT_MS)
set_knob_defval ($K1,500000)
set_text($K1,"Delay")
move_control_px($K1,356,39)
{End of GUI Generator on init definitions}
end on
on ui_control($K0)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$K0,-1,-1,-1)
set_engine_par($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$K0,-1,-1,-1)
set_engine_par($ENGINE_PAR_CH_DEPTH,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_CH_SPEED,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_FL_PHASE,$K0,-1,0,1)
set_engine_par($ENGINE_PAR_CH_PHASE,$K0,-1,0,1)
end on
on ui_control($K1)
set_engine_par($ENGINE_PAR_EFFECT_BYPASS,$K1,-1,-1,-1)
set_engine_par($ENGINE_PAR_INSERT_EFFECT_OUTPUT_GAIN,$K1,-1,-1,-1)
set_engine_par($ENGINE_PAR_DL_TIME,$K1,-1,1,1)
set_engine_par($ENGINE_PAR_DL_DAMPING,$K1,-1,1,1)
set_engine_par($ENGINE_PAR_DL_PAN,$K1,-1,1,1)
set_engine_par($ENGINE_PAR_DL_FEEDBACK,$K1,-1,1,1)
end on

on ui_control($K0)
set_engine_par($ENGINE_PAR_CH_PHASE,$K0,-1,0,1)
set_knob_label($K0,get_engine_par_disp($ENGINE_PAR_CH_PHASE,-1,0,1))
end on 
_________________________________________
*WORKED TOO, But:*
The Chorus does the same as BEFORE....
But the Delay???
All FOUR Knobs move simultanious!!!!! What have i to do that only
the FEEDBACK-Knob moves????????

*Many Many Thanks to you.... GH*
a real happy Reiner 
(cause its going ON now. No more guessing and tapping like blind in the Night)


----------



## Cosmonomad (Jan 21, 2011)

*Thank you TOO, kb123!!!!!*

You know (and may be you can imagine?):
*THIS*... is all that *NEW *to me.... and really complex...

Lines that are absolutly NORMAL and easy for YOU (cause you deal with them every day over a long time, i think)...giving ME Headaches.
But as i wrote above:

*I am W.I.L.L.I.N.G. to Learn!!!!*
So i am on my Road now.

Thanx again, and: I hope i will NOT bore you if i come up with some MORE Questions!?!?
*Greetz, Reiner*
PS:
How do i know which Unit is for which Effect???
I mean: DB is for what? and: how many? allways 1000000????
Is there a Source (except the N.I.-KSP-RG) where one can get all those Values explained?

That would be wonderful.
The "Kontakt explained" by Grooves3 is not a Source for Scripting.
And all the "musical" Rest i can do in Kontakt.

In this very moment i use thew Custom-Name -Function, cause i don`t know where to put the Name coreect:
There is that "Variable Name" named $K0.
Have i to add the name like this: $K0Delay.... or do i have to type: $Delay???
Thanx again.... :roll:


----------

