Forums > Jitter

jit.gl.graph for a waveform display


Jul 25 2009 | 1:16 pm

Hi Jitters !

I’m trying to have something like a waveform display but rendered in a 3D GL environment. I’m using a jit.buffer~ to read a buffer then a jit.gl.graph to render it.
Of course, I’m drastically downsampling (100).
However, I still get a huge number of points to graph because I’m graphing a growing buffer (from 0 to 20 minutes).

My problem is that as soon as I turn the jit.gl.graph on, my CPU jumps to more than 115% (dual core is wonderful ;o) when it was around 35% before.

I can’t get why. Is it because of the huge number of points ? Is it because a CPU-expensive option of jit.gl.graph is on ? Is it simply because of the way jit.gl.graph is working ?

Does somebody already tried something like this ?
Do you have an idea for rendering a waveforme in 3D/GL without jit.gl.graph ?

Cheers

Jul 25 2009 | 3:20 pm

hi ben,

>I can’t get why. Is it because of the huge number of points

i think so. Maybe you could try graphing 1000ms of the buffer at a time, as it records, and move the drawing position of the jit.gl.graph.

oli

Jul 25 2009 | 3:45 pm

Hi Oli ! (nice to hear from you btw)

I thought of that but the display is supposed to give a way to browse in the whole buffer and select some interesting parts of it. Pretty much like waveform~ does but with a lot of additional info already displayed in 3D/OpenGL (mostly with jig.gl.sketch) along a timeline.

So this won’t really reach what I would like to achieve…

Thanks anyway I’ll keep looking for workarounds.

Cheers

Jul 25 2009 | 3:49 pm

maybe you could try rendering to a texture (if a 2d waveform is acceptable)

oli

Jul 25 2009 | 11:06 pm

Here’s how I used to do it, using jitter matrices. Made to be a near-to drop-in replacement for scope~. Course, now I would do it using GL render to texture (on the todo list). But this might be helpful to somebody.

Save as jscope~.maxpat:

— Pasted Max Patch, click to expand. —

Save as jscope~.maxhelp:

— Pasted Max Patch, click to expand. —
Jul 25 2009 | 11:08 pm

Oh, just realized that you were looking for something more like waveform~ than like scope~. Nevermind!

Jul 26 2009 | 12:26 am

Maybe this will help, at least to start with. It displays a buffer~ in OpenGL (using jit.gl.mesh).

— Pasted Max Patch, click to expand. —
Jul 26 2009 | 8:00 am

Hi !

hehe ;o) I did a scope too years ago now…
But the last patch you posted is very efficient, jit.gl.mesh seems to be a very good way to explore for what I’d like to do.
Thx a bunch
I’ll keep you posted !

cheers

Jul 27 2009 | 2:57 pm

Hi !

Thank you very much for the visualisation with jit.gl.mesh. I’ve adapted it to my system and it works perfectly !

It now takes a few CPU % to visualise the buffer on top of my timelime in jitter.

Really Great !
Thank’s again

PS : I’m not posting the patch. It’s not that I don’t want to share it, it’s just because it doesn’t work alone (without the complex system around) and if I make a "standalone" version of it, I’ll get a patch very close to the one already posted. So it won’t add anything new !

Jul 30 2009 | 11:01 am

Hi all – the jscope~ is great, has anyone had much success with attempting a jitter spectroscope…?

I only ask cos…

http://www.cycling74.com/forums/index.php?t=msg&goto=178200&rid=8295&S=6dafef1cab65be65f54c212404a86e6b#msg_178200

If anyone can help I’d appreciate it…

Jan 31 2016 | 4:51 pm

Hi all have you a method to draw playheads in the graham wakefield patch! i’ve tried with jit.gl.sketch with no results,

Feb 02 2016 | 12:03 pm

i would start with something like "jit.gl.gridshape @shape plane @transform_reset 2 @scale 0.01 1 0".
it can be animated using, e.g. the normalized position output of groove~ –> scale 0. 1. -1. 1. –> position $1 0 0

Feb 02 2016 | 3:02 pm

Thanks a lot, it’s really what i wanted, there’s just one problem, when moving the shape sometimes a glitch occurs, but i think there’s no way to menage it…
Using more jit.gl.gridshape and different colors we can make multiple playheads, Awesome.

Feb 09 2016 | 1:45 pm

Hi,

I know this may be a basic question but how do I change the colour of the visualised wave in Graham Wakefield’s patch? I have been trying all the methods I can think of and find but it does not change the colour.

Thanks :)


slo
Feb 09 2016 | 6:59 pm

@Rob,

I get a different color for the waveform by changing the @color attribute in the jit.gl.mesh object at the bottom.

Feb 14 2016 | 6:38 am

Hi SLO,
Sorry, should have specified, I meant the jscope patch. I can’t seem to get the colour to change reliably. I have used jit.hue but this doesn’t work very well and misses out some of the colour spectrum. Is there a more effective way of doing it?


slo
Feb 15 2016 | 2:59 pm

Ah, of course. :-) Graham’s jscope~ is outputting a 2 plane matrix while for colour the jit.pwindow (or jit.window) needs 3 planes (RGB) of 4 planes (RGBA). Only one of the planes from jscope seems to have data, so I created 3 channels of it and scaled them to produce different colours.


-- Pasted Max Patch, click to expand. --

Mar 24 2016 | 7:59 am

Hi Slo, apologies for the delay. That worked great thanks!

Mar 29 2016 | 12:05 pm

hey – this is nice to avoid the glitches that waveform~ seems to have when processing a buffer.

But how can I visualise only the first channel of a two channel buffer?

Viewing 19 posts - 1 through 19 (of 19 total)

Forums > Jitter