Getting a sound... From an image.
h
eekboi (272)

Make sure to read the full post before pointing out errors please.

Hey! I've made this trash for you all to enjoy. This was made using @minx28's circle API. Make sure to change the seed in main.py! This repl is a dummy for a concept of mine that I call "Wide coding". This concept is basically a way of keeping your code as bloated as possible just for the effect, hence why I have like 12 files. If you have any questions/problems go ahead and ask me in the comments!
Some things you have to do to get this piece of crap working right are first, running the repl for a second time. And then deleting the contents of mathpy.py every second time you've ran the repl. Sorry I couldn't make it simpler, just the way it works.
We now have 445/1000 lines of code!
EDIT: Due to multiple people pointing out an issue which I had underestimated (looking at you @ZDev1, @CodingCactus, @abaanasim98, @JosephSanthosh, and @EthanCulp) I've decided to make a fix, courtesy of CodingCactus. You'll see changes in my repl about now.

You are viewing a single comment. View All
minx28 (356)

I might try make a version of this - how have you converted the image into sound? What I'm thinking of doing is selecting a handful of points across the image, making a bezier curve out of them, then for each point along that curve, turning the RGB into a linear value and playing a pitch associated with that.

eekboi (272)

@minx28 What I've done was take the pixels, turn them into an RGB value. Then I used the re module to remove the characters from the output of that. Next I added the result of the filter into a number, which happens to be a frequency of the noise that is played.

eekboi (272)

@minx28 And to address

You can remove the post and premodifiers.

It's fun to jack the postmodifiers all the way up and hear the sound go "EEEEEEEEEEEEEEEEEEE". :D