# how can i center an audio signal?

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

How can i obtain centered audio signal such as below?

SOLVED:

i found someone asked the similar question before

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

• 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? – Laurent Duval Dec 30 '15 at 18:01
• I was about to say... ;-( – Peter K. Dec 31 '15 at 0:56

"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:

  y = x - xm1 + 0.995 * ym1;