$0.00 0

YOUR CART
Checkout

SUBTOTAL
DISCOUNT
TOTAL
Checkout
Callbacks are sections of a script that is being called. One of the callbacks, on async_complete...

Kontakt Tutorials

Use a Custom Midi File With Your Instrument in Kontakt

Callbacks are sections of a script that is being called. One of the callbacks, on async_complete is called when you load or save arrays, midi files or ir samples. In today’s video tutorial I’ll show you to Use a custom midi file with your Instrument.

Some other useful information about callbacks is that they all start with on and end with end on. Callbacks can be stopped using the command, exit. Each callback has a unique id number which can be retrieved with $NI_CALLBACK_ID. And you can query which callback triggered a function with $NI_CALLBACK_TYPE and the corresponding built in constants.
On aync_complete is an asynchronous callback that is triggered after the execution of the load_array, save_array, love_midi_file, save_midi_file and load_ir_sample commands. What this means is that on async_complete is not waiting for those commands to be finished. When those commands are finished, they return a unique value. This value can be used with $NI_ASYNC_ID and $NI_ASYNC_EXIT_STATUS to check whether the command was finished and whether the command was successful or not.
Today we will write some script that will load a miid file and display a message as to whether it was successful or not.

We make us use of load_midi_file and on async_complete to do this.
To resolve synchronization issues, load_midi_file returns a unique ID when being used. When the command is finished, the on async_complete callback gets triggered and the built-in variable $NI_ASYNC_ID is updated with the ID of the command that triggered the callback. If the command was completed successfully (for example if the file was found and successfully loaded), the internal value $NI_ASYNC_EXIT_STATUS is set to 1, otherwise it is 0.

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 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 7 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