Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felipethome/audio-visualization
Animation using the Web Audio API and Canvas
https://github.com/felipethome/audio-visualization
animation canvas webaudio-api
Last synced: about 5 hours ago
JSON representation
Animation using the Web Audio API and Canvas
- Host: GitHub
- URL: https://github.com/felipethome/audio-visualization
- Owner: felipethome
- License: bsd-3-clause
- Created: 2017-07-11T19:55:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-12T08:36:28.000Z (almost 2 years ago)
- Last Synced: 2024-04-18T06:59:16.109Z (7 months ago)
- Topics: animation, canvas, webaudio-api
- Language: JavaScript
- Homepage:
- Size: 10.4 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Audio Visualization
Simple animation using the WebAudio API and Canvas.
The idea of the animation is to show the music going on around the Earth. If the music is "louder" then the music notes are further away. The Earth keeps attracting the music to itself with its gravity. Each sphere around the Earth represents a group of frequencies.
The frequencies of the audio are captured in real time. Each group of frequencies corresponds to one floating sphere. The size of the spheres are related to the average of all frequencies. If the average is a big number so the spheres will be big too. Same thing goes for the speed they move away: the greater the average the greater the speed.
[Demo](https://felipethome.github.io/audio-visualization)
## What does this animation uses?
This animation uses the Web Audio API and HTML canvas element.
The code uses ES6+, but it is transpiled using Babel.## Compatibility
Up to date Chrome and Firefox will definitely work.
Up to date Safari and Edge will work, but their decodeAudioData function is buggy, so I do not guarantee that.
Internet Explorer: No.[Web Audio API compatibility table](https://caniuse.com/#search=web%20audio%20api)
[Canvas compatibility table](https://caniuse.com/#search=canvas)## How can I try it?
Clone this repo:
git clone github.com/felipethome/audio-visualization
Install dependencies:
npm install
For a development version:
npm run dev
Then check localhost:8080.
## LICENSE
BSD-3