annotate widgets/MIDIFileImportDialog.h @ 1127:9fb8dfd7ce4c 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 2c59b0cd176b
children a18e78b9c78b
rev   line source
Chris@378 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@378 2
Chris@378 3 /*
Chris@378 4 Sonic Visualiser
Chris@378 5 An audio file viewer and annotation editor.
Chris@378 6 Centre for Digital Music, Queen Mary, University of London.
Chris@378 7
Chris@378 8 This program is free software; you can redistribute it and/or
Chris@378 9 modify it under the terms of the GNU General Public License as
Chris@378 10 published by the Free Software Foundation; either version 2 of the
Chris@378 11 License, or (at your option) any later version. See the file
Chris@378 12 COPYING included with this distribution for more information.
Chris@378 13 */
Chris@378 14
Chris@378 15 #ifndef _MIDI_FILE_IMPORT_DIALOG_H_
Chris@378 16 #define _MIDI_FILE_IMPORT_DIALOG_H_
Chris@378 17
Chris@378 18 #include <QObject>
Chris@378 19
Chris@378 20 #include "data/fileio/MIDIFileReader.h"
Chris@378 21
Chris@378 22 class MIDIFileImportDialog : public QObject,
Chris@378 23 public MIDIFileImportPreferenceAcquirer
Chris@378 24 {
Chris@397 25 Q_OBJECT
Chris@397 26
Chris@378 27 public:
Chris@378 28 MIDIFileImportDialog(QWidget *parent = 0);
Chris@378 29
Chris@378 30 virtual TrackPreference getTrackImportPreference
Chris@378 31 (QStringList trackNames, bool haveSomePercussion,
Chris@378 32 QString &singleTrack) const;
Chris@378 33
Chris@378 34 virtual void showError(QString error);
Chris@378 35
Chris@378 36 protected:
Chris@378 37 QWidget *m_parent;
Chris@378 38 };
Chris@378 39
Chris@378 40 #endif