IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
SoX Questions
editaudio
post Oct 30 2012, 00:03
Post #1





Group: Members
Posts: 4
Joined: 29-October 12
Member No.: 104165



I am new to SoX and have a couple questions.

1) I have been using Chris's Dynamic Compressor on podcasts and music to listen in the car and my iPod in noisy environments. I usually apply a ratio of 0.7 to 0.9. Does anyone know how to get the equivalent results in Sox?

2) I am using the compand effect and getting a lot of clipping. Does the -G and norm options apply to the input? How do I normalize the output and prevent clipping?

sox -G --norm=-3 alien.wav alienout.wav. compand 0.3,1 -90,-90,-70,-70,-60,-20,0,0 -5 0 0.2
sox WARN compand: compand clipped 46934 samples; decrease volume?

I would appreciate any comments and suggestions.
Go to the top of the page
+Quote Post
bandpass
post Oct 30 2012, 08:00
Post #2





Group: Members
Posts: 321
Joined: 3-August 08
From: UK
Member No.: 56644



No, IIRC -G doesn't work for compand, you have to play around with the manual attenuation parameter (-5 in your example): err on the cautious side and put "norm -3" after the compand command.

Google "compand for rock concerts" for a lot more info.
Go to the top of the page
+Quote Post
editaudio
post Oct 30 2012, 17:53
Post #3





Group: Members
Posts: 4
Joined: 29-October 12
Member No.: 104165



Thanks for the rock concerts suggestion.

Norm does not seem to work:

sox alien.wav alienout.wav compand .2,.4 6:-90,-90,-80,-40,-10,0 -10 -30 .2
sox WARN compand: compand clipped 5293 samples; decrease volume?

sox alien.wav alienout.wav compand .2,.4 6:-90,-90,-80,-40,-10,0 -10 -30 .2 norm 0
sox WARN compand: compand clipped 5293 samples; decrease volume?

sox alien.wav alienout.wav compand .2,.4 6:-90,-90,-80,-40,-10,0 -10 -30 .2 norm -3
sox WARN compand: compand clipped 5293 samples; decrease volume?
Go to the top of the page
+Quote Post
bandpass
post Oct 30 2012, 18:34
Post #4





Group: Members
Posts: 321
Joined: 3-August 08
From: UK
Member No.: 56644



Keep increasing the compand attenuation until the clips go away (they've already reduced in number), then attenuate by a further say, 10 dB.

SoX is 32-bit internally, so there's nothing to worry about with this attenuation (and the norm will bring the level back up if on some tracks not all the attenuation is needed).

HTH.
Go to the top of the page
+Quote Post
editaudio
post Oct 30 2012, 19:42
Post #5





Group: Members
Posts: 4
Joined: 29-October 12
Member No.: 104165



Thanks to your suggestions the clipping is now under control. Looking at the file in a waveform editor, it's very "spikey" and "peaky". Compressor and Audacity is able to make it more "blocky", "smooth", and "flat". I've tried many different combinations of settings but just can't seem to get good results with SoX.
Go to the top of the page
+Quote Post
chi
post Nov 1 2012, 11:32
Post #6





Group: Members
Posts: 45
Joined: 27-November 11
Member No.: 95439



QUOTE (editaudio @ Oct 30 2012, 20:42) *
Looking at the file in a waveform editor, it's very "spikey" and "peaky". Compressor and Audacity is able to make it more "blocky", "smooth", and "flat". I've tried many different combinations of settings but just can't seem to get good results with SoX.


To get a flatter waveform, you’ll need to make the transfer function flatter too, and possibly shorten the attack time. E.g.,
CODE
compand 0.05,0.2 6:-90,-90,-80,-1,-10,0 -10 -30 .1
yields quite a level waveform for me. Whether that’s useful or not is a different question.

Are you aware that
CODE
sox --plot=method ...
(where “method” can be gnuplot or octave) will plot the transfer function?
Go to the top of the page
+Quote Post
editaudio
post Nov 1 2012, 20:28
Post #7





Group: Members
Posts: 4
Joined: 29-October 12
Member No.: 104165



The transfer function looks good, but the audio file has many tall spikes, so to avoid clipping, the volume gets reduced substantially.

SoX waveform:
CODE
     |
     |                               |
     |                               |
     |    |                          |
     |    |                          |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
     |    |                          |
     |                               |
     |                               |
     |


Chris's Dynamic Compressor waveform:
CODE
                         |
||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||
||||||||||||||||||||||||||||||||||||||||||||||||||||
                         |

Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 13:09