Skip to content

Commit

Permalink
Merge pull request #4288 from ninomp/fix-beatgrid-reanalyze-imported
Browse files Browse the repository at this point in the history
Fix preference option for re-analyzing beatgrids imported from other software
daschuer authored Sep 16, 2021
2 parents 23b8a60 + 1ebaf67 commit 670bc63
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/analyzer/analyzerbeats.cpp
Original file line number Diff line number Diff line change
@@ -81,6 +81,7 @@ bool AnalyzerBeats::initialize(TrackPointer pTrack, int sampleRate, int totalSam
<< "\nPlugin:" << m_pluginId
<< "\nFixed tempo assumption:" << m_bPreferencesFixedTempo
<< "\nRe-analyze when settings change:" << m_bPreferencesReanalyzeOldBpm
<< "\nRe-analyze imported from other software:" << m_bPreferencesReanalyzeImported
<< "\nFast analysis:" << m_bPreferencesFastAnalysis;

m_sampleRate = sampleRate;
6 changes: 5 additions & 1 deletion src/preferences/beatdetectionsettings.h
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@ class BeatDetectionSettings {
DEFINE_PREFERENCE_HELPERS(ReanalyzeWhenSettingsChange, bool,
BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE, false);

DEFINE_PREFERENCE_HELPERS(ReanalyzeImported, bool, BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE, false);
DEFINE_PREFERENCE_HELPERS(ReanalyzeImported,
bool,
BPM_CONFIG_KEY,
BPM_REANALYZE_IMPORTED,
false);

DEFINE_PREFERENCE_HELPERS(FastAnalysis, bool,
BPM_CONFIG_KEY, BPM_FAST_ANALYSIS_ENABLED, false);
2 changes: 2 additions & 0 deletions src/preferences/dialog/dlgprefbeats.cpp
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ void DlgPrefBeats::loadSettings() {
m_bAnalyzerEnabled = m_bpmSettings.getBpmDetectionEnabled();
m_bFixedTempoEnabled = m_bpmSettings.getFixedTempoAssumption();
m_bReanalyze = m_bpmSettings.getReanalyzeWhenSettingsChange();
m_bReanalyzeImported = m_bpmSettings.getReanalyzeImported();
m_bFastAnalysisEnabled = m_bpmSettings.getFastAnalysis();

slotUpdate();
@@ -74,6 +75,7 @@ void DlgPrefBeats::slotResetToDefaults() {
m_bFixedTempoEnabled = m_bpmSettings.getFixedTempoAssumptionDefault();
m_bFastAnalysisEnabled = m_bpmSettings.getFastAnalysisDefault();
m_bReanalyze = m_bpmSettings.getReanalyzeWhenSettingsChangeDefault();
m_bReanalyzeImported = m_bpmSettings.getReanalyzeImportedDefault();

slotUpdate();
}

0 comments on commit 670bc63

Please sign in to comment.