Skip to content

Short and sweet python code converting pixels from an image to "musical data." Arguments accept image and "length" factor, (ratio of pixels analyzed from image, [1, 100] for best results.)

Notifications You must be signed in to change notification settings

ematth/Image-To-Music

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image-To-Music

Short and sweet python code converting pixels from an image to "musical data." Arguments accept image and "length" factor, (ratio of pixels analyzed from image, [1, 100] for best results.)

Example

Take note of "quad.jpg" and "quad.jpg.txt" for an example of the end-product.

How to use

In terminal, "python main.py (image) (factor)" will create a new .txt file based on the given image. for best functioning results, (image) should be either a .jpg or .png, and (factor) should be a positive integer. You can also use "python main.py (image)" which will default (factor) to a reasonable value.

Warning

This code is rough. Don't be suprised if it doesn't work for "edge cases" and some image files/formats.

About

Short and sweet python code converting pixels from an image to "musical data." Arguments accept image and "length" factor, (ratio of pixels analyzed from image, [1, 100] for best results.)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published