Chris@752: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@752: Chris@752: /* Chris@752: Sonic Visualiser Chris@752: An audio file viewer and annotation editor. Chris@752: Centre for Digital Music, Queen Mary, University of London. Chris@752: Chris@752: This program is free software; you can redistribute it and/or Chris@752: modify it under the terms of the GNU General Public License as Chris@752: published by the Free Software Foundation; either version 2 of the Chris@752: License, or (at your option) any later version. See the file Chris@752: COPYING included with this distribution for more information. Chris@752: */ Chris@752: Chris@777: #ifndef SV_MATCH_ALIGNER_H Chris@777: #define SV_MATCH_ALIGNER_H Chris@752: Chris@753: #include "Aligner.h" Chris@752: Chris@752: class AlignmentModel; Chris@752: class Document; Chris@752: Chris@777: class MATCHAligner : public Aligner Chris@752: { Chris@752: Q_OBJECT Chris@752: Chris@752: public: Chris@777: MATCHAligner(Document *doc, Chris@777: ModelId reference, Chris@777: ModelId toAlign, Chris@777: bool withTuningDifference); Chris@752: Chris@752: // Destroy the aligner, cleanly cancelling any ongoing alignment Chris@777: ~MATCHAligner(); Chris@752: Chris@761: void begin() override; Chris@752: Chris@752: static bool isAvailable(); Chris@752: Chris@752: private slots: Chris@752: void alignmentCompletionChanged(ModelId); Chris@752: void tuningDifferenceCompletionChanged(ModelId); Chris@752: Chris@752: private: Chris@752: static QString getAlignmentTransformName(); Chris@752: static QString getTuningDifferenceTransformName(); Chris@752: Chris@752: bool beginAlignmentPhase(); Chris@752: Chris@752: Document *m_document; Chris@752: ModelId m_reference; Chris@752: ModelId m_toAlign; Chris@752: ModelId m_aggregateModel; // an AggregateWaveModel Chris@752: ModelId m_alignmentModel; // an AlignmentModel Chris@752: ModelId m_tuningDiffOutputModel; // SparseTimeValueModel, unreg'd with doc Chris@752: ModelId m_pathOutputModel; // SparseTimeValueModel, unreg'd with doc Chris@767: bool m_withTuningDifference; Chris@752: float m_tuningFrequency; Chris@752: bool m_incomplete; Chris@752: }; Chris@752: Chris@752: #endif