App 2.44.0: the pumpkin light follows the kick drum, behind a switch
MusicPulse reads 40-120 Hz and lights only on jumps of the bass, so held notes and bass lines stay dark. Settings gets "Pumpkin light follows the music" (Halloween only, off by default); off, the audio analyser never starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -215,6 +215,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
|
||||
/** Whether the Overview hides the navigation (the button in the navigation's header). */
|
||||
static final String PREF_OVERVIEW_FULLSCREEN = "overview_fullscreen";
|
||||
/** The Halloween pumpkin's light follows the music; off by default, so the analyser stays off. */
|
||||
static final String PREF_MUSIC_LIGHT = "music_light";
|
||||
|
||||
/** True while the Overview is full screen: the navigation hidden, the edge swipe armed. */
|
||||
private boolean overviewFull;
|
||||
@@ -1223,6 +1225,12 @@ public class MainActivity extends AppCompatActivity {
|
||||
bindDriveMode();
|
||||
bindOverviewStyle();
|
||||
bindAccentColor();
|
||||
SwitchMaterial musicLight = settingsPane.findViewById(R.id.music_light_switch);
|
||||
musicLight.setChecked(prefs.getBoolean(PREF_MUSIC_LIGHT, false));
|
||||
musicLight.setOnCheckedChangeListener((btn, checked) -> {
|
||||
prefs.edit().putBoolean(PREF_MUSIC_LIGHT, checked).apply();
|
||||
updateMusicTap();
|
||||
});
|
||||
fullScreenSwitch = settingsPane.findViewById(R.id.full_screen_switch);
|
||||
fullScreenSwitch.setChecked(UploadSettings.fullScreen(prefs));
|
||||
fullScreenSwitch.setOnCheckedChangeListener((btn, checked) -> {
|
||||
@@ -1761,10 +1769,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
updateMusicTap();
|
||||
}
|
||||
|
||||
/** The pumpkin listens only while it can be seen: the app in front, on the Overview, in Halloween. */
|
||||
/**
|
||||
* The pumpkin listens only while it can be seen (the app in front, on the Overview, in
|
||||
* Halloween) and only when "Pumpkin light follows the music" is on.
|
||||
*/
|
||||
private void updateMusicTap() {
|
||||
ViewPager2 pager = findViewById(R.id.content);
|
||||
musicTap.setRunning(inFront && overviewStyle() == OverviewStyle.HALLOWEEN
|
||||
&& prefs.getBoolean(PREF_MUSIC_LIGHT, false)
|
||||
&& pager != null && pager.getCurrentItem() == 0);
|
||||
}
|
||||
|
||||
@@ -1828,6 +1840,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
TextView note = settingsPane.findViewById(R.id.accent_note);
|
||||
note.setVisibility(style.usesAccent ? View.GONE : View.VISIBLE);
|
||||
note.setText(getString(R.string.accent_not_used, styleLabels()[style.ordinal()]));
|
||||
int music = style == OverviewStyle.HALLOWEEN ? View.VISIBLE : View.GONE;
|
||||
settingsPane.findViewById(R.id.music_light_switch).setVisibility(music);
|
||||
settingsPane.findViewById(R.id.music_light_hint).setVisibility(music);
|
||||
}
|
||||
|
||||
/** The drop-down's labels, by {@link OverviewStyle} ordinal. */
|
||||
|
||||
Reference in New Issue
Block a user