drum_machine: no orange CLK TIMER! where there is simply no pump - #148
Merged
Merged
Conversation
audiodev.pump imports on every host, so the 'no pump' branch never ran: without the C engine the event queue is None, the sequencer is None, and the label guessed 'this kit is not schedulable' in orange. That was every desktop CPython, Android and browser run on the default kit. The label now reads grey TIMER when there is no queue (or audio is not open yet), grey CLK LIVE for a kit that plays live by design, green CLK AUDIO on the pump, and orange CLK TIMER! only when a pump is here and the graph did not take. It also prints its reason once rather than on every refresh. Fixes #147
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #147.
It was a false alarm.
from audiodev import pumpsucceeds on every host, so the grey "no pump" branch never ran. Without the Caudiopumpengine (desktop CPython, the Android Runner, Pyodide)events()is None, no sequencer is built, and_refresh_clockfilled in "this kit is not schedulable" as the reason. TR808 was never the problem; the timer path it fell back to is the one it was designed for on those hosts.The label now keys off the queue: grey TIMER with no pump (or before a browser opens audio), grey CLK LIVE for a kit that plays live by design (acoustickit), green CLK AUDIO on the pump, orange CLK TIMER! only when a pump is present and didn't take the graph. The reason prints once.
Checked, default kit, pressing PLAY from a probe:
Android shows the same thing as desktop CPython (no pump there); the phone check happens in another session.