Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thejoin95/image-to-music
Generate midi files from image
https://github.com/thejoin95/image-to-music
img2midi img2mp3 javascript midi python rgb2midi threejs
Last synced: 9 days ago
JSON representation
Generate midi files from image
- Host: GitHub
- URL: https://github.com/thejoin95/image-to-music
- Owner: TheJoin95
- Created: 2019-07-04T12:27:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-09-03T13:03:00.000Z (about 5 years ago)
- Last Synced: 2024-05-01T20:59:35.204Z (7 months ago)
- Topics: img2midi, img2mp3, javascript, midi, python, rgb2midi, threejs
- Language: JavaScript
- Homepage: https://thejoin95.github.io/image-to-music/index.html
- Size: 38.9 MB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Music-generator-midi
Demo here: https://thejoin95.github.io/image-to-music/index.html
This little experiment is made in Python and Three.js.
The three.js base was made by a girl, but I could not find the link to the her repo anymore. I'm sorry.## Generate Midi music from image
The img2mid script take in input some images and produce a midi file.The music is made by a combination of colors: given a portion (pixel) of the image it's calculated the avg color and assigned to a midi note.
The duration of a not is given by the brightness of the pixel portion. More bright, the duration is up to 4s and the min is around 0.25s.The drum's notes are given by the darkest colors (grey, dark brown and black).
I also tried to map the various colors to the light spectrum and then converted them into notes, but without success.
Sometimes the "songs" are shorter than other or sometimes they are "cringe".. it is almost a random sequence of notes.
All the midi files will be converted into a mp3 file, for web compability.
## Art Gallery
The Art Gallery idea came up since some images are paintings.
I used a premade box from a girl then I customized everything with some colors, pattern and audio.If someone find her repo, please, contact me so I can give her the reference.