new void Start()
{
midiStreamPlayer = FindFirstObjectByType<MidiStreamPlayer>();
}
private void PlayScale()
{
for (
int ecart = 0; ecart < scale.
Count; ecart++)
{
{
Value = CurrentNote + scale[ecart],
Channel = StreamChannel,
Duration = DelayPlayScale,
Velocity = Velocity,
Delay = ecart * DelayPlayScale,
};
}
}
Represents a MIDI event used throughout MPTK. This class is central to script-based MIDI workflows in...
Definition MPTKEvent.cs:59
Scale interval library loaded from GammeDefinition.csv. Can be used in any music-generation workflow.
Definition MPTKScaleLib.cs:46
static MPTKScaleLib CreateScale(MPTKScaleName index, bool log=false)
Gets a scale from an index. Scales are read from GammeDefinition.csv in Resources/GeneratorTemplate.
Definition MPTKScaleLib.cs:128
int Count
Number of notes in the scale.
Definition MPTKScaleLib.cs:78
Builds and plays real-time music in response to user actions or algorithmic logic....
Definition MidiStreamPlayer.cs:44
void MPTK_PlayEvent(MPTKEvent mptkEvent)
Plays one MIDI event from an instance of MPTKEvent. Runs in a thread so the call returns immediately....
Definition MidiStreamPlayer.cs:121
MPTKCommand
MIDI command codes. Defines the action performed by the message: note on/off, patch change,...
Definition MPTKEnum.cs:16