plugin 'MIDISightReader' does not work on voice 4

• May 29, 2012 - 08:14
Type
Functional
Severity
S4 - Minor
Status
closed

The bug is in line 53 of that plugin:
for (var v = 0; v < 3; v++) {

Correct would be:
for (var v = 0; v < 4; v++) {
or
for (var v = 0; v <= 3; v++) {


Comments

Thanks for your comments, Jojo.
Yes I did copy that function, but in the JavaScript bit of the plugin, the turnBlack() function is not used, so the bug has no effect. The JavaScript calls a Java program which turns the notes black. Have you seen a problem when using the plugin, or did you just spot the error in the JavaScript?

As you can see, the JavaScript saves the score as a MIDI file, then the Java program reads this in, compares it to the notes being played and turns the notes green as appropriate. This imposes some limitations on what I can achieve, for example it does not colour in the second note of a tie & it does not cope well with "swung" music. I will try to investigate a bit more.

The plugin should work on Linux if you change the JavaScript to call the Java directly, instead of via the batch file. I don't have Linux, so I'm unable to test this. I'd be interested to know if you can get this going. It should be possible to skip the batch file in Windows too, so making it cross-platform.

There is a limitation on the length of scores - the MuseScore OSC interface takes an int for the MIDI tick number, not a long. This is unlikely to be a problem for sight-reading.
As for the version of MuseScore, the PDF instructions explain that.

The next version will hopfully check the tempo and rhythm.

Thanks.

Status (old) patch (ready to commit) fixed

I just noticed the 'broken' JavaScript code, due to lack of a MIDI Keyboard (and the capabilitieies to play on it in the first place) I didn't test the plugin at all.
So that part is just dead code -> problem fixed...