Reading Through An Image

stringtapper's icon

I am basically trying to re-synthisize a sonographic image. So the image itself very literally represents spectral content that should then be triggered in a simple synthesis engine inside a poly~.

The problem I am having is how to read through an image left to right in such a way that I capture all the Y values for every X value at once, like the vertical line cursor in a sequencer moving through a sound file. So far all I've been able to accomplish is reading through the image pixel by pixel (and even then I'm not sure how to determine which way I'm reading through it).

Does anyone have any suggestions as to how to achieve what I want? The "Whispering_heights" example patch seems close, but it seems to be tailored for moving images and the mechanism for reading through the file seems awfully complex.

Any ideas and assistance is appreciated.

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

jit.submatrix?

stringtapper's icon

Ooh, that's a very good start. Thanks for that!

Any other ideas most welcome.

stringtapper's icon

Ok so after realizing I will have to rethink how I'm doing this I'm stuck at trying to take a 1 pixel wide vertical slice of pixels from an image and map it to a frequency spectrum. Then the problem would be how to sequence each vertical slice. Since you would have to read through the pixel values vertically I'm not sure if it is possible for a computer to calculate data that fast so that you can read all of the data from each sequential slice. I'm not even sure if this is the right approach.

I would be grateful for even just being pointed to specific objects or tutorials that might help.

Thanks.

big_pause's icon

try this for size

PAD 28 - Metasynthy

stringtapper's icon

Thanks for the link. Baz to the rescue! A combination of jit.submatrix and jit.spill is the way to go for accomplishing this.

Another part of solution was abandoning the idea of doing this in real time. Still can't figure out how that would be done. So now we're reading the image offline and then "playing" the data back into the sonification engine.