You will need to code your score as a text file in order to use it with mididetector. This score will contain :
- Time signature definition,
- Tempo definition,
- User defined parameters for the detection,
- Notes of the score.
Each event (note or controler) is defined by its type and its value, as shown below :
note :
type = 0, values = pitch, note_value(2 numbers), accentuation, measure, beat, fraction
tempo controler :
type = 1, values = tempo value, 0, measure, beat, fraction
time signature controler :
type = 2, values = upper value, lower value, measure, beat, fraction
legato parameter :
type = 3, values = value, 0, measure, beat, fraction
duration tolerance :
type = 4, values = value, 0, measure, beat, fraction
dynamic controler :
type = 5, values = value, 0, measure, beat, fraction
For a note, the two number of note_value are resp. the upper and the lower value of the duration fraction. Pitch of a note is an integer between 0 and 127 (center value is C5 = 60). Rests are also coded : they are represented by notes with pitch 128.
example: for a C#5, 1/8 note, not accentuated, at measure 2, beat 3, fract 48, we will write :
``-1'' at the end indicate end of score.