annotate align/LinearAligner.h @ 770:486add472c3f pitch-align

Implement trimmed linear aligner
author Chris Cannam
date Thu, 28 May 2020 17:52:19 +0100
parents dd742e566e60
children
rev   line source
Chris@767 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@767 2
Chris@767 3 /*
Chris@767 4 Sonic Visualiser
Chris@767 5 An audio file viewer and annotation editor.
Chris@767 6 Centre for Digital Music, Queen Mary, University of London.
Chris@767 7
Chris@767 8 This program is free software; you can redistribute it and/or
Chris@767 9 modify it under the terms of the GNU General Public License as
Chris@767 10 published by the Free Software Foundation; either version 2 of the
Chris@767 11 License, or (at your option) any later version. See the file
Chris@767 12 COPYING included with this distribution for more information.
Chris@767 13 */
Chris@767 14
Chris@767 15 #ifndef SV_LINEAR_ALIGNER_H
Chris@767 16 #define SV_LINEAR_ALIGNER_H
Chris@767 17
Chris@767 18 #include "Aligner.h"
Chris@767 19
Chris@767 20 class AlignmentModel;
Chris@767 21 class Document;
Chris@767 22
Chris@767 23 class LinearAligner : public Aligner
Chris@767 24 {
Chris@767 25 Q_OBJECT
Chris@767 26
Chris@767 27 public:
Chris@767 28 LinearAligner(Document *doc,
Chris@767 29 ModelId reference,
Chris@767 30 ModelId toAlign,
Chris@767 31 bool trimmed);
Chris@767 32
Chris@767 33 ~LinearAligner();
Chris@767 34
Chris@767 35 void begin() override;
Chris@767 36
Chris@767 37 static bool isAvailable() {
Chris@767 38 return true;
Chris@767 39 }
Chris@767 40
Chris@767 41 private:
Chris@767 42 Document *m_document;
Chris@767 43 ModelId m_reference;
Chris@767 44 ModelId m_toAlign;
Chris@767 45 bool m_trimmed;
Chris@770 46
Chris@770 47 bool getTrimmedExtents(ModelId model, sv_frame_t &start, sv_frame_t &end);
Chris@767 48 };
Chris@767 49
Chris@767 50 #endif