フィルターのクリア

how to pan stereo audio on Matlab

10 ビュー (過去 30 日間)
Femi Okome
Femi Okome 2022 年 12 月 15 日
コメント済み: Femi Okome 2022 年 12 月 16 日
i have exported the data of a sterio wav file. i have code to change aplitude of the audio, pan the audio and play it. but im stuck on how to pan the audio
amplificationFactor = 1.1; % Ten percent gain.
data = data * amplificationFactor;
plot(data);
sound(data, fs);
any advice will be appreciated

採用された回答

Bora Eryilmaz
Bora Eryilmaz 2022 年 12 月 15 日
編集済み: Bora Eryilmaz 2022 年 12 月 15 日
For stereo audio, your data has to be an n x 2 matrix. Then you can multiply each channel (column) by a weight between 0 and 1 to pan.
% Full pan left
data = rand(100,2);
data(:,2) = 0;
% Full pan right
data = rand(100,2);
data(:,1) = 0;
% 25% left, 75% right pan
data = rand(100,2);
data(:,1) = 0.25 * data(:,1);
data(:,2) = 0.75 * data(:,2);
  1 件のコメント
Femi Okome
Femi Okome 2022 年 12 月 16 日
thank you very much, was wondering what the problem was. thank you again

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

その他の回答 (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