| 374 | } |
| 375 | |
| 376 | function stemWave(idx, color, vol, eff) { |
| 377 | const wn = 28; |
| 378 | const wplayed = Math.round(state.progress * wn); |
| 379 | let out = ""; |
| 380 | for (let i = 0; i < wn; i++) { |
| 381 | let wh = 16 + Math.abs(Math.sin(i * (0.55 + idx * 0.13)) + Math.sin(i * 0.33 + idx) * 0.6) * 62 + ((i * (7 + idx * 3)) % 9); |
| 382 | wh = Math.max(7, Math.min(98, wh)) * (0.3 + 0.7 * vol); |
| 383 | const wc = eff ? "#34343c" : i <= wplayed ? color : color + "3d"; |
| 384 | out += `<i style="height:${wh}%;background:${wc}"></i>`; |
| 385 | } |
| 386 | return out; |
| 387 | } |
| 388 | |
| 389 | function stemsBody() { |
| 390 | const c = state.current; |