Mercurial > hg > svcore
comparison 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 |
comparison
equal
deleted
inserted
replaced
1773:fadd9f8aaa27 | 1774:f19711ab7074 |
---|---|
60 sv_frame_t fromReference(sv_frame_t frame) const; | 60 sv_frame_t fromReference(sv_frame_t frame) const; |
61 | 61 |
62 void setPathFrom(ModelId pathSource); // a SparseTimeValueModel | 62 void setPathFrom(ModelId pathSource); // a SparseTimeValueModel |
63 void setPath(const Path &path); | 63 void setPath(const Path &path); |
64 | 64 |
65 /** | |
66 * Set the calculated pitch relative to a reference. This is | |
67 * purely metadata. | |
68 */ | |
69 void setRelativePitch(int cents) { m_relativePitch = cents; } | |
70 | |
71 /** | |
72 * Get the value set with setRelativePitch. | |
73 */ | |
74 int getRelativePitch() const { return m_relativePitch; } | |
75 | |
65 void toXml(QTextStream &stream, | 76 void toXml(QTextStream &stream, |
66 QString indent = "", | 77 QString indent = "", |
67 QString extraAttributes = "") const override; | 78 QString extraAttributes = "") const override; |
68 | 79 |
69 QString toDelimitedDataString(QString, DataExportOptions, | 80 QString toDelimitedDataString(QString, DataExportOptions, |
88 mutable std::unique_ptr<Path> m_path; | 99 mutable std::unique_ptr<Path> m_path; |
89 mutable std::unique_ptr<Path> m_reversePath; | 100 mutable std::unique_ptr<Path> m_reversePath; |
90 bool m_pathBegun; | 101 bool m_pathBegun; |
91 bool m_pathComplete; | 102 bool m_pathComplete; |
92 QString m_error; | 103 QString m_error; |
104 int m_relativePitch; | |
93 | 105 |
94 void constructPath() const; | 106 void constructPath() const; |
95 void constructReversePath() const; | 107 void constructReversePath() const; |
96 | 108 |
97 sv_frame_t performAlignment(const Path &path, sv_frame_t frame) const; | 109 sv_frame_t performAlignment(const Path &path, sv_frame_t frame) const; |