diff data/model/AlignmentModel.h @ 1774:f19711ab7074

Optionally record relative pitch
author Chris Cannam
date Thu, 15 Aug 2019 18:18:03 +0100
parents ee7fd2c01d87
children c546429d4c2f
line wrap: on
line diff
--- a/data/model/AlignmentModel.h	Wed Aug 14 13:54:23 2019 +0100
+++ b/data/model/AlignmentModel.h	Thu Aug 15 18:18:03 2019 +0100
@@ -62,6 +62,17 @@
     void setPathFrom(ModelId pathSource); // a SparseTimeValueModel
     void setPath(const Path &path);
 
+    /**
+     * Set the calculated pitch relative to a reference. This is
+     * purely metadata.
+     */
+    void setRelativePitch(int cents) { m_relativePitch = cents; }
+
+    /**
+     * Get the value set with setRelativePitch.
+     */
+    int getRelativePitch() const { return m_relativePitch; }
+
     void toXml(QTextStream &stream,
                QString indent = "",
                QString extraAttributes = "") const override;
@@ -90,6 +101,7 @@
     bool m_pathBegun;
     bool m_pathComplete;
     QString m_error;
+    int m_relativePitch;
 
     void constructPath() const;
     void constructReversePath() const;