Symptom
Operator reports Android Auto Brightness (#804) is not modulating brightness in the field even with audible music playing. Reported against app v1.7.53; not yet reproduced/disproven on v1.7.59.
What's known
- App build v1.7.59 (
dist/slyled-android.apk, 2026-05-05) installs cleanly on Pixel 4 XL, RECORD_AUDIO permission grants OK via pm grant.
- Code path on Stage screen:
LiveStageViewModel.setAutoBrightnessEnabled(true) → MicAutoBrightness.start() (8 kHz mono PCM, 50 ms hop, EnvelopeFollower) → on each hop repository.setMasterBrightness(master) → POST /api/brightness {value: 0..255} (parent_server.py:14550).
- Server endpoint just sets
_settings["globalBrightness"]. Whether the running timeline/Track-action pipeline actually consumes globalBrightness at refresh tick was not verified in this session.
- Live test on 2026-05-05 was blocked before reaching the mic UI: parent server failed to bind 5600 on the dev box (PyInstaller .exe processes spun up but never listened; running parent_server.py via Python 3.14 also exited silently after the UDP-4210 retry log). Separate orchestrator port-bind issue, but it prevented the Android side from connecting.
To investigate next session
- Get an orchestrator running and reachable from the test phone (LAN, not just WSL host). Confirm
POST /api/brightness {value:N} actually changes lit-fixture brightness end-to-end.
- With Auto Brightness enabled on the Stage screen, watch:
adb logcat -s MicAutoBrightness:V LiveStageVM:V — Mode.Listening vs Mode.PermissionDenied/NoMic/Clipping.
- Stage card's envelope % readout — does it move with music?
- Server-side
globalBrightness — does it change at ~20 Hz while envelope is non-zero?
- If envelope moves but light doesn't: bug is in the server consumer side (timeline/runtime not honouring
globalBrightness updates mid-play).
- If envelope stays at 0: AudioRecord is reading silence — possible causes:
MediaRecorder.AudioSource.UNPROCESSED returning silent buffers on this Pixel, mic routed to call audio, sensitivity too low (default 1.5), floor too high.
- If
Mode.PermissionDenied despite the manifest grant: foreground-service requirement on Android 14+ for RECORD_AUDIO while screen is off — verify behaviour matches Android version of test device.
Files
android/app/src/main/java/com/slywombat/slyled/audio/MicAutoBrightness.kt
android/app/src/main/java/com/slywombat/slyled/audio/EnvelopeFollower.kt
android/app/src/main/java/com/slywombat/slyled/viewmodel/LiveStageViewModel.kt:178 (setAutoBrightnessEnabled)
desktop/shared/parent_server.py:14550 (/api/brightness)
- Stage UI:
LiveStageScreen.kt:920 (AutoBrightnessButton)
Related
Symptom
Operator reports Android Auto Brightness (#804) is not modulating brightness in the field even with audible music playing. Reported against app v1.7.53; not yet reproduced/disproven on v1.7.59.
What's known
dist/slyled-android.apk, 2026-05-05) installs cleanly on Pixel 4 XL, RECORD_AUDIO permission grants OK viapm grant.LiveStageViewModel.setAutoBrightnessEnabled(true)→MicAutoBrightness.start()(8 kHz mono PCM, 50 ms hop, EnvelopeFollower) → on each hoprepository.setMasterBrightness(master)→POST /api/brightness {value: 0..255}(parent_server.py:14550)._settings["globalBrightness"]. Whether the running timeline/Track-action pipeline actually consumesglobalBrightnessat refresh tick was not verified in this session.To investigate next session
POST /api/brightness {value:N}actually changes lit-fixture brightness end-to-end.adb logcat -s MicAutoBrightness:V LiveStageVM:V—Mode.ListeningvsMode.PermissionDenied/NoMic/Clipping.globalBrightness— does it change at ~20 Hz while envelope is non-zero?globalBrightnessupdates mid-play).MediaRecorder.AudioSource.UNPROCESSEDreturning silent buffers on this Pixel, mic routed to call audio, sensitivity too low (default 1.5), floor too high.Mode.PermissionDenieddespite the manifest grant: foreground-service requirement on Android 14+ forRECORD_AUDIOwhile screen is off — verify behaviour matches Android version of test device.Files
android/app/src/main/java/com/slywombat/slyled/audio/MicAutoBrightness.ktandroid/app/src/main/java/com/slywombat/slyled/audio/EnvelopeFollower.ktandroid/app/src/main/java/com/slywombat/slyled/viewmodel/LiveStageViewModel.kt:178(setAutoBrightnessEnabled)desktop/shared/parent_server.py:14550(/api/brightness)LiveStageScreen.kt:920(AutoBrightnessButton)Related