[PD] running plot of sampled data

matthew jones m.jones at signal.QinetiQ.com
Fri Oct 15 17:48:20 CEST 2004


I guess you want to use [env~] instead?
Using [snapshot~] has the possibility of returning a stream of zeros even if
the signal is quite loud (ie. if it sampled at the zero crossings each
time).  I Usually use an [env~] feeding into a [-90] which feeds into a vu
object...

However, since I have my doubts on the efficiency of the env~ object for
such operations, if ANYONE CAN SUGGEST HOW TO IMPLEMENT A ONE-TAP IIR FILTER
it may be just as well to be using [snapshot~] in a different arrangement:

[adc~] connects to a [-~] object where the right inlet gets a delayed
version of the output of [adc~] (delayed using [delwrite~] and [delread~]).
This feeds into a one-tap IIR filter (where the coefficients are [1 0.999] -
on the verge of stability but not exactly unity gain, which would cause
probs in floating arithmetic).  The output of the IIR filter should be the
smoothed envelope signal, equivalent to summing all samples between now and
"delay-time" ago.
Sorry I can't provide this in a patch, I don't have pd here with me, nor can
I make an IIR filter out of zexy's [z~] because pd complains about DSP loops
(send~ and receive~ usually solve this but they put in huge delay, I think,
which ruins the filter).

Sorry for blabbing.  If you however just wanted the equivalent of an
oscilloscope, I think there is a functioning object in cyclone!

Matt

-=-=-=-=-=-=-=-=-=-=-=-=-
http://www.loopit.org/
-=-=-=-=-=-=-=-=-=-=-=-=-
----- Original Message ----- 
From: "Matthias Blau" <blau_m at web.de>
To: <pd-list at iem.at>
Sent: Friday, October 15, 2004 4:10 PM
Subject: [PD] running plot of sampled data


> Hi,
>
> I am trying to continuously plot a sequence of data (from snapshot~), in
> order to get a running visualization of sound levels. Sampling should
> occur every 10..100ms and I want to see about 1000 past data points.
>
> My first guess was to use an array of that size and to write data to it
> via tabwrite, indexed by modulo_counter. Unfortunately, the frequency at
> which the plot of the array is updated, is way too low (every one second
> or so). Is there a a way of changing that frequency? If not, are there
> better alternatives?
>
> Thanks for your help, Matthias
>
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
http://iem.at/cgi-bin/mailman/listinfo/pd-list





More information about the Pd-list mailing list