Maestro - Midi Player Tool Kit for Unity Version 2.18.2
Loading...
Searching...
No Matches
Loading and Activation

Load SoundFonts from internal resources, local files, or remote URLs. More...

Functions

bool MidiPlayerTK.MPTKSoundFont.Load (string path=null)
 Loads a SoundFont file on the fly while the application is running (MPTK Pro).

Detailed Description

Load SoundFonts from internal resources, local files, or remote URLs.

Function Documentation

◆ Load()

bool MidiPlayerTK.MPTKSoundFont.Load ( string path = null)

Loads a SoundFont file on the fly while the application is running (MPTK Pro).

Note
This method returns immediately with a boolean status: false if the load was canceled, or true if the load is in progress. Since loading may take time, use LoadedCallback to be notified when the SoundFont is ready or if an error occurs. StatusSoundFont provides the current loading status, and ProgressCallback can be used to track progress.
Parameters
pathSFThe path to the SoundFont, loading from:
  • Local desktop when path starts with file://
  • a web resource when starts with http:// or https://
  • else from the internal MPTK soundfont DB with this name,
  • if null or empty, the default internal soundfont is selected.
Returns
  • true if loading is in progress. Define LoadedCallback to get information when loading is complete.
  • false if an error is detected in the parameters. The callback LoadedCallback is not called if the return value is false.
See also
LoadedCallback
ProgressCallback
StatusSoundFont
LoadFromCache
SaveToCache
DownloadOnly