mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-11 15:16:27 +01:00
reassignment added to list of algorithms in settings and preferences
This commit is contained in:
@@ -190,6 +190,8 @@ const wxArrayString &SpectrogramSettings::GetAlgorithmNames()
|
|||||||
if (theArray.IsEmpty()) {
|
if (theArray.IsEmpty()) {
|
||||||
// Keep in correspondence with enum SpectrogramSettings::Algorithm:
|
// Keep in correspondence with enum SpectrogramSettings::Algorithm:
|
||||||
theArray.Add(_("Frequencies"));
|
theArray.Add(_("Frequencies"));
|
||||||
|
/* i18n-hint: the Reassignment algorithm for spectrograms */
|
||||||
|
theArray.Add(_("Reassignment"));
|
||||||
/* i18n-hint: EAC abbreviates "Enhanced Autocorrelation" */
|
/* i18n-hint: EAC abbreviates "Enhanced Autocorrelation" */
|
||||||
theArray.Add(_("Pitch (EAC)"));
|
theArray.Add(_("Pitch (EAC)"));
|
||||||
}
|
}
|
||||||
@@ -557,7 +559,7 @@ int SpectrogramSettings::GetFFTLength() const
|
|||||||
{
|
{
|
||||||
return windowSize
|
return windowSize
|
||||||
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||||
* ((algorithm == algSTFT) ? zeroPaddingFactor : 1);
|
* ((algorithm != algPitchEAC) ? zeroPaddingFactor : 1);
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ public:
|
|||||||
|
|
||||||
enum Algorithm {
|
enum Algorithm {
|
||||||
algSTFT = 0,
|
algSTFT = 0,
|
||||||
|
algReassignment,
|
||||||
algPitchEAC,
|
algPitchEAC,
|
||||||
|
|
||||||
algNumAlgorithms,
|
algNumAlgorithms,
|
||||||
|
|||||||
@@ -459,7 +459,8 @@ void SpectrumPrefs::OnAlgorithm(wxCommandEvent &evt)
|
|||||||
void SpectrumPrefs::EnableDisableSTFTOnlyControls()
|
void SpectrumPrefs::EnableDisableSTFTOnlyControls()
|
||||||
{
|
{
|
||||||
// Enable or disable other controls that are applicable only to STFT.
|
// Enable or disable other controls that are applicable only to STFT.
|
||||||
const bool STFT = (mAlgorithmChoice->GetSelection() == 0);
|
const bool STFT =
|
||||||
|
(mAlgorithmChoice->GetSelection() != SpectrogramSettings::algPitchEAC);
|
||||||
mGain->Enable(STFT);
|
mGain->Enable(STFT);
|
||||||
mRange->Enable(STFT);
|
mRange->Enable(STFT);
|
||||||
mFrequencyGain->Enable(STFT);
|
mFrequencyGain->Enable(STFT);
|
||||||
|
|||||||
Reference in New Issue
Block a user