When I use this code (in a multiscript):
on midi_in
if ($MIDI_COMMAND=$MIDI_COMMAND_NOTE_ON)
reset_ksp_timer
$count := 1
while ($count<12)
wait(10000)
add_text_line($back,$count*10 & " " & ($KSP_TIMER/1000))
inc($count)
end while
end if
end on
I get:
10 0
20 39
30 39
40 39
50 39
60 79
70 79
80 79
90 79
100 119
110 119
Please explain the inconsistency between the wait function and $KSP_TIMER.