Repository navigation
Music, session controls and UI upgrades - #5
Merged
Merged
Conversation
- Run on a "playback" latency audio context with a 0.25 s lookahead instead of Tone's lowest-latency default. Ambient playback doesn't need low latency, and the larger buffer keeps the audio thread from running dry (heard as crackles) when the pads, reverb, drums and animated sky are all busy. Uses Tone.getTransport() since Tone.Transport is bound to the original context. - Unlock audio before building the graph. - Limiter at -1 dB on the output to catch thunder/chord spikes. - Cap pad polyphony at 16 voices to bound CPU cost. - Short bass glide now that the bass follows chord roots. - Only push pad/pluck tone settings to the synths when they change.
- When the weather fetch fails with no earlier reading, the tray says
WEATHER OFFLINE (and the Studio readout explains that typical mild
weather is used meanwhile) instead of LOADING forever. Failed fetches
retry after 30s, 60s, 120s... up to the normal 10 minute refresh.
- Waveform redrawn: crisp at any pixel density, smoothly auto-gained so
quiet ambient audio fills the strip, a soft glowing brass/blue line with
a faint fill. While stopped it breathes gently instead of leaving a gap
(still under prefers-reduced-motion).
- Record and Studio are labeled pill buttons with proper icons ("Rec",
"Studio"); icon-only on very narrow phones. Onboarding text now names the
Studio instead of a gear glyph.
- The engine now emits chord, arp-note and kick events, delivered in sync with the audio through Tone's Draw scheduler. - Sky reactions (sky/useSkyReactions.ts, Web Animations API, no React re-renders): the sun/moon glow pulses with each kick, a star flares on arp notes (a drifting mote by day or under cloud), and the light washes warm on major chords and cool on minor ones, stronger on a key change. Skipped under prefers-reduced-motion and while the tab is hidden. - Tray shows where the weather is from (picked city, "Your location", "Approximate location", "Default location", "Simulated weather"), the chord playing now (e.g. "Am"), and briefly highlights the key when the key or mode changes. - chordName/triadQuality in musicTheory.ts, with tests.
- The Studio drawer is split into three tabs instead of one long scroll: Sound (focus mode, sleep timer, mixer), Source (Live/Simulate, location, input and parameter readout) and Presets. Proper tablist/tab/tabpanel roles, arrow keys move between tabs. - Larger, higher-contrast PETRICHOR wordmark. - "Or press Space" hint under the tray while stopped, on devices with a keyboard only; play button tooltip mentions Space too. - README updated for the new tray, sky reactions, Studio tabs and the crackle fix.
Page loads were served stale-while-revalidate, so after each deploy the first visit still showed the previous release (its HTML points at the old hashed bundles), and only a second reload showed the update. Page loads are now network-first with the cache as the offline fallback; hashed assets stay cache-first. Cache renamed so old caches are cleared on activation.
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.
Music
Playback fixes
Session controls
UI
Housekeeping
Testing