add a PR of mine pending merging
authormirabilos <tg@debian.org>
Sun, 2 Jun 2019 17:17:07 +0000 (19:17 +0200)
committermirabilos <mirabilos@evolvis.org>
Sun, 2 Jun 2019 22:28:35 +0000 (00:28 +0200)
(cherry picked from commit e7d7b9b85ad12cd5807f105900ee7df6c2908c88)
(then backported)

debian/changelog
debian/patches/experiments/statusline-concert-transposing-pitch.diff [new file with mode: 0644]
debian/patches/series

index ccce801..21f4c44 100644 (file)
@@ -4,6 +4,7 @@ musescore2 (2.3.2+dfsg3-2) wtf; urgency=low
   * debian/buildtest: move nocheck test here
   * Streamline and (slightly) optimise debian/rules
   * Build under the C.UTF-8 locale
+  * Add patch to show two pitches (in transposing mode) in status line
 
  -- Thorsten Glaser <tg@mirbsd.de>  Sun, 02 Jun 2019 21:53:08 +0200
 
diff --git a/debian/patches/experiments/statusline-concert-transposing-pitch.diff b/debian/patches/experiments/statusline-concert-transposing-pitch.diff
new file mode 100644 (file)
index 0000000..20b580f
--- /dev/null
@@ -0,0 +1,30 @@
+Description: Indicate the sounding pitch in the status line if…
+  * the current instrument has an actual pitch
+    (not beat/rhythm slashes or drums)
+  * the Concert Pitch (global) toggle is off
+ .
+ This will show the same pitch twice for nōn-transposing
+ instruments; that’s by design, to show we’re currently
+ in transposing pitch mode but that instrument does not
+ transpose (helps debugging).
+ .
+ Partially addresses node #283120.
+Author: mirabilos <m@mirbsd.org>
+Forwarded: https://github.com/musescore/MuseScore/pull/5036
+
+--- a/libmscore/note.cpp
++++ b/libmscore/note.cpp
+@@ -2652,6 +2652,13 @@ QString Note::accessibleInfo()
+             pitchName = chord()->noStem() ? tr("Beat Slash") : tr("Rhythm Slash");
+       else if (staff()->isDrumStaff() && drumset)
+             pitchName = qApp->translate("drumset", drumset->name(pitch()).toUtf8().constData());
++      else if (!concertPitch()) {
++            pitchName = tpcUserName(false);
++            // tpcUserName equivalent for getting the sounding pitch
++            QString soundingPitch = tpc2name(_tpc[0], NoteSpellingType::STANDARD, NoteCaseType::AUTO, false) + QString::number((_pitch / 12) - 1);
++            // almost the same string as below
++            return tr("%1; Pitch: %2 (sounding as %3); Duration: %4%5").arg(noteTypeUserName()).arg(pitchName).arg(soundingPitch).arg(duration).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
++            }
+       else
+             pitchName = tpcUserName(false);
+       return tr("%1; Pitch: %2; Duration: %3%4").arg(noteTypeUserName()).arg(pitchName).arg(duration).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
index d61138f..308cbd7 100644 (file)
@@ -13,3 +13,4 @@ debian-specific/fixup-AppData.diff
 experiments/lyrics-hyphen-max-8sp.diff
 experiments/musescore-2.1.0-qt-5.12.patch
 experiments/revert-restriking-patch.diff
+experiments/statusline-concert-transposing-pitch.diff