For playing Spatialized MIDI by channels or by tracks from the MidiDB. This class must be used with the prefab MidiSpatializer.
More...
|
void | MPTK_RefreshedUsedSynth () |
|
MidiLoad | MPTK_Load () |
|
MidiLoad | MPTK_Load (string uri) |
|
void | MPTK_Next () |
|
MPTKEvent.EnumLength | MPTK_NoteLength (MPTKEvent note) |
|
void | MPTK_Pause (float timeToPauseMS=-1f) |
|
virtual void | MPTK_Play (bool alreadyLoaded=false) |
|
void | MPTK_Play (byte[] data) |
|
virtual void | MPTK_Play (float delayRampUp, float startDelay=0) |
|
void | MPTK_Play (MPTKWriter mfw2, float delayRampUp=0f, float fromPosition=0, float toPosition=0, long fromTick=0, long toTick=0, bool timePosition=true) |
|
void | MPTK_PlayNextOrPrevious (int offset) |
|
void | MPTK_Previous () |
|
List< MPTKEvent > | MPTK_ReadMidiEvents (long fromTicks=0, long toTicks=long.MaxValue) |
|
void | MPTK_RePlay () |
|
bool | MPTK_SearchMidiToPlay (string searchPartOfName) |
|
void | MPTK_SortEvents () |
|
void | MPTK_Stop (bool stopAllSound=true) |
|
virtual void | MPTK_Stop (float delayRampDown, float stopDelay=0) |
|
void | MPTK_SwitchMidiWithDelay (int index, string name, float volume, float delayToStopMillisecond, float delayToStartMillisecond) |
|
void | MPTK_UnPause () |
|
void | MPTK_ClearAllSound (bool destroyAudioSource=false, int _idSession=-1) |
|
void | MPTK_InitSynth (int channelCount=16, bool preserveChannelInfo=false) |
|
void | MPTK_ResetStat () |
|
void | MPTK_StartSequencerMidi () |
|
void | MPTK_StartSynth () |
|
void | MPTK_StopSynth () |
|
IEnumerator | MPTK_WaitAllNotesOff (int _idSession=-1) |
|
delegate void | OnAudioFrameStartHandler (double synthTime) |
|
|
enum | ModeStopPlay { StopNoWaiting
, StopWhenAllVoicesReleased
, StopWhenAllVoicesEnded
} |
| Defined when the MIDI player is stopped. Immediately, waits for the release phase or the complete stop of all notes being played.. More...
|
|
enum | ModeSpatializer { Channel
, Track
} |
|
static StringBuilder | MPTK_BuildInfoSynth (MidiSynth synth) |
| Build a string with performance and information about the MIDI reader and the MIDI synthesizer. DEBUG_PERF_AUDIO DEBUG_HISTO_DSPSIZE DEBUG_PERF_MIDI More...
|
|
MPTKInnerLoop | MPTK_InnerLoop |
|
bool | MPTK_LogLoadEvents |
|
ModeStopPlay | MPTK_ModeStopVoice |
|
bool | MPTK_PauseOnFocusLoss |
|
bool | MPTK_StartPlayAtFirstNote |
|
LoadingStatusMidiEnum | MPTK_StatusLastMidiLoaded |
|
bool | MPTK_StopPlayOnLastNote |
|
string | MPTK_WebRequestError |
| Contains the error from the web request when loading MIDI from an URL
|
|
EventEndMidiClass | OnEventEndPlayMidi |
|
EventNotesMidiClass | OnEventNotesMidi |
|
EventStartMidiClass | OnEventStartPlayMidi |
|
bool | MPTK_ApplyModLfo |
|
bool | MPTK_ApplyRealTimeModulator |
|
bool | MPTK_ApplyVibLfo |
|
bool | MPTK_AudioSettingFromUnity |
|
bool | MPTK_AutoBuffer = true |
|
int | MPTK_AutoCleanVoiceLimit |
|
bool | MPTK_CorePlayer |
|
float | MPTK_CutOffVolume = 0.0001f |
|
bool | MPTK_DirectSendToPlayer |
|
MPTKEffectSoundFont | MPTK_EffectSoundFont |
|
MPTKEffectUnity | MPTK_EffectUnity |
| Unlike SoundFont effects, they applied to the whole player. On the other hand, the Unity effects parameters are rich and, obviously based on Uniy algo!
https://docs.unity3d.com/Manual/class-AudioEffectMixer.html
Only most important effect are integrated in Maestro: Reverb and Chorus. On need, others effects could be added. More...
|
|
bool | MPTK_EnableChangeTempo |
|
bool | MPTK_EnableFreeSynthRate = false |
|
bool | MPTK_EnablePanChange |
|
bool | MPTK_EnablePresetDrum |
|
int | MPTK_InstrumentNum |
|
bool | MPTK_KillByExclusiveClass = true |
|
float | MPTK_LeanSynthStarting = 0.05f |
|
bool | MPTK_LogEvents |
|
bool | MPTK_LogWave |
|
bool | MPTK_ReleaseSameNote = true |
|
uint | MPTK_ReleaseTimeMin = 500000 |
|
float | MPTK_ReleaseTimeMod = 1f |
|
bool | MPTK_SpatialSynthEnabled |
|
int | MPTK_StatVoiceCountActive |
|
int | MPTK_StatVoiceCountFree |
|
int | MPTK_StatVoiceCountPlaying |
|
int | MPTK_StatVoiceCountReused |
|
int | MPTK_StatVoicePlayed |
|
int | MPTK_StatVoiceRatioReused |
|
int | MPTK_ThreadMidiWait = 10 |
|
bool | MPTK_WeakDevice |
|
Action< int, long, int, int > | OnBeatEvent |
| Action is executed at each beat and received these parameters: More...
|
|
EventSynthClass | OnEventSynthAwake |
|
EventSynthClass | OnEventSynthStarted |
|
Func< MPTKEvent, bool > | OnMidiEvent |
|
bool | playOnlyFirstWave |
|
const float | FLUID_CHORUS_DEFAULT_DEPTH = 4.25f |
|
const float | FLUID_CHORUS_DEFAULT_LEVEL = 0.6f |
|
const int | FLUID_CHORUS_DEFAULT_N = 3 |
|
const float | FLUID_CHORUS_DEFAULT_SPEED = 0.2f |
|
const float | FLUID_CHORUS_DEFAULT_WIDTH = 10f |
|
const float | FLUID_REVERB_DEFAULT_DAMP = 0.3f |
|
const float | FLUID_REVERB_DEFAULT_LEVEL = 0.7f |
|
const float | FLUID_REVERB_DEFAULT_ROOMSIZE = 0.5f |
|
const float | FLUID_REVERB_DEFAULT_WIDTH = 0.8f |
|
static List< MidiFilePlayer > | SpatialSynths |
|
MPTKChannels | MPTK_Channels [get] |
| Description and list of MIDI Channels associated to the MIDI synth.
Each MIDI synth has 16 channels that carry all the relevant MIDI information. More...
|
|
string | MPTK_Copyright [get] |
|
int | MPTK_DeltaTicksPerQuarterNote [get] |
|
TimeSpan | MPTK_Duration [get] |
|
float | MPTK_DurationMS [get] |
|
bool | MPTK_ExtendedText [get, set] |
|
bool | MPTK_IsPaused [get] |
|
bool | MPTK_IsPlaying [get] |
|
bool | MPTK_KeepEndTrack [get, set] |
|
bool | MPTK_KeepNoteOff [get, set] |
|
MPTKEvent | MPTK_LastEventPlayed [get] |
|
bool | MPTK_Loop [get, set] |
|
bool | MPTK_MidiAutoRestart [get, set] |
|
List< MPTKEvent > | MPTK_MidiEvents [get] |
|
int | MPTK_MidiIndex [get, set] |
|
MidiLoad | MPTK_MidiLoaded [get] |
|
virtual string | MPTK_MidiName [get, set] |
|
bool | MPTK_PlayOnStart [get, set] |
|
TimeSpan | MPTK_PlayTime [get] |
|
double | MPTK_Position [get, set] |
|
double | MPTK_PositionFirstNote [get] |
|
double | MPTK_PositionLastNote [get] |
|
string | MPTK_ProgramName [get] |
|
double | MPTK_Pulse [get] |
|
int | MPTK_Quantization [get, set] |
|
bool | MPTK_RawSeek [get, set] |
|
double | MPTK_RealTime [get] |
|
string | MPTK_SequenceTrackName [get] |
|
float | MPTK_Speed [get, set] |
|
double | MPTK_Tempo [get, set] |
|
string | MPTK_TextEvent [get] |
|
long | MPTK_TickCurrent [get, set] |
|
long | MPTK_TickFirstNote [get] |
|
long | MPTK_TickLast [get] |
|
long | MPTK_TickLastNote [get] |
|
int | MPTK_TrackCount [get] |
|
string | MPTK_TrackInstrumentName [get] |
|
int | MPTK_IndexSynthBuffSize [get, set] |
|
int | MPTK_IndexSynthRate [get, set] |
|
string | MPTK_InstrumentPlayed [get] |
|
bool | MPTK_IsSpatialSynthMaster [get] |
|
bool | MPTK_KeepPlayingNonLooped [get, set] |
|
float | MPTK_MaxDistance [get, set] |
|
bool | MPTK_PauseOnDistance [get, set] |
|
bool | MPTK_Spatialize [get, set] |
|
int | MPTK_SpatialSynthIndex [get] |
|
int | MPTK_SynthRate [get, set] |
|
int | MPTK_ThreadMidiPriority [get, set] |
|
string | MPTK_TrackName [get] |
|
int | MPTK_TransExcludedChannel [get, set] |
|
int | MPTK_Transpose [get, set] |
|
float | MPTK_Volume [get, set] |
|
OnAudioFrameStartHandler | OnAudioFrameStart |
|
For playing Spatialized MIDI by channels or by tracks from the MidiDB. This class must be used with the prefab MidiSpatializer.
- Attention
- MidiSpatializer inherits of classes MidiFilePlayer and MidiSynth. For clarity, only MidiSpatializer attibutes are provided here. Look at the classes MidiFilePlayer and MidiSynth to discover all attributes available.
- Version
- Maestro Pro
There is no specific API for this prefab. Scripting is necessary to defined position of channel or instrument in your 3D env. See below.
This class inherits from MidiFilePlayer and MidiSynth, so all properties, event, methods from MidiFilePlayer and MidiSynth are available in this class.
See "Midi File Setup" in the Unity menu MPTK for adding MIDI in MidiDB.
///!
public void ArrangeByChannel()
{
float xdim = 500f;
float zstart = 0;
for (int iChannel = 0; iChannel < 16; iChannel++)
{
TestSpatializerFly tsf = mfp.gameObject.GetComponent<TestSpatializerFly>();
int lineNumber = iChannel % 4 + 1;
if (lineNumber == 1) zstart += 100;
float x = Mathf.Lerp(-xdim, xdim, ((float)lineNumber) / 4f);
float y = tsf.PosSynth.y;
float z = zstart;
tsf.PosSynth = new Vector3(x, y, z);
}
}
Play a MIDI file from the MidiDB. This class must be used with the prefab MidiFilePlayer....
Definition: MidiFilePlayer.cs:69
static List< MidiFilePlayer > SpatialSynths
Definition: MidiSynth.cs:819
See full example in TestSpatializerFly.cs More information here https://paxstellar.fr/midi-external-player-v2/