Build Chord and Play with MidiStreamPlayer.
More...
Build Chord and Play with MidiStreamPlayer.
- Version
- Maestro Pro See example in TestMidiStream.cs and ExtStreamPlayerPro.cs
◆ MPTKChordBuilder()
MidiPlayerTK.MPTKChordBuilder.MPTKChordBuilder |
( |
bool |
log = false | ) |
|
Create a default chord: tonic=C4, degree=1, count note=3.
- Parameters
-
◆ MPTK_BuildFromLib() [1/2]
void MidiPlayerTK.MPTKChordBuilder.MPTK_BuildFromLib |
( |
int |
pindex | ) |
|
Build a chord
- Version
- Maestro Pro
- Parameters
-
pindex | position from 0 in ChordLib.csv |
◆ MPTK_BuildFromLib() [2/2]
void MidiPlayerTK.MPTKChordBuilder.MPTK_BuildFromLib |
( |
MPTKChordName |
chordName | ) |
|
Build a chord from the current chord in the lib ChordLib.csv in folder Resources/GeneratorTemplate.csv
- Version
- Maestro Pro
- Parameters
-
chordName | NAme of the chord |
◆ MPTK_BuildFromRange()
void MidiPlayerTK.MPTKChordBuilder.MPTK_BuildFromRange |
( |
MPTKRangeLib |
range = null | ) |
|
Build a chord from the current selected range (MPTK_RangeSelected), Tonic and Degree are to be defined in parameter MPTKChord chord. Major range is selected if no range defined. After the call, Events contains all notes for the chord.
- Version
- Maestro Pro
- Parameters
-
◆ Arpeggio
long MidiPlayerTK.MPTKChordBuilder.Arpeggio |
Delay in millisecond between each notes in the chord (play an arpeggio).
◆ Channel
int MidiPlayerTK.MPTKChordBuilder.Channel |
Midi channel fom 0 to 15 (9 for drum)
◆ Count
int MidiPlayerTK.MPTKChordBuilder.Count |
Count of notes to compose the chord. Between 2 and 20.
◆ Degree
int MidiPlayerTK.MPTKChordBuilder.Degree |
Scale Degree. Between 1 and 7.
- I Tonic First
- II Supertonic Second
- III Mediant Maj or min Third
- IV Subdominant Fourth
- V Dominant Fifth
- VI Submediant Maj or min Sixth
- VII Leading Tone/Subtonic Maj or min Seventh Good reading here: https://lotusmusic.com/lm_chordnames.html
◆ Delay
long MidiPlayerTK.MPTKChordBuilder.Delay |
Delay in millisecond before playing the chord.
◆ Duration
long MidiPlayerTK.MPTKChordBuilder.Duration |
Duration of the chord in millisecond. Set -1 to play indefinitely.
◆ Events
List<MPTKEvent> MidiPlayerTK.MPTKChordBuilder.Events |
List of midi events played for this chord. This list is build when call to MPTK_PlayChord or MPTK_PlayChordFromLib is done else null.
◆ FromLib
int MidiPlayerTK.MPTKChordBuilder.FromLib |
Index of the chord in the libraries file ChordLib.csv in folder Resources/GeneratorTemplate.csv. To be used with MidiStreamPlayer.MPTK_PlayChordFromLib(MPTKChord chord)
◆ Tonic
int MidiPlayerTK.MPTKChordBuilder.Tonic |
Tonic (Root) for the chord. 48=C3, ... , 60=C4, 61=C4#, 62=D4, ... , 72=C5, ....
◆ Velocity
int MidiPlayerTK.MPTKChordBuilder.Velocity |
Velocity between 0 and 127