Giter Site home page Giter Site logo

thejoin95 / image-to-music Goto Github PK

View Code? Open in Web Editor NEW
16.0 1.0 3.0 39.85 MB

Generate midi files from image

Home Page: https://thejoin95.github.io/image-to-music/index.html

Python 1.37% HTML 0.17% JavaScript 98.45%
python midi rgb2midi img2mp3 img2midi threejs javascript

image-to-music's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.