Skip to content

Instantly share code, notes, and snippets.

@fxi
Last active December 27, 2020 11:08
Show Gist options
  • Save fxi/60edefad22a75fc5304f7c31280a5379 to your computer and use it in GitHub Desktop.
Save fxi/60edefad22a75fc5304f7c31280a5379 to your computer and use it in GitHub Desktop.
Rendering sound analyzers for audio stream in tixy.land #tixy #golf #toy

Rendering from mic stream

Collection of code snippets for tixy.land

  • Render a simple white bar graph. 210 char.
//  Not working on safari, not working using link ( audio context need user interaction )
i?(a.getByteFrequencyData(d),(16-d[x]/18)-y)<0:t||(d=new Uint8Array(16),c=new AudioContext(),navigator.mediaDevices.getUserMedia({audio:a=c.createAnalyser()}).then(s=>{c.createMediaStreamSource(s).connect(a)}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment