comparison layer/SliceLayer.h @ 1386:fc3d89f88690 spectrogramparam

Use log-frequency rather than log-bin for calculating x coord in spectrum. This has the advantage that frequency positions don't move when we change the window size or oversampling ratio, but it does give us an unhelpfully large amount of space for very low frequencies - to be considered
author Chris Cannam
date Mon, 12 Nov 2018 11:34:34 +0000
parents 86f319dd6ab9
children 1eb560b363e7
comparison
equal deleted inserted replaced
1385:37e9d6a1e00c 1386:fc3d89f88690
119 public slots: 119 public slots:
120 void sliceableModelReplaced(const Model *, const Model *); 120 void sliceableModelReplaced(const Model *, const Model *);
121 void modelAboutToBeDeleted(Model *); 121 void modelAboutToBeDeleted(Model *);
122 122
123 protected: 123 protected:
124 /// Convert a (possibly non-integral) bin into x-coord. May be overridden
124 virtual double getXForBin(const LayerGeometryProvider *, double bin) const; 125 virtual double getXForBin(const LayerGeometryProvider *, double bin) const;
126
127 /// Convert an x-coord into (possibly non-integral) bin. May be overridden
125 virtual double getBinForX(const LayerGeometryProvider *, double x) const; 128 virtual double getBinForX(const LayerGeometryProvider *, double x) const;
129
130 /// Convert a point such as a bin number into x-coord, given max &
131 /// min. For use by getXForBin etc
132 double getXForScalePoint(const LayerGeometryProvider *,
133 double p, double pmin, double pmax) const;
134
135 /// Convert an x-coord into a point such as a bin number, given
136 /// max & min. For use by getBinForX etc
137 double getScalePointForX(const LayerGeometryProvider *,
138 double x, double pmin, double pmax) const;
126 139
127 virtual double getYForValue(const LayerGeometryProvider *v, double value, double &norm) const; 140 virtual double getYForValue(const LayerGeometryProvider *v, double value, double &norm) const;
128 virtual double getValueForY(const LayerGeometryProvider *v, double y) const; 141 virtual double getValueForY(const LayerGeometryProvider *v, double y) const;
129 142
130 virtual QString getFeatureDescriptionAux(LayerGeometryProvider *v, QPoint &, 143 virtual QString getFeatureDescriptionAux(LayerGeometryProvider *v, QPoint &,