https://github.com/stabla/soundcolor
🎶 Make reacting colors on song (js/webaudioAPI)
https://github.com/stabla/soundcolor
javascript reactive sound webaudio
Last synced: 7 days ago
JSON representation
🎶 Make reacting colors on song (js/webaudioAPI)
- Host: GitHub
- URL: https://github.com/stabla/soundcolor
- Owner: stabla
- License: other
- Created: 2016-05-04T17:32:44.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-07T12:26:26.000Z (over 9 years ago)
- Last Synced: 2025-04-04T17:06:43.280Z (about 1 year ago)
- Topics: javascript, reactive, sound, webaudio
- Language: JavaScript
- Homepage: https://stabla.github.io/soundColor/
- Size: 10.4 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# soundColor
Written in JavaScript.
I want to improve myself, I accept any advice or critic.
#### Demo
Live version available here: https://stabla.github.io/soundColor/
#### How it works
Some magic with Web Audio API and fft (fast fourier transform). In fact, it's more about array's manipulation than magic.
## Download
You can download it via bower
bower install soundcolor
## Installation
###Into index.html
define your audio source, and place your sound into song/ folder :
src="song/YourSong.mp3"
You can change the name of the artist and the name of the song on index.html, but that's not necessary.
### Into js/sound.js
You can change the value of speed, but I haven't create colors transition yet, so it should be a little bit awful.
Change outPutThreshold to have a better effects. (but still too many flashes)
var outputThreshold = 50;
#### Errors
Actually, it's not running on mobile devices.
In view IE not supporting Web Audio API (http://caniuse.com/#feat=audio-api), soundColor not working in IE. Sorry. (but if someone use IE, please, help the world, and tell him about Mozilla).
If it's not running on Chrome, you can delete the
> crossorigin="anonymous"
into the audio tag (index.html page).
If you have this error :
> MediaElementAudioSource outputs zeroes due to CORS access restrictions for file://yourfile
run your chrome with this command
> chrome.exe --disable-web-security
#### Special thanks
I want to thanks Web Audio API developpers. (https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API)
Thanks to [@blacksponge](https://github.com/blacksponge)