Mercurial > hg > svapp
comparison align/TransformDTWAligner.h @ 768:1b1960009be6 pitch-align
Provide callback for output preprocessing before DTW, use it for freq-pitch conversion; use direct setting of completion on alignment models instead of creating fake outputs for completion only
author | Chris Cannam |
---|---|
date | Fri, 22 May 2020 17:17:44 +0100 |
parents | dd742e566e60 |
children | 1d6cca5a5621 |
comparison
equal
deleted
inserted
replaced
767:dd742e566e60 | 768:1b1960009be6 |
---|---|
17 | 17 |
18 #include "Aligner.h" | 18 #include "Aligner.h" |
19 | 19 |
20 #include "transform/Transform.h" | 20 #include "transform/Transform.h" |
21 | 21 |
22 #include <functional> | |
23 | |
22 class AlignmentModel; | 24 class AlignmentModel; |
23 class Document; | 25 class Document; |
24 | 26 |
25 class TransformDTWAligner : public Aligner | 27 class TransformDTWAligner : public Aligner |
26 { | 28 { |
35 TransformDTWAligner(Document *doc, | 37 TransformDTWAligner(Document *doc, |
36 ModelId reference, | 38 ModelId reference, |
37 ModelId toAlign, | 39 ModelId toAlign, |
38 Transform transform, | 40 Transform transform, |
39 DTWType dtwType); | 41 DTWType dtwType); |
42 | |
43 TransformDTWAligner(Document *doc, | |
44 ModelId reference, | |
45 ModelId toAlign, | |
46 Transform transform, | |
47 DTWType dtwType, | |
48 std::function<double(double)> outputPreprocessor); | |
40 | 49 |
41 // Destroy the aligner, cleanly cancelling any ongoing alignment | 50 // Destroy the aligner, cleanly cancelling any ongoing alignment |
42 ~TransformDTWAligner(); | 51 ~TransformDTWAligner(); |
43 | 52 |
44 void begin() override; | 53 void begin() override; |
56 Document *m_document; | 65 Document *m_document; |
57 ModelId m_reference; | 66 ModelId m_reference; |
58 ModelId m_toAlign; | 67 ModelId m_toAlign; |
59 ModelId m_referenceOutputModel; | 68 ModelId m_referenceOutputModel; |
60 ModelId m_toAlignOutputModel; | 69 ModelId m_toAlignOutputModel; |
61 ModelId m_alignmentProgressModel; | |
62 ModelId m_alignmentModel; | 70 ModelId m_alignmentModel; |
63 bool m_referenceTransformComplete; | |
64 bool m_toAlignTransformComplete; | |
65 Transform m_transform; | 71 Transform m_transform; |
66 DTWType m_dtwType; | 72 DTWType m_dtwType; |
67 bool m_incomplete; | 73 bool m_incomplete; |
74 std::function<double(double)> m_outputPreprocessor; | |
68 }; | 75 }; |
69 | 76 |
70 #endif | 77 #endif |