How to normalize audio input?

조회 수: 5 (최근 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 CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by