Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread gm


thanks for your offer, I can not really read Math lab code and always 
have a hard time

even figuring out essentials of such code

My phase vocoder already works kind of satisfactorily now as a demo in 
Native Instruments Reaktor,
I do the forward FFT offline and the iFFT "just in time", that means 12 
"butterflies" per sample,
so you could bring down latency by speeding up the iFFT, though I am not 
sure what a reasonable latency is.
I made a poll on some electronic musicians board and most people voted 
for 10 ms being just tolerable.


I am half way content with the way it works now, for analysis I have 
twelve FFTs in parallel, one for each octave
with window sizes based on ERB scale per octave, so it's not totally bad 
on transients but not good either.
I assume there is still some room for improvements on the windows, but 
not very much.


FFT size is 4096, and now I search for ways to improve it, mostly 
regarding transients.
But I am not sure if that's possible with FFT cause I still have 
pre-ringing, and I cant see
how to avoid that completely cause you can only shorten the windows on 
the low octaves so much.

Maybe with an assymetric window?
If you do the analysis with a IIR filter bank (or wavelets) you kind of 
have assymmetric windows, that is the filters
integrate in a causal way with a decaying "window" they see, but I am 
not sure if this can be adapted somehow

to an FFT.

An other way that would reduce reverberation and shorten transient times 
somehwat would
be using shorter FFTs for the resynthesis, this would also bring down 
CPU a bit and latency.


So this is where I am at at the moment

Am 09.11.2018 um 23:29 schrieb robert bristow-johnson:


i don't wanna lead you astray.  i would recommend staying with the 
phase vocoder as a framework for doing time-frequency manipulation.  
it **can** be used real-time for pitch shift, but when i have used the 
phase vocoder, it was for time-scaling and then we would simply 
resample the time-scaled output of the phase vocoder to bring the 
tempo back to the original and shift the pitch.  that was easier to 
get it right than it was to *move* frequency components around in the 
phase vocoder.  but i remember in the 90s, Jean Laroche doing that 
real time with a single PC.  also a real-time phase vocoder (or any 
frequency-domain process, like sinusoidal modeling) is going to have 
delay in a real-time process.  even if your processor is infinitely 
fast, you still have to fill up your FFT buffer with samples before 
invoking the FFT.  if your buffer is 4096 samples and your sample rate 
is 48 kHz, that's almost 1/10 second.  and that doesn't count 
processing time, just the buffering time.  and, in reality, you will 
have to double buffer this process (buffer both input and output) and 
that will make the delay twice as much. so with 1/5 second delay, 
that's might be an issue.


i offered this before (and someone sent me a request and i believe i 
replied, but i don't remember who), but if you want my 2001 MATLAB 
code that demonstrates a simple phase vocoder doing time scaling, i am 
happy to send it to you or anyone.  it's old.  you have to turn 
wavread() and wavwrite() into audioread() and audiowrite(), but 
otherwise, i think it will work.  it has an additional function that 
time-scales each sinusoid *within* every frame, but i think that can 
be turned off and you can even delete that modification and what you 
have left is, in my opinion, the most basic phase vocoder implemented 
to do time scaling.  lemme know if that might be helpful.


L8r,

r b-j

 Original Message ----------------
Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for 
realtime synthesis?

From: "gm" 
Date: Fri, November 9, 2018 5:02 pm
To: music-dsp@music.columbia.edu
--

> You get me intrigued with this
>
> I actually believe that wavelets are the way to go for such things,
> but, besides that anything beyond a Haar wavelet is too complicated 
for me

> (and I just grasp that Haar very superficially of course),
>
> I think one problem is the problem you mentioned - don't do anything
> with the bands,
> only then you have perfect reconstruction
>
> And what to do you do with the bands to make a pitch shift or to
> preserve formants/do some vocoding?
>
> It's not so obvious (to me), my naive idea I mentioned earlier in this
> thread was to
> do short FFTs on the bands and manipulate the FFTs only
>
> But how? if you time stretch them, I believe the pitch goes down (thats
> my intuition only, I am not sure)
> and also, these bands alias, since the filters are not brickwall,
> and the aliasing is only canceled on reconstruction I believe?
>
> So, yes, very interesting topic, that could lead me astray for another
> couple o

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread robert bristow-johnson



�
i don't wanna lead you astray.� i would recommend staying with the phase 
vocoder as a framework for doing time-frequency manipulation.� it **can** be 
used real-time for pitch shift, but when i have used the phase vocoder, it was 
for time-scaling and then we would simply
resample the time-scaled output of the phase vocoder to bring the tempo back to 
the original and shift the pitch.� that was easier to get it right than it was 
to *move* frequency components around in the phase vocoder.� but i remember in 
the 90s, Jean Laroche doing that real time with a
single PC.� also a real-time phase vocoder (or any frequency-domain process, 
like sinusoidal modeling) is going to have delay in a real-time process.� even 
if your processor is infinitely fast, you still have to fill up your FFT buffer 
with samples before invoking the FFT.� if your
buffer is 4096 samples and your sample rate is 48 kHz, that's almost 1/10 
second.� and that doesn't count processing time, just the buffering time.� and, 
in reality, you will have to double buffer this process (buffer both input and 
output) and that will make the delay twice as much.�
so with 1/5 second delay, that's might be an issue.
i offered this before (and someone sent me a request and i believe i replied, 
but i don't remember who), but if you want my 2001 MATLAB code that 
demonstrates a simple phase vocoder doing time scaling, i am happy to send it 
to you or
anyone.� it's old.� you have to turn wavread() and wavwrite() into audioread() 
and audiowrite(), but otherwise, i think it will work.� it has an additional 
function that time-scales each sinusoid *within* every frame, but i think that 
can be turned off and you can even delete that
modification and what you have left is, in my opinion, the most basic phase 
vocoder implemented to do time scaling.� lemme know if that might be helpful.
L8r,
r b-j
�
 Original Message 
Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime 
synthesis?

From: "gm" 

Date: Fri, November 9, 2018 5:02 pm

To: music-dsp@music.columbia.edu

--



> You get me intrigued with this

>

> I actually believe that wavelets are the way to go for such things,

> but, besides that anything beyond a Haar wavelet is too complicated for me

> (and I just grasp that Haar very superficially of course),

>

> I think one problem is the problem you mentioned - don't do anything

> with the bands,

> only then you have perfect reconstruction

>

> And what to do you do with the bands to make a pitch shift or to

> preserve formants/do some vocoding?

>

> It's not so obvious (to me), my naive idea I mentioned earlier in this

> thread was to

> do short FFTs on the bands and manipulate the FFTs only

>

> But how? if you time stretch them, I believe the pitch goes down (thats

> my intuition only, I am not sure)

> and also, these bands alias, since the filters are not brickwall,

> and the aliasing is only canceled on reconstruction I believe?

>

> So, yes, very interesting topic, that could lead me astray for another

> couple of weeks but without any results I guess

>

> I think as long as I don't fully grasp all the properties of the FFT and

> phase vocoder I shouldn't start anything new...

>
--



r b-j� � � � � � � � � � � � �r...@audioimagination.com



"Imagination is more important than knowledge."

�
�
�
�
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread gm

You get me intrigued with this

I actually believe that wavelets are the way to go for such things,
but, besides that anything beyond a Haar wavelet is too complicated for me
(and I just grasp that Haar very superficially of course),

I think one problem is the problem you mentioned - don't do anything 
with the bands,

only then you have perfect reconstruction

And what to do you do with the bands to make a pitch shift or to 
preserve formants/do some vocoding?


It's not so obvious (to me), my naive idea I mentioned earlier in this 
thread was to

do short FFTs on the bands and manipulate the FFTs only

But how? if you time stretch them, I believe the pitch goes down (thats 
my intuition only, I am not sure)

and also, these bands alias, since the filters are not brickwall,
and the aliasing is only canceled on reconstruction I believe?

So, yes, very interesting topic, that could lead me astray for another 
couple of weeks but without any results I guess


I think as long as I don't fully graps all the properties of the FFT and 
phase vocoder I shouldn't start anything new...


Am 09.11.2018 um 22:31 schrieb robert bristow-johnson:




what you're discussing here appears to me to be about perfect 
reconstruction in the context of Wavelets and Filter Banks.


there is a theorem that's pretty easy to prove that if you have 
complementary high and low filterbanks with a common cutoff at 1/2 
Nyquist, you can downsample both high and low-pass filterbank outputs 
by a factor of 1/2 and later combine the two down-sampled streams of 
samples to get perfect reconstruction of the original.  this result is 
not guaranteed if you **do** anything to either filter output in the 
filterbank.


 Original Message 
Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for 
realtime synthesis?

From: "gm" 
Date: Fri, November 9, 2018 4:19 pm
To: music-dsp@music.columbia.edu
--
>
> hm, my application has also WOLA ...
>
> All I find is about up- and downsampling of time sequences and spectra
> of the same length.
>

...
>
> If anyone knows of an easy explanation of down- and up sampling spectra
> it would be much appreciated.
>
> Am 09.11.2018 um 19:16 schrieb Ethan Duni:
> ..
>> The only applications I know of that tolerate time-domain aliasing in
>> transforms are WOLA filter banks - which are explicitly designed to
>> cancel these (severe!) artifacts in the surrounding time-domain
>> processing.

--

r b-j                         r...@audioimagination.com

"Imagination is more important than knowledge."


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread robert bristow-johnson







what you're discussing here appears to me to be about perfect reconstruction in 
the context of Wavelets and Filter Banks.



there is a theorem that's pretty easy to prove that if you have complementary 
high and low filterbanks with a common cutoff at 1/2 Nyquist, you can 
downsample both high and low-pass filterbank outputs by a factor of 1/2 and 
later combine the two down-sampled streams of samples to get perfect
reconstruction of the original.� this result is not guaranteed if you **do** 
anything to either filter output in the filterbank.


 Original Message 

Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime 
synthesis?

From: "gm" 

Date: Fri, November 9, 2018 4:19 pm

To: music-dsp@music.columbia.edu

--

>

> hm, my application has also WOLA ...

>

> All I find is about up- and downsampling of time sequences and spectra

> of the same length.

>
...

>

> If anyone knows of an easy explanation of down- and up sampling spectra

> it would be much appreciated.

>

> Am 09.11.2018 um 19:16 schrieb Ethan Duni:

> ..

>> The only applications I know of that tolerate time-domain aliasing in

>> transforms are WOLA filter banks - which are explicitly designed to

>> cancel these (severe!) artifacts in the surrounding time-domain

>> processing.
--



r b-j� � � � � � � � � � � � �r...@audioimagination.com



"Imagination is more important than knowledge."

�
�
�
�
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread gm
s a
string of stationary inputs it can fold them together
into one big high-res DCT and code that instead.

On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn
mailto:et...@polyspectral.com>>
wrote:

I don't think that's correct -- DIF involves first
doing a single stage of butterfly operations over the
input, and then doing two smaller DFTs on that
preprocessed data. I don't think there is any
reasonable way to take two "consecutive" DFTs of the
raw input data and combine them into a longer DFT.

(And I don't know anything about the historical
question!)

-Ethan



On Mon, Nov 5, 2018 at 2:18 PM, robert
bristow-johnson mailto:r...@audioimagination.com>> wrote:

Ethan, that's just the difference between
Decimation-in-Frequency FFT and
Decimation-in-Time FFT.

i guess i am not entirely certainly of the
history, but i credited both the DIT and DIF FFT
to Cooley and Tukey.  that might be an incorrect
historical impression.



 Original Message
--------------------
    Subject: Re: [music-dsp] 2-point DFT Matrix for
    subbands Re: FFT for realtime synthesis?
From: "Ethan Fenn" mailto:et...@polyspectral.com>>
Date: Mon, November 5, 2018 10:17 am
To: music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>

--

> It's not exactly Cooley-Tukey. In Cooley-Tukey
you take two _interleaved_
> DFT's (that is, the DFT of the even-numbered
samples and the DFT of the
> odd-numbered samples) and combine them into one
longer DFT. But here you're
> talking about taking two _consecutive_ DFT's. I
don't think there's any
> cheap way to combine these to exactly recover
an individual bin of the
> longer DFT.
>
> Of course it's possible you'll be able to come
up with a clever frequency
> estimator using this information. I'm just
saying it won't be exact in the
> way Cooley-Tukey is.
>
> -Ethan
>
>


--

r b-j r...@audioimagination.com
<mailto:r...@audioimagination.com>

"Imagination is more important than knowledge."


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu  <mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp

___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu <mailto:music-dsp@music.columbia.edu>
https://lists.columbia.edu/mailman/listinfo/music-dsp


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread Ethan Duni
gm wrote:
>This is brining up my previous question again, how do you decimate a
spectrum
>by an integer factor properly, can you just add the bins?

To decimate by N, you just take every Nth bin.

>the orginal spectrum represents a longer signal so I assume folding
>of the waveform occurs?

Yeah, you will get time-domain aliasing unless your DFT is oversampled
(i.e., zero-padded in time domain) by a factor of (at least) N to begin
with. For critically sampled signals the result is severe distortion (i.e.,
SNR ~= 0dB).

>but maybe this doesn't matter in practice for some applications?

The only applications I know of that tolerate time-domain aliasing in
transforms are WOLA filter banks - which are explicitly designed to cancel
these (severe!) artifacts in the surrounding time-domain processing.

Ethan D

On Fri, Nov 9, 2018 at 6:39 AM gm  wrote:

> This is brining up my previous question again, how do you decimate a
> spectrum
> by an integer factor properly, can you just add the bins?
>
> the orginal spectrum represents a longer signal so I assume folding
> of the waveform occurs? but maybe this doesn't matter in practice for some
> applications?
>
> The background is still that I want to use a higher resolution for
> ananlysis and
> a lower resolution for synthesis in a phase vocoder.
>
> Am 08.11.2018 um 21:45 schrieb Ethan Duni:
>
> Not sure can get the odd bins *easily*, but it is certainly possible.
> Conceptually, you can take the (short) IFFT of each block, then do the
> (long) FFT of the combined blocks. The even coefficients simplify out as
> you observed, the odd ones will be messier. Not sure quite how messy - I've
> only looked at the details for DCT cases.
>
> Probably the clearest way to think about it is in the frequency domain.
> Conceptually, the two consecutive short DFTs are the same as if we had
> taken two zero-padded long DFTs, and then downsampled each by half. So the
> way to combine them is to reverse that process: upsample them by 2, and
> then add them together (with appropriate compensation for the
> zero-padding/boxcar window).
>
> Ethan D
>
> On Thu, Nov 8, 2018 at 8:12 AM Ethan Fenn  wrote:
>
>> I'd really like to understand how combining consecutive DFT's can work.
>> Let's say our input is x0,x1,...x7 and the DFT we want to compute is
>> X0,X1,...X7
>>
>> We start by doing two half-size DFT's:
>>
>> Y0 = x0 + x1 + x2 + x3
>> Y1 = x0 - i*x1 - x2 + i*x3
>> Y2 = x0 - x1 + x2 - x3
>> Y3 = x0 + i*x1 - x2 - i*x3
>>
>> Z0 = x4 + x5 + x6 + x7
>> Z1 = x4 - i*x5 - x6 + i*x7
>> Z2 = x4 - x5 + x6 - x7
>> Z3 = x4 + i*x5 - x6 - i*x7
>>
>> Now I agree because of periodicity we can compute all the even-numbered
>> bins easily: X0=Y0+Z0, X2=Y1+Z1, and so on.
>>
>> But I don't see how we can get the odd bins easily from the Y's and Z's.
>> For instance we should have:
>>
>> X1 = x0 + (r - r*i)*x1 - i*x2 + (-r - r*i)*x3 - x4 + (-r + r*i)*x5 + i*x6
>> + (r + r*i)*x7
>>
>> where r=sqrt(1/2)
>>
>> Is it actually possible? It seems like the phase of the coefficients in
>> the Y's and Z's advance too quickly to be of any use.
>>
>> -Ethan
>>
>>
>>
>> On Mon, Nov 5, 2018 at 3:40 PM, Ethan Duni  wrote:
>>
>>> You can combine consecutive DFTs. Intuitively, the basis functions are
>>> periodic on the transform length. But it won't be as efficient as having
>>> done the big FFT (as you say, the decimation in time approach interleaves
>>> the inputs, so you gotta pay the piper to unwind that). Note that this is
>>> for naked transforms of successive blocks of inputs, not a WOLA filter
>>> bank.
>>>
>>> There are Dolby codecs that do similar with a suitable flavor of DCT
>>> (type II I think?) - you have your encoder going along at the usual frame
>>> rate, but if it detects a string of stationary inputs it can fold them
>>> together into one big high-res DCT and code that instead.
>>>
>>> On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn 
>>> wrote:
>>>
>>>> I don't think that's correct -- DIF involves first doing a single stage
>>>> of butterfly operations over the input, and then doing two smaller DFTs on
>>>> that preprocessed data. I don't think there is any reasonable way to take
>>>> two "consecutive" DFTs of the raw input data and combine them into a longer
>>>> DFT.
>>>>
>>>> (And I don't know anything about the historical question!)
>>>>
>>>> -Ethan
>>>>
>>>>
>>>>
>>>> On Mon, Nov 5, 

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-09 Thread gm
This is brining up my previous question again, how do you decimate a 
spectrum

by an integer factor properly, can you just add the bins?

the orginal spectrum represents a longer signal so I assume folding
of the waveform occurs? but maybe this doesn't matter in practice for 
some applications?


The background is still that I want to use a higher resolution for 
ananlysis and

a lower resolution for synthesis in a phase vocoder.


Am 08.11.2018 um 21:45 schrieb Ethan Duni:
Not sure can get the odd bins *easily*, but it is certainly possible. 
Conceptually, you can take the (short) IFFT of each block, then do the 
(long) FFT of the combined blocks. The even coefficients simplify out 
as you observed, the odd ones will be messier. Not sure quite how 
messy - I've only looked at the details for DCT cases.


Probably the clearest way to think about it is in the frequency 
domain. Conceptually, the two consecutive short DFTs are the same as 
if we had taken two zero-padded long DFTs, and then downsampled each 
by half. So the way to combine them is to reverse that process: 
upsample them by 2, and then add them together (with appropriate 
compensation for the zero-padding/boxcar window).


Ethan D

On Thu, Nov 8, 2018 at 8:12 AM Ethan Fenn <mailto:et...@polyspectral.com>> wrote:


I'd really like to understand how combining consecutive DFT's can
work. Let's say our input is x0,x1,...x7 and the DFT we want to
compute is X0,X1,...X7

We start by doing two half-size DFT's:

Y0 = x0 + x1 + x2 + x3
Y1 = x0 - i*x1 - x2 + i*x3
Y2 = x0 - x1 + x2 - x3
Y3 = x0 + i*x1 - x2 - i*x3

Z0 = x4 + x5 + x6 + x7
Z1 = x4 - i*x5 - x6 + i*x7
Z2 = x4 - x5 + x6 - x7
Z3 = x4 + i*x5 - x6 - i*x7

Now I agree because of periodicity we can compute all the
even-numbered bins easily: X0=Y0+Z0, X2=Y1+Z1, and so on.

But I don't see how we can get the odd bins easily from the Y's
and Z's. For instance we should have:

X1 = x0 + (r - r*i)*x1 - i*x2 + (-r - r*i)*x3 - x4 + (-r + r*i)*x5
+ i*x6 + (r + r*i)*x7

where r=sqrt(1/2)

Is it actually possible? It seems like the phase of the
coefficients in the Y's and Z's advance too quickly to be of any use.

-Ethan



On Mon, Nov 5, 2018 at 3:40 PM, Ethan Duni mailto:ethan.d...@gmail.com>> wrote:

You can combine consecutive DFTs. Intuitively, the basis
functions are periodic on the transform length. But it won't
be as efficient as having done the big FFT (as you say, the
decimation in time approach interleaves the inputs, so you
gotta pay the piper to unwind that). Note that this is for
naked transforms of successive blocks of inputs, not a WOLA
filter bank.

There are Dolby codecs that do similar with a suitable flavor
of DCT (type II I think?) - you have your encoder going along
at the usual frame rate, but if it detects a string of
stationary inputs it can fold them together into one big
high-res DCT and code that instead.

On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn
mailto:et...@polyspectral.com>> wrote:

I don't think that's correct -- DIF involves first doing a
single stage of butterfly operations over the input, and
then doing two smaller DFTs on that preprocessed data. I
don't think there is any reasonable way to take two
"consecutive" DFTs of the raw input data and combine them
into a longer DFT.

(And I don't know anything about the historical question!)

-Ethan



On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson
mailto:r...@audioimagination.com>> wrote:

Ethan, that's just the difference between
Decimation-in-Frequency FFT and Decimation-in-Time FFT.

i guess i am not entirely certainly of the history,
but i credited both the DIT and DIF FFT to Cooley and
Tukey.  that might be an incorrect historical impression.



 Original Message
--------
            Subject: Re: [music-dsp] 2-point DFT Matrix for
    subbands Re: FFT for realtime synthesis?
From: "Ethan Fenn" mailto:et...@polyspectral.com>>
Date: Mon, November 5, 2018 10:17 am
To: music-dsp@music.columbia.edu
<mailto:music-dsp@music.columbia.edu>

--

> It's not exactly Cooley-Tukey. In Cooley-Tukey you
take two _interleaved_
> DFT's (that is, the DFT of the even-numbered samples
and the DFT of the
> odd-numbered samples) a

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-08 Thread Ethan Duni
Not sure can get the odd bins *easily*, but it is certainly possible.
Conceptually, you can take the (short) IFFT of each block, then do the
(long) FFT of the combined blocks. The even coefficients simplify out as
you observed, the odd ones will be messier. Not sure quite how messy - I've
only looked at the details for DCT cases.

Probably the clearest way to think about it is in the frequency domain.
Conceptually, the two consecutive short DFTs are the same as if we had
taken two zero-padded long DFTs, and then downsampled each by half. So the
way to combine them is to reverse that process: upsample them by 2, and
then add them together (with appropriate compensation for the
zero-padding/boxcar window).

Ethan D

On Thu, Nov 8, 2018 at 8:12 AM Ethan Fenn  wrote:

> I'd really like to understand how combining consecutive DFT's can work.
> Let's say our input is x0,x1,...x7 and the DFT we want to compute is
> X0,X1,...X7
>
> We start by doing two half-size DFT's:
>
> Y0 = x0 + x1 + x2 + x3
> Y1 = x0 - i*x1 - x2 + i*x3
> Y2 = x0 - x1 + x2 - x3
> Y3 = x0 + i*x1 - x2 - i*x3
>
> Z0 = x4 + x5 + x6 + x7
> Z1 = x4 - i*x5 - x6 + i*x7
> Z2 = x4 - x5 + x6 - x7
> Z3 = x4 + i*x5 - x6 - i*x7
>
> Now I agree because of periodicity we can compute all the even-numbered
> bins easily: X0=Y0+Z0, X2=Y1+Z1, and so on.
>
> But I don't see how we can get the odd bins easily from the Y's and Z's.
> For instance we should have:
>
> X1 = x0 + (r - r*i)*x1 - i*x2 + (-r - r*i)*x3 - x4 + (-r + r*i)*x5 + i*x6
> + (r + r*i)*x7
>
> where r=sqrt(1/2)
>
> Is it actually possible? It seems like the phase of the coefficients in
> the Y's and Z's advance too quickly to be of any use.
>
> -Ethan
>
>
>
> On Mon, Nov 5, 2018 at 3:40 PM, Ethan Duni  wrote:
>
>> You can combine consecutive DFTs. Intuitively, the basis functions are
>> periodic on the transform length. But it won't be as efficient as having
>> done the big FFT (as you say, the decimation in time approach interleaves
>> the inputs, so you gotta pay the piper to unwind that). Note that this is
>> for naked transforms of successive blocks of inputs, not a WOLA filter
>> bank.
>>
>> There are Dolby codecs that do similar with a suitable flavor of DCT
>> (type II I think?) - you have your encoder going along at the usual frame
>> rate, but if it detects a string of stationary inputs it can fold them
>> together into one big high-res DCT and code that instead.
>>
>> On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn 
>> wrote:
>>
>>> I don't think that's correct -- DIF involves first doing a single stage
>>> of butterfly operations over the input, and then doing two smaller DFTs on
>>> that preprocessed data. I don't think there is any reasonable way to take
>>> two "consecutive" DFTs of the raw input data and combine them into a longer
>>> DFT.
>>>
>>> (And I don't know anything about the historical question!)
>>>
>>> -Ethan
>>>
>>>
>>>
>>> On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson <
>>> r...@audioimagination.com> wrote:
>>>
>>>>
>>>>
>>>> Ethan, that's just the difference between Decimation-in-Frequency FFT
>>>> and Decimation-in-Time FFT.
>>>>
>>>> i guess i am not entirely certainly of the history, but i credited both
>>>> the DIT and DIF FFT to Cooley and Tukey.  that might be an incorrect
>>>> historical impression.
>>>>
>>>>
>>>>
>>>>  Original Message
>>>> 
>>>> Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
>>>> realtime synthesis?
>>>> From: "Ethan Fenn" 
>>>> Date: Mon, November 5, 2018 10:17 am
>>>> To: music-dsp@music.columbia.edu
>>>>
>>>> --
>>>>
>>>> > It's not exactly Cooley-Tukey. In Cooley-Tukey you take two
>>>> _interleaved_
>>>> > DFT's (that is, the DFT of the even-numbered samples and the DFT of
>>>> the
>>>> > odd-numbered samples) and combine them into one longer DFT. But here
>>>> you're
>>>> > talking about taking two _consecutive_ DFT's. I don't think there's
>>>> any
>>>> > cheap way to combine these to exactly recover an individual bin of the
>>>> > longer DFT.
>>>> >
>>>> > Of course it's 

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-08 Thread Theo Verelst

No matter how you go about this, the the Fast Fourier will in almost every case
act as some sort of ensemble measurement over it's length, and maybe do some
filtering between consecutive transform steps. Maybe you even continuously
average in the frequency domain, using per sample sliding FFT frames, even then
you're measuring which "bins" of the FFT respond to the samples in you signal,
not more and not less.

Usually if the math/algebra doesn't proof anything conclusive, no high spun
expectations about the mathematical relevance of the result is in order...


T.V.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-08 Thread Ethan Fenn
I'd really like to understand how combining consecutive DFT's can work.
Let's say our input is x0,x1,...x7 and the DFT we want to compute is
X0,X1,...X7

We start by doing two half-size DFT's:

Y0 = x0 + x1 + x2 + x3
Y1 = x0 - i*x1 - x2 + i*x3
Y2 = x0 - x1 + x2 - x3
Y3 = x0 + i*x1 - x2 - i*x3

Z0 = x4 + x5 + x6 + x7
Z1 = x4 - i*x5 - x6 + i*x7
Z2 = x4 - x5 + x6 - x7
Z3 = x4 + i*x5 - x6 - i*x7

Now I agree because of periodicity we can compute all the even-numbered
bins easily: X0=Y0+Z0, X2=Y1+Z1, and so on.

But I don't see how we can get the odd bins easily from the Y's and Z's.
For instance we should have:

X1 = x0 + (r - r*i)*x1 - i*x2 + (-r - r*i)*x3 - x4 + (-r + r*i)*x5 + i*x6 +
(r + r*i)*x7

where r=sqrt(1/2)

Is it actually possible? It seems like the phase of the coefficients in the
Y's and Z's advance too quickly to be of any use.

-Ethan



On Mon, Nov 5, 2018 at 3:40 PM, Ethan Duni  wrote:

> You can combine consecutive DFTs. Intuitively, the basis functions are
> periodic on the transform length. But it won't be as efficient as having
> done the big FFT (as you say, the decimation in time approach interleaves
> the inputs, so you gotta pay the piper to unwind that). Note that this is
> for naked transforms of successive blocks of inputs, not a WOLA filter
> bank.
>
> There are Dolby codecs that do similar with a suitable flavor of DCT (type
> II I think?) - you have your encoder going along at the usual frame rate,
> but if it detects a string of stationary inputs it can fold them together
> into one big high-res DCT and code that instead.
>
> On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn  wrote:
>
>> I don't think that's correct -- DIF involves first doing a single stage
>> of butterfly operations over the input, and then doing two smaller DFTs on
>> that preprocessed data. I don't think there is any reasonable way to take
>> two "consecutive" DFTs of the raw input data and combine them into a longer
>> DFT.
>>
>> (And I don't know anything about the historical question!)
>>
>> -Ethan
>>
>>
>>
>> On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson <
>> r...@audioimagination.com> wrote:
>>
>>>
>>>
>>> Ethan, that's just the difference between Decimation-in-Frequency FFT
>>> and Decimation-in-Time FFT.
>>>
>>> i guess i am not entirely certainly of the history, but i credited both
>>> the DIT and DIF FFT to Cooley and Tukey.  that might be an incorrect
>>> historical impression.
>>>
>>>
>>>
>>>  Original Message
>>> 
>>> Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
>>> realtime synthesis?
>>> From: "Ethan Fenn" 
>>> Date: Mon, November 5, 2018 10:17 am
>>> To: music-dsp@music.columbia.edu
>>> 
>>> --
>>>
>>> > It's not exactly Cooley-Tukey. In Cooley-Tukey you take two
>>> _interleaved_
>>> > DFT's (that is, the DFT of the even-numbered samples and the DFT of the
>>> > odd-numbered samples) and combine them into one longer DFT. But here
>>> you're
>>> > talking about taking two _consecutive_ DFT's. I don't think there's any
>>> > cheap way to combine these to exactly recover an individual bin of the
>>> > longer DFT.
>>> >
>>> > Of course it's possible you'll be able to come up with a clever
>>> frequency
>>> > estimator using this information. I'm just saying it won't be exact in
>>> the
>>> > way Cooley-Tukey is.
>>> >
>>> > -Ethan
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>>
>>> r b-j r...@audioimagination.com
>>>
>>> "Imagination is more important than knowledge."
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> dupswapdrop: music-dsp mailing list
>>> music-dsp@music.columbia.edu
>>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>>>
>>
>> ___
>> dupswapdrop: music-dsp mailing list
>> music-dsp@music.columbia.edu
>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-06 Thread gm

I think I figured it out.

I use 2^octave * SR/FFTsize -> toERBscale -> * log2(FFTsize)/42 as a 
scaling factor for the windows.


Means the window of the top octave is about 367 samples at 44100 SR - 
does that seem right?


Sounds better but not so different, still pretty blurry and somewhat 
reverberant.


I used the lower frequency limit of the octaves for the window sizes
and Hann windows cause I don't want the windows to be too small.

Do you think using Gaussian windows and the center of the octave will 
make a big difference?


Or do I just need more overlaps in resynthesis now?


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-06 Thread gm

Further tests let me assume that you can do it on a log2 scale but that
appropriate window sizes are crucial.

But how to derive these optmal window sizes I am not sure.

I could calculate the bandwitdh of the octave band (or an octave/N band) 
in ERB
for instance but then what? How do I derive a window length from that 
for that band?


I understand that bandwitdh is inversly proportional to window length.

So it seems very easy actually but I am stuck here...


Am 06.11.2018 um 16:13 schrieb gm:

At the moment I am using decreasing window sizes on a log 2 scale.

It's still pretty blurred, and I don't know if I just don't have the 
right window parameters,
and if a log 2 scale is too coarse and differs too much from an 
auditory scale, or if if I don't have

enough overlaps in resynthesis (I have four).
Or if it's all together.

The problem is the lowest octave or the lowest two octaves, where I 
need a long
window for frequency estimation and partial tracking, it just soundded 
bad when the window was smaller in this range

because the frequencies are blurred too much I assume.

Unfortunately I am not sure what quality can be achieved and where the 
limits are with this approach.



Am 06.11.2018 um 14:20 schrieb Ross Bencina:

On 7/11/2018 12:03 AM, gm wrote:
A similar idea would be to do some basic wavelet transfrom in 
octaves for instance and then
do smaller FFTs on the bands to stretch and shift them but I have no 
idea
if you can do that - if you shift them you exceed their bandlimit I 
assume?
and if you stretch them I am not sure what happens, you shift their 
frequency content down I assume?
Its a little bit fuzzy to me what the waveform in a such a band 
represents

and what happens when you manipulate it, or how you do that.


Look into constant-Q and bounded-Q transforms.

Ross.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-06 Thread gm

At the moment I am using decreasing window sizes on a log 2 scale.

It's still pretty blurred, and I don't know if I just don't have the 
right window parameters,
and if a log 2 scale is too coarse and differs too much from an auditory 
scale, or if if I don't have

enough overlaps in resynthesis (I have four).
Or if it's all together.

The problem is the lowest octave or the lowest two octaves, where I need 
a long
window for frequency estimation and partial tracking, it just soundded 
bad when the window was smaller in this range

because the frequencies are blurred too much I assume.

Unfortunately I am not sure what quality can be achieved and where the 
limits are with this approach.



Am 06.11.2018 um 14:20 schrieb Ross Bencina:

On 7/11/2018 12:03 AM, gm wrote:
A similar idea would be to do some basic wavelet transfrom in octaves 
for instance and then
do smaller FFTs on the bands to stretch and shift them but I have no 
idea
if you can do that - if you shift them you exceed their bandlimit I 
assume?
and if you stretch them I am not sure what happens, you shift their 
frequency content down I assume?
Its a little bit fuzzy to me what the waveform in a such a band 
represents

and what happens when you manipulate it, or how you do that.


Look into constant-Q and bounded-Q transforms.

Ross.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-06 Thread Ross Bencina

On 7/11/2018 12:03 AM, gm wrote:
A similar idea would be to do some basic wavelet transfrom in octaves 
for instance and then

do smaller FFTs on the bands to stretch and shift them but I have no idea
if you can do that - if you shift them you exceed their bandlimit I assume?
and if you stretch them I am not sure what happens, you shift their 
frequency content down I assume?

Its a little bit fuzzy to me what the waveform in a such a band represents
and what happens when you manipulate it, or how you do that.


Look into constant-Q and bounded-Q transforms.

Ross.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread Stefan Sullivan
I'm definitely not the most mathy person on the list, but I think there's
something about the complex exponentials, real transforms and the 2-point
case. For all real DFTs you should get a real-valued sample at DC and
Nyquist, which indeed you do get with your matrix. However, there should be
some complex numbers in a matrix for a 4-point DFT, which you won't get no
matter how many matrices of that form you multiply together. My guess is
that yours is a special case of a DFT Matrix for 2 bins. I suspect if you
took a 4-point DFT Matrix and tried the same it might work out better?

https://en.wikipedia.org/wiki/DFT_matrix

Stefan

On Mon, Nov 5, 2018, 12:40 Ethan Duni  You can combine consecutive DFTs. Intuitively, the basis functions are
> periodic on the transform length. But it won't be as efficient as having
> done the big FFT (as you say, the decimation in time approach interleaves
> the inputs, so you gotta pay the piper to unwind that). Note that this is
> for naked transforms of successive blocks of inputs, not a WOLA filter
> bank.
>
> There are Dolby codecs that do similar with a suitable flavor of DCT (type
> II I think?) - you have your encoder going along at the usual frame rate,
> but if it detects a string of stationary inputs it can fold them together
> into one big high-res DCT and code that instead.
>
> On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn  wrote:
>
>> I don't think that's correct -- DIF involves first doing a single stage
>> of butterfly operations over the input, and then doing two smaller DFTs on
>> that preprocessed data. I don't think there is any reasonable way to take
>> two "consecutive" DFTs of the raw input data and combine them into a longer
>> DFT.
>>
>> (And I don't know anything about the historical question!)
>>
>> -Ethan
>>
>>
>>
>> On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson <
>> r...@audioimagination.com> wrote:
>>
>>>
>>>
>>> Ethan, that's just the difference between Decimation-in-Frequency FFT
>>> and Decimation-in-Time FFT.
>>>
>>> i guess i am not entirely certainly of the history, but i credited both
>>> the DIT and DIF FFT to Cooley and Tukey.  that might be an incorrect
>>> historical impression.
>>>
>>>
>>>
>>>  Original Message
>>> 
>>> Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
>>> realtime synthesis?
>>> From: "Ethan Fenn" 
>>> Date: Mon, November 5, 2018 10:17 am
>>> To: music-dsp@music.columbia.edu
>>>
>>> --
>>>
>>> > It's not exactly Cooley-Tukey. In Cooley-Tukey you take two
>>> _interleaved_
>>> > DFT's (that is, the DFT of the even-numbered samples and the DFT of the
>>> > odd-numbered samples) and combine them into one longer DFT. But here
>>> you're
>>> > talking about taking two _consecutive_ DFT's. I don't think there's any
>>> > cheap way to combine these to exactly recover an individual bin of the
>>> > longer DFT.
>>> >
>>> > Of course it's possible you'll be able to come up with a clever
>>> frequency
>>> > estimator using this information. I'm just saying it won't be exact in
>>> the
>>> > way Cooley-Tukey is.
>>> >
>>> > -Ethan
>>> >
>>> >
>>>
>>>
>>>
>>> --
>>>
>>> r b-j r...@audioimagination.com
>>>
>>> "Imagination is more important than knowledge."
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> dupswapdrop: music-dsp mailing list
>>> music-dsp@music.columbia.edu
>>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>>>
>>
>> ___
>> dupswapdrop: music-dsp mailing list
>> music-dsp@music.columbia.edu
>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread Ethan Duni
You can combine consecutive DFTs. Intuitively, the basis functions are
periodic on the transform length. But it won't be as efficient as having
done the big FFT (as you say, the decimation in time approach interleaves
the inputs, so you gotta pay the piper to unwind that). Note that this is
for naked transforms of successive blocks of inputs, not a WOLA filter
bank.

There are Dolby codecs that do similar with a suitable flavor of DCT (type
II I think?) - you have your encoder going along at the usual frame rate,
but if it detects a string of stationary inputs it can fold them together
into one big high-res DCT and code that instead.

On Mon, Nov 5, 2018 at 11:34 AM Ethan Fenn  wrote:

> I don't think that's correct -- DIF involves first doing a single stage of
> butterfly operations over the input, and then doing two smaller DFTs on
> that preprocessed data. I don't think there is any reasonable way to take
> two "consecutive" DFTs of the raw input data and combine them into a longer
> DFT.
>
> (And I don't know anything about the historical question!)
>
> -Ethan
>
>
>
> On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson <
> r...@audioimagination.com> wrote:
>
>>
>>
>> Ethan, that's just the difference between Decimation-in-Frequency FFT and
>> Decimation-in-Time FFT.
>>
>> i guess i am not entirely certainly of the history, but i credited both
>> the DIT and DIF FFT to Cooley and Tukey.  that might be an incorrect
>> historical impression.
>>
>>
>>
>> ------------ Original Message 
>> Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
>> realtime synthesis?
>> From: "Ethan Fenn" 
>> Date: Mon, November 5, 2018 10:17 am
>> To: music-dsp@music.columbia.edu
>> --
>>
>> > It's not exactly Cooley-Tukey. In Cooley-Tukey you take two
>> _interleaved_
>> > DFT's (that is, the DFT of the even-numbered samples and the DFT of the
>> > odd-numbered samples) and combine them into one longer DFT. But here
>> you're
>> > talking about taking two _consecutive_ DFT's. I don't think there's any
>> > cheap way to combine these to exactly recover an individual bin of the
>> > longer DFT.
>> >
>> > Of course it's possible you'll be able to come up with a clever
>> frequency
>> > estimator using this information. I'm just saying it won't be exact in
>> the
>> > way Cooley-Tukey is.
>> >
>> > -Ethan
>> >
>> >
>>
>>
>>
>> --
>>
>> r b-j r...@audioimagination.com
>>
>> "Imagination is more important than knowledge."
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> dupswapdrop: music-dsp mailing list
>> music-dsp@music.columbia.edu
>> https://lists.columbia.edu/mailman/listinfo/music-dsp
>>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread robert bristow-johnson


Well, I dunno shit about the history also.  I just ascribed all of the radix-2 
FFT to Cooley and Tukey.But I think you're mistaken about the technical claim.  
If you have or can get Oppenheim and Schafer and go to the FFT chapter of 
whatever revision you have, and there are several different 8 point FFTs that 
they illustrate.--r b-j                     
r...@audioimagination.com"Imagination is more important than knowledge."

 Original message 
From: Ethan Fenn  
Date: 11/5/2018  11:34 AM  (GMT-08:00) 
To: robert bristow-johnson , 
music-dsp@music.columbia.edu 
Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime 
synthesis? 

I don't think that's correct -- DIF involves first doing a single stage of 
butterfly operations over the input, and then doing two smaller DFTs on that 
preprocessed data. I don't think there is any reasonable way to take two 
"consecutive" DFTs of the raw input data and combine them into a longer 
DFT.(And I don't know anything about the historical question!)-EthanOn Mon, Nov 
5, 2018 at 2:18 PM, robert bristow-johnson  wrote: 
Ethan, that's just the difference between Decimation-in-Frequency FFT and 
Decimation-in-Time FFT.i guess i am not entirely certainly of the history, but 
i credited both the DIT and DIF FFT to Cooley and Tukey.  that might be an 
incorrect historical impression.
 Original Message --------
Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime 
synthesis?
From: "Ethan Fenn" 
Date: Mon, November 5, 2018 10:17 am
To: music-dsp@music.columbia.edu
--

> It's not exactly Cooley-Tukey. In Cooley-Tukey you take two _interleaved_
> DFT's (that is, the DFT of the even-numbered samples and the DFT of the
> odd-numbered samples) and combine them into one longer DFT. But here you're
> talking about taking two _consecutive_ DFT's. I don't think there's any
> cheap way to combine these to exactly recover an individual bin of the
> longer DFT.
>
> Of course it's possible you'll be able to come up with a clever frequency
> estimator using this information. I'm just saying it won't be exact in the
> way Cooley-Tukey is.
>
> -Ethan
>
>
 
--

r b-j                         r...@audioimagination.com

"Imagination is more important than knowledge."
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread Ethan Fenn
I don't think that's correct -- DIF involves first doing a single stage of
butterfly operations over the input, and then doing two smaller DFTs on
that preprocessed data. I don't think there is any reasonable way to take
two "consecutive" DFTs of the raw input data and combine them into a longer
DFT.

(And I don't know anything about the historical question!)

-Ethan



On Mon, Nov 5, 2018 at 2:18 PM, robert bristow-johnson <
r...@audioimagination.com> wrote:

>
>
> Ethan, that's just the difference between Decimation-in-Frequency FFT and
> Decimation-in-Time FFT.
>
> i guess i am not entirely certainly of the history, but i credited both
> the DIT and DIF FFT to Cooley and Tukey.  that might be an incorrect
> historical impression.
>
>
>
>  Original Message ----------------
> Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for
> realtime synthesis?
> From: "Ethan Fenn" 
> Date: Mon, November 5, 2018 10:17 am
> To: music-dsp@music.columbia.edu
> --
>
> > It's not exactly Cooley-Tukey. In Cooley-Tukey you take two _interleaved_
> > DFT's (that is, the DFT of the even-numbered samples and the DFT of the
> > odd-numbered samples) and combine them into one longer DFT. But here
> you're
> > talking about taking two _consecutive_ DFT's. I don't think there's any
> > cheap way to combine these to exactly recover an individual bin of the
> > longer DFT.
> >
> > Of course it's possible you'll be able to come up with a clever frequency
> > estimator using this information. I'm just saying it won't be exact in
> the
> > way Cooley-Tukey is.
> >
> > -Ethan
> >
> >
>
>
>
> --
>
> r b-j r...@audioimagination.com
>
> "Imagination is more important than knowledge."
>
>
>
>
>
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread robert bristow-johnson



�
Ethan, that's just the difference between Decimation-in-Frequency FFT and 
Decimation-in-Time FFT.
i guess i am not entirely certainly of the history, but i credited both the DIT 
and DIF FFT to Cooley and Tukey.� that might be an incorrect historical 
impression.



 Original Message 

Subject: Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime 
synthesis?

From: "Ethan Fenn" 

Date: Mon, November 5, 2018 10:17 am

To: music-dsp@music.columbia.edu

--



> It's not exactly Cooley-Tukey. In Cooley-Tukey you take two _interleaved_

> DFT's (that is, the DFT of the even-numbered samples and the DFT of the

> odd-numbered samples) and combine them into one longer DFT. But here you're

> talking about taking two _consecutive_ DFT's. I don't think there's any

> cheap way to combine these to exactly recover an individual bin of the

> longer DFT.

>

> Of course it's possible you'll be able to come up with a clever frequency

> estimator using this information. I'm just saying it won't be exact in the

> way Cooley-Tukey is.

>

> -Ethan

>

>

�


--



r b-j� � � � � � � � � � � � �r...@audioimagination.com



"Imagination is more important than knowledge."

�
�
�
�
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread gm




Am 05.11.2018 um 16:17 schrieb Ethan Fenn:


Of course it's possible you'll be able to come up with a clever 
frequency estimator using this information. I'm just saying it won't 
be exact in the way Cooley-Tukey is.


Maybe, but not the way I laid it out.

Also it seems wiser to interpolate spektral peaks, as had been suggested 
to me before.


But it doesn's sound much better then to get the frequency from the 
phase step so the bad sound for frequency shifts at an FFT size of 2048 
has other reasons than just a bad phase estimate.
Maybe it's just stupid to find a solution for this FFT size and a 
frequency domain shift.


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-05 Thread Ethan Fenn
It's not exactly Cooley-Tukey. In Cooley-Tukey you take two _interleaved_
DFT's (that is, the DFT of the even-numbered samples and the DFT of the
odd-numbered samples) and combine them into one longer DFT. But here you're
talking about taking two _consecutive_ DFT's. I don't think there's any
cheap way to combine these to exactly recover an individual bin of the
longer DFT.

Of course it's possible you'll be able to come up with a clever frequency
estimator using this information. I'm just saying it won't be exact in the
way Cooley-Tukey is.

-Ethan



On Mon, Nov 5, 2018 at 12:28 AM, gm  wrote:

>
>
> Am 05.11.2018 um 01:56 schrieb gm:
>
>> so you do the "radix 2 algorithm" if you will on a subband, and now what?
>> the bandlimits are what? the neighbouring upper and lower bands?
>>
>> how do I get a frequency estimate "in between" out of these two real
>> values that describe the upper and lower limit of the band but have no
>> further information?
>>
>> thank you.
>>
> The way I see it:
>
> If you do that 2 point transform on a band you get 2 data points instead
> of one (or rather instead of two sucsessive ones of course), representing
> the upper and lower bandwith limit of the band, but not very well seperated.
> But if you take the result of the previous frame also into account you now
> get 4 points representing the corner of a bin
> of the original spectrum so to say, however in bewteen spectra, and you
> now can do bilinear interpolation between these 4 points.
>
> But in the end this is just crude averaging between two sucessive spectra,
> and I am not sure if it sounded better
> or worse. It's hard to tell a difference, it works quite well on a sine
> sweep though.
>
> But there must be a better way to make use of these 2 extra data points.
>
> In the end you now have the same amount of information as with a spectrum
> of double size.
> So you should be able to obtain the same quality from that.
> That was my way of thinking, however flawed that is, I'd like to know.
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-04 Thread gm




Am 05.11.2018 um 01:56 schrieb gm:

so you do the "radix 2 algorithm" if you will on a subband, and now what?
the bandlimits are what? the neighbouring upper and lower bands?

how do I get a frequency estimate "in between" out of these two real 
values that describe the upper and lower limit of the band but have no 
further information?


thank you.

The way I see it:

If you do that 2 point transform on a band you get 2 data points instead 
of one (or rather instead of two sucsessive ones of course), 
representing the upper and lower bandwith limit of the band, but not 
very well seperated.
But if you take the result of the previous frame also into account you 
now get 4 points representing the corner of a bin
of the original spectrum so to say, however in bewteen spectra, and you 
now can do bilinear interpolation between these 4 points.


But in the end this is just crude averaging between two sucessive 
spectra, and I am not sure if it sounded better
or worse. It's hard to tell a difference, it works quite well on a sine 
sweep though.


But there must be a better way to make use of these 2 extra data points.

In the end you now have the same amount of information as with a 
spectrum of double size.

So you should be able to obtain the same quality from that.
That was my way of thinking, however flawed that is, I'd like to know.


___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-04 Thread gm




Am 05.11.2018 um 01:39 schrieb robert bristow-johnson:

mr. g,

I think what you're describing is the Cooley-Tukey Radix-2 FFT algorithm.


yes that seems kind of right, though I am not describing something but 
posting a question actually

and the "other thing" was an answer to a question

maybe my post was too long, boring and naive for you, so I am sorry for 
that.
I am reusing the same subject lien to help people to ignore this, if 
they want


so you do the "radix 2 algorithm" if you will on a subband, and now what?
the bandlimits are what? the neighbouring upper and lower bands?

how do I get a frequency estimate "in between" out of these two real 
values that describe the upper and lower limit of the band but have no 
further information?


thank you.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp



Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-04 Thread robert bristow-johnson


and the other thing you're describing is what they usually call "sinusoidal 
modeling.".--r b-j                     r...@audioimagination.com"Imagination is 
more important than knowledge."

 Original message 
From: gm  
Date: 11/4/2018  4:14 PM  (GMT-08:00) 
To: music-dsp@music.columbia.edu 
Subject: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime
synthesis? 

bear with me, I am a math illiterate.I understand you can do a Discrete Fourier 
Transform in matrix form,and for 2-point case it is simply[ 1, 1   1,-1]like 
the Haar transform, average and difference.My idea is, to use two successive 
DFT frames, and to transform resepctive bins of two successive frames like 
this.To obtain a better frequency estimate (subbands) from two smaller DFTs 
instead of an DFT double the size.This should be possible? and the information 
obtained, time and frequency resolution wise, identical.Except that you can 
overlap the two DTFs.I basically want to find the dominant frequency in the FFT 
bin, and sepreate it and discard the rest.And a subband resolution of 2 seems 
to be a sufficient increase in resolution.But how do I get that from this when 
there is no phase other then 0?I can see which of the two bands has more 
energy, but how do I know "the true frequency" of Nyquist and DC?There is not 
enough information.The problem persists for me if I resort to a 4-point 
transform, what to do with the highest/lowest subband.(and also to understand 
how to calculate the simple 4 point matrix, cause I am uneducated..)Or do I 
need the 4-point case and discard "DC" and Nyquist subbands?Or is the idea 
totally nonsens?Or is it justified to pick the subband that has more energy, 
and then, what?___dupswapdrop: 
music-dsp mailing 
listmusic-dsp@music.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/music-dsp___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime synthesis?

2018-11-04 Thread robert bristow-johnson


mr. g,I think what you're describing is the Cooley-Tukey Radix-2 FFT 
algorithm.--r b-j                     r...@audioimagination.com"Imagination is 
more important than knowledge."

 Original message 
From: gm  
Date: 11/4/2018  4:14 PM  (GMT-08:00) 
To: music-dsp@music.columbia.edu 
Subject: [music-dsp] 2-point DFT Matrix for subbands Re: FFT for realtime
    synthesis? 

bear with me, I am a math illiterate.I understand you can do a Discrete Fourier 
Transform in matrix form,and for 2-point case it is simply[ 1, 1   1,-1]like 
the Haar transform, average and difference.My idea is, to use two successive 
DFT frames, and to transform resepctive bins of two successive frames like 
this.To obtain a better frequency estimate (subbands) from two smaller DFTs 
instead of an DFT double the size.This should be possible? and the information 
obtained, time and frequency resolution wise, identical.Except that you can 
overlap the two DTFs.I basically want to find the dominant frequency in the FFT 
bin, and sepreate it and discard the rest.And a subband resolution of 2 seems 
to be a sufficient increase in resolution.But how do I get that from this when 
there is no phase other then 0?I can see which of the two bands has more 
energy, but how do I know "the true frequency" of Nyquist and DC?There is not 
enough information.The problem persists for me if I resort to a 4-point 
transform, what to do with the highest/lowest subband.(and also to understand 
how to calculate the simple 4 point matrix, cause I am uneducated..)Or do I 
need the 4-point case and discard "DC" and Nyquist subbands?Or is the idea 
totally nonsens?Or is it justified to pick the subband that has more energy, 
and then, what?___dupswapdrop: 
music-dsp mailing 
listmusic-dsp@music.columbia.eduhttps://lists.columbia.edu/mailman/listinfo/music-dsp___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp