フィルターのクリア

Matlab Sound Output Signal Different than input waveform when viewed with -Scope

11 ビュー (過去 30 日間)
I am trying to use the sound function to output a higher frequency sin wave superimposed on a lower frequency sine wave through my audio card.
I have tried but the internal sound card on my laptop as well as an external blue toother sound card but both seem to have the signals smoothened to a single sin wave with the higher frequency when I observe the signal with an O-scope.
As a test, I also tried to output a traingle wave, this is also smoothened to a sine wave.
Is there any kinds of filtering that is happening that is not documented that can be disabled or another way to get the signal on the o-scope to match the input signal provided in the Matlab Vector?

採用された回答

Moritz Boecker
Moritz Boecker 2022 年 5 月 12 日
So i manged to fix it.
For anyone else searching, go to the audio settings and turn off all enhancements:
Then you will get the output you are looking for.
Thank you everyone on here for your help.

その他の回答 (2 件)

Chandra
Chandra 2022 年 5 月 2 日
Hi,
Try using different sampling frequency that is suitable to the given signal, try to maintain the sampling frequency more than twice the signal
Generally the sound function takes the sampling rate default value of 8192 hertz, so try changing it accordingly
>>sound(y,Fs); %y is data and Fs is sampling rate
Refer to Soundfunction
  1 件のコメント
Moritz Boecker
Moritz Boecker 2022 年 5 月 2 日
Thanks for the quick reply. I have been trying a samplig rate of 14.4 and 28.8kHz. The sine waves I have been trying are on the order of 50-1kHz when seeing these results.

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


Chandra
Chandra 2022 年 5 月 4 日
Hi,
Try to save the data using "audiowrite" and then play without using sound function i.e., directly on the system and then observe the data.
It is really helpful by updating the furthur results.
  1 件のコメント
Moritz Boecker
Moritz Boecker 2022 年 5 月 11 日
I did a round trip with audiowrite. When playing the exported .wav file with VLC player I still get the same result on my scope. When reading the file back in with audioread it shows up correctly. Does anyone know what might be going wrong with the audio handeling in Windows?
Thanks!

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

カテゴリ

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