next up previous contents
Next: Note errors detection Up: Error detection and classification Previous: Error detection and classification   Contents

Error checking function

When the detector is activated, we enter the function mididetector_check every 5ms4.1. This function does nothing unless we have got:

- a played note as input

- a state as output from the score follower

`` Played note'' are not only notes-on: with played note, we understand a note-on or a note-off, because we have to consider that a note-off (end of a note) can eventualy be a ``rest-on'', i.e. the beginning of an expected or unexpected rest.

A matching is also done:

- when we have got a note-on which has been recognised,

- when we have got a note-on for which the follower outputs a g-state (not recognised),

- when we have got a rest, recognised or not.

This function detect errors, but doesn't do any classification. When an error is detected, a flag is updated, and corresponding detection functions (which will check resp. note errors, rhythm errors and dynamic errors) will be called later (when we have enough information to classify that error).

For each check, we also have to update time-offset: we must ``erase'' the difference between time of played note and time of followed note, to avoid recording many times the same error.

Let's now see used algorithms for each kind of detection, and main algorithm.


next up previous contents
Next: Note errors detection Up: Error detection and classification Previous: Error detection and classification   Contents
Mathieu Gilles (Betr. soltau) 2003-08-25