next up previous contents
Next: Dynamic errors detection Up: Rhythm errors detection Previous: Indicators   Contents

Algorithm

Skip rests errors are detected in the main checking function:



(...)

if (we have a g-rest)

Error = type SKIP REST

(...)


Other errors are classified in the sub-function mididetector_checkrhythmerror, which will be called if needed on next state reception (as is it for note error checking sub-function):



BEGIN

if (previous state was a g-state)

Error = type ADDED REST

else

if (new_time_offset - previous_time_offset > 0)

Error = type NOTE TOO LONG

else

Error = type NOTE TOO SHORT

endif

endif

END




Mathieu Gilles (Betr. soltau) 2003-08-25