$0.00 0

YOUR CART
Checkout

SUBTOTAL
DISCOUNT
VAT
TOTAL
Checkout
Banner
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 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