# Multi-script Graphics



## dfhagai (Jun 25, 2018)

Hi,

The only *multi-*script I've seen that uses pictures is La Scoring Strings ARC...

I know it's a pain in the a$$ to add graphics to a multi-script, but I have to make the one that I'm working on visually appealing...

What's the procedure of incorporating graphics in a multi-script? where should I put the actual files? tips on sharing the multi-script with the graphics?

Thank you!!!
HD


----------



## EvilDragon (Jun 25, 2018)

Pictures need to go to (on Windows): %USERPROFILE%\Documents\Native Instruments\Kontakt 5\Pictures\

Preferably in a subfolder.


----------



## Aviram Dayan Production (Jun 25, 2018)

yes what mario say,
also there is no possibility to insert to NKR, at the end of your work
you need to move manually, or simple installation.


----------



## dfhagai (Jun 25, 2018)

Thanks! another question:
Can a multi-script generate MIDI notes?
I'm trying to create an audition button that will generate a note and send it to an instrument.
set_midi doesn't seem to work...

EDIT: I understand that it's because I can't use set_midi to create a note within a on_controller callback? if so, anyway around this?


----------



## EvilDragon (Jun 26, 2018)

Multiscripts are basically MIDI processors only, so they can send MIDI notes.

But wait, you mention firing an audition note on a button? That's not "on controller" callback then - this callback doesn't exist in multiscripts. There's only "on midi_in", but you need to do set_midi() in that button's UI callback. Don't forget to send a note off as well, otherwise you get stuck notes.


----------



## dfhagai (Jun 26, 2018)

I've meant to write "on ui_control", not "on controller"....


EvilDragon said:


> Pictures need to go to (on Windows): %USERPROFILE%\Documents\Native Instruments\Kontakt 5\Pictures\
> 
> Preferably in a subfolder.


Two questions please:
1. How do I tell Kontakt to search in a subfolder? it only searches in the root folder...
2. What do I put in the "set_control_par_str" instead of "$INST_WALLPAPER_ID"?


----------



## EvilDragon (Jun 26, 2018)

1. Use get_folder($GET_FOLDER_FACTORY_DIR)
2. If you want some sort of background, use ui_label, assign picture to it as per usual.


----------



## dfhagai (Jun 26, 2018)

EvilDragon said:


> $GET_FOLDER_FACTORY_DIR


How do I use *Get *a function to *Set *a folder?


----------



## EvilDragon (Jun 26, 2018)

Simple... You use it as a part of the path when you assign a picture.


```
set_control_par_str(get_ui_id($somecontrol), $CONTROL_PAR_PICTURE, get_folder($GET_FOLDER_FACTORY_DIR) & "My Library\button")
```


----------



## dfhagai (Jun 26, 2018)

EvilDragon said:


> Pictures need to go to (on Windows): %USERPROFILE%\Documents\Native Instruments\Kontakt 5\Pictures\
> 
> Preferably in a subfolder.



According to set_text, It seems that $GET_FOLDER_FACTORY_DIR doesn't point to the above, but to:
C:\Program Files\Common Files\Native Instruments\Kontakt 5

$GET_FOLDER_LIBRARY_DIR does point to the folder you've mentioned.

I've copied my picture (named "Skin") into:
c:\users\Documents\Native Instruments\Kontakt\Pictures\New Folder\Skin
and the code is:

```
set_control_par_str(get_ui_id($skin), $CONTROL_PAR_PICTURE, get_folder($GET_FOLDER_LIBRARY_DIR) & "pictures\New Folder\Skin")
```

And it doesn't work......


----------



## EvilDragon (Jun 26, 2018)

Ah right, sorry, then $GET_FOLDER_LIBRARY_DIR.


You don't need to use "pictures" part, I think. So just "New Folder/Skin" should suffice. Use forwards slashes (so that it's Mac compatible).


----------



## dfhagai (Jun 26, 2018)

The only thing that works is putting the picture at:
c:\users\Documents\Native Instruments\Kontakt\Pictures\New Folder\Skin

and setting the code like this:

```
set_control_par_str(get_ui_id($skin), $CONTROL_PAR_PICTURE, "New Folder/Skin")
```
If I add $GET_FOLDER_LIBRARY_DIR it doesn't work.
So, unless I'm missing something, as long as it works I'm happy!


----------



## EvilDragon (Jun 26, 2018)

Ahhhh right. Kontakt looks there by default for graphics assets, if it doesn't find a Resources folder. I forgot about that.


----------



## dfhagai (Jun 26, 2018)




----------



## dfhagai (Jun 26, 2018)

EvilDragon said:


> Multiscripts are basically MIDI processors only, so they can send MIDI notes.
> 
> But wait, you mention firing an audition note on a button? That's not "on controller" callback then - this callback doesn't exist in multiscripts. There's only "on midi_in", but you need to do set_midi() in that button's UI callback. Don't forget to send a note off as well, otherwise you get stuck notes.



Why doesn't this script generates a note?

```
on init
    declare ui_button $Audition
end on

on ui_control ($Audition)   
    set_midi (1,$MIDI_COMMAND_NOTE_ON,60,80)
    wait(500000)
    set_midi (1,$MIDI_COMMAND_NOTE_OFF,60,127)
    $Audition := 0
end on
```


----------



## EvilDragon (Jun 26, 2018)

You're sending to MIDI channel 2. Is the instrument loaded to play that note back also set to channel 2?


----------



## dfhagai (Jun 26, 2018)

Damn 0 index!
Blessed be thy Mario


----------

