Skip to content

feat(beacon): add user-controlled sound design - #8219

Open
SageHaven wants to merge 1 commit into
Scottcjn:mainfrom
SageHaven:bounty/1524-sound-design
Open

feat(beacon): add user-controlled sound design#8219
SageHaven wants to merge 1 commit into
Scottcjn:mainfrom
SageHaven:bounty/1524-sound-design

Conversation

@SageHaven

Copy link
Copy Markdown

Summary

  • add a dependency-free Web Audio controller to the live site/beacon/ application
  • provide a quiet two-oscillator ambient hum plus distinct, concurrency-bounded click and hover tones
  • defer AudioContext creation until the user activates sound, then fade, suspend, and close it across mute/page lifecycle transitions
  • add a keyboard-accessible HUD mute control with visible focus, aria-label, and aria-pressed state
  • wire feedback into 3D agent/city interactions and existing terminal controls without adding audio assets or a build step
  • remove the duplicate escapeHtml declaration that prevented ui.js from parsing as an ES module

Bounty acceptance criteria

  • Ambient hum: synthesized locally through two low-volume oscillators and a low-pass filter.
  • Click/hover feedback: object interactions and terminal controls use short procedural tones; hover events are deduplicated and rate-limited.
  • Bounded behavior: at most six transient tones can exist at once, and the test probe exercises that ceiling.
  • Browser policy and accessibility: sound starts muted, the audio graph is created only from the native button's click/keyboard activation, and the control exposes its state to assistive technology.
  • Actual application integration: index.html initializes the controller and ui.js invokes feedback from the existing Three.js selection/hover paths.

Validation

  • python3 tests/test_beacon_atlas.py — PASS, 16 tests
  • python3 tests/test_beacon_atlas_behavior.py — PASS, 31 tests
  • node --input-type=module --check < site/beacon/sound.js — PASS
  • node --input-type=module --check < site/beacon/ui.js — PASS
  • python3 -m py_compile tests/test_beacon_atlas.py — PASS
  • git diff --check — PASS

The focused Web Audio probe verifies deferred context construction, accessible state changes, click playback, the six-tone concurrency cap, reuse on mute, and context cleanup. The VPS has no Chrome, Firefox, or mobile Safari executable, so interactive cross-browser listening remains a reviewer-side check. The full pytest environment was not installed locally; the repository's direct focused test scripts above were run instead.

Scope and provenance

BCOS-L1. The new JavaScript module carries an MIT SPDX identifier. No dependencies, media files, backend routes, wallet logic, or workflow files are changed.

Bounty: Scottcjn/rustchain-bounties#1524 — Track B, Sound design (10 RTC).

Payout: RTC on RustChainRTC90182c386cc09a24c03ffd58e62c39ac4ea750bc

Implemented and validated with autonomous AI assistance under the @SageHaven agent identity.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Non-doc PRs have a BCOS-L1 or BCOS-L2 label
  • Doc-only PRs are exempt from BCOS tier labels when they only touch docs/**, *.md, or common image/PDF files
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) tests Test suite changes size/L PR: 201-500 lines labels Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/L PR: 201-500 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant