Live scrolling waveform display

X37V's icon

Hello,

I have been trying to come up with all sorts of workarounds for this, but I wanted to know if anyone had a nice simple solution.

I'm looking for a way to take a live signal and constantly display the previous n seconds of it, kind of like a cross between a waveform~ display and a spectroscope~ in sonogram mode (or multislider in reverse line scroll mode).

I can do it with a redrawing waveform~, but I wonder if there is a nicer way:

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

jvkr's icon

lcd is an option:

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

X37V's icon

That'll do nicely for what I need

Cheers jkvr!

For the Cycling developers, how easy would it be to add further functionality to spectroscope~ that did an amplitude display like this? Rhetorical question really...

Emmanuel Jourdan's icon

On 2 juin 08, at 12:30, Alex Mesker wrote:

> That'll do nicely for what I need
>
> Cheers jkvr!
>
> For the Cycling developers, how easy would it be to add further
> functionality to spectroscope~ that did an amplitude display like
> this? Rhetorical question really...

Spectroscope~ is designed to make a FFT analysis. It wouldn't make to
much sense to add that feature here. IMHO, the lcd solution is good
enough.

ej

seejayjames's icon

Along the lines of the spectroscope~, I was wondering if, since it's done some kind of FFT already, whether there could be an outlet which spits out lists of bins/amplitudes. So you wouldn't need to do a separate FFT yourself, just run it thru the spectroscope and track what's already going on visually, but have access to the numbers involved too.

If the new one in 5 already does this, my apologies :) and thanks!

I suppose you could do some trickery to achieve this with an exactly-placed and sized spectroscope, using the suckah to read the values graphically :)

-CJ

X37V's icon

I ended up reworking the LCD solution that jkvr suggested, as it didn't accurately represent peaks and the positive & negative values (it just mirrored the positive to make the negative), by using peakamp~ instead of avg~

For anyone that is interested:

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

markjennings's icon

I would be interested in something similar....but my Issue is im on max 4. Does anybody have a patch that I could try in Max 4

X37V's icon

I just knocked this up.... give it a try. I haven't really tested it though

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

sfogar's icon

Hi,

what about a similar solution to show (after you open it) the
soundfile 'preview' ?

That is, not a live scrolling wavefor but a fixed one, loaded when you
'open' a soundfile.

All the best

--
Alessandro Fogar

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

2008/6/30 Alex Mesker :
>
> I ended up reworking the LCD solution that jkvr suggested, as it didn't accurately represent peaks and the positive & negative values (it just mirrored the positive to make the negative), by using peakamp~ instead of avg~
>
> For anyone that is interested:
>
>
>
>
>

X37V's icon

Hi sfogar,

For that, I'd use the waveform~ object (if you are loading the sound file into a buffer). Check out the help file.

... or if you aren't loading a file into a buffer, this is another solution: https://cycling74.com/forums/index.php?t=msg&goto=92655&rid=0

I just included a sfplay~ object in my example to test if it was working, but the idea from the beginning was to be able to take a live audio stream and display it (as opposed to loading in a sound file).