to change the amplitude of a .wav file

9 ビュー (過去 30 日間)
Femi Okome
Femi Okome 2022 年 12 月 14 日
コメント済み: Image Analyst 2022 年 12 月 15 日
I am new to Matlab and im trying to change the amplitude of a .wav file. i have exported the data and Fs. i just dont know how to now increase/decreas the aplitude of the wav.
the code below shows what i have done,
thanks for any advice given.
plot(data);
soundsc(data,fs);

採用された回答

Image Analyst
Image Analyst 2022 年 12 月 14 日
Try multiplying by a scaling factor:
amplificationFactor = 1.1; % Ten percent gain.
data = data * amplificationFactor;
plot(data);
sound(data, fs);
You might be interested in my File Exchange entry that allows you to plot the waveforms of all the files in a folder:
  2 件のコメント
Femi Okome
Femi Okome 2022 年 12 月 14 日
thank you very much. that now works and i can also see the gain change on the graph. one more thing, what would be the best way to calculate the plot value in dB.
Image Analyst
Image Analyst 2022 年 12 月 15 日
You probably need to square the signal to get power then use the formula here:

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by