Polyphonic Image sampler/flipbook in OpenGL

Feb 26, 2012 at 7:24pm

Polyphonic Image sampler/flipbook in OpenGL

Hi,

I have a question, perhaps someone can help here? Any pointers appreciated…

I am trying to build a sort of ‘image-sampler’ and I’d like to figure out how to take most advantage of hardware-acceleration. Similar to a MIDI-based sampler it should in response to triggers (e.g. velocity values) select and output a certain ‘image’ -instead of an audio-sample. I was thinking to make a poly~ where each voice would correspond to a ‘velocity’ value and handle the rendering of a specific image. Different keynumbers would be represented as individual instances of this poly~ object (or maybe a poly~ in a poly~?). Thing is, that they all need to be ‘mixed’ together (they can ‘overlay’).

So what I am basically looking for is an efficient way to dump a number of images (pngs with alpha) into an OpenGL context and fade them in and out individually. The result of playing this sampler should look kind of like a flipbook without a predetermined sequence of images.

I don’t know much about video in OpenGL, I suppose a starting point would be Tutorial 34: Using Textures, and Tutorial 49: Colorspaces … ? Maybe this thread? http://www.cycling74.com/forums/topic.php?id=6733

Cheers,
Marlon

PS I’m on Max5.1.9 and MacOS10.6.8 (MBPro17″)

#61990
Feb 27, 2012 at 8:23am

Hi Marlon,

if you were in Max 6 you should check out jit.mgraphics. Send the output to a jit.gl.videoplane.

http://www.cycling74.com/forums/topic.php?id=37912

– Pasted Max Patch, click to expand. –
#223858
Feb 27, 2012 at 6:56pm

Thanks, however unfortunately I’m running this project in Max5. And I still wonder how to do the mixing of up to 127 simultaneous images afterwards… :-S

Marlon

#223859
Feb 27, 2012 at 7:30pm

hi marlon.
you are probably going to want to create a poly~ instance containing a jit.gl.videoplane object with @blend_enable 1 @depth_enable 0.

you can then use the alpha component of the color attribute to control the opacity of the image.
or you can experiment with different @blend_mode settings to get different blend styles.

#223860
May 20, 2012 at 2:03pm

I’m sure the professional flipbook creator can help you: http://bit.ly/oMbfWa

#223861

You must be logged in to reply to this topic.