Skip to content

Encode an image to sound and view it with a spectrogram - turn your images into music

License

Notifications You must be signed in to change notification settings

AmrMahmoud2/img-encode

 
 

Repository files navigation

img-encode

Encode an image to audio spectrum

Demo

https://alexadam.github.io/demos/img-encode/index.html

Open an image file

alt s1.png

Click on "Encode"

alt s2.png

alt s3.png

Open the generated 'result.wav' file with 'Sonic Visualizer', click on 'Layer -> add Spectrogram'. The result:

alt result

Other examples

alt result

alt result

alt result

alt result

alt result

How to use it

There are 2 versions: python ('v1-python' - no longer maintained) and javascript ('v2-js') This is an usage example for the javascript version, tested on Firefox 41, Ubuntu 15.10, Sonic Visualizer 2.4

  1. Download as .zip or clone the repository

  2. go to the '/img-encode' folder

  3. open '/v2-js/index.html' in Firefox

  4. click on 'Open Image...' then on 'Encode'

  5. After a few seconds you will be prompted to save the generated 'result.wav' (audio) file

  6. Open 'result.wav' with Sonic Visualizer then click on 'Layer -> add Spectrogram'

Credits

http://www.ohmpie.com/imageencode/

http://www.codebase.es/riffwave/

https://github.com/eligrey/FileSaver.js

About

Encode an image to sound and view it with a spectrogram - turn your images into music

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 64.8%
  • HTML 15.6%
  • CSS 10.2%
  • Python 9.4%