feat: add procedural Pokemon sound effects and audio settings - #340
Open
justinjeong5 wants to merge 1 commit into
Open
justinjeong5 wants to merge 1 commit into
justinjeong5 wants to merge 1 commit into
Conversation
justinjeong5
force-pushed
the
feat/pokemon-cries-sfx
branch
from
September 22, 2026 06:45
754abfd to
0acee07
Compare
- Synthesize lore-accurate retro Pokemon fanfares and jingles in memory (44.1kHz mono PCM buffers via SoundSynthesizer): - .tap: A-button menu selection pop - .levelUp: Level Up jingle (Rare Candy use) - .evolve: Evolution Victory fanfare (Evolution completion) - .buy: Pokemon Center healing melody (Shop item/egg purchase) - .shiny: Gen 2 shiny sparkle chime (Mint use and shiny hatch) - .hatch: 'Gotcha! Pokemon was caught!' fanfare (Egg hatch / new dex entry) - Zero external copyrighted audio assets committed (100% procedurally synthesized in code). - Add sound effect toggle and volume controls in Settings with instant audio test preview. - Connect sound events across CompanionView, ShopView, BagView, and SettingsView. - Provide isolated QA scripts for local testing (scripts/launch-qa-sound.sh, scripts/setup-qa-sound-save.py, scripts/preview-sound.swift). - Comprehensive unit tests across audio player, volume settings, localization in all 7 languages.
justinjeong5
force-pushed
the
feat/pokemon-cries-sfx
branch
from
September 22, 2026 06:53
0acee07 to
cb9f4f7
Compare
This branch has not been deployed
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.
Summary
Adds authentic, nostalgic Pokémon sound effects and audio controls to PokeTokenBar, enhancing companion interactions, level-ups, evolutions, and shop transactions with zero external audio assets.
All sound effects are procedurally synthesized in memory (44.1kHz Float32 mono PCM buffers via
SoundSynthesizer) using exact note frequencies, durations, envelopes, and dual-voice harmonies of classic Pokémon signatures:.tap): Authentic A-button menu selection pop when clicking the menu bar companion sprite (0.08s)..levelUp): Nostalgic level-up jingle (F5-C5-F5-C5-D#5-E5-F5) when using Rare Candies without triggering an evolution (0.95s)..evolve): Signature 5-note evolution victory fanfare (E5-B5-A5-D#6-E6) with warm bass harmony when evolving into a higher evolutionary stage (1.2s)..buy): Globally recognized Pokémon Center healing melody ("Ta-ta-ta-ta-taan!",B5-B5-B5-G#5-E6lead + bass) when buying items or eggs in the Token Shop (1.05s)..shiny): Gen 2 sparkle chime when hatching a shiny Pokémon or using a Mint in the Bag (0.85s)..hatch): Iconic "Gotcha! Pokémon was caught!" fanfare (A5-F5-C5-A#5-A#5-A#5-G5-A#5-A5lead + counterpoint) when hatching an egg or registering a new species (1.4s).Key Features & Design Decisions
CONTRIBUTING.md). No audio files (MP3, WAV, OGG) or binary audio assets are added or committed; audio waveforms are purely calculated and rendered in code.AVAudioEngineConfigurationChangenotifications to rebuild audio node graphs when plugging in headphones, connecting AirPods, or waking from system sleep.PokemonAudioPlayingprotocol; hardware audio output gated (canPlayHardwareAudio: falsein test environments) so headless CI/test suites run silently without CoreAudio device dependencies.Type of change
UI changes
Reviewer Testing Guide (How to Try It Locally)
We've provided two easy, non-destructive ways for reviewers to experience the audio effects locally without affecting personal production save data (
~/Library/Application Support/PokeTokenBarremains 100% untouched).Option 1: Standalone Sound Audition Window (5-Second Quick Check)
Reviewers can listen to all 6 synthesized chimes and inspect their waveforms directly in a lightweight GUI window without opening the menu bar app:
Option 2: Full In-App Gameplay QA (Isolated Test Environment)
To test how the sound effects feel inside actual app interactions (tap, item usage, level-up, evolution, shop purchases):
This launches a debug instance in the macOS menu bar using an isolated temporary state (
~/.poketokenbar-qa-sound) pre-configured with Bulbasaur, 10 Rare Candies, 5 Mints, and 50B Tokens..tap(A-button pop)Useon Rare Candy (1 count).levelUp(Level-Up jingle)F5-C5-F5-C5-D#5-E5-F5) ++100M XPtoast.Useon Rare Candy a 2nd time.evolve(Evolution fanfare)E5-B5-A5-D#6-E6) into Ivysaur!Useon Mint.shiny(Sparkle chime).buy(Center healing melody).levelUp./scripts/launch-qa-sound.sh --egg.hatch(Catch fanfare)Checklist
swift buildandswift testpass locally (1,170 tests passed, 0 failures, 13 skipped; logic core line coverage 93.32% >= 75%)PokemonAudioPlayerTests.swift,UsageStoreSoundSettingsTests.swift,LocalizationSoundTests.swift)🤖 Generated with Antigravity 2.0 (AGY 2.0)