waveform~ display as a circle

    MaxMSP

    stanrad's icon
    stanrad's icon
    stanrad
    Jan 17 2011 | 8:18 pm
    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.

    • brendan mccloskey's icon
      brendan mccloskey's icon
      brendan mccloskey
      Jan 17 2011 | 8:24 pm
      You mean, with the start of the buffer contents at 0deg, the middle at 180 and the end at 359deg?
      Share
    • stanrad's icon
      stanrad's icon
      stanrad
      Jan 17 2011 | 8:28 pm
      Yes.
    • stanrad's icon
      stanrad's icon
      stanrad
      Jan 17 2011 | 8:40 pm
      Something like this
      1684.Picture1a.jpg
      jpg
    • stanrad's icon
      stanrad's icon
      stanrad
      Jan 17 2011 | 10:24 pm
      Yes, something like that. Unfortunately, don't have Max4 live or Abelton hoping there was a way to do it within Max 5.
    • brendan mccloskey's icon
      brendan mccloskey's icon
      brendan mccloskey
      Jan 17 2011 | 11:09 pm
      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
    • Tim Lloyd's icon
      Tim Lloyd's icon
      Tim Lloyd
      Jan 18 2011 | 12:51 am
      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
    • Ben Bracken's icon
      Ben Bracken's icon
      Ben Bracken
      Jan 18 2011 | 5:08 am
      Graham did a jit.buffer->jit.gl.mesh patch some time ago:
      https://cycling74.com/forums/jit-gl-graph-for-a-waveform-display
      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
    • nick rothwell | project cassiel's icon
      nick rothwell | project cassiel's icon
      nick rothwell | project cassiel
      Jan 18 2011 | 10:39 am
      (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.
    • Emmanuel Jourdan's icon
      Emmanuel Jourdan's icon
      Emmanuel Jourdan
      Jan 18 2011 | 2:29 pm
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
      Just for the fun... an lcd example:
    • Emmanuel Jourdan's icon
      Emmanuel Jourdan's icon
      Emmanuel Jourdan
      Jan 18 2011 | 3:21 pm
      Max Patcher
      In Max, select New From Clipboard.
      and with the playhead...
    • seejayjames's icon
      seejayjames's icon
      seejayjames
      Jan 18 2011 | 3:53 pm
      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~ !
    • Tj Shredder's icon
      Tj Shredder's icon
      Tj Shredder
      Jan 18 2011 | 4:52 pm
      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...
    • stanrad's icon
      stanrad's icon
      stanrad
      Jan 18 2011 | 8:39 pm
      Wow. Pretty Impressive and creative solution Emmanuel. Thanks for everyone else's valuable insight.
    • lewis lepton's icon
      lewis lepton's icon
      lewis lepton
      Jan 18 2011 | 9:06 pm
      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.
    • Mike S's icon
      Mike S's icon
      Mike S
      Jan 18 2011 | 9:22 pm
      Emmanuel bringing the pain hardcore from the brain
    • Emmanuel Jourdan's icon
      Emmanuel Jourdan's icon
      Emmanuel Jourdan
      Jan 18 2011 | 11:38 pm
      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.
    • Chris Muir's icon
      Chris Muir's icon
      Chris Muir
      Jan 19 2011 | 12:26 am
      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.
    • nick rothwell | project cassiel's icon
      nick rothwell | project cassiel's icon
      nick rothwell | project cassiel
      Jan 19 2011 | 10:14 am
      Nice, Emmanuel... lighter weight than my JS/OpenGL solution, I think. I should do some CPU comparisons.
    • nick rothwell | project cassiel's icon
      nick rothwell | project cassiel's icon
      nick rothwell | project cassiel
      Jan 19 2011 | 10:00 pm
      FWIW, I've posted up a page with a video of my disc in action:
    • Roman Thilenius's icon
      Roman Thilenius's icon
      Roman Thilenius
      Jan 20 2011 | 12:30 pm
      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.
    • nick rothwell | project cassiel's icon
      nick rothwell | project cassiel's icon
      nick rothwell | project cassiel
      Jan 20 2011 | 4:13 pm
      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.
    • Emmanuel Jourdan's icon
      Emmanuel Jourdan's icon
      Emmanuel Jourdan
      Jan 21 2011 | 12:09 am
      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.
    • kp*'s icon
      kp*'s icon
      kp*
      Jan 21 2011 | 6:03 am
      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.
    • brendan mccloskey's icon
      brendan mccloskey's icon
      brendan mccloskey
      Jan 21 2011 | 10:42 am
      @kp*
      Actually, it should be "more bettererer"
      Brendan
    • stanrad's icon
      stanrad's icon
      stanrad
      Jan 24 2011 | 11:24 pm
      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.
    • kp*'s icon
      kp*'s icon
      kp*
      Jan 25 2011 | 12:11 am
      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.
    • brendan mccloskey's icon
      brendan mccloskey's icon
      brendan mccloskey
      Feb 10 2011 | 5:00 pm
      bumping this for a colleague
      Brendan
    • saulpimpson's icon
      saulpimpson's icon
      saulpimpson
      Feb 10 2011 | 7:11 pm
      This is really cool. Want to try with Elastic~ and It would be cool to be able to manipulate the loop with the playhead.
    • vichug's icon
      vichug's icon
      vichug
      Feb 11 2011 | 11:08 pm
      most interesting thing coming to my mind is : it really reminds me of the gamelan circular notation system
    • Orkester's icon
      Orkester's icon
      Orkester
      Feb 25 2011 | 5:05 pm
      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.
    • garykwan80s's icon
      garykwan80s's icon
      garykwan80s
      Nov 24 2015 | 12:46 pm
      How to use jit.lcd to replace the lcd,so that we can display the waveform through jit.qt.videoout.
    • ygreq's icon
      ygreq's icon
      ygreq
      Dec 13 2016 | 9:43 pm
      Wow! Great find! Any Ideas how I can get this done with live sound and pushed in a matrix?
    • Ernest's icon
      Ernest's icon
      Ernest
      Dec 14 2016 | 4:44 pm
      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).
      Max Patcher
      In Max, select New From Clipboard.
    • Ernest's icon
      Ernest's icon
      Ernest
      Dec 14 2016 | 4:59 pm
      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 )
      Max Patcher
      In Max, select New From Clipboard.
    • ygreq's icon
      ygreq's icon
      ygreq
      Mar 23 2017 | 11:02 am
      Never got to say THANK YOU, Ernest! This is exactly what I was searching for!
    • Nick's icon
      Nick's icon
      Nick
      Sep 06 2017 | 4:39 am
      This is an excellent thread, thanks Emmanuel & Ernest!