more status line stuff
authormirabilos <tg@debian.org>
Sun, 25 Oct 2020 02:09:43 +0000 (03:09 +0100)
committermirabilos <mirabilos@evolvis.org>
Sun, 25 Oct 2020 02:09:43 +0000 (03:09 +0100)
debian/changelog
debian/patches/experiments/statusline-velocity-onoff.diff [new file with mode: 0644]
debian/patches/series

index a6f3129..15f3fd9 100644 (file)
@@ -3,8 +3,9 @@ musescore3 (3.2.3+dfsg1-7) unstable; urgency=medium
   * Address QA warning in AppData
   * Quell another debugging output
   * Update musical font against latest PR sent upstream
   * Address QA warning in AppData
   * Quell another debugging output
   * Update musical font against latest PR sent upstream
+  * Also indicate tuning, on/off time in the status line
 
 
- -- Thorsten Glaser <tg@mirbsd.de>  Sun, 25 Oct 2020 02:19:46 +0100
+ -- Thorsten Glaser <tg@mirbsd.de>  Sun, 25 Oct 2020 03:09:23 +0100
 
 musescore3 (3.2.3+dfsg1-6) unstable; urgency=low
 
 
 musescore3 (3.2.3+dfsg1-6) unstable; urgency=low
 
diff --git a/debian/patches/experiments/statusline-velocity-onoff.diff b/debian/patches/experiments/statusline-velocity-onoff.diff
new file mode 100644 (file)
index 0000000..a910cb0
--- /dev/null
@@ -0,0 +1,47 @@
+# DP: https://musescore.org/en/node/290900#comment-927933
+# DP: requested velocity, on time, off time
+# DP: but velocity is hard (needs full rendermidi)
+# DP: this does tuning, on/off time
+
+--- a/libmscore/note.cpp
++++ b/libmscore/note.cpp
+@@ -2766,21 +2766,31 @@ QString Note::accessibleInfo() const
+       QString duration = chord()->durationUserName();
+       QString voice = QObject::tr("Voice: %1").arg(QString::number(track() % VOICES + 1));
+       QString pitchName;
++      QString pitchOffset;
++      QString onofftime;
++      if (!_playEvents.empty()) {
++            int on = _playEvents[0].ontime();
++            int off = _playEvents[0].offtime();
++            if (on != 0 || off != NoteEvent::NOTE_LENGTH)
++                  onofftime = QObject::tr(" (on %1‰ off %2‰)").arg(on).arg(off);
++            }
+       const Drumset* drumset = part()->instrument()->drumset();
+       if (fixed() && headGroup() == NoteHead::Group::HEAD_SLASH)
+             pitchName = chord()->noStem() ? QObject::tr("Beat slash") : QObject::tr("Rhythm slash");
+       else if (staff()->isDrumStaff(tick()) && drumset)
+             pitchName = qApp->translate("drumset", drumset->name(pitch()).toUtf8().constData());
+-      else if (!concertPitch()) {
++      else {
+             pitchName = tpcUserName(false);
+-            // tpcUserName equivalent for getting the sounding pitch
+-            QString soundingPitch = propertyUserValue(Pid::TPC1) + QString::number(((_pitch + ottaveCapoFret() - int(tpc2alter(tpc()))) / 12) - 1);
+-            // almost the same string as below
+-            return QObject::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)));
++            if (tuning() != 0)
++                  pitchOffset = QString::asprintf("%+.3f", tuning());
++            if (!concertPitch()) {
++                  // tpcUserName equivalent for getting the sounding pitch
++                  QString soundingPitch = propertyUserValue(Pid::TPC1) + QString::number(((_pitch + ottaveCapoFret() - int(tpc2alter(tpc()))) / 12) - 1);
++                  // almost the same string as below
++                  return QObject::tr("%1; Pitch: %2 (sounding as %3%4); Duration: %5%6%7").arg(noteTypeUserName()).arg(pitchName).arg(soundingPitch).arg(pitchOffset).arg(duration).arg(onofftime).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
++                  }
+             }
+-      else
+-            pitchName = tpcUserName(false);
+-      return QObject::tr("%1; Pitch: %2; Duration: %3%4").arg(noteTypeUserName()).arg(pitchName).arg(duration).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
++      return QObject::tr("%1; Pitch: %2%3; Duration: %4%5%6").arg(noteTypeUserName()).arg(pitchName).arg(pitchOffset).arg(duration).arg(onofftime).arg((chord()->isGrace() ? "" : QString("; %1").arg(voice)));
+       }
+ //---------------------------------------------------------
index 59eb021..b3d398c 100644 (file)
@@ -82,6 +82,7 @@ experiments/smufl-fixes.diff
 experiments/fix-accidental-paren-pos.diff
 experiments/improve-mscore-font.diff
 experiments/silence-qdebug.diff
 experiments/fix-accidental-paren-pos.diff
 experiments/improve-mscore-font.diff
 experiments/silence-qdebug.diff
+experiments/statusline-velocity-onoff.diff
 experiments/revert-restriking-patch.diff
 experiments/log-collisions.diff
 #debian-specific/qt-5.7.diff
 experiments/revert-restriking-patch.diff
 experiments/log-collisions.diff
 #debian-specific/qt-5.7.diff