Build Scale and Play with MidiStreamPlayer.
- Version
- Maestro Pro
See example in TestMidiStream.cs and ExtStreamPlayerPro.cs
new void Start()
{
midiStreamPlayer = FindFirstObjectByType<MidiStreamPlayer>();
}
private void PlayScale()
{
MPTKRangeLib range = MPTKRangeLib.Range(CurrentScale, true);
for (int ecart = 0; ecart < range.Count; ecart++)
{
{
Value = CurrentNote + range[ecart],
Channel = StreamChannel,
Duration = DelayPlayScale,
Velocity = Velocity,
Delay = ecart * DelayPlayScale,
};
}
}
Description of a MIDI Event. It's the heart of MPTK! Essential to handling MIDI by script from all ot...
Definition: MPTKEvent.cs:45
Build and Play Real Time Music in relation with user actions or algorithms. This class must be used w...
Definition: MidiStreamPlayer.cs:36
void MPTK_PlayEvent(MPTKEvent mptkEvent)
Definition: MidiStreamPlayer.cs:109
MPTKCommand
Definition: MPTKEnum.cs:12
int MidiPlayerTK.MPTKScaleLib.this[int index] |
|
get |
Indexer on an instance if this classe
This provides access to each count of Intervals in semitones from the tonic.
From a Major Melodic, each index will return 0, 2, 4, 5, 7, 9, 11 First position (index=0) always return 0 because it is the ibterval count from the tonic xD.
- Parameters
-
index | Index in the scale. If greater than interval count in the scale, the interval in semitones is taken from the next octave. |
- Returns
- Intervals in semitones from 0
mptkScale = MPTKRangeLib.Range(indexScale:0, log:true);
Debug.Log(mptkScale[0])
Debug.Log(mptkScale[4])