c@116: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ c@116: /* c@116: Constant-Q library c@116: Copyright (c) 2013-2014 Queen Mary, University of London c@116: c@116: Permission is hereby granted, free of charge, to any person c@116: obtaining a copy of this software and associated documentation c@116: files (the "Software"), to deal in the Software without c@116: restriction, including without limitation the rights to use, copy, c@116: modify, merge, publish, distribute, sublicense, and/or sell copies c@116: of the Software, and to permit persons to whom the Software is c@116: furnished to do so, subject to the following conditions: c@116: c@116: The above copyright notice and this permission notice shall be c@116: included in all copies or substantial portions of the Software. c@116: c@116: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, c@116: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF c@116: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND c@116: NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY c@116: CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF c@116: CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION c@116: WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. c@116: c@116: Except as contained in this notice, the names of the Centre for c@116: Digital Music; Queen Mary, University of London; and Chris Cannam c@116: shall not be used in advertising or otherwise to promote the sale, c@116: use or other dealings in this Software without prior written c@116: authorization. c@116: */ c@116: c@116: #ifndef CQBASE_H c@116: #define CQBASE_H c@116: c@116: #include c@116: #include c@116: c@116: class CQBase // interface class c@116: { c@116: public: c@116: typedef std::complex Complex; c@116: typedef std::vector RealSequence; c@116: typedef std::vector RealColumn; c@116: typedef std::vector ComplexSequence; c@116: typedef std::vector ComplexColumn; c@116: typedef std::vector RealBlock; c@116: typedef std::vector ComplexBlock; c@116: c@116: virtual double getSampleRate() const = 0; c@116: virtual int getBinsPerOctave() const = 0; c@116: virtual int getOctaves() const = 0; c@116: virtual int getTotalBins() const = 0; c@116: virtual int getColumnHop() const = 0; c@116: virtual int getLatency() const = 0; c@116: virtual double getMaxFrequency() const = 0; c@116: virtual double getMinFrequency() const = 0; // actual min, not that passed to ctor c@145: virtual double getBinFrequency(double bin) const = 0; c@116: }; c@116: c@116: #endif