The system will have to compare a score and a performance of the same piece. We need to define exactely what we mean with "score" : which data will be recorded in this score, which file type will it be, and how we can build a score from a given piece.
I - Needed dataWe have defined which kind of errors will be detected. We must now define all data we need to reach this goal. I.1 - Note errors Essential datum is the pitch of the note. We will use the MIDI
definition of the pitch : an integer value between 0 and 127, centered
on C3 = pitch 63.
We need a tempo parameter, which could be different from a part
of the piece to another (precise tempo change, accelerando...). We will
take tempo values between 0 and 256, which will correspond to the number
of beats pro minute.
We need for each note its velocity to find accentuation errors.
We will use the MIDI definition of the velocity : an integer value between
0 and 127.
We said in the "evaluation criteria definition" that thresholds
could be used to determine which tolerance level would be used for each
piece. Since these threshold values are depending on the piece, the can
be linked to the score. We have for the moment 2 parameters : duration
tolerance parameter and accentuation parameter.
II - jMax score objectThe jMax Score Following object uses a jMax score object as input. This object is a derivation of a MIDI file : mainly used data are, for each note : pitch, duration, time and velocity. If we want to use the Score Following Package without having to make changes in it, a part of our score shall be a jMax score. It is possible to build a jMax score from a MIDI file. But we need other data : the jMax score will not be enough to store all the information we want. We will have to join another file to it in order to have the complete score we need.
III - joint file for other dataIn this file, we will have to store : note value, note position, note accentuation, tempo, time signature, dynamic, legato parameter and duration tolerance.
Value, position, and accentuation are linked to each note. One part of
our file will be the list of all notes with those parameters, like : III.2 - Parameters - controlers As in a MIDI file, we can set parameter values with "controlers"
: one controler type for each parameter to be set. For example :
We can fill our file as a sequence : notes and controlers are placed
in the order they shall appear in the score. We can define numeric values
for each type : First read number will indicate the data type : if we have 0, we know
we will have to read successively index, value, position and accent. 2 3:4 1:1:00
|
Data value | type | filled | location |
Note pitch | scaled (0-127) | MIDI data | jMax score object |
Note duration | time in ms | calculated | jMax score object |
Note value | predefined values | MIDI data | joint file |
Note start time | time in ms | calculated | jMax score object |
Note position | predefined values | MIDI data | joint file |
Note velocity | scaled (0-127) | MIDI data | jMax score object |
Note accentuation | predefined values | user defined | joint file |
Tempo | scaled (0-256) | user defined | joint file |
Time signature | predefined values | user defined | joint file |
Dynamic | predefined values | user defined | joint file |
Legato | predefined values | user defined | joint file |
Duration tolerance | scaled (0-1) | user defined | joint file |
IV.2 - Data values - more details
Note value : defined as a fraction of a 4/4 measure.
Note position : 3 values structure : [measure number, beat number, beat fraction]. The beat number is linked to time signature. Beat fraction is an integer between 0 and 95 (48 is the center between 2 beats. 96 values is the best solution to have a precise value for 4-multiple and 3-multiple note values.
Time signature : 2 values, corresponding to the number of beats in the measure, and the note value that fills a beat (musical definition of time signature)
Dynamic : integer value between 0 and 7, with the following correspondance : 0 for ppp, 1 for pp, .... 6 for ff, 7 for fff
Legato : integer value : 0 for staccato, 1 for normal/undefined, 2 for legato
Duration tolerance : numerical value between 0 and 1 :
0.5 will mean we will detect no error if note is played between (t - note
duration * 0.5) and (t + note duration * 0.5)