Converting images into sound?
Hey everyone,
I was wondering if anybody could help me on a installation im working on. First off im i just want to let you know my knowledge of Max/MSP is basic at best but im hoping to improve this through this project. Ok with that said the first step of my idea is converting pictures into sound by reading the colour scale of that image which would in turn trigger a number different interesting synths (like a granular synth).
The second part of my idea is that these pictures will be played on a slideshow at random in max, with each image being displayed for about 10 seconds and as they do, trigger the synths.
The resulting effect is that each picture will create it's own piece of 'music' if you will and each will sound slightly different from previous picture.
Heres a video that will hopefully give you a better understand of what im trying to achieve, just with my idea having a slideshow to display multiple images:
If anybody has any advice, ideas or even a better way on how i should approach this project i'd really really appreciate it. Thank you
there's really a million ways of doing this. an image is an array of pixel data. how to interpret it depends entirely on the sonic results you'd like to create. you could simply plot the pixel data to a waveform and play that. or run a blob detection algorithm on it and set synth parameters from that. or search for the dominant color. or contrast variance or ... or ... (have a look at the jit.cv objects for some inspiration)
i'd start from intended sonic output. you say you wanna use a grain synth. how many useful/expressive parameters does it have? that can be a hint at what image analysis approach to take.
take an image and manually set the parameters of your synth to produce something that fits the image. what synth parameters did you change? which of the image's features guided you in the sound design? take that as your starting point for patching.
excellent advice!
I would probably also try using [jit.spill] on single rows of your images (maybe resampling down so there are only a handful), then doing something with the lists of pixel data. This way you have a more manageable amount to deal with, and you can "scan through" lots of example lines to see what you get. Simplest would be to iterate through each line and use [peek~] to load them into [buffers~] and then play them directly as waveforms. Maybe the ten seconds for each image could be a progressive scan through all the rows.
There are a ton of things you can do beyond that...those data lists can be used for a lot...parameters for effects or filters...amplitude envelopes...frequency values...on and on.