()
| 361 | } |
| 362 | |
| 363 | function mainWaveform() { |
| 364 | const N = 56; |
| 365 | const played = Math.round(state.progress * N); |
| 366 | let bars = ""; |
| 367 | for (let i = 0; i < N; i++) { |
| 368 | let h = 24 + Math.abs(Math.sin(i * 0.7) + Math.sin(i * 0.21) * 0.7) * 46 + ((i * 37) % 11); |
| 369 | h = Math.max(14, Math.min(98, h)); |
| 370 | const bg = i <= played ? "#f5b417" : "#34343c"; |
| 371 | bars += `<i style="height:${h}%;background:${bg}"></i>`; |
| 372 | } |
| 373 | return bars; |
| 374 | } |
| 375 | |
| 376 | function stemWave(idx, color, vol, eff) { |
| 377 | const wn = 28; |