Mercurial > hg > svcore
view data/model/DenseThreeDimensionalModel.h @ 157:c03ec31005e1
* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and
vertical depending on layer type (supported for waveform and spectrogram,
though wrong for log-scale spectrogram at the moment).
* Add bare bones of a spectrum layer.
* Add window icon
* Add shortcut for "insert time instant" on laptops without keypad enter (";")
* Delete FFT processing thread when it exits (at least, next time we're asked
for something interesting)
* Get audio file extensions from the file readers, and thus from libsndfile for
the wave file reader -- leads to rather a wide combo box in file dialog though
* Better refresh order for spectrogram (redraw centre section first)
author | Chris Cannam |
---|---|
date | Fri, 04 Aug 2006 17:01:37 +0000 |
parents | 21792a550ec9 |
children | 0ed2b2e26b44 |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. This file copyright 2006 Chris Cannam. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file COPYING included with this distribution for more information. */ #ifndef _DENSE_THREE_DIMENSIONAL_MODEL_H_ #define _DENSE_THREE_DIMENSIONAL_MODEL_H_ #include "Model.h" #include "base/ZoomConstraint.h" #include <QMutex> #include <vector> class DenseThreeDimensionalModel : public Model, virtual public ZoomConstraint, virtual public QObject { Q_OBJECT public: /** * Return the number of sample frames covered by each set of bins. */ virtual size_t getResolution() const = 0; /** * Return the number of bins in each set of bins. */ virtual size_t getYBinCount() const = 0; /** * Return the minimum value of the value in each bin. */ virtual float getMinimumLevel() const = 0; /** * Return the maximum value of the value in each bin. */ virtual float getMaximumLevel() const = 0; typedef std::vector<float> BinValueSet; /** * Get the set of bin values at the given sample frame (i.e. the * windowStartFrame/getWindowSize()'th set of bins). */ virtual void getBinValues(long windowStartFrame, BinValueSet &result) const = 0; /** * Get a single value, the one at the n'th bin of the set of bins * starting at the given sample frame. */ virtual float getBinValue(long windowStartFrame, size_t n) const = 0; virtual QString getBinName(size_t n) const = 0; virtual int getCompletion() const = 0; protected: DenseThreeDimensionalModel() { } }; #endif