🎚️ Audio Spectrum Visualizer
📐 計算公式 / 原理
柱高 val = (sin(animT×0.05 + i×0.3)×0.3 + sin(animT×0.08 + i×0.15)×0.2 + 0.5) × 畫布高 × 0.8;wave 模式 val = (sin(animT×0.05 + i×0.2)×0.4 + 0.5) × 畫布高 × 0.8;圓形模式極角 = (i ÷ 柱數) × 2π,內半徑 = min(寬, 高) ÷ 4,條長 = (sin(animT×0.05 + i×0.3)×0.5 + 0.5) × 內半徑 × 0.8 + 10;配色按 t = i ÷ 柱數 在起止色間線性插值
按正弦疊加公式生成模擬頻譜柱形動畫(合成數據),不接入麥克風或音訊檔案,也不執行真實 FFT;用於視覺演示與版式參考,如需真實頻譜分析請使用專業音訊軟體。
📚 深度解析:頻譜視覺化
💡 常見使用場景
- 音樂播放器的頻譜樣式參考。
- 頻譜外觀的視覺演示。
- 頁面動效與配色試驗。
模擬頻譜
輸入:條數 48、柱狀樣式、起止配色。
處理:按正弦疊加公式生成合成幅值。
輸出:頻譜柱形動畫;不讀取麥克風或音訊檔案,本地繪製。
❓ 常見問題(FAQ)
- 需要檔案嗎?
- 不需要,也不支援。本工具不接入麥克風或音訊檔案,柱形由合成公式生成,純前端本地繪製。
- 條數怎麼定?
- 條數即畫面中的柱形數量(8–120),越多越密;它不代表真實頻段劃分。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Fast Fourier transform | converts time samples to magnitude (reference only; this tool does not run a real FFT) | Cooley and Tukey FFT |
| Sampling theorem | sample above twice the highest frequency or aliasing occurs | Nyquist-Shannon sampling theorem |
| Windowing | a Hann window suppresses sidelobes from spectral leakage | Spectral analysis practice |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準