Transmitting speech and music with high dynamic range (technical Linux).
Some play music CDs ... so.. these often have 80 dB dynamic range or so...
For those this may be of interest.
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 9in Linux), 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 for telephone from the NE570 application
note, CCIT attack time: 3+-2ms, release time: 13.5+-9ms:
0.003,.013.5
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).
|