필터 지우기
필터 지우기

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 CenterFile Exchange에서 Audio 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