"BigTime": Large time signatures plugin [Release, proof-of-concept]

• Jan 5, 2022 - 14:11

Large time signatures have been requested in MuseScore for some time, but currently are not natively supported. This is a plugin which "converts" MuseScore time signatures into text-based large time signatures.

Plugin: https://gitlab.com/RunasSudo/musescore-bigtime-plugin/-/blob/master/Big…

Screenshot.png

Some notes:

  • Internally, the native time signatures are stretched to reserve space for the large time signatures, and hidden by making the opacity 0.
  • The large time signatures have the User-1 style applied. For correct results, reduce the line spacing (e.g. 0.34li).

This is a very simple implementation and has some shortcomings – e.g. there is limited customisability – but given how long this feature request has stood I thought I'd put this up as a proof-of-concept of sorts.


Comments

Thanks L'Moose on Discord for the suggestion – I've updated the plugin to use SMuFL large time signature symbols from Bravura. This removes the need to download and install any separate fonts!

In reply to by [DELETED] 28444986

//=============================================================================
// MuseScore
// Music Composition & Notation
//
// Note Names Plugin
//
// Copyright (C) 2012 Werner Schweer
// Copyright (C) 2013 - 2019 Joachim Schmitz
// Copyright (C) 2014 Jörn Eichler
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2
// as published by the Free Software Foundation and appearing in
// the file LICENCE.GPL
//=============================================================================

import QtQuick 2.0
import MuseScore 3.0

MuseScore {
version: "3.0"
description: qsTr("This plugin names notes as per your language setting")
menuPath: "Plugins.Notes." + qsTr("Note Names") // this does not work, why?

function nameChord (notes, text) {
for (var i = 0; i < notes.length; i++) {
console.log(notes);
console.log(i);
console.log("回数; " +notes[i].tpc);
console.log("ピッチ; " +notes[0].pitch);
//cursor.add("あ");
var sep = "\n"; // change to "\n" if you want them vertically
if ( i > 0 )
text.text = sep + text.text; // any but top note

     if (typeof notes[i].tpc === "undefined") // like for grace notes ?!?
        return
     switch (notes[i].tpc) {
        case -1: text.text = qsTranslate("InspectorAmbitus", "F♭♭") + text.text; break;
        case  0: text.text = qsTranslate("InspectorAmbitus", "C♭♭") + text.text; break;
        case  1: text.text = qsTranslate("InspectorAmbitus", "G♭♭") + text.text; break;
        case  2: text.text = qsTranslate("InspectorAmbitus", "D♭♭") + text.text; break;
        case  3: text.text = qsTranslate("InspectorAmbitus", "A♭♭") + text.text; break;
        case  4: text.text = qsTranslate("InspectorAmbitus", "E♭♭") + text.text; break;
        case  5: text.text = qsTranslate("InspectorAmbitus", "B♭♭") + text.text; break;
        case  6: text.text = qsTranslate("InspectorAmbitus", "F♭")  + text.text; break;
        case  7: text.text = qsTranslate("InspectorAmbitus", "C♭")  + text.text; break;

        case  8: text.text = qsTranslate("InspectorAmbitus", "G♭")  + text.text; break;
        case  9: text.text = qsTranslate("InspectorAmbitus", "D♭")  + text.text; break;
        case 10: text.text = qsTranslate("InspectorAmbitus", "A♭")  + text.text; break;
        case 11: text.text = qsTranslate("InspectorAmbitus", "E♭")  + text.text; break;
        case 12: text.text = qsTranslate("InspectorAmbitus", "B♭")  + text.text; break;
        case 13: text.text = qsTranslate("InspectorAmbitus", "F")   + text.text; break;
        case 14: text.text = qsTranslate("InspectorAmbitus", "比")   + text.text; break;
        case 15: text.text = qsTranslate("InspectorAmbitus", "十")   + text.text; break;
        case 16: if (notes[0].pitch ==74 ){text.text = qsTranslate("InspectorAmbitus", "上")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "凢")   + text.text;}
              break;
        case 17: if (notes[0].pitch ==69 ){text.text = qsTranslate("InspectorAmbitus", "行")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "乞")   + text.text;}
              break;
        case 18: 
              if (notes[0].pitch ==64 ){text.text = qsTranslate("InspectorAmbitus", "乙")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "八")   + text.text;}
              break;
        case 19: if (notes[0].pitch ==59 ){text.text = qsTranslate("InspectorAmbitus", "一")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "七")   + text.text;}
              break;
        case 20:if (notes[0].pitch ==66 ){text.text = qsTranslate("InspectorAmbitus", "下")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "千")   + text.text;}
              break;
        case 21: if (notes[0].pitch ==61 ){text.text = qsTranslate("InspectorAmbitus", "工")   + text.text;}
              else{text.text = qsTranslate("InspectorAmbitus", "言")   + text.text;}
              break;
        case 22: text.text = qsTranslate("InspectorAmbitus", "美")  + text.text; break;
        case 23: text.text = qsTranslate("InspectorAmbitus", "D♯")  + text.text; break;
        case 24: text.text = qsTranslate("InspectorAmbitus", "A♯")  + text.text; break;
        case 25: text.text = qsTranslate("InspectorAmbitus", "E♯")  + text.text; break;
        case 26: text.text = qsTranslate("InspectorAmbitus", "B♯")  + text.text; break;
        case 27: text.text = qsTranslate("InspectorAmbitus", "F♯♯") + text.text; break;
        case 28: text.text = qsTranslate("InspectorAmbitus", "C♯♯") + text.text; break;
        case 29: text.text = qsTranslate("InspectorAmbitus", "G♯♯") + text.text; break;
        case 30: text.text = qsTranslate("InspectorAmbitus", "D♯♯") + text.text; break;
        case 31: text.text = qsTranslate("InspectorAmbitus", "A♯♯") + text.text; break;
        case 32: text.text = qsTranslate("InspectorAmbitus", "E♯♯") + text.text; break;
        case 33: text.text = qsTranslate("InspectorAmbitus", "B♯♯") + text.text; break;
        case 34: text.text = qsTranslate("InspectorAmbitus", "あ") + text.text; break;
        case 35: text.text = qsTranslate("InspectorAmbitus", "い") + text.text; break;
        case 36: text.text = qsTranslate("InspectorAmbitus", "う") + text.text; break;
        default: text.text = qsTr("?")   + text.text; break;
     } // end switch tpc

     //switch (notes[0].pitch) {
       // case 57: text.text = qsTranslate("InspectorAmbitus", "乞") + text.text; break;
        //case 59: text.text = qsTranslate("InspectorAmbitus", "一") + text.text; break;
       // case 61: text.text = qsTranslate("InspectorAmbitus", "工") + text.text; break;
       // case 62: text.text = qsTranslate("InspectorAmbitus", "凡") + text.text; break;
       // case 64: text.text = qsTranslate("InspectorAmbitus", "乙") + text.text; break;
       // case 66: text.text = qsTranslate("InspectorAmbitus", "下") + text.text; break;
       // case 67: text.text = qsTranslate("InspectorAmbitus", "十") + text.text; break;
       // case 68: text.text = qsTranslate("InspectorAmbitus", "美") + text.text; break;
        //case 69: text.text = qsTranslate("InspectorAmbitus", "行") + text.text; break;
       // case 71: text.text = qsTranslate("InspectorAmbitus", "七") + text.text; break;
       // case 74: text.text = qsTranslate("InspectorAmbitus", "上") + text.text; break;
        //case 76: text.text = qsTranslate("InspectorAmbitus", "八") + text.text; break;
        //case 78: text.text = qsTranslate("InspectorAmbitus", "千") + text.text; break;
     //}

     // octave, middle C being C4
     //text.text += (Math.floor(notes[i].pitch / 12) - 1)
     // or
     //text.text += (Math.floor(notes[i].ppitch / 12) - 1)

// change below false to true for courtesy- and microtonal accidentals
// you might need to come up with suitable translations
// only #, b, natural and possibly also ## seem to be available in UNICODE
if (false) {
switch (notes[i].userAccidental) {
case 0: break;
case 1: text.text = qsTranslate("accidental", "Sharp") + text.text; break;
case 2: text.text = qsTranslate("accidental", "Flat") + text.text; break;
case 3: text.text = qsTranslate("accidental", "Double sharp") + text.text; break;
case 4: text.text = qsTranslate("accidental", "Double flat") + text.text; break;
case 5: text.text = qsTranslate("accidental", "Natural") + text.text; break;
case 6: text.text = qsTranslate("accidental", "Flat-slash") + text.text; break;
case 7: text.text = qsTranslate("accidental", "Flat-slash2") + text.text; break;
case 8: text.text = qsTranslate("accidental", "Mirrored-flat2") + text.text; break;
case 9: text.text = qsTranslate("accidental", "Mirrored-flat") + text.text; break;
case 10: text.text = qsTranslate("accidental", "Mirrored-flat-slash") + text.text; break;
case 11: text.text = qsTranslate("accidental", "Flat-flat-slash") + text.text; break;
case 12: text.text = qsTranslate("accidental", "Sharp-slash") + text.text; break;
case 13: text.text = qsTranslate("accidental", "Sharp-slash2") + text.text; break;
case 14: text.text = qsTranslate("accidental", "Sharp-slash3") + text.text; break;
case 15: text.text = qsTranslate("accidental", "Sharp-slash4") + text.text; break;
case 16: text.text = qsTranslate("accidental", "Sharp arrow up") + text.text; break;
case 17: text.text = qsTranslate("accidental", "Sharp arrow down") + text.text; break;
case 18: text.text = qsTranslate("accidental", "Sharp arrow both") + text.text; break;
case 19: text.text = qsTranslate("accidental", "Flat arrow up") + text.text; break;
case 20: text.text = qsTranslate("accidental", "Flat arrow down") + text.text; break;
case 21: text.text = qsTranslate("accidental", "Flat arrow both") + text.text; break;
case 22: text.text = qsTranslate("accidental", "Natural arrow down") + text.text; break;
case 23: text.text = qsTranslate("accidental", "Natural arrow up") + text.text; break;
case 24: text.text = qsTranslate("accidental", "Natural arrow both") + text.text; break;
case 25: text.text = qsTranslate("accidental", "Sori") + text.text; break;
case 26: text.text = qsTranslate("accidental", "Koron") + text.text; break;
default: text.text = qsTr("?") + text.text; break;
} // end switch userAccidental
} // end if courtesy- and microtonal accidentals
} // end for note
}

onRun: {
if (typeof curScore === 'undefined')
Qt.quit();

  var cursor = curScore.newCursor();
  var startStaff;
  var endStaff;
  var endTick;
  var fullScore = false;
  cursor.rewind(1);
  if (!cursor.segment) { // no selection
     fullScore = true;
     startStaff = 0; // start with 1st staff
     endStaff  = curScore.nstaves - 1; // and end with last
  } else {
     startStaff = cursor.staffIdx;
     cursor.rewind(2);
     if (cursor.tick === 0) {
        // this happens when the selection includes
        // the last measure of the score.
        // rewind(2) goes behind the last segment (where
        // there's none) and sets tick=0
        endTick = curScore.lastSegment.tick + 1;
     } else {
        endTick = cursor.tick;
     }
     endStaff = cursor.staffIdx;
  }
  console.log(startStaff + " - " + endStaff + " - " + endTick)

  for (var staff = startStaff; staff &lt;= endStaff; staff++) {
     for (var voice = 0; voice &lt; 4; voice++) {
        cursor.rewind(1); // beginning of selection
        cursor.voice    = voice;
        cursor.staffIdx = staff;

        if (fullScore)  // no selection
           cursor.rewind(0); // beginning of score

        while (cursor.segment &amp;&amp; (fullScore || cursor.tick &lt; endTick)) {
           if (cursor.element &amp;&amp; cursor.element.type === Element.CHORD) {
              var text = newElement(Element.STAFF_TEXT);

              var graceChords = cursor.element.graceNotes;
              for (var i = 0; i &lt; graceChords.length; i++) {
                 // iterate through all grace chords
                 var graceNotes = graceChords[i].notes;
                 nameChord(graceNotes, text);
                 // there seems to be no way of knowing the exact horizontal pos.
                 // of a grace note, so we have to guess:
                 text.offsetX = -2.5 * (graceChords.length - i);
                 //switch (voice) {
                    //case 0: text.offsetY =  1; break;
                    //case 1: text.offsetY = 10; break;
                    //case 2: text.offsetY = -1; break;
                    //case 3: text.offsetY = 12; break;
                 //}

                 cursor.add(text);
                 // new text for next element
                 text = newElement(Element.STAFF_TEXT);
              }

              var notes = cursor.element.notes;
              nameChord(notes, text);

              //switch (voice) {
                 //case 0: text.offsetY =  1; break;
                 //case 1: text.offsetY = 10; break;
                 //case 2: text.offsetY = -1; break;
                 //case 3: text.offsetY = 12; break;
              //}
              if ((voice == 0) &amp;&amp; (notes[0].pitch &gt; 83))
                 text.offsetX = 1;
              cursor.add(text);
           } // end if CHORD
           cursor.next();
        } // end while segment
     } // end for voice
  } // end for staff
  Qt.quit();

} // end onRun
}

MuseScore笙プラグインβ版0606.txt
MuseScore笙プラグイン
β版0606.txt を表示しています。

Hi there! It's 2024 and I decided to Download this plugin. I have no idea if it is still supported, but as Musescore is my notation engine of choice, I would really like to use this plugin. I downloaded the 1.4 version and enabled it in my plugins folder, but it is not applying or running correctly for me. I have a Windows 10 Desktop and running the most recent version of Musescore Studio 4.3. Whenever I launch and try to apply the plugin to my time signature(s), it gives me "Run Plugin BigTime" as the of prompt. I click it and my software crashes.

If this comment reaches you, I am in need of some clarification. If I missed a step, or if there is anything wrong.

Attachment Size
BigTime_help.png 125.17 KB

In reply to by Mason Kistler

Hi there, I am aware the plugin sadly isn't compatible with MuseScore Studio 4. It is on my to do list to fix, but I am not actively using the plugin at the moment and so unfortunately it is not an immediate priority.

If anyone is interested I would welcome code contributions or for someone to fork and continue maintenance.

In reply to by RunasSudo

Try this, and tell us whether it works...
It should work in Mu3 and Mu4 (including 4.4), just 7 added and 4 changed lines:

$ diff -u BigTime.qml.orig BigTime.qml
--- BigTime.qml.orig    2024-08-19 13:14:00.849288600 +0200
+++ BigTime.qml 2024-08-19 13:09:01.597413800 +0200
@@ -14,14 +14,21 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-import QtQuick 2.0
+import QtQuick 2.9
 import MuseScore 3.0
 
 MuseScore {
        version: "1.4"
        description: "Large time signatures"
        menuPath: "Plugins.BigTime"
-
+
+        //4.4 title: "Big Time Signatures"
+       Component.onCompleted : {
+               if (mscoreMajorVersion >= 4 && mscoreMinorVersion <= 3) {
+                               title = "Big Time Signatures";
+               }
+       }
+
        onRun: {
 
                // -----------------------
@@ -63,7 +70,7 @@
                // ------------------
 
                if (!curScore) {
-                       Qt.quit();
+                       (typeof(quit) === 'undefined' ? Qt.quit : quit)()
                }
 
                var cursor = curScore.newCursor(); // TODO: Is this necessary?
@@ -174,6 +181,6 @@
                        }
                }
 
-               Qt.quit();
+               (typeof(quit) === 'undefined' ? Qt.quit : quit)()
        }
 }
Attachment Size
BigTime.qml 5.55 KB

Do you still have an unanswered question? Please log in first to post your question.