尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证A zero dependency mood-based music visualizer.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Pick a mood. Hear it. See it. A music visualizer that generates original music and matching audio-reactive visuals, live in your browser.
🔗 Live demo: moodwave.carterscoding.com
Moodwave turns a feeling into a small live show. Choose a mood (Calm, Energetic, Dreamy, Moody, or Happy), and the page composes looping, slowly evolving music with the Web Audio API while a full-screen canvas animation pulses, bursts, and swirls in time with it.
| Key | Action |
|---|---|
Space | Play / pause |
1–5 | Switch mood |
N | Next shape set |
F | Toggle fullscreen |
S | Save screenshot |
Open the settings panel (the 'sliders' button) to:
The microphone needs a secure page (https:// or localhost), which GitHub Pages and the local servers below both provide.
ES modules don't load from file://, so serve the folder with any static server:
# Node
npx serve .
# or Python 3
python3 -m http.server 8000
Then open the printed URL (e.g. http://localhost:8000) and press Start.
main branch and the / (root) folder, then Save.https://<username>.github.io/moodwave/.All paths are relative, so the site works from that subpath as-is.
Custom domain: the CNAME file points Pages at moodwave.carterscoding.com. Add a CNAME DNS record for moodwave → <username>.github.io, then enable Enforce HTTPS in Settings → Pages. If you don't use a custom domain, delete CNAME.
| File | What it does |
|---|---|
index.html | Page structure: canvas, welcome screen and control bar. |
style.css | All styling: CSS variables, glass UI, animations, idle fade and responsive layout. |
audio.js | The MOODS config plus the Web Audio engine: synth voices, drums, step sequencer, crossfades and the AnalyserNode. |
visuals.js | Canvas animation loop, 12 shape renderers, shape-set cycling, particle bursts, crossfades and snapshots. |
main.js | App setup: builds mood buttons, wires controls, keyboard shortcuts and idle detection, and connects audio to visuals. |
favicon.svg, apple-touch-icon.png | Site icon (browser tab and iOS home screen). |
CNAME | Custom domain for GitHub Pages. |
LICENSE | MIT license. |
audio.js visuals.js
┌───────────────────────────────────────────┐ ┌──────────────────────────┐
│ sequencer → synths/drums → mood bus ┐ │ │ requestAnimationFrame │
│ (crossfade per mood) │ │ │ ↓ │
│ ↓ │ │ getLevels() ─────────────┼─┐
│ reverb ←──────────────────────── master │ │ ↓ │ │
│ ↓ │ │ renderer(shape) draws │ │
│ compressor → AnalyserNode ─┼─→ bass/mid/treble/hit │ │
│ ↓ │ └──────────────────────────┘ │
│ speakers │ │
└───────────────────────────────────────────┘ main.js passes engine.getLevels ──┘
AudioContext clock, so timing stays tight even if the page is busy.AnalyserNode. getLevels() reads its frequency data once per frame and returns { volume, bass, mid, treble, bassHit, spectrum }. The levels are 0–1, bassHit is a simple onset detector that fires when bass energy jumps above its running average, and spectrum is the raw frequency data (used by the radial spectrum shape).bassHit triggers bursts and jumps, mids drive opacity, and treble brightens colors and speeds up spin. The intensity slider scales all of it.Everything about a mood lives in the MOODS object at the top of audio.js. Add an entry and the button, music, and visuals all appear automatically:
export const MOODS = {
// ...existing moods
spooky: {
label: 'Spooky',
music: {
bpm: 90, root: 45, scale: MINOR, progression: [0, 1, 0, 4], seventh: true,
swing: 0, reverb: 0.7, fills: false,
pad: { type: 'sawtooth', octave: 0, gain: 0.07, pattern: 'x', dur: 16, attack: 1, release: 2, cutoff: 900, detune: 20, voices: 2 },
bass: { type: 'sine', octave: -1, gain: 0.25, pattern: '1.......1...5...', dur: 4, cutoff: 400 },
lead: { type: 'triangle', octave: 1, gain: 0.05, every: 4, density: 0.3, dur: 2, attack: 0.02, release: 0.8, cutoff: 2000 },
arp: null,
drums: { kick: 'x.......x.......', snare: '............x...', hat: '', gain: 0.6 },
},
visual: { shapes: ['galaxy', 'warp', 'ripples'], cycle: 15, palette: ['#39ff14', '#8a2be2', '#ff6f00'], background: '#030806', trail: 0.1, speed: 0.6 },
},
};
MOODS. Patterns are 16-step strings (x hit, - ghost, . rest; bass uses 1 3 5 8 for chord tones).visual.shapes lists the renderers to cycle through, in order: circles, ripples, waves, geometric, warp, grid, spectrum, glow, bubbles, swirl, galaxy, confetti. The optional cycle sets the seconds per set (default 20). For a brand-new look, add an { init, draw } entry to SHAPES in visuals.js.1–9 map to moods in the order they're defined.MediaRecorder?mood=dreamy&intensity=80)MIT © 2026 Carter K