[Sharing is Fun] LCD Sonogram
////////// MAIN PATCH \\\\\
////////// PFFT SUBPATCH - Save as BF.PFFT-Analysis~ \\\\\
--------------------------------------------------------------
I share this patch because I'm stuck with the colors adding.
The monochrome mode works... A lot of tweekings can be achieve but my main problem is now the colors, I have no idea on how to do this.
I tried to change colors independently, with different exponential coefficient but without significant results. Maybe a combination of [split]...
Thanks in advance for any help.
Colorful, with subsampling:
--- Subpatch 1: spectr-fftsub ---
--- Subpatch 1: spectr-down ---
--- Subpatch 3: spectr-analyze ---
--- Main patch ---
Some comments in follow-up.
Some comment on my LCD sonogram.
spectr-fftsub:
Performs the fft.
Lives of course inside pfft~
Integration (spectral averaging) is not used in the sonogram.
spectr-down:
Subsampled pfft~. Lives in a poly~
I use a script to change overlap.
spectr-analyze:
Hearth of the sonogram.
Embed a poly~ for downsampling.
dsp needs to be stopped before changing downsampling and restarted before.
clut use 3 tables to hold R, G and B curves.
Get my clut here: http://www2.pescadoo.net/temporaire/SPECTRO.CLUT
main patch:
Gain: self explanatory.
Period: ms per column.
YOU CAN EASILY SCREW YOU CPU WITH PERIODS < 10.
Powerful stuff, thanks for sharing it. Your cluts work fine, good idea.
I'll have to have a look at this on my other computer later, but thanks!
Crazy coincidence that you post this, I was going to ask if there are any
alternative sonograms to the max object, preferably using LCD.
Is the code scalable? If I resize the LCD, will the code accomodate the new
dimensions?
On 14/04/2008, Bertrand Fraysse wrote:
>
>
> Powerful stuff, thanks for sharing it. Your cluts work fine, good idea.
>
>
In my version, the resize message for the code is on the left, and more precisely in the top left corner. You send a message with
[x y] and then you resize your LCD by giving it the same values.
A question. If I put an interface thing in a bpatcher.
Is there a way to know, inside the bpatcher, its size ?
> Crazy coincidence that you post this, I was going to ask
> if there are any alternative sonograms to the max object,
> preferably using LCD.
Funny indeed. April is sonogram's month.
> Is the code scalable? If I resize the LCD,
> will the code accomodate the new dimensions?
Mine won't until you change 'counter 0 512' to match the new width and 'spectr-analyze fft_size buffer_name' to match the new height. Since it is one vertical pixel per frequency bin, you are bound to height = fft-size/2.
Next version will get a zoom fft (spectrum translation around a center frequency) but this requires the low-pass filter which was omitted in this version ('filter here' comment in spectr-analyze) because aliasing would be too high.
There are certainly better display solutions with Jitter but i don't have Jitter.
Quote: J.Y.Bernier wrote on Sun, 13 April 2008 23:34
----------------------------------------------------
> YOU CAN EASILY SCREW YOU CPU WITH PERIODS < 10.
----------------------------------------------------
Really? on my macbook pro a period of 1 is fine about 1% cpu usage.
It's a great patch!
Best,
J.
Bertrand Fraysse schrieb:
> A question. If I put an interface thing in a bpatcher.
> Is there a way to know, inside the bpatcher, its size ?
Javascript can help:
function bang()
{
if(this.patcher){
if(this.patcher.box){
outlet(0, this.patcher.box.rect);
}
}
}
--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com