$0.00 0

YOUR CART
Checkout

SUBTOTAL
DISCOUNT
VAT
TOTAL
Checkout
Banner
When you initialize an instrument, an empty MIDI object is initialized with it. You can either...

Kontakt Tutorials

Kontakt Scripting - Load a MIDI File With The File Selector

When you initialize an instrument, an empty MIDI object is initialized with it. You can either start editing the object by defining a buffer size and inserting events, or by inserting a whole MIDI file.. In today’s video tutorial I will show you how to create a Performance View that lets you Load a MIDI File With The File Selector.

You can only use one MIDI object at a time within an NKI. The MIDI object is held in memory and can be accessed by any of the script slots. It is possible to add, remove and edit MIDI events within the object, as well as import and export MIDI files.

So far we have looked at how you can import files using the load midi and insert midi commands. While functional, these commands aren’t very practical in the real world where you will need to access MIDI files on the fly.

Today we will look at a new command that allows you to load files from a directory and navigate back and forth between them. We’ll use a new ui control, ui_file_selector.

Ui_file_selector has the following commands and built-in variables:

fs_get_filename – returns the filename of the last selected file in the ui file browser
ui-id – the id number of the ui control
Return parameter
0 – returns the filename w/out extension
1 – returns the filename with extension
2 – returns the whole path

fs_navigate – jump to the next/previous file in an ui file selector and trigger its callback.
ui-id – the ID number of the ui control
direction
0: the previous file (in relation to the currently selected one) is selected
1: the next file (in relation to the currently selected one) is selected

Control_par_basepath – sets the basepath of the UI file browser. This control parameter can only be used in the init callback. Be careful with the number of subfolders of the basepath as it can take a long time to scan the subfolders. The scan process takes place every time the NKI is loaded.

Control_par_column_width – sets the width of the browser columns. This control parameter can only be used in the init callback.

Control_par_filepath – sets the actual path of the UI file browser which must be a subpath of the basepath. This control parameter is useful for recalling the last status of the browser upon loading the instrument. It can only be used in the init callback.

Control_par_file_type – sets the file type for file selector. It an only be used in the init callback. The following file types are available:
$NI_FILE_TYPE_MIDI
$NI_FILE_TYPE_AUDIO
$NI_FILE_TYPE_ARRAY

Remember to leave a comment to let us know what you think about the video, how you plan on using the techniques you have learned or if want to give us some feedback!

RELATED COURSES

Next Steps With Kontakt 5 (Intermediate)

ADSR Courses

Add to cart

Getting Started With Kontakt

ADSR Courses

Add to cart
Waveform Loaded
Waveform Played
×
PLAYLIST
Clear all
WISHLISTS
Create an account to use wishlists
×
SAVE TUTORIALS
Create an account to save tutorials
×
FOLLOW YOUR FAVORITES
Follow your favourite labels, formats and genre's and ADSR will show what's new in those on your next visit.
×
  • Create product wishlist
  • Save your favorite tutorials
  • Regular discounts and exclusives
  • Never miss a sound! Follow your favorite labels.
Sign up to My ADSR to ensure you're ahead of the pack. Save your favorite content and be notified of new content. You'll never miss a thing!
Create your account now!
CREATE ACCOUNT
Sign up to My ADSR to ensure you're ahead of the pack. Save your favorite content and be notified of new content. You'll never miss a thing!
  • Get days all ADSR courses free
  • Create product wishlist
  • Save your favorite tutorials
  • Regular discounts and exclusives
Create your account now!
SIGN IN
adsrsounds.com login Video streaming login
Remember me
Forgot your password?
DON'T HAVE AN ADSR ACCOUNT?
Create your account
FORGOT PASSWORD

Send info
  1. Enter your email address
  2. Click "Send info"
  3. Check your inbox for an activation link
  4. Visit activation link and enter set new password
Sign in
DON'T HAVE AN ADSR ACCOUNT?
Create your account
IMPORTANT: Is this product compatible with your system? Please check the product system requirements tab before purchasing. To proceed with this purchase you must check the box to confirm you have checked the requirements.


I have read the system requirements and agree to the return policy. I understand that refunds will not be given due to limitation of my software or operating system.

I don't agree
, you have loyalty credit available. To redeem click the button to claim !
Claim
Claim your free sounds

For every $5 you spend on ADSR receive 1 free credit for Sample Manager.

Even better, we have back-dated this so any purchases you made since 2017 have also been credited to your account!

Click the button below to claim your free credit.

Get my free credits
Loyalty credits
1Every purchase you make on ADSR* now earns you 1 loyalty credit for every $5 spent
2Once you make a purchase your credits are added to your account
3Credits can be redeemed in ADSR Sample Manager to download individual loops and samples
4To redeem simply download ADSR Sample Manager and/or log into Sample Manager with your ADSR login details
5Credits will have been automatically added to your account
6Loyalty credits expire 30 days after initial purchase
* Not including video subscriptions