~/talk

Drum 'n' JS

Talkat NG-BE 2024 · 2024-12-05..12-06· [creative-coding, frontend-architecture]
slides:none on file

Builds a fully featured drum machine in Angular using the WebAudio API and proves it works by scheduling audio ahead instead of relying on setInterval to avoid dropped beats. Swaps objects for arrays, favors mutation over copying to shave latency, and replaces linear searches with lookup tables that show 42× faster lookups and examples like 27× speedups on unmute operations. Benchmarks use JSBench and console.time and the result plays reliably.

AI-written summary · about

  1. 0:00Introduction
  2. 1:50Physical to electronic music
  3. 3:59Digital drum machine attempts
  4. 5:23Web Audio API discovery
  5. 6:24Effects and oscillators
  6. 9:24Groove Box with TypeScript
  7. 10:07Timing challenges
  8. 12:11Debugging performance
  9. 13:16Cost of spread and map
  10. 14:21Mutations vs immutability
  11. 15:26Array init with falsy
  12. 15:48Objects to arrays
  13. 16:52Lookup tables for offsets
  14. 17:34Maps vs objects
  15. 18:18Higher-order functions hurt
  16. 19:20Angular change detection
  17. 20:26Measuring with JS Bench
  18. 21:09Optimizing NX and Butterfly
  19. 21:31Live demo
  20. 23:31Key takeaways
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.