retrograde plugin: Typo in plugin name
-
var mscorePlugin = { menu: 'Plugins.Retrogade selection', init: init, run: run };
There is an 'r' missing, I guess it should rather be:
var mscorePlugin = { menu: 'Plugins.Retrograde selection', init: init, run: run };
- Furthermore there are some confusing and wrong comments:
score.appendPart("Flute"); // create two staff piano part score.appendMeasures(50); // append five empty messages
Guess it should rather be:
score.appendPart("Flute"); // create one staff flute part score.appendMeasures(50); // append fifty empty measures
- While at it: the voice loop doesn't really loop, it works on voice 1 only:
for (var voice = 0; voice < 1; voice++) { cursor.voice = voice; cursor.goToSelectionStart();
so it could as well go away, reducing the code to:
for (var staff = startStaff; staff < endStaff; ++staff) { cursor.goToSelectionStart(); cursor.staff = staff; while (cursor.tick() < selectionEnd.tick()) { if (cursor.isChord()) { var chord = cursor.chord(); chordArray.push(chord); }else if (cursor.isRest()){ var rest = cursor.rest(); chordArray.push(rest.tickLen); } cursor.next(); } }
- Last but not least:
if(typeof chord == 'object'){
Shouldn't this rather be the following?
if(typeof chord === 'object'){
Comments
fixed in ba6f10f25c
Whow, that was quick!
Another one:
Couldn't it pick time and key sig from the existing score and create the new one alike?
no. There is no way to do that with the current plugin framework.
Not simply this?
score.keysig = curScore.keysig;
score.timesig = curScore.timesig;
Seems to work for me...
It works for keysig only. Timesig is not defined. If you want to make a pull request, be my guest :)
as per Score Object timesig is available as of 1.1
It got added to the documentaton by Soerboe on 5Jul2011
Is that wrong?
Apparently not, as it does indeed work. Pull request to follow ;-)
Well, it works in the sense of creating that new score with the correct keysig, but closing the original score (without having done anything to it) causes MuseScore to crash!?!
Automatically closed -- issue fixed for 2 weeks with no activity.