Global script? Possible?

jmarcv
jmarcv Member Posts: 9 Member

I am looking for a way to make a script global. So far, it looks like I have to pick a slot for each instrument and set it manually. However, I came

across this in the 'Retro Machines MK2' and wonder if it is a feature I can use, but not finding any info on it. See image.

This would APPEAR to maybe auto load a script file in every slot 3 of every instrument? 

The path field? says "LINK: RM_Slot3_Unisono.txt" but I can't find that file anywhere and see nothing in the 'Apply From" dropdown.

Does anyone have insight - pointers on what this is, and if it is a way to link a set of instruments to one global script?

Comments

  • Gablux
    Gablux Member Posts: 71 Member

    Those are two different things.

    Scripts live on one of the 5 slots available and are executed from slot 1 to slot 5.

    The link feature is there to use an external file located in /resources/scripts/ instead of in the internal editor.

    There's no such thing as a global script, because there aren't scopes of scripts that way (local versus global) there's only the order imposed by the slots.

    If you have only one script in one of the slots, that's the only set of instructions running. If you have more than one, then you have to get familiar with the intricacies of having calls in each script and how they relate to each other. For instance, if you have a note callback on script one and two, how changing an event_id on slot one will affect what the script on slot 2 is receiving.


    On how to use the linked file:

    You have to go to the edit view mode (wrench icon on the top left) then instrument options. On the popup window's left tab click on Instrument. Create a resource container for your instrument (make sure the instrument is saved somewhere first). By creating the resource container you will have the folder structure needed for Kontakt to look for script files.

    Then you would need a code editor like SublimeText (with the KSP plugin) that every time you compile your ksp code, it will save directly a file into the scripts folder (there is some setting up for that) and if you have NI's Creator Tools open and linked to your instrument, Kontakt will reload the script every time the linked txt file inside the scripts folder is updated.

    After the file is created in the scripts folder it will appear in the dropdown menu under 'resources folder' in a submenu list with all the files in that folder.

  • jmarcv
    jmarcv Member Posts: 9 Member

    Thanks for the response. Looks like my idea of applying MY script in SOMEONE ELSES library is not going to work.

  • Gablux
    Gablux Member Posts: 71 Member

    oh.

    well, you would have to know exactly what their script is doing and what are the pitfalls between the interactions between scripts in different slots. It is possible to work. But... is it worth the time and effort?

Back To Top