Current implementation does not use an independent Hilbert transformer and a 'delay'. Instead a pair of band-pass filters are used. I/Q signal are passed through one of those BPF respectively. Two filters have identical frequency(amplitude) response but the phase response of the Q channel BPF is 90 degree different with respect to I channel BPF. If you want to konw further details of such filters, see references.
All the filters in the program are FIR type and have the following characteristics.
BPF: Sampling Rate: 12000Hz Number of taps: 89 Passband: 300-3000Hz Transition band: 500Hz Stopband attenuation: 60.0 dB Decimation/Interpolation LPF: Sampling Rate: 48000Hz Number of taps: 89 Passband: 0-4000Hz Transition band: 2000Hz Stopband attenuation: 60.0 dBThey were designed by using Java applets found on the Internet (example of filter design).
The ALSA sound driver seems to be in the rapid development process. While I was writing the demodulation program the API changed extensively (version 0.4.x to 0.5.x). My DSP program dosen't run with newer API. I hope I will make my codes compatible with new API soon.
The current Java Sound API cannot open capture and playback device with different format (sampling rate). So the demodulator program must perform interpolation (to 48kHz) after it gets the demodulated AF signal. The generator program must sample mic input at 48kHz and decimate it to 12kHz at first.
The program consists of following 5 files(classes).
The program is provided "as is" without any warranty of any kind.
Next make a directory where you will put DSP programs ('c:\dsp' for example). Under that directory, make 2 directories named 'src' and 'classes' respectively. Then copy 5 source files into the 'src' directory.
Set CLASSPATH variable:
set CLASSPATH=%CLASSPATH%;c:\dsp\classes;Compile dsp programs:
cd c:\dsp (the top directory you made for dsp programs)Now you are ready. To run the generator program, type
cd src
javac -d ..\classes *.java
java ji3gab.dsp.Generator 1or to run the demodulator program, type
java ji3gab.dsp.Detector 1'1' is an argument for the program and it corresponds to mode. '0' for AM(demodulation only), '1' for LSB, and '2' for USB.
You may need to adjust various sound levels such as MIC, LINE IN, Wave output, Master, etc. through Windows' audio property panel.