warp interface

    Feb 09 2010 | 5:43 pm
    Hello all, I just started experimening with a sample warping interface ala Ableton Live/Pro Tools Elastic Audio. All it is atm is el.buffet~ and the pevents message drawing lines into an lcd that's on top of a waveform~. The analysis from el.buffet~ seems to work quite well, but I'm a little stumped as to how I can re-draw the warped waveform.
    I need some way of drawing the waveform into lcd (or jit.pwindow) so that after one of the markers (detected transient lines) is moved, I can redraw it and the waveform will stretch/expand accordingly. After that works I'll start worrying about how to translate the markers and warp data into a way of actually adjusting time-stretching of a sample.
    My plan is to get this idea working, and then try and build an FTIR IR touchscreen to use with it and future patches. It would be awsome to be able to view the waveform of a sample and then just touch+drag to warp the pitch/time. It might turn into an interesting project!
    Here is what I have so far with lcd if anyone is interested (you will need el.buffet~), cheers for any suggestions!

    • Feb 20 2010 | 11:33 pm
      Anyone have any ideas on this? I'm still not sure where to start with displaying the waveform of a buffer in a visually stretch-able way. Jitter looms........I need to do some more tutorials!
    • Feb 21 2010 | 1:50 am
      Quick hack-style would be jit.desktop to take a snapshot of the waveform---your buffer~ as it looks in a big waveform~ object, use simple colors like a white wave on a black background...also use a square-shaped waveform~ as the texture needs to be a square with power-of-2 side lengths, so this will minimize distortion. Use that matrix (from jit.desktop) as a texture on a jit.gl.gridshape, or go straight to a jit.gl.videoplane. Then you can stretch the gl shapes as much as you want with [scale] commands. (Stretching in [lcd] is not the way you want to go...the math is done for you with the GL objects.) With a white waveform to begin with, you can use jit.scalebias to change to any color.
      I'd be curious how it would look on a cylinder or sphere too. If you try that, use tex_map 2 for the sphere, so it will map the way you'd imagine it should...
      jit.gl.handle on the shape or the scene for even more fun.
      A less-hack style would be to use [uzi] --> [peek~] and grab as many samples as you want from your buffer~ (maybe every 16th sample or something so it's not insane), then send those points into jit.gl.sketch, using either "point" or "lineto" commands. You'll need to tweak the position values to map in the GL world correctly: at standard camera distance (Z = 4.00 I think) the range is -1. to 1. in each axis. You can stretch jit.gl.sketch the same way as other shapes, regardless of the number of points....or you can stretch the entire scene with [scale] commands to jit.gl.render.
      also there's jit.graph, jit.plot (I think these are the names...) one of them will display signal data real-time like scope~, and it looks really cool...maybe have that at the bottom to see the results of your stretching.
      Yep, multi-touch waveform mangling is where it's headed!
    • Feb 21 2010 | 1:43 pm
      where can we get that el.buffet~ object? cant find it on max objects database and google gives lots of spanish hits! :P
    • Feb 21 2010 | 2:01 pm
      There's a link in my first post to Eric Lyon's page. I got a heads up on the jitter forum about this as well
      One of the posts shows a way to display a buffer using openGL, which seems to be exactly what I need. I just now need to get my head around exactly how it works so I can stretch it to bits :)
      Cheers for the help so far!