loadInstrument(at:)
Configures the sampler with the specified instrument file.
Declaration
func loadInstrument(at instrumentURL: URL) throwsParameters
- instrumentURL:
The URL of the file that contains the instrument.
Discussion
The instrument can be one of the following types: Logic or GarageBand EXS24, the sampler’s native aupreset file, or an audio file, such as caf, aiff, wav, or mp3.
For a single audio file, the framework loads it into a new default instrument and uses any information in the audio file, such as the root key and key range, for its placement in the instrument.