Mercurial > hg > svcore
annotate data/model/WaveFileModel.h @ 1196:c7b9c902642f spectrogram-minor-refactor
Fix threshold in spectrogram -- it wasn't working in the last release.
There is a new protocol for this. Formerly the threshold parameter had a
range from -50dB to 0 with the default at -50, and -50 treated internally
as "no threshold". However, there was a hardcoded, hidden internal threshold
for spectrogram colour mapping at -80dB with anything below this being rounded
to zero. Now the threshold parameter has range -81 to -1 with the default
at -80, -81 is treated internally as "no threshold", and there is no hidden
internal threshold. So the default behaviour is the same as before, an
effective -80dB threshold, but it is now possible to change this in both
directions. Sessions reloaded from prior versions may look slightly different
because, if the session says there should be no threshold, there will now
actually be no threshold instead of having the hidden internal one.
Still need to do something in the UI to make it apparent that the -81dB
setting removes the threshold entirely. This is at least no worse than the
previous, also obscured, magic -50dB setting.
author | Chris Cannam |
---|---|
date | Mon, 01 Aug 2016 16:21:01 +0100 |
parents | efea94b04d5a |
children | 22fe34dd7f26 |
rev | line source |
---|---|
Chris@147 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@147 | 2 |
Chris@147 | 3 /* |
Chris@147 | 4 Sonic Visualiser |
Chris@147 | 5 An audio file viewer and annotation editor. |
Chris@147 | 6 Centre for Digital Music, Queen Mary, University of London. |
Chris@202 | 7 This file copyright 2006 Chris Cannam and QMUL. |
Chris@147 | 8 |
Chris@147 | 9 This program is free software; you can redistribute it and/or |
Chris@147 | 10 modify it under the terms of the GNU General Public License as |
Chris@147 | 11 published by the Free Software Foundation; either version 2 of the |
Chris@147 | 12 License, or (at your option) any later version. See the file |
Chris@147 | 13 COPYING included with this distribution for more information. |
Chris@147 | 14 */ |
Chris@147 | 15 |
Chris@1122 | 16 #ifndef WAVE_FILE_MODEL_H |
Chris@1122 | 17 #define WAVE_FILE_MODEL_H |
Chris@316 | 18 |
Chris@147 | 19 #include "RangeSummarisableTimeValueModel.h" |
Chris@147 | 20 |
Chris@147 | 21 #include <stdlib.h> |
Chris@147 | 22 |
Chris@179 | 23 class WaveFileModel : public RangeSummarisableTimeValueModel |
Chris@147 | 24 { |
Chris@147 | 25 Q_OBJECT |
Chris@147 | 26 |
Chris@147 | 27 public: |
Chris@1122 | 28 virtual ~WaveFileModel(); |
Chris@147 | 29 |
Chris@1122 | 30 virtual sv_frame_t getFrameCount() const = 0; |
Chris@1122 | 31 virtual int getChannelCount() const = 0; |
Chris@1122 | 32 virtual sv_samplerate_t getSampleRate() const = 0; |
Chris@1122 | 33 virtual sv_samplerate_t getNativeRate() const = 0; |
Chris@147 | 34 |
Chris@1122 | 35 virtual QString getTitle() const = 0; |
Chris@1122 | 36 virtual QString getMaker() const = 0; |
Chris@1122 | 37 virtual QString getLocation() const = 0; |
Chris@179 | 38 |
Chris@1122 | 39 virtual sv_frame_t getStartFrame() const = 0; |
Chris@1122 | 40 virtual sv_frame_t getEndFrame() const = 0; |
Chris@147 | 41 |
Chris@1122 | 42 virtual void setStartFrame(sv_frame_t startFrame) = 0; |
Chris@333 | 43 |
Chris@147 | 44 protected: |
Chris@1122 | 45 WaveFileModel() { } // only accessible from subclasses |
Chris@147 | 46 }; |
Chris@147 | 47 |
Chris@147 | 48 #endif |