I created a white noise signal. I am trying to use the array I have created with the white noise to play in 2 channels. When the left channel I was trying to have 5000 samples and the right will have 0 and when in the right channel it will have 5000 samples and the left will be 0(which means no sound from this channel). I keep getting an error when trying to concatenate the sounds and I think I messed up with the loop because every time it loops it will do 5000 samples and I only need 5000 total with a 10000 sample pause in between the 2 sounds. I also had trouble writing the band-pass filter into the code but it worked when using the FDAToool. Any help would be appreciated.
fs = 44.1; %Sample Frequency khz
L=5000; %Sample length for the random signal
P=10000; %Sample Pause Gap
mu=0;
sigma=2;
Left_signal = [sigma*randn(L,1)+mu 0];
Right_signal = [0 sigma*randn(L,1)+mu];
%Loop thru all samples
for num = 2:L,
%Time
%t = num *(1/Fs);
Left_signal = [Left_signal; sigma*randn(L,1)+mu 0];
end
Pause = zeros(P,2);
for num2 = 2:L,
%time
%t = num2 * (1/Fs);
Right_signal = [Right_signal; 0 sigma*randn(L,1)+mu];
end
Long_signal = [Left_signal; Pause; Right_signal];