![]() |
Maestro - Midi Player Tool Kit for Unity Version 2.18.2
|
Provides runtime access to SoundFont loading, caching, state inspection, and preset/bank exploration. More...
Public Member Functions | |
| bool | SelectBankInstrument (int bankNumber) |
| This method change the default instrument drum bank and build the presets list associated. See ListPreset. Note 1: this call doesn't change the current MIDI bank used to play an instrument, only the content of ListPreset. Note 2: to apply the bank to all channels, the synth must be restarted: call MidiFilePlayer.MPTK_InitSynth. Note 3: to change the current bank, rather use #MidiSynth.MPTK_ChannelPresetChange . | |
| bool | SelectBankDrum (int bankNumber) |
| This method change the default instrument drum bank and build the presets list associated. See ListPresetDrum. Note 1: this call doesn't change the current MIDI bank used to play a drum, only the content of ListPresetDrum. Note 2: to apply the bank to all channels, the synth must be restarted: call MidixxxPlayer.MPTK_InitSynth. Note 3: to change the current bank, rather use MidiSynthPlayer.MPTK_ChannelPresetChange . | |
| bool | Load (string path=null) |
| Loads a SoundFont file on the fly while the application is running (MPTK Pro). | |
Public Attributes | |
| bool | LoadFromCache |
| Whether to reuse previously downloaded SoundFonts if available. Default is true. Folder: Application.persistentDataPath/"DownloadedSF". | |
| bool | SaveToCache |
| Whether to store the loaded SoundFont in a local cache. Default is true. Folder: Application.persistentDataPath/"DownloadedSF". | |
| bool | DownloadOnly |
| Whether to only download the SoundFont. When true, the SoundFont is not loaded in the MidiSynth. Default is false. | |
| Action< float > | ProgressCallback = null |
| Called every 200 ms while a download is in progress. See also ProgressValue. | |
| Action< MidiSynth > | LoadedCallback = null |
| Define a callback when the SoundFont is loaded and ready to use. | |
Properties | |
| int | DefaultBank [get, set] |
| The default bank to use for instruments. Set to -1 to select the first bank. | |
| int | DrumBank [get, set] |
| The bank to use for the drum kit. Set to -1 to select the last bank. | |
| bool | IsInternal [get] |
| True if the Soundfont is loaded from the MPTK resources (internal). False is the Soundfont is loaded from an external resources, local file or from an URL. | |
| bool | IsDefault [get] |
| True if the Soundfont is loaded from the MPTK resources (internal) and is the default (selected in "Soundfont Setup"). | |
| bool | IsReady [get] |
| True if a Soundfont is available from internal or external. | |
| ImSoundFont | SoundFont [get] |
| When a Soundfont is ready, return an instance of #ImSoundfont else return null. | |
| string | SoundFontName [get] |
| Name of Soundfont. | |
| List< string > | BanksName [get] |
| List of banks name available with the format "<number> - Bank". Unlike preset, there is no bank name defined in a Soundfont. Index in the list is not the bank number (missing bank have been removed), use the same index in BanksNumber to get the bank number. | |
| List< int > | BanksNumber [get] |
| List of banks number available. Index in the list is not the bank number (missing banks have been removed), use the same index in BanksName to get the bank name. | |
| List< string > | PresetsName [get, set] |
| List of preset name available with the format "<number> - <name>". Index in the list is not the preset number (preset missing has been removed), use the same index in PresetsNumber to get the preset number. | |
| List< int > | PresetsNumber [get, set] |
| List of preset number available. Use the same index in PresetsName to get the preset name. | |
| List< string > | PresetsDrumName [get, set] |
| List of preset name available with the format "<number> - <name>" but dedicated to drum bank. Index in the list is not the preset number (preset missing has been removed), use the same index in PresetsDrumNumber to get the preset number. | |
| List< int > | PresetsDrumNumber [get, set] |
| List of preset number available but dedicated to drum bank. Use the same index in PresetsDrumName to get the preset name. | |
| List< MPTKListItem > | ListBank [get, set] |
| Gets the list of banks available. It's a full and fixed list of 129 MPTKListItem with null value if a bank is missing. MPTKListItem.Index give the number of the bank Prefer using the BanksName to get a list of bank available and BanksNumber to get the bank number at same corresponding index. . | |
| List< MPTKListItem > | ListPreset [get, set] |
| List of presets for instrument for the default or selected bank. When using with preset change MIDI event, MPTKListItem.Index give the number of the preset . | |
| List< MPTKListItem > | ListPresetDrum [get, set] |
| List of presets drum for the default or selected bank. When using with preset change MIDI event, MPTKListItem.Index give the number of the preset . | |
| float | ProgressValue [get] |
| Provides the download progress value. Normalized between 0 and 1. It should be a percentage, but webRequest may provide a value not directly related to the actual percentage. | |
| LoadingStatusSoundFontEnum | StatusSoundFont [get] |
| Provides the status of the loaded SoundFont. | |
| TimeSpan | TimeToDownloadSoundFont [get] |
| Time to download the SoundFont from a web resource or a local file. | |
| TimeSpan | TimeToLoadSoundFont [get] |
| Time to load the SoundFont in the MidiSynth prefab. | |
| TimeSpan | TimeToLoadWave [get] |
| Time to load samples in the MidiSynth. | |
| TimeSpan | TimeToLoadOverall [get] |
| Total time to load the SoundFont. | |
Provides runtime access to SoundFont loading, caching, state inspection, and preset/bank exploration.