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!
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 1657.3oc6assjiZCD8Y6uBJp7niCRbOeH4koRMkLH7nLXvEHOylr0te6QW.i DFrwFvK0V6CCWjPRsNp6Vcejmutdk4t7ufKMM9SiWLVs5qqWsRTDufUUuux7 .5KQonRwmYlg+Le2+XtQVEE+Epn3iFjLBst32Hww3LdEfpRRxynkj+CKJCt0 pp3rSGHYoXpnuUJL+DstTXUoxhn+6QrTbMM2v9y3uqplDKjClr869VlJiZF5 fnEl+EtHFkgpq6HhF8FIa+qE3HprKsccYRF6F+pSH+JDr057XHZBtnBcpfG1 nPRwefKJI4pS4UlMcLTzWdhq.Xf3lieSOy.88o4QuiiUvgUlw3j6oOxOhyZ9 dK9WncQ+KIYGKvk3LJhVI3piK5TJ80tWzzqOAEg6sw8f8qL2WPhyy3hgVa4E WOfuXHVFbUkaQ8YniczTZdd5NTwGjRxtTr15.SgFkQNfnXJQJOPqysib3XAI ip0W3LDqOdqLpHOMUqqj07QG0Di+fDg+jDSeSzWMnklIlhdilolV4sL4NfKK Q6w0fmlcGabbUqnmkrKr0f5UnXuATp4RatyqEsr477aKE8s12ismmX01SnqZ K0tC4K80M5aqWW+vlY.GcsVDnn2HQQnJ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6Em97QTQEELc6swoOznllv567CEruezs.uaCDvpsmAfsfPKmP.G aT2NHMOBINCQqoy.ijkj2hp0Q3YN3ldl04VcfOzMjBFU7igV07tNFCzOYoik jWb360i2GTRz6ZAwvg5n7z7h5zVqKm8gGPEuqTm0V6PHv0eSOOoEYPyZgaUg 0BiVOBr.gdfMc9j5OUgc60ZV34O9xmzZFmr9lLL0UjzUN7pUiQ6voZPTINks 5vBMRSDDACY6CccBEioNBzuJ1UdnV6qSEp5iByr3Tpt6iGwlc5LQkPbsQpAO i972w3sHRxO1XoFk8ms5Q0cg8mX7zI8VhfsoyoBGufFG9+kCMryzCENN5ezk +eYzIkSWrpdWxD3VxD3oJSNdCAm5QjrlGQZ.nD.behDDJXaikMiqH78pmGoj Z6O.vyy9ohdsFtdfOu6SlrkPFHvWbyI77aicsdHlosf44FAACYU084ZRLDQ5 dsIFqLAF5RG34szwkIuagSAOW0ofgr1s.UwuWmDs1.e82V++.D0IZ4B -----------end_max5_patcher-----------
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!
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!
where can we get that el.buffet~ object? cant find it on max objects database and google gives lots of spanish hits! :P
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!
Forums > MaxMSP