Reading Through An Image
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.
----------begin_max5_patcher---------- 583.3ocyVssaiBCD8Y3qvxOyFgMWZ59z9UzWpVEY.mFGAFjwzjcq5+9hsgVx J2BMkfPJxQLd73y4LiG6WbcfIkmo0PvOAOBbbdw0wQaRYvo6aGXA4bZNoV6F jSOUlbD5YlRROK0lyKIYID9S8Svxzlac8Gn3di6K4RNofpm5ApHivI8yU1Hy oR4epnFz.0QC76AKsl8W8jH7F+Ny7lBFuccZrg5LVQjoGX7m1InoRSzvw9sq ADoGiiUiXzF+2BeabL.vDHkwWccUCdeOcQBR.LahRz0KJd.HiKmMsILTqJHi DEDNh3fuFwooHgJrICgSQFpHh1YjTwNJmjjq8w+ijHkz3MykO8RDdPUzbKQ1 qeNxjaJHRA6rM0CeUEQswbWeLAv49LF1W+21agHkzHkkbKJw1I1F4KxkNR71 3L1uPkXqNw3Ykmrvm3OjOWlxlJeP2aNbGLrN9d+YM474LJZlYTP3PFEdKHzm bjjWxpofPP5Ah.f7a+YgxAqvSmcodT3B2CqtIwPJvuxXE.jcECsF6mcW20iQ 2.EiHkhFauO355rOJ2U6mYO1uulJge0Cc20U1XjjQuHbXiQsKvbF++euodeT 1uTmpKaDo8DqqGO38MJiVKYbhj0dev69DbgOGXYYT9vWKjwpUOfPqy9VyWSE MAS.MwKFZPS.MQKFZvS.MnUUlBgWtT05RcTu.eb3rb0N5sBMBdvKKbVSUOwS .OauR3XZQSppdlJp6BoFIsWZcrTewQrm9SF27oNhPA8YVu+Qtpn8p6+.TgEw hA -----------end_max5_patcher-----------
Ooh, that’s a very good start. Thanks for that!
Any other ideas most welcome.
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 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.