Custom Instruments (load)
Handel allows custom instruments to be loaded into Handel Programs.
Instruments can be created and added to a run of a Handel program as follows:
The MakeInstrument
function wraps Tone.js's sampler constructor. It takes a urls object as its argument. This urls object, maps note names matched to their location (locally or not). One or more mappings can be used.
After making an instrument above, we add it to our config object and run the Handel program with that config.
Within the Handel program we load the instrument as follows:
load configInstrumentName as nameOfInstrumentWithinHandel
Note: this feature makes your Handel program less portable but gives you the freedom of using arbitrary instruments in your Handel program.