I have used pvsadsyn for this purpose as you can define te number of bins and the starting point for resynthesis of fsig signals. The problem is of course knowing the frequency region of each bin. As chuck mentioned I think it would be similar with pvsmaska, as the bandwidth of each bin depends on your fft windowing size (is that right!?). So if you are synthesising the first say 10 bins of an fsig with a window size of 512 you are covering a much wider frequency range than you would be with a window size of 1024 (higher frequency resolution). Don't ask me the maths though! The easiest way would be to use pvsbufread as it does the calculation for you and accepts frequency numbers for lowest and highest resynthesis bounds. If you are not using this for live stuff then I don't see how a very short delay would be a problem, you are always going to get the fft delay anyway so perfect synching with the original audio signal is not possible unless you delay the original signal too by the right amount.

As Richard mentioned it would be amazingly helpful to have a smoothing function too for filtering :-)

Best
Peiman  

On 11/12/2007, Chuckk Hubbard <badmuthahubbard@gmail.com> wrote:
On Dec 11, 2007 7:35 AM, Hector Centeno <hcengar@gmail.com> wrote:

> I've been looking for the most efficient way of "bandpass" filtering
> bins in a fsig for a realtime instrument. What I want to do is to be
> able to split an fsig into different fsigs containing diferent bin
> sections (for independent processing). I guess I could use the pvsftr
> and pvsftw opcodes together with the vectorial opcodes to alter the
> table, but I was wondering if I'm missing any other way of doing it
> more CPU efficient without having to rewrite tables (I want to be able
> to change the ranges realtime). Also I thought about using pvstencil

I thought of pvsmaska, but that uses ftables too.  There is pvsfilter;
I suppose you could generate a signal with pure sines of the right
frequencies, pvsanal it, and pvsfilter the two fsigs.  I would guess
pvsmaska is more efficient.  I'm afraid I still don't completely
understand Csound's frequency-amplitude pairs.  I read some of the
documentation offered when I asked about it, but from what I could
tell it was still referring to equally spaced bins, where pvsvoc
implies that the frequencies of one fsig can differ from those of
another fsig of the same size.  Point being that, if you don't know
what frequencies the bins of your signal will have, how do you know
what frequencies to use for sines to analyze to get the desired
filter?  And my suspicion being that the bins have fixed frequency
values, and "amp-freq" pair refers to "freq" being the same for all
fsigs of the same size...

Anyway I would personally use pvsmaska; I don't know how a k-rate
specification would even work, if it has to specify 512 or however
many values per control period.  pvsbufread has upper and lower limits
of which frequencies to include...

> On the request side: It could be nice to have an opcode for doing
> this, one that simply takes a fsig and two k-rate parameters for the
> lowest and highest bin and outputs another fsig containing only those
> bins with the rest zeroed.

Sounds like pvsbufread.  I haven't played with it to know how much
delay is necessary, but maybe I will today...

-Chuckk

--
http://www.badmuthahubbard.com


Send bugs reports to this list.
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"