Adding echo with xpvox:
This uses sox, the echo output is fed back to the dsp device again, select igain as source:
xpvox -o | \
-r 44100 -w -c 1 -s -t raw - \
-r 44100 -w -c 1 -s -t ossdsp /dev/dsp \
echo 1 .65 1.5 .5
Transmitting speech and music with high dynamic range.
Since the dynamic range of the transmission channel is likely limited, we can use a compander.
In the old days there was a chip: Philips NE570.
These days we have the 'sox' program, it has a compand option.
I took the datasheet from the NE570, copied the curve to sox parameters:
-80,-40,-60,-30,-40,-20,0,0 (sox can only go to 0dB)
Then I took the CCIT recommendation from the NE570 application note, CCIT attack: 3+-2ms release 13.5+-9ms:
Now I could make a compander program for wave files:
sox example.wav example_companded.wav compand 0.003,.013.5 -80,-40,-60,-30,-40,-20,0,0 1
Most of it will now be at the same level!
If you have 2 soundcards you could pipe the output of xpvox through this into the other dsp device,
and have your mike companded too!
If not then you can pre-process your waves or mp3 (make a wave with mpg123 -w xxx.wav xxx.mp3).
Expanding it again:
If you have control over both the transmitter and receiver, you can expand again at the receiving end,
simply by reversing the dB values in the sox compand curve:
sox example.wav example.expanded.wav compand 0.003,.013.5 -40,-80,-30,-60,-20,-40,0,0 1
For example I have used this in phone links with speech from the US to Europe, with the NE570 chip.
Companding at the transmitter side, and then expanding again at the receiver site, can give some noise reduction.
This low noise was important when playing on a speaker in a hall full of people.
The price is always some distortion.
Using the expander we actually amplify the strong passages more then the softer ones, so more then
any noise or hum... You can sometimes even use the expander if the signal is not companded!
Designing a lightning detector, work in progress.
Lightning detector diagram, ASM listing, it uses PIC 12F629.. add a beeper, soft is being developed.
|command line switch||function|
|-h||help (this help)|
|-o||send PCM as 44100 16 bits mono stream to stdout, use with lame to make mp3|
|-t float||threshold mike sensitivity (0-100%) default 3|
|-v||debug (prints functions and arguments)|