waveform~ display as a circle
Has anyone managed to display waveform data in the shape of a circle? I would like to view, edit and display buffer data in the shape of a circle. (As opposed to the rectangular boxy format included in the waveform~ object.) Thanks for any insight.
You mean, with the start of the buffer contents at 0deg, the middle at 180 and the end at 359deg?
Yes.
Something like this
You mean like this?
Yes, something like that. Unfortunately, don't have Max4 live or Abelton hoping there was a way to do it within Max 5.
I think I can safely say that, certainly in the past 3 years, this request has never appeared on the forum - and in my experience I know that this feature is not readily available in Max; the only objects that I can think of to get anywhere near a solution would be [lcd] or maybe [pictslider], but you would need a 360deg image rendered elesewhere first. Either that, or something like Processing, but your programming would need to be better than mine.....
Brendan
It's possible to do it in Jitter, but I'm not one of the ones who could put it together very easily. Search/ask on the Jitter forum, how to render a buffer in OpenGL......then do something like apply the formula for a circle to the matrix in some way....I'm being cryptic because I don't know how lol.
All I know is that it IS doable in Max5, and not just because Nick posted a picture... :p
Graham did a jit.buffer->jit.gl.mesh patch some time ago:
You could use this as a jumping point, then capture/jit.gl.asyncread it to a texture and then use the texture on a jit.gl.gridshape @circle. I'd probably make the initial rendering/texture extra big so it will look decent when used on the gridshape.
Coming up with a meaningful way to interact with it might be the trickier part.
-Ben
(To the admins: thanks for purging the accidental double post.)
My solution is straight Max5 - it just so happens that I'm working on a Max for Live project. It's Javascript/JSUI, and probably not quite what you want: it's a live looped amplitude display rather than a buffer waveform.
I didn't think about a Jitter/GL solution - that makes a lot of sense - but I was starting from some older JS code which supports click-and-drag interaction, as well as additional text and/or icons.
Just for the fun... an lcd example:
and with the playhead...
WHOA
...and I was planning on doing other things today...
How do you think this kind of approach could work with jit.gl.sketch? On the [lcd] it seems pretty snappy. Maybe the GL isn't needed after all... with jit.gl.sketch in the past I've noticed pretty bad response after this many lines are drawn on there. But it would be pretty rockin especially with the handle and other goodies the GL world would provide.
New Max object: groovecirc~ !
Wonderful Emmanuel.
I think there is no need for Gl, as you only need to calculate it once. To draw the playhead isn't that expensive...
Wow. Pretty Impressive and creative solution Emmanuel. Thanks for everyone else's valuable insight.
yummy, that is pretty damn snappy if i do say so myself. just think on what you could do with sectioning off the waveform when you have a portion of it looping.
Emmanuel bringing the pain hardcore from the brain
Thanks for the nice comments... Using sprites like in the second example makes it reasonably fast. The major problem we just take samples evenly spaced, and not because they are meaningful, one idea to go further would be to apply some filter lowpass filter, or something like that on the absolute value of the samples (or calculate a RMS) selecting the samples to display, easy to do in mxj for instance, but too complicated/slow in patch.
Nice patch. Rather than calculate an RMS value, I think I would just try and find the minimum and maximum in a given batch of samples.
Nice, Emmanuel... lighter weight than my JS/OpenGL solution, I think. I should do some CPU comparisons.
FWIW, I've posted up a page with a video of my disc in action:
that is definetly very easy to do with [lcd] or [jit.lcd].
of course it will lack antialiasing so when you just draw lines
to lcd you might want to make the display not too small.
Just another example of the subjective Max object space of different users... I've done a fair amount of UI design in Javascript over the last few years, yet have hardly ever used [lcd], despite it being much older.
I made a new version in mxj which is way more accurate (find the maximum of a block, instead of the first value...), posted on toolbox.
That is the freaking coolest thing I have seen in a really long time. Bravo. Oddly, I kinda like the java free version bettererer. That is seriously sexy and oddly relevant and helpful for the kind of thing I happend to be doing at the moment. Seriously wow.
@kp*
Actually, it should be "more bettererer"
Brendan
That looks much more bettererer than the rectangular waveform~ . Looks like a coffee cup stain (from Java nevertheless ;0.) I'm sure it will become of use in the future-seems much easier to navigate and lots of potential for development. nice to see so much interest in this topic.
Well paired with say named transports or loops of different lengths (or just different speeds) it just is so cool to watch the phasing and convergence points... or maybe 2 of them superimposed with waveforms in different colors. Sexy stuff.
bumping this for a colleague
Brendan
This is really cool. Want to try with Elastic~ and It would be cool to be able to manipulate the loop with the playhead.
most interesting thing coming to my mind is : it really reminds me of the gamelan circular notation system
I caught this thread when it first popped up, came across the patcher again cleaning up files. Would it be possible to do this with scope~ or with an overdubbing buffer? Same idea except realtime, I suppose, but would that be too resource heavy?
Thanks.
How to use jit.lcd to replace the lcd,so that we can display the waveform through jit.qt.videoout.
Wow! Great find! Any Ideas how I can get this done with live sound and pushed in a matrix?
What you can do is draw the wave into jit.gl.mesh and display in a jitter window rather than using scope. This draws two sines at 90-degree phase difference to make a circle (it's rendered at an angle to the viewplane (use the window handles to change the viewing angle).
Then you can put in a waveform to modulate the circle in the 3rd dimension at a lower amplitude. Now the angled view actually works in your favor )
Never got to say THANK YOU, Ernest! This is exactly what I was searching for!
This is an excellent thread, thanks Emmanuel & Ernest!