Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cwilso/volume-meter
Simple example of implementing a clip-detecting volume meter in Web Audio.
https://github.com/cwilso/volume-meter
Last synced: 14 days ago
JSON representation
Simple example of implementing a clip-detecting volume meter in Web Audio.
- Host: GitHub
- URL: https://github.com/cwilso/volume-meter
- Owner: cwilso
- License: mit
- Created: 2014-01-27T18:25:23.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2022-09-14T18:41:00.000Z (about 2 years ago)
- Last Synced: 2024-10-15T17:57:36.050Z (29 days ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 428
- Watchers: 17
- Forks: 164
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Simple volume meter
I whipped this app up to show a basic volume meter on live audio input. It does both clip detection and RMS volume.
A "volume" meter can mean many things; if you want to do clip detection, you really need to access every sample. If you don't need clip detection, I might suggest using an Analyser and getByteTimeDomainData, since it will likely have lower CPU overhead. Note that it is CRITICALLY IMPORTANT to disassociate visual rendering (in the requestAnimationFrame loop) from the onaudioprocess function - you do NOT want to trigger a relayout from inside your audio handler, or it may glitch or cause other issues.
It's also hosted at https://webaudiodemos.appspot.com/volume-meter/.
Check it out, feel free to fork, submit pull requests, etc. MIT-Licensed - party on.
-Chris