フィルターのクリア

How to deliver a sound tone to only one ear?

4 ビュー (過去 30 日間)
Mohammad
Mohammad 2013 年 7 月 8 日
コメント済み: mohadeseh zamani 2021 年 8 月 12 日
Hi everyone;
I am trying to set an experiment on MATLAB where I am going to be producing a tone and sending it to the user via ear plugs. However, the tone coming to the right ear has to be 180degrees out of phase to the tone coming to the left ear.
So for instance, if the frequency is 1000Hz, I will send the 1000Hz signal to the right ear now then wait 0.5ms to send the same tone to the left ear. Hence the two sounds are going to be out of phase with each other.
So my question is: how to tell MatLab to send a tone to only the right ear then send another tone to the other ear. Or how to disable either the left or right earplug.
Thank you for your help. Ali

採用された回答

Jan
Jan 2013 年 7 月 8 日
編集済み: Jan 2013 年 7 月 8 日
You can simply add zeros in the silent channel:
t = linspace(0, 5, 22500*5);
y = sin(t * 1000 * 2 * pi);
silence = zeros(1, floor(0.5e-3 * 22500)); % 0.5 ms
signal = [y, silence; silence, y(:)].';
wavplay(signal, 22050);
% Draw the signal to check the phase shift:
plot(signal(1:100, :))
  1 件のコメント
mohadeseh zamani
mohadeseh zamani 2021 年 8 月 12 日
Hello Jan, I am trying to generate a toneburst in either left and right ear for example if f=250 Hz and duration of time that sound is produced in the ear is 1 seconds and the distance between the two sounds is 4 second ( first sound in the left ear and the right sound in the right ear) my problem is that generating sound in left and right ear if you know it please help me I really neeed this part.

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

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