"cfx" <
[email protected]> wrote in message news:<bhtaol$53a$
[email protected]>...
> First, thanks for your attention.
>
> The goal of the processus is to apply a little decorrelation to a source
> audio signal in real time.
> And this by applying a little phasing on each signal frequency component.
>
> We can considere that I have a some audio data and I can get these data only
> by blocks of 1024 samples.
> When I get a block, I apply an Hanning window to the block and compute the
> fft (fftsize == 1024).
> In the fourier domain I want to modifie the phase of each frequency
> component.
> For that I dispose of a transfert function (an array of 512 complexes) that
> for doing that, each complex, of the
> transfert function, associated to a frequency component had a unit modul and
> an argument between
> 0 and pi/3. Then I multiply the fft of my block with the transfert function
> and compute the ifft.
OK. You are applying an all-pass filter to your signal in frequency domain.
Now, I can't see the relation between the 512 complex samples of the
transfer function and the block size of 1024. Is the transfer function
specified in frequency domain? If so, what do you do with the frequency bins
between the Nyquist frequency and the sampling frequency?
> If the block received is the block [n,n+1024-1] ('n' is a arbitrary absolute
> sample indices), I dispose of a previous windowed block [n-1024,n-1], I
> overlap these two blocks such that the data [n-512,n+512-1] are valid
> processed
> data if there is no modification of the signal phase in the processing, but
> this is not the case.
> My interpretetion of this phenomena is a sliding of the window due to the
> frequency phasing apply by the processus.
Your problem appears to be how to patch blocks in time domain, considering
that each sample is represented in two blocks...
> But now, I am not an expert in Signal Processing, and it is possible that I
> made a great mistake in my raisonment, and maybe it is not possible to do
> what I want by this way.
I think it should be possible to implement a filter this way. You would
probably need to pay some attention to quite a few details, though.
Having said that, my immediate response (provided I understand your problem
correctly) is that you may want to consider a time-domain implementation
of your all-pass filter. I don't know much about such implementations, but
there may be others here who can help you with the details.
If that's not an option, you may try to compute the time series as some
sort of weighted average between blocks. Assume you want to reconstruct
the samples [n,n+512-1]. The deconvolved data would come from the trailing
half of the block [n-512,n+512-1] (call these samples a(m), m=0,...,511)
and the leading half of the block [n, n+1024-1] (call these samples
b(m), m=0,...,511).
The resulting segment of the time series x(n) could then be computed
with the naive constant weighting
x(n+m) = 1/2(a(m)+b(m)) m=0,...,511
or possibly a more elaborate ramp weighting
x(n+m) = (511-m)/511*a(m)+ m/511*b(m) m=0,...,511.
In any case, there will be differences between the patched data from
such a block-wise approach, and data comupted either in time domain or
with other block sizes.
Rune