0
$\begingroup$

I'm trying to reconstruct an audio signal, and below is what i got after rescaling.

enter image description here

How can i obtain centered audio signal such as below?

enter image description here


SOLVED:

ruoho ruotsi's answer addresses my problem :)

i found someone asked the similar question before

How to remove or filter the drift problem in measured Strain signal?

$\endgroup$
2
  • $\begingroup$ Welcome to SE.DSP. You are reconstructing and rescaling a signal using unmentioned processing. They could influence the trend, background or baseline you are observing. Could you please be more specific about your reconstruction? $\endgroup$ Dec 30, 2015 at 18:01
  • $\begingroup$ I was about to say... ;-( $\endgroup$
    – Peter K.
    Dec 31, 2015 at 0:56

3 Answers 3

1
$\begingroup$

"Center" isn't the word that I'd use to describe what you want to do. Your signal does not have a zero-mean, so like @Dole suggested you should use a DC-Blocker (DC-Offset removing) filter to get the job done:

Here are your references:

https://ccrma.stanford.edu/~jos/filters/DC_Blocker.html https://ccrma.stanford.edu/~jos/filters/DC_Blocker_Frequency_Response.html https://ccrma.stanford.edu/~jos/filters/DC_Blocker_Software_Implementations.html

the code (from the above links) can be as simple as this, where x is the current sample and y is the filtered sample, while xm1 and ym1 are the x,y from the previous step (i.e. x[i-1], y[i-1]):

  y = x - xm1 + 0.995 * ym1;
  xm1 = x;
  ym1 = y;
$\endgroup$
1
  • 1
    $\begingroup$ this is what i was looking for, thank you so much! :) $\endgroup$
    – anony
    Dec 31, 2015 at 0:42
1
$\begingroup$

Use small High Pass filter. Usually it is suggested to remove the frequencies in the range of 0-200 Hz for speech signals.

$\endgroup$
0
$\begingroup$

Remove DC offset. Either convert to frequency domain and remove bin 0 or just use a very low frequency high pass filter.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.