Reply by Richard Dobson March 28, 20122012-03-28
On 28/03/2012 00:47, robert bristow-johnson wrote:
..
>> and we have it running in real time for multiple voices on a relatively >> modest CUDA-programmed GPU (presented at ICMC 2011). > > *that's* what them GPUs are for. uhm, Richard, i got the constant-Q > thing from the website, but can i get that ICMC paper? >
The 2011 paper is not up yet (not under my control), but I will ask today. Richard Dobson
Reply by robert bristow-johnson March 27, 20122012-03-27
On 3/26/12 2:42 PM, Tim Wescott wrote:
> On Mon, 26 Mar 2012 14:12:54 -0400, robert bristow-johnson wrote:
...
>> >> but if you want to compute that exp(i*w*t) as the output of a ringing, >> critically stable IIR, then that will eventually lead you to Goertzel, i >> think. but if you want to trim off the samples older than N samples >> ago, it has to be a Goertzel modified as a TIIR (instead of IIR). but >> *then*, because it ain't a simple CIC, numerical turds will get in there >> and will not come out, that's why i would dampen the ringing, just a >> teeny-weeny bit. > > The mix -> CIC -> mix architecture I was proposing was specifically > intended to eliminate those turds naturally.
well, at least in a fixed-point architecture and an accumulator that is as wide as the sum of widths of coefs and data (plus log2(N)), then there are no turds to eliminate. very low emission computation.
> Think of it as fiber vs. stronger laxatives.
:-) i feel better already. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by robert bristow-johnson March 27, 20122012-03-27
On 3/27/12 3:35 PM, Richard Dobson wrote:
> On 27/03/2012 17:15, robert bristow-johnson wrote: >> On 3/27/12 12:01 PM, westocl wrote: >> >>> >>> x[n] -> GOERTZEL BANK -> multiply a coefficnt -> INVERSE BANK -> y[n] >>> >> >> do you want to do this whole operation for *every* sample? >> >> what are you doing for the INVERSE BANK? and how do you add up the >> results of that to get y[n]? >> >> > > It is not using Goertzel, but in the Sliding Phase Vocoder (SPV) I am > involved with***, which is built on the plain Sliding DFT, resynthesis > is (as the analysis) per sample, and is by oscillator bank.
yup, {x[n-N+1]...x[n]} --> DFT --> ??? --> iDFT --> {y[n-N+1]...y[n]} and then he's tossing all of the y[.] samples except one, likely y[n].
> We can do > whatever we like to the data in that form, including deciding which bins > to resynthesise. Of course this is not for any engineering task as such, > but for experimental music processing, and the primary trick to date is > to apply audio-rate (Chowning-style) FM to an arbitrary input signal > using per-sample pitch shifting of each bin. We call it Transformational > FM (TFM). > > It goes almost without saying that this is prohibitively expensive on an > ordinary CPU, but the algorithm is itself massively parallel in form,
well, you can do a sliding DFT for each bin with a moving sum implemented as a CIC (or as Wang and Smith would say a TIIR) in fixed point so you know you are subtracting off exactly what you previously added. now maybe the westocl's question is if it's better to compute (or lookup) the twiddle coefficient, e^(j*2*pi*k*m/N), for each bin or have a separate Goertzel filter for each bin? seems to me to be simple and cheaper to look up out of a periodic table that you stride through with a step size of k. you would have to maintain pointer states for each bin.
> and we have it running in real time for multiple voices on a relatively > modest CUDA-programmed GPU (presented at ICMC 2011).
*that's* what them GPUs are for. uhm, Richard, i got the constant-Q thing from the website, but can i get that ICMC paper? does the constant-Q thingie get to be a fully inverse mapping? i don't quite get how to do a fully 1-to-1 mapping with log-frequency spaced data. might not matter if you're throwing away everything except y[n].
> I see no reason in > principle why a similar approach cannot be applied to the Sliding > Goertzel; depending, as ever, on how important/interesting/useful the > process is, to justify the effort.
they all live in this frequency-domain/sinusoidal-modeling milieu. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by Jerry Avins March 27, 20122012-03-27
On 3/27/2012 1:01 PM, westocl wrote:
>> On 3/27/12 12:01 PM, westocl wrote: >> >>> >>> x[n] -> GOERTZEL BANK -> multiply a coefficnt -> INVERSE BANK -> > y[n] >>> >> >> do you want to do this whole operation for *every* sample? >> >> what are you doing for the INVERSE BANK? and how do you add up the >> results of that to get y[n]? >> >> >> -- >> >> r b-j rbj@audioimagination.com >> >> "Imagination is more important than knowledge." > > do you want to do this whole operation for *every* sample? > > yes. every sample. > > i would like to use the complex coefficient i got from the FORWARD BANK and > do a > > -(unknown number now) > \ > / A*cos(w_f/Fs *n) + B*sin (w_f/Fs *n) > _0 > > to get only the current y[n] sample
Why all that rigmarole to compute the sample you just measured?
> where i use f/Fs instead of k for each resonator and n is my current input > index.
Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Tim Wescott March 27, 20122012-03-27
On Tue, 27 Mar 2012 14:45:38 -0500, westocl wrote:

>>On Mon, 26 Mar 2012 11:11:46 -0500, westocl wrote: >> >>> I was looking an algorithm to calculate fourier coefficents and update >>> them at every new input sample, the Sliding Goertzel algorithm. This > one >>> seems to give both an estimate of the amplitude AND phase. I am not > sure >>> if any of you guys are familar with it. >>> >>> http://www.ingelec.uns.edu.ar/pds2803/Materiales/Articulos/ >>ASlidingGoertzelAlgorithm.pdf >>> >>> My thoughts are that if i can generate a number lets say N >>> coefficients with each complex resonator at every time sample then i >>> should be able to use the coefficents and resenthesize the signal. >>> >>> The problem is i dont know how many coefficents i would need to >>> synthesize the signal. >>> >>> With the FFT that number is known to be the length of the input data. >>> However in this case the input data is not constrained in length, it > can >>> be a infinate input stream, where the 'state' of the filter along with >>> the present input determines the fourier coefficent. >> >>Everyone got distracted by your mention of the Goertzel algorithm, I >>don't think anyone answered your stated question. >> >>How many Fourier coefficients are needed to synthesize a signal? Well, >>that depends!!! >> >>The first thing it depends on is what you mean, because your question, >>as > >>stated, doesn't make sense. I gather from context that you mean to ask >>how many coefficients of a discrete Fourier transform does it take to >>synthesize an infinitely long signal. The answer to that question is: >>that does not compute. >> >>So tell us what you're trying to _achieve_, and instead of having fun >>tearing apart the Goertzel algorithm, maybe we can suggest an approach >>that doesn't involve the DFT, but does involve a chance that you'll >>succeed. >> >>-- >>My liberal friends think I'm a conservative kook. My conservative >>friends think I'm a liberal kook. Why am I not happy that they have >>found common ground? >> >>Tim Wescott, Communications, Control, Circuits & Software >>http://www.wescottdesign.com > > > I am looking for a way to track how a signals spectral phase varys over > time without being able to capture the whole signal as with the DFT or > FFT. The Goertzel was the only algorithm that came to mind.
"Spectral phase" means practically nothing. Elucidate. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by westocl March 27, 20122012-03-27
>On Mon, 26 Mar 2012 11:11:46 -0500, westocl wrote: > >> I was looking an algorithm to calculate fourier coefficents and update >> them at every new input sample, the Sliding Goertzel algorithm. This
one
>> seems to give both an estimate of the amplitude AND phase. I am not
sure
>> if any of you guys are familar with it. >> >> http://www.ingelec.uns.edu.ar/pds2803/Materiales/Articulos/ >ASlidingGoertzelAlgorithm.pdf >> >> My thoughts are that if i can generate a number lets say N coefficients >> with each complex resonator at every time sample then i should be able >> to use the coefficents and resenthesize the signal. >> >> The problem is i dont know how many coefficents i would need to >> synthesize the signal. >> >> With the FFT that number is known to be the length of the input data. >> However in this case the input data is not constrained in length, it
can
>> be a infinate input stream, where the 'state' of the filter along with >> the present input determines the fourier coefficent. > >Everyone got distracted by your mention of the Goertzel algorithm, I >don't think anyone answered your stated question. > >How many Fourier coefficients are needed to synthesize a signal? Well, >that depends!!! > >The first thing it depends on is what you mean, because your question, as
>stated, doesn't make sense. I gather from context that you mean to ask >how many coefficients of a discrete Fourier transform does it take to >synthesize an infinitely long signal. The answer to that question is: >that does not compute. > >So tell us what you're trying to _achieve_, and instead of having fun >tearing apart the Goertzel algorithm, maybe we can suggest an approach >that doesn't involve the DFT, but does involve a chance that you'll >succeed. > >-- >My liberal friends think I'm a conservative kook. >My conservative friends think I'm a liberal kook. >Why am I not happy that they have found common ground? > >Tim Wescott, Communications, Control, Circuits & Software >http://www.wescottdesign.com
I am looking for a way to track how a signals spectral phase varys over time without being able to capture the whole signal as with the DFT or FFT. The Goertzel was the only algorithm that came to mind.
Reply by Richard Dobson March 27, 20122012-03-27
On 27/03/2012 17:15, robert bristow-johnson wrote:
> On 3/27/12 12:01 PM, westocl wrote: > >> >> x[n] -> GOERTZEL BANK -> multiply a coefficnt -> INVERSE BANK -> y[n] >> > > do you want to do this whole operation for *every* sample? > > what are you doing for the INVERSE BANK? and how do you add up the > results of that to get y[n]? > >
It is not using Goertzel, but in the Sliding Phase Vocoder (SPV) I am involved with***, which is built on the plain Sliding DFT, resynthesis is (as the analysis) per sample, and is by oscillator bank. We can do whatever we like to the data in that form, including deciding which bins to resynthesise. Of course this is not for any engineering task as such, but for experimental music processing, and the primary trick to date is to apply audio-rate (Chowning-style) FM to an arbitrary input signal using per-sample pitch shifting of each bin. We call it Transformational FM (TFM). It goes almost without saying that this is prohibitively expensive on an ordinary CPU, but the algorithm is itself massively parallel in form, and we have it running in real time for multiple voices on a relatively modest CUDA-programmed GPU (presented at ICMC 2011). I see no reason in principle why a similar approach cannot be applied to the Sliding Goertzel; depending, as ever, on how important/interesting/useful the process is, to justify the effort. Richard Dobson *** http://dream.cs.bath.ac.uk/SDFT/index.html NB: sound examples!
Reply by Tim Wescott March 27, 20122012-03-27
On Mon, 26 Mar 2012 11:11:46 -0500, westocl wrote:

> I was looking an algorithm to calculate fourier coefficents and update > them at every new input sample, the Sliding Goertzel algorithm. This one > seems to give both an estimate of the amplitude AND phase. I am not sure > if any of you guys are familar with it. > > http://www.ingelec.uns.edu.ar/pds2803/Materiales/Articulos/
ASlidingGoertzelAlgorithm.pdf
> > My thoughts are that if i can generate a number lets say N coefficients > with each complex resonator at every time sample then i should be able > to use the coefficents and resenthesize the signal. > > The problem is i dont know how many coefficents i would need to > synthesize the signal. > > With the FFT that number is known to be the length of the input data. > However in this case the input data is not constrained in length, it can > be a infinate input stream, where the 'state' of the filter along with > the present input determines the fourier coefficent.
Everyone got distracted by your mention of the Goertzel algorithm, I don't think anyone answered your stated question. How many Fourier coefficients are needed to synthesize a signal? Well, that depends!!! The first thing it depends on is what you mean, because your question, as stated, doesn't make sense. I gather from context that you mean to ask how many coefficients of a discrete Fourier transform does it take to synthesize an infinitely long signal. The answer to that question is: that does not compute. So tell us what you're trying to _achieve_, and instead of having fun tearing apart the Goertzel algorithm, maybe we can suggest an approach that doesn't involve the DFT, but does involve a chance that you'll succeed. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Reply by westocl March 27, 20122012-03-27
>On 3/27/12 12:01 PM, westocl wrote: > >> >> x[n] -> GOERTZEL BANK -> multiply a coefficnt -> INVERSE BANK ->
y[n]
>> > >do you want to do this whole operation for *every* sample? > >what are you doing for the INVERSE BANK? and how do you add up the >results of that to get y[n]? > > >-- > >r b-j rbj@audioimagination.com > >"Imagination is more important than knowledge."
do you want to do this whole operation for *every* sample? yes. every sample. i would like to use the complex coefficient i got from the FORWARD BANK and do a -(unknown number now) \ / A*cos(w_f/Fs *n) + B*sin (w_f/Fs *n) _0 to get only the current y[n] sample where i use f/Fs instead of k for each resonator and n is my current input index.
Reply by robert bristow-johnson March 27, 20122012-03-27
On 3/27/12 12:01 PM, westocl wrote:

> > x[n] -> GOERTZEL BANK -> multiply a coefficnt -> INVERSE BANK -> y[n] >
do you want to do this whole operation for *every* sample? what are you doing for the INVERSE BANK? and how do you add up the results of that to get y[n]? -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."