フィルターのクリア

Why standard Waveform from audio out gets distorted when i reduce the amplitude?

6 ビュー (過去 30 日間)
shyam
shyam 2015 年 7 月 28 日
コメント済み: Dinesh Iyer 2015 年 7 月 28 日
In my attempt to generate a standard sine wave out of a sound card, i started using matlab which has a function soundsc for scaling the output
t = 0:1/48000:10;
y = sin(1000*2*pi*t);
soundsc(y,48000,[a b]);
its ok when my a and b are -1 and 1 respectively, when i try to make them even -0.9 and 0.9 respectively the standard sine wave of 1Khz gets distorted why so ?
are our sound cards will not be able to handle standard sounds ??

採用された回答

Dinesh Iyer
Dinesh Iyer 2015 年 7 月 28 日
Shyam,
The reason for this distortion is that some of the signal values are being clipped. When you specify [a, b], it is assumed that signal you are attempting to playback has values in the range [a, b] and it allows you to scale it to the the range [-1, 1].
In your case, the signal "y" has values in the range [-1, 1] and by specifying [a, b] t be [-0.9 0.9], the values between [-0.9 0.9] in "y" are being scaled to [-1 1]. Values greater than 0.9 are scaled out of range and hence clipped.
The help for the soundsc function makes this clear.
Dinesh
  2 件のコメント
shyam
shyam 2015 年 7 月 28 日
thanks i understood,but i have tried with some other experiment like replacing the y=sin(..) line with y = 0.5 sine(..) but the output was not halved but its response was not linear what may be the problem ?
Dinesh Iyer
Dinesh Iyer 2015 年 7 月 28 日
I am not sure I understand your question.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio 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