Just as for SynthDef, an Instr supports .add which will compile a SynthDef and add it to the SynthDescLib that the Pattern system uses.
But when using the Event \type \instr it will also just figure it out.
So you can actually keep your Instr in separate files and there is no need to load or .add
There might be a delay while it loads, so it would be safest to preload your Instr ( use Instr.loadAll )
Note that it IS possible to dynamically change the SynthDef architecture using Instr. If the architecture differs than it will compile the new one and send it.
This will take an Event and set it to type='instr' and set the \instr name. It will then play the event.
event |
proto event which it will spawn. The keys in the Event are used to satisfy args of the Instr |
this
see also InstrGateSpawner and InstrSpawner