Build and Play Real Time Music in relation with user actions or algorithms. This class must be used with the prefab MidiStreamPlayer.
More...
|
MPTKChordBuilder | MPTK_PlayChordFromLib (MPTKChordBuilder chord) |
|
MPTKChordBuilder | MPTK_PlayChordFromRange (MPTKChordBuilder chord) |
|
void | MPTK_PlayEvent (List< MPTKEvent > mptkEvents) |
|
void | MPTK_PlayEvent (MPTKEvent mptkEvent) |
|
void | MPTK_PlayPitchWheelChange (int channel, float pitchWheel) |
|
void | MPTK_PlayPitchWheelSensitivity (int channel, int sensitivity) |
|
void | MPTK_StartMidiStream () |
|
void | MPTK_StopChord (MPTKChordBuilder chord) |
|
void | MPTK_StopEvent (MPTKEvent mptkEvent) |
|
int | MPTK_ChannelBankGetIndex (int channel) |
|
int | MPTK_ChannelControllerGet (int channel, int controller) |
|
int | MPTK_ChannelCount () |
|
bool | MPTK_ChannelEnableGet (int channel) |
|
void | MPTK_ChannelEnableSet (int channel, bool enable) |
|
int | MPTK_ChannelForcedPresetGet (int channel) |
|
bool | MPTK_ChannelForcedPresetSet (int channel, int preset, int bank=-1) |
|
string | MPTK_ChannelInfo (int channel) |
|
int | MPTK_ChannelNoteCount (int channel) |
|
bool | MPTK_ChannelPresetChange (int channel, int preset, int bank=-1) |
|
int | MPTK_ChannelPresetGetIndex (int channel) |
|
string | MPTK_ChannelPresetGetName (int channel) |
|
float | MPTK_ChannelVolumeGet (int channel) |
|
void | MPTK_ChannelVolumeSet (int channel, float volume) |
|
void | MPTK_ChorusSetDefault () |
|
void | MPTK_ClearAllSound (bool destroyAudioSource=false, int _idSession=-1) |
|
void | MPTK_InitSynth (int channelCount=16, bool resetActiveVoices=false) |
|
void | MPTK_ResetStat () |
|
void | MPTK_ReverbSetDefault () |
|
void | MPTK_SFChorusSetDefault () |
|
void | MPTK_SFFilterSetDefault () |
|
void | MPTK_SFReverbSetDefault () |
|
void | MPTK_StartSequencerMidi () |
|
void | MPTK_StopSynth () |
|
IEnumerator | MPTK_WaitAllNotesOff (int _idSession=-1) |
|
delegate void | OnAudioFrameStartHandler (double synthTime) |
|
|
string | MPTK_RangeName [get] |
|
int | MPTK_RangeSelected [get, set] |
|
bool | MPTK_ApplySFChorus [get, set] |
| Apply chorus effect as defined in the SoundFont.
This effect is processed with the fluidsynth algo independently on each voices but with a small decrease of performace(10%). More...
|
|
bool | MPTK_ApplySFFilter [get, set] |
|
bool | MPTK_ApplySFReverb [get, set] |
| Apply reverberation effect as defined in the SoundFont.
This effect is processed with the fluidsynth algo independently on each voices but with a small decrease of performace(40%). More...
|
|
bool | MPTK_ApplyUnityChorus [get, set] |
|
bool | MPTK_ApplyUnityReverb [get, set] |
|
float | MPTK_ChorusDelay [get, set] |
|
float | MPTK_ChorusDepth [get, set] |
|
float | MPTK_ChorusDryMix [get, set] |
|
float | MPTK_ChorusRate [get, set] |
|
float | MPTK_ChorusWetMix1 [get, set] |
|
float | MPTK_ChorusWetMix2 [get, set] |
|
float | MPTK_ChorusWetMix3 [get, set] |
|
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] |
|
float | MPTK_ReverbDecayHFRatio [get, set] |
|
float | MPTK_ReverbDecayTime [get, set] |
|
float | MPTK_ReverbDelay [get, set] |
|
float | MPTK_ReverbDensity [get, set] |
|
float | MPTK_ReverbDiffusion [get, set] |
|
float | MPTK_ReverbDryLevel [get, set] |
|
float | MPTK_ReverbHFReference [get, set] |
|
float | MPTK_ReverbLevel [get, set] |
|
float | MPTK_ReverbLFReference [get, set] |
|
float | MPTK_ReverbReflectionDelay [get, set] |
|
float | MPTK_ReverbReflectionLevel [get, set] |
|
float | MPTK_ReverbRoom [get, set] |
|
float | MPTK_ReverbRoomHF [get, set] |
|
float | MPTK_ReverbRoomLF [get, set] |
|
float | MPTK_SFChorusDepth [get, set] |
|
float | MPTK_SFChorusLevel [get, set] |
|
float | MPTK_SFChorusSpeed [get, set] |
|
float | MPTK_SFChorusWidth [get, set] |
|
float | MPTK_SFFilterQModOffset [get, set] |
|
float | MPTK_SFReverbDamp [get, set] |
|
float | MPTK_SFReverbLevel [get, set] |
|
float | MPTK_SFReverbRoomSize [get, set] |
|
float | MPTK_SFReverbWidth [get, set] |
|
bool | MPTK_Spatialize [get, set] |
|
int | MPTK_SpatialSynthIndex [get] |
|
int | MPTK_SynthRate [get, set] |
|
string | MPTK_TrackName [get] |
|
int | MPTK_TransExcludedChannel [get, set] |
|
int | MPTK_Transpose [get, set] |
|
float | MPTK_Volume [get, set] |
|
Build and Play Real Time Music in relation with user actions or algorithms. This class must be used with the prefab MidiStreamPlayer.
- Attention
-
No MIDI file is necessary, the notes are generated by your scripts from your own algorithms by using the methods and properties of this class.
The main function MPTK_PlayEvent() and the class MPTKEvent are able to create all kind of MIDI events as note-on.
All the values must be set in MPTKEvent, command, note value, duration ... for more details look at the class MPTKEvent.
A note-on must also be stopped, : if duration = -1 the note is infinite, it's the goal of MPTK_StopEvent() to stop the note with a note-off.
On top of that, the Pro version adds playing chords with MPTK_PlayChordFromRange() and MPTK_PlayChordFromLib().
For playing scales, have a look to the class MPTKRangeLib
For more information see here https://paxstellar.fr/midi-file-player-detailed-view-2-2/
and look at the demo TestMidiStream with the source code TestMidiStream.cs.
This class inherits from MidiSynth so all properties, events, methods from MidiSynth are available in this class.
A quick example:
using UnityEngine;
public class YourClass : MonoBehaviour
{
void Start()
{
midiStreamPlayer = FindObjectOfType<MidiStreamPlayer>();
}
void Play()
{
{
Value = 10000,
});
{
Channel = 0,
Duration = -1,
Value = 60,
Velocity = 100,
};
}
void Stop()
{
}
}
Description of a MIDI Event. It's the heart of MPTK! Essential to handling MIDI by script from all ot...
Definition: MPTKEvent.cs:418
Build and Play Real Time Music in relation with user actions or algorithms. This class must be used w...
Definition: MidiStreamPlayer.cs:79
void MPTK_PlayEvent(MPTKEvent mptkEvent)
Definition: MidiStreamPlayer.cs:133
void MPTK_StopEvent(MPTKEvent mptkEvent)
Definition: MidiStreamPlayer.cs:266
Definition: MidiFileEditorPlayer.cs:6
MPTKCommand
Definition: MPTKEvent.cs:12