Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

How can I use LPT-USB to trigger the output?

1 view (last 30 days)
Junghee
Junghee on 9 Dec 2013
Closed: Walter Roberson on 10 Dec 2013
I have worked on some codes to filter the sound.
I asked few days ago if anybody knows how to turn LED light on by using LPT-USB port and MATLAB.. but nobody answered.
I have filtered the sound and have a frequency spectrum.
According to that specified frequency, I need to trigger the output with LPT-USB port.
Following is what I did so far.
% Reading wav file
b=wavread('/Users/*******/Desktop/traffichonk.wav');
% Selecting a portion (37s to 41s)
b1=b(44100*37:44100*41);
size(b1)
% FFT algorithm
n=176401;
fs=44100;
ts2=1/fs;
tmax2=(n-1)*ts2;
t2=0:ts2:tmax2;
f2=-fs/2:fs/(n-1):fs/2;
z2=fftshift(fft(b1));
% Plotting the sample b1
figure(1)
plot(t2,b1)
title('Plot of a Sound Sample');
xlabel('time(s)');
ylabel('Sound data');
% Plotting the Frequency Spectrum
figure(2)
plot(f2,abs(z2))
title('Frequency Spectrum');
xlabel('Frequency Hz');
ylabel('Amplitude');
% After bandpass toolbox is used, alert saying "The variable 'Hbp' has been
% exported to the command window.' will show up.
b2=filter(Hbp,b1);
z3=fftshift(fft(b2));
% Plotting the frequency spectrum after filtering
figure(3)
plot(f2,abs(z3))
title('Frequency Spectrum after Filtering');
xlabel('Frequency(Hz)');
ylabel('Amplitude');
% Checking the sound
soundsc(b2,44100)
I need to take live input in and send live output out... and I will use a microphone for a input device and LPT to USB port...(I found some info online- people said I could use LPT port to get output signal but I don't know if LPT-USB port is the right one)
Anyway, triggering the output or code for LPT-USB port.. anything is fine.
Please I'll appreciate any help.
Thanks
  3 Comments
Junghee
Junghee on 10 Dec 2013
Oh It's same :D nobody put answer on mine and it was gone from the first page so thought nobody will read mine

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!