retrograde plugin: Typo in plugin name

• Jun 12, 2012 - 16:14
Type
Functional
Severity
3
Status
closed
Project
  1. 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
          };
    
  2. 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
    
  3. 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();
                      }
                }
    
  4. Last but not least:
                if(typeof chord == 'object'){
    

    Shouldn't this rather be the following?

                if(typeof chord === 'object'){
    

Comments

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!?!