# HG changeset patch # User Chris Cannam # Date 1565889502 -3600 # Node ID 175770a1349518be64ea70e9929707c2e10da26e # Parent d09345e578a7b27138710402e5fd60f067d0994e Show relative pitch if recorded diff -r d09345e578a7 -r 175770a13495 view/Pane.cpp --- a/view/Pane.cpp Wed Aug 14 10:58:24 2019 +0100 +++ b/view/Pane.cpp Thu Aug 15 18:18:22 2019 +0100 @@ -35,6 +35,7 @@ //!!! ugh #include "data/model/WaveFileModel.h" +#include "data/model/AlignmentModel.h" #include #include @@ -834,10 +835,19 @@ text = tr("Unaligned"); } else { completion = model->getAlignmentCompletion(); + int relativePitch = 0; + if (auto alignmentModel = + ModelById::getAs(model->getAlignment())) { + relativePitch = alignmentModel->getRelativePitch(); + } if (completion == 0) { text = tr("Unaligned"); } else if (completion < 100) { text = tr("Aligning: %1%").arg(completion); + } else if (relativePitch < 0) { + text = tr("Aligned at -%1 cents").arg(-relativePitch); + } else if (relativePitch > 0) { + text = tr("Aligned at +%1 cents").arg(relativePitch); } else { text = tr("Aligned"); }