-
Is there a limit of 999 sliders?
I have been trying to troubleshoot why I get an unexpected 'control X was not declared or variable is no control' error, and I wonder if I haven't found the culprit. The issue seems to resolve itself when I reduce the number of sliders in my script to 999 or fewer. That is a nice, round number, so I'm thinking I found my…
-
Saving/Loading button combinations with other buttons and a menu
Hey all, I am working on a script that allows the user to save a preset to a specific button. So far I have 4 buttons which should be selected in any combination then by pressing the dropdown menu you can save or load. This all works fine but now I want to implement the 'Save to P1' and 'Save to P2' idea. By selecting…
-
Kontakt KSP and objects
I've found only arrays. however, to reduce the complexity of my code (searching) to o(1) I need to use dictionary data structure which also known as Associative_array (objects or dictionary). in simple words i'm looking for a way to declare arrays with string as key, like: %arr["key"] := value message(%arr["key"]) Is it…
-
Strange thing...
Hi, I have a strange thing to solve. I have a script with 6 menus of effects presets that I assign to configurable slots as I like. Everything works with panels (ui_panel) and on each panel sliders that appear and disappear depending on the slots configuration by the user. Everything works perfectly, except for this…
-
Change play position in the middle of a note (custom looping)
I'm implementing a custom looping mechanic where the user can drag start/end loop cursors over a waveform. Changing the engine's loop points with the following code is kind of slow, so calling it every time the user drags one of the cursors causes the cursors to move very slowly:…
-
Set_snapshot_type ..?
Hi _ I'm sorry but I don't understand the news Snapshot type appeared in the recent 6.7. Kontakt version . Can someone enlighten me ?
-
How to make script to play multiple samples at certain percentage
How can I use a script to allow multiple samples to be played from different groups, while allowing the user to determine the percentage, or gain, of each sample being played? So, for example, a knob will expose values between 0 and 100 and allow the user to select a value. This value will be used to determine the amount…
-
Custom labels
Hi all, I'm creating a new instrument and have finally got my new slider/knob appearing and functioning. Unfortunately the values that come with the native Kontakt display disappear once you replace it with a custom .PNG. I figured out how to create a ui_label or add_text_line but the Kontakt labels and text just look so…
-
Load NKA preset
Hi Guys, I want to create a NKA browser that gets the NKA files directly without opening the dialog. This is what I have so far. Remember to set a path so you can save the ska with custom names... on init declare $count declare @path @path := "/Users/NAME/Desktop/FOLDER/Data/" declare ui_button $Save declare ui_button…
-
Outputting percentage value on label
Hi Guys, I have adapted some code I found and it is working well, except the output the slider gives me is not a percentage but actually one of the %drywet values. How can I change the code attached so it shows percentage values on my label? (Tried to do a code block but said I had too many characters!) Thanks in advance!
-
What to put in empty if statement?
The short story is I need to allow an if statement to be empty. Since SublimeKSP gives me an error when an if statement is empty, I need to put something in there to satisfy it. I could declare a dummy variable and write to it, but I don't want to declare anything extraneous like that. What is a good fast, low memory…
-
Image format for get_font_id(<file_name>)
Does someone have an example of what the format of an image is supposed to be for use with get_font_id(<file_name>)? My text shows up as thin vertical slices of random characters instead of the characters I type. I assume it's a problem with my .png image and/or the .txt file that accompanies the image. Here's what I did:…
-
Best Way To Reset Labels?
Hey there everyone, I'm looking into ways to have labels display values within a ui_control callback and then reset to their original label. For example, "Freq". So far, all I've been able to come up with is using a for loop to create a timer, of sorts, that resets the text after the UI control has been set for a short…
-
XY Pad get value by ui_id
Hi! How can I get the value of x or y of a cursor when I only have the ui_id of the XY Pad? Is there a way to do this with get_control_par? Many thanks in advance!
-
on persistence_changed, select button
Hi everybody! I'm looking to select a button by default. I'd been using an "on persistence_changed" then "play_note" to trigger a keyswitch on persistence_changed play_note (0,127,0,0) end on But as EvilDragon pointed out, this play_note interferes with the ks_list. And I'd much rather select a button on default, something…
-
define key_lo, key_hi MIDI range
Hi everyone! I want to specify different MIDI ranges per group, but when I switched to Group 3, I could not trigger a sample below 60, whereas I've listed it as 57. I've figured out that Group 0 defines the MIDI range, but even with a note in_range callback, I can still trigger a note outside of the specified range. I…
-
Transposing Chords.
This is probably really simple. Apologies in advance for my lack of knowledge. I'm making a simple instrument for my friend that plays specific chords on specific keys. If you think - it works like XFER Cthulu - but with way less functionality and comically bad MSpaint graphics. The way I've gone about it but using…
-
Modifying Send Effect Parameters
Hey Guys, Hopefully a simple one. Struggling to use "set_engine_par" correctly to modify a Send Effect parameter. For example "engine_par_rv_predelay" within a Legacy Reverb effect. From what I can see in the Reference Manual "ni_send_bus" may be required but unfortunately I can't seem to correctly interpret this. Any help…
-
ks_list defintion
Hi everyone! What "ks_list" purpose in this context? I used it to define the key color range but I noticed that it's affecting the midi note being played so can't quite figure out what it's doing or how I should co-ordinate the MIDI note value to its associated group. Thanks!! declare $sel_ks declare $find_ks declare…
-
KSP Script : transform poly_at to CC ?
Hello ! I'm sure it's not difficult, but I'm not able to do this alone, I don't have the basics to learn scripting on my own... I just need a script to transform poly_aftertouch to cc ... Thanks a lot if somedy help. 🌞