Real-Time Audio Buffer Write

Mariano Sibilia's icon

Hi, I'm working on a real-time audio buffer visualisation in Jitter, and it's working fine. The only thing is that this way when the loop capture (driven by phasor~) completes, jit.matrix gets fully cleared / initialised.

Instead, I want the new data to overwrite/replace the old values progressively (left to right), so the waveform stays visible without resetting, similar to how poke~ works with buffer~.

If I remove the clear message in my patch, the buffer continues to write, but it just overlaps the old data instead of replacing it.

Thanks

TFL's icon

You could use the ---WAVER matrix as is, an use an additional jit.matrix for the visual output, on which you will copy ---WAVER column by column at data rate (using a [snapshot~] after [r ---Ysig2]), but you reset (set to 0) the column before copying the values from ---WAVER.

If you could provide the patch you have so we can tinker with it without having to recreate it from your screenshot, that would help.

Rob Ramirez's icon

I shared this on the discord a while back, might find some inspiration. https://discord.com/channels/289378508247924738/289379337528934401/1314699168094224457

[ edit - attached the file directly ]

jit-scrolling-waveform.maxpat
Max Patch




Pedro Santos's icon

Hello. How about something like this?

Max Patch
Copy patch and select New From Clipboard in Max.

Mariano Sibilia's icon

@TFL

Oscope.maxpat
Max Patch

Here's the patch

Mariano Sibilia's icon

@Rob Ramirez that looks really cool actually, thanks so much for sharing it!

Mariano Sibilia's icon

@Pedro Santos that's good! but is there a way to keep the visualisation of the waveform on jit.pwindow instead of a floating window?

Matteo Marson's icon

@Mariano
You can capture to texture using jit.gl.node and send it to jit.pwindow:

Max Patch
Copy patch and select New From Clipboard in Max.

Mariano Sibilia's icon

@Matteo Marson yes! thank you!