Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodaguti/musicgenerator
Generates a music from a image file.
https://github.com/nodaguti/musicgenerator
Last synced: about 21 hours ago
JSON representation
Generates a music from a image file.
- Host: GitHub
- URL: https://github.com/nodaguti/musicgenerator
- Owner: nodaguti
- Created: 2012-06-15T11:38:08.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-06-19T15:07:52.000Z (over 9 years ago)
- Last Synced: 2023-03-23T08:23:04.818Z (almost 2 years ago)
- Language: JavaScript
- Size: 113 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Music Generator
画像を読み込んで, その画素情報から音楽を自動生成します.
Demo: http://nodaguti.usamimi.info/test/MusicGenerator/MusicGenerator.html
:warning: 古い [Audio Data API](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/Introducing_the_Audio_API_Extension)
を使って作られたため, Firefox 28 **以下** でしか動作しません.## 仕組み
画像を左上から右下に向かって走査し, 各画素から RGBA の情報を取り出して指定された数式に基づき以下の値を決定し, 音を作ります.
- Frequency (default: `Math.floor((R+G+B) / 3) + 100`)
- Sound Length (default: `(R+G)/1000`)
- Envelope (default: 0)
- Type of wave: Sin, Square, Triangle, Sawtooth (default: Sin wave)