59 settings.beginGroup(
"Preferences");
63 (settings.value(
"spectrogram-x-smoothing",
int(m_spectrogramXSmoothing)).toInt());
71 m_recordMono = settings.value(
"record-mono",
false).toBool();
73 m_gapless = settings.value(
"gapless",
true).toBool();
78 (settings.value(
"time-to-text-mode",
int(
TimeToTextMs)).toInt());
79 m_showHMS = (settings.value(
"show-hours-minutes-seconds",
true)).toBool();
80 m_octave = (settings.value(
"octave-of-middle-c", 4)).toInt();
82 m_showSplash = settings.value(
"show-splash",
true).toBool();
85 settings.beginGroup(
"TempDirectory");
86 m_tempDirRoot = settings.value(
"create-in",
"$HOME").toString();
98 props.push_back(
"Spectrogram Y Smoothing");
99 props.push_back(
"Spectrogram X Smoothing");
100 props.push_back(
"Tuning Frequency");
101 props.push_back(
"Property Box Layout");
102 props.push_back(
"Window Type");
103 props.push_back(
"Resample Quality");
104 props.push_back(
"Omit Temporaries from Recent Files");
105 props.push_back(
"Record Mono");
106 props.push_back(
"Resample On Load");
107 props.push_back(
"Use Gapless Mode");
108 props.push_back(
"Normalise Audio");
109 props.push_back(
"Fixed Sample Rate");
110 props.push_back(
"Temporary Directory Root");
111 props.push_back(
"Background Mode");
112 props.push_back(
"Time To Text Mode");
113 props.push_back(
"Show Hours And Minutes");
114 props.push_back(
"Octave Numbering System");
115 props.push_back(
"View Font Size");
116 props.push_back(
"Show Splash Screen");
123 if (name ==
"Spectrogram Y Smoothing") {
124 return tr(
"Spectrogram y-axis interpolation:");
126 if (name ==
"Spectrogram X Smoothing") {
127 return tr(
"Spectrogram x-axis interpolation:");
129 if (name ==
"Tuning Frequency") {
130 return tr(
"Frequency of concert A");
132 if (name ==
"Property Box Layout") {
133 return tr(
"Property box layout");
135 if (name ==
"Window Type") {
136 return tr(
"Spectral analysis window shape");
138 if (name ==
"Resample Quality") {
139 return tr(
"Playback resampler type");
141 if (name ==
"Normalise Audio") {
142 return tr(
"Normalise audio signal when reading from audio file");
144 if (name ==
"Omit Temporaries from Recent Files") {
145 return tr(
"Omit temporaries from Recent Files menu");
147 if (name ==
"Record Mono") {
148 return tr(
"Mix recorded channels to mono");
150 if (name ==
"Resample On Load") {
151 return tr(
"Resample mismatching files on import");
153 if (name ==
"Use Gapless Mode") {
154 return tr(
"Load mp3 files in gapless mode");
156 if (name ==
"Fixed Sample Rate") {
157 return tr(
"Single fixed sample rate to resample all files to");
159 if (name ==
"Temporary Directory Root") {
160 return tr(
"Location for cache file directory");
162 if (name ==
"Background Mode") {
163 return tr(
"Background colour preference");
165 if (name ==
"Time To Text Mode") {
166 return tr(
"Time display precision");
168 if (name ==
"Show Hours And Minutes") {
169 return tr(
"Use hours:minutes:seconds format");
171 if (name ==
"Octave Numbering System") {
172 return tr(
"Label middle C as");
174 if (name ==
"View Font Size") {
175 return tr(
"Font size for text overlays");
177 if (name ==
"Show Splash Screen") {
178 return tr(
"Show splash screen on startup");
186 if (name ==
"Spectrogram Y Smoothing") {
189 if (name ==
"Spectrogram X Smoothing") {
192 if (name ==
"Tuning Frequency") {
195 if (name ==
"Property Box Layout") {
198 if (name ==
"Window Type") {
201 if (name ==
"Resample Quality") {
204 if (name ==
"Normalise Audio") {
207 if (name ==
"Omit Temporaries from Recent Files") {
210 if (name ==
"Record Mono") {
213 if (name ==
"Resample On Load") {
216 if (name ==
"Use Gapless Mode") {
219 if (name ==
"Fixed Sample Rate") {
222 if (name ==
"Temporary Directory Root") {
226 if (name ==
"Background Mode") {
229 if (name ==
"Time To Text Mode") {
232 if (name ==
"Show Hours And Minutes") {
235 if (name ==
"Octave Numbering System") {
238 if (name ==
"View Font Size") {
241 if (name ==
"Show Splash Screen") {
249 int *min,
int *max,
int *deflt)
const 251 if (name ==
"Spectrogram Y Smoothing") {
257 if (name ==
"Spectrogram X Smoothing") {
266 if (name ==
"Property Box Layout") {
269 if (deflt) *deflt = 0;
273 if (name ==
"Window Type") {
280 if (name ==
"Run Vamp Plugins In Process") {
284 if (name ==
"Omit Temporaries from Recent Files") {
285 if (deflt) *deflt = 1;
289 if (name ==
"Background Mode") {
292 if (deflt) *deflt = 0;
296 if (name ==
"Time To Text Mode") {
299 if (deflt) *deflt = 0;
303 if (name ==
"Show Hours And Minutes") {
304 if (deflt) *deflt = 1;
308 if (name ==
"Octave Numbering System") {
314 if (deflt) *deflt = 2;
318 if (name ==
"View Font Size") {
321 if (deflt) *deflt = 10;
325 if (name ==
"Show Splash Screen") {
326 if (deflt) *deflt = 1;
337 if (name ==
"Property Box Layout") {
338 if (value == 0)
return tr(
"Show boxes for all panes");
339 else return tr(
"Show box for current pane only");
341 if (name ==
"Window Type") {
354 if (name ==
"Resample Quality") {
356 case 0:
return tr(
"Fastest");
357 case 1:
return tr(
"Standard");
358 case 2:
return tr(
"Highest quality");
361 if (name ==
"Spectrogram Y Smoothing") {
367 if (name ==
"Spectrogram X Smoothing") {
373 if (name ==
"Background Mode") {
380 if (name ==
"Time To Text Mode") {
382 case TimeToTextMs:
return tr(
"Standard (to millisecond)");
383 case TimeToTextUs:
return tr(
"High resolution (to microsecond)");
391 if (name ==
"Octave Numbering System") {
393 case C0_Centre:
return tr(
"C0 - middle of octave scale");
394 case C3_Logic:
return tr(
"C3 - common MIDI sequencer convention");
395 case C4_ASA:
return tr(
"C4 - ASA American standard");
396 case C5_Sonar:
return tr(
"C5 - used in Cakewalk and others");
406 return tr(
"Preferences");
412 return "preferences";
418 if (name ==
"Spectrogram Y Smoothing") {
420 }
else if (name ==
"Spectrogram X Smoothing") {
422 }
else if (name ==
"Tuning Frequency") {
424 }
else if (name ==
"Property Box Layout") {
426 }
else if (name ==
"Window Type") {
428 }
else if (name ==
"Run Vamp Plugins In Process") {
430 }
else if (name ==
"Omit Temporaries from Recent Files") {
432 }
else if (name ==
"Background Mode") {
434 }
else if (name ==
"Time To Text Mode") {
436 }
else if (name ==
"Show Hours And Minutes") {
438 }
else if (name ==
"Octave Numbering System") {
441 }
else if (name ==
"View Font Size") {
443 }
else if (name ==
"Show Splash Screen") {
458 settings.beginGroup(
"Preferences");
459 settings.setValue(
"spectrogram-y-smoothing",
int(smoothing));
475 settings.beginGroup(
"Preferences");
476 settings.setValue(
"spectrogram-x-smoothing",
int(smoothing));
488 settings.beginGroup(
"Preferences");
489 settings.setValue(
"tuning-frequency", freq);
501 settings.beginGroup(
"Preferences");
502 settings.setValue(
"property-box-layout",
int(layout));
514 settings.beginGroup(
"Preferences");
515 settings.setValue(
"window-type",
int(type));
527 settings.beginGroup(
"Preferences");
528 settings.setValue(
"run-vamp-plugins-in-process", run);
540 settings.beginGroup(
"Preferences");
541 settings.setValue(
"omit-recent-temporaries", omit);
550 if (root == QDir::home().absolutePath()) {
556 settings.beginGroup(
"TempDirectory");
557 settings.setValue(
"create-in", root);
569 settings.beginGroup(
"Preferences");
570 settings.setValue(
"record-mono", mono);
582 settings.beginGroup(
"Preferences");
583 settings.setValue(
"resample-on-load", resample);
595 settings.beginGroup(
"Preferences");
596 settings.setValue(
"gapless", gapless);
608 settings.beginGroup(
"Preferences");
609 settings.setValue(
"fixed-sample-rate", rate);
621 settings.beginGroup(
"Preferences");
622 settings.setValue(
"normalise-audio", norm);
636 settings.beginGroup(
"Preferences");
637 settings.setValue(
"background-mode",
int(mode));
651 settings.beginGroup(
"Preferences");
652 settings.setValue(
"time-to-text-mode",
int(mode));
666 settings.beginGroup(
"Preferences");
667 settings.setValue(
"show-hours-minutes-seconds", show);
681 settings.beginGroup(
"Preferences");
682 settings.setValue(
"octave-of-middle-c",
int(oct));
720 settings.beginGroup(
"Preferences");
721 settings.setValue(
"view-font-size", size);
735 settings.beginGroup(
"Preferences");
736 settings.setValue(
"show-splash", show);
double sv_samplerate_t
Sample rate.
void setOctaveOfMiddleC(int oct)
void setResampleOnLoad(bool)
SpectrogramSmoothing m_spectrogramSmoothing
void setFixedSampleRate(sv_samplerate_t)
PropertyList getProperties() const override
Get a list of the names of all the supported properties on this container.
void propertyChanged(PropertyContainer::PropertyName)
PropertyBoxLayout m_propertyBoxLayout
QString getPropertyValueLabel(const PropertyName &, int value) const override
If the given property is a ValueProperty, return the display label to be used for the given value for...
int getPropertyRangeAndValue(const PropertyName &, int *, int *, int *) const override
Return the minimum and maximum values for the given property and its current value in this container...
void setSpectrogramXSmoothing(SpectrogramXSmoothing smoothing)
QString getPropertyContainerIconName() const override
static Preferences * getInstance()
void setUseGaplessMode(bool)
sv_samplerate_t m_fixedSampleRate
void setTimeToTextMode(TimeToTextMode mode)
void setNormaliseAudio(bool)
void setWindowType(WindowType type)
SpectrogramXSmoothing m_spectrogramXSmoothing
static int getOctaveOfMiddleCInSystem(OctaveNumberingSystem s)
void setSpectrogramSmoothing(SpectrogramSmoothing smoothing)
void setOmitTempsFromRecentFiles(bool omit)
BackgroundMode m_backgroundMode
PropertyBoxLayout
!! harmonise with PaneStack
void setProperty(const PropertyName &, int) override
static Preferences * m_instance
void setPropertyBoxLayout(PropertyBoxLayout layout)
void setTemporaryDirectoryRoot(QString tempDirRoot)
QString getPropertyContainerName() const override
PropertyType getPropertyType(const PropertyName &) const override
Return the type of the given property, or InvalidProperty if the property is not supported on this co...
static OctaveNumberingSystem getSystemWithMiddleCInOctave(int o)
void setShowHMS(bool show)
void setViewFontSize(int size)
std::vector< PropertyName > PropertyList
void setRunPluginsInProcess(bool r)
TimeToTextMode m_timeToTextMode
bool m_runPluginsInProcess
QString getPropertyLabel(const PropertyName &) const override
Return the human-readable (and i18n'ised) name of a property.
void setBackgroundMode(BackgroundMode mode)
void setTuningFrequency(double freq)