diff options
| author | Paul Buetow <paul@buetow.org> | 2026-04-20 23:09:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-04-20 23:09:45 +0300 |
| commit | a37e12455d734bca9218ed92aee14b2d68c73e79 (patch) | |
| tree | a0ebf9ada79bfff732121ced6e8cfb93a8d55193 | |
| parent | 580ae1e5a61880f9e3844c691ad89efedf19f3b0 (diff) | |
new theme
| -rw-r--r-- | internal/generator/templates/shared/nav.tmpl | 2 | ||||
| -rw-r--r-- | internal/generator/theme_sounds.go | 14 | ||||
| -rw-r--r-- | internal/version/version.go | 2 |
3 files changed, 17 insertions, 1 deletions
diff --git a/internal/generator/templates/shared/nav.tmpl b/internal/generator/templates/shared/nav.tmpl index fb26463..8d20844 100644 --- a/internal/generator/templates/shared/nav.tmpl +++ b/internal/generator/templates/shared/nav.tmpl @@ -214,6 +214,8 @@ html.sno-splash-skip #splash-overlay { display:none !important; visibility:hidde var ctx = splashAudioCtx; function ring() { splashChimePlayed = true; + // Theme override: if defined, plays its own sound and returns true to skip the default chime. + if (window.snonuxSplashSound && window.snonuxSplashSound(ctx)) return; var now = ctx.currentTime; var sp = SNONUX_SOUNDS.splash; var freqs = sp.freqs; diff --git a/internal/generator/theme_sounds.go b/internal/generator/theme_sounds.go index c2e311d..9c58c0c 100644 --- a/internal/generator/theme_sounds.go +++ b/internal/generator/theme_sounds.go @@ -52,6 +52,7 @@ var themeSoundPresets = map[string]themeSounds{ "cosmos": soundsCosmos(), "retrofuture": soundsRetrofuture(), "spaceage": soundsSpaceage(), + "tropicale": soundsTropical(), } func soundsNeon() themeSounds { @@ -196,6 +197,19 @@ func soundsSpaceage() themeSounds { return s } +// soundsTropical returns synth parameters for the Tropical Beach theme. +// Warm sine arpeggio across a C-major pentatonic — steel drum impression on splash. +// Nav uses a breathy mid-freq sine "bird tone"; open/close sweep like breaking surf. +func soundsTropical() themeSounds { + var s themeSounds + s.Splash.Freqs = []float64{523.25, 659.25, 783.99, 1046.5} + s.Splash.Spacing, s.Splash.Gain, s.Splash.Wave = 0.085, 0.08, "sine" + s.Nav.Freq, s.Nav.Wave, s.Nav.Dur, s.Nav.Gain = 880, "sine", 0.07, 0.07 + s.Open.Wave, s.Open.Start, s.Open.End, s.Open.Dur, s.Open.Gain = "sine", 440, 880, 0.18, 0.08 + s.Close.Wave, s.Close.Start, s.Close.End, s.Close.Dur, s.Close.Gain = "sine", 660, 330, 0.17, 0.075 + return s +} + func defaultSounds() themeSounds { return soundsNeon() } diff --git a/internal/version/version.go b/internal/version/version.go index 81cce33..2df9093 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -2,4 +2,4 @@ package version // Version is the application version (semantic versioning). -const Version = "0.4.3" +const Version = "0.5.0" |
