How to normalize audio input?

2 ビュー (過去 30 日間)
fei
fei 2013 年 5 月 24 日
回答済み: Antonio Ferreras 2019 年 10 月 22 日
Hello, does anybody know how wavrecord function scales PCM format (range 0-256 or 0-65536) into -1;1 interval? many thanks for answers

回答 (3 件)

Daniel Shub
Daniel Shub 2013 年 5 月 24 日
The wavrecord function does not do the scaling but rather the recsnd function handles the scaling. The recsnd function is/was not a well defined entity since it was a platform dependent mex file and in some cases it used audiorecorder. The wavrecord function is now obsolete and is slated to be removed, so there is no single version...
That said, (x-128)/128 is probably a reasonable approximation of the conversion. Do you have reason to doubt this?

fei
fei 2013 年 5 月 26 日
Thank you for your answer Daniel, finally I used mapminmax function which uses this algorithm: y = (ymax-ymin)*(x-xmin)/(xmax-xmin) + ymin;
  1 件のコメント
Jan
Jan 2013 年 5 月 26 日
Please post comments in the comment section of the corresponding answer, not as further answer. Thanks.

サインインしてコメントする。


Antonio Ferreras
Antonio Ferreras 2019 年 10 月 22 日
The problem con mapminmax is that it introduces a continuus bias

カテゴリ

Help Center および File ExchangeAudio Processing Algorithm Design についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by