sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* volume extremely low when combining many files
@ 2016-09-21 23:10 Bob S
  2016-09-22  5:35 ` Erich Eckner
  0 siblings, 1 reply; 16+ messages in thread
From: Bob S @ 2016-09-21 23:10 UTC (permalink / raw)
  To: Sox-users

Hello,

  I am using sox to automatically assemble a soundtrack which described by a bunch of keyframes, each of which specifies a small sound file to be played at a certain pitch and volume.  When there are many keyframes, the overall soundtrack volume becomes very low.  I do a first pass to generate a sound file for each keyframe with the sound at the specified volume and pitch and with padding to place it at the right place in the overall soundtrack.  Then in a second pass I assemble all the files. (I was doing this with pipes and one big sox call, but the process was being terminated due to using too many resources on the server.)

 I want the volume settings on the individual sounds to be respected, but the overall output file should be normal volume.  Right now even if all my keyframes are full volume, the combined result is very quiet.  

I read a little bit about this in the documentation, and I tried using the —norm argument to normalize the final sound, but it isn’t working. 

My call looks something like this:

sox -V —norm -m sound0.wav sound1.wav sound2.wav sound3.wav … sound100.wav  -r 44100  -e signed -b 16 output.wav trim 0 30.0

Can anyone tell me what I am doing wrong?  Should I not try to set the volume on each sub-file and then set the volume when I am doing the final combine?  
Thanks!
Bob


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-21 23:10 volume extremely low when combining many files Bob S
@ 2016-09-22  5:35 ` Erich Eckner
  2016-09-22 16:19   ` Bob S
  0 siblings, 1 reply; 16+ messages in thread
From: Erich Eckner @ 2016-09-22  5:35 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1.1: Type: text/plain, Size: 2000 bytes --]

Hi,

the problem is, that "norm" is invoked on the input files, which are
then mixed and decreased in volume to prevent clipping. Try something like

sox -V -m sound0.wav sound1.wav sound2.wav sound3.wav … sound100.wav  -r
44100  -e signed -b 16 output.wav trim 0 30.0 norm

instead.

Cheers, Erich

On 22.09.2016 01:10, Bob S wrote:
> Hello,
> 
>   I am using sox to automatically assemble a soundtrack which described by a bunch of keyframes, each of which specifies a small sound file to be played at a certain pitch and volume.  When there are many keyframes, the overall soundtrack volume becomes very low.  I do a first pass to generate a sound file for each keyframe with the sound at the specified volume and pitch and with padding to place it at the right place in the overall soundtrack.  Then in a second pass I assemble all the files. (I was doing this with pipes and one big sox call, but the process was being terminated due to using too many resources on the server.)
> 
>  I want the volume settings on the individual sounds to be respected, but the overall output file should be normal volume.  Right now even if all my keyframes are full volume, the combined result is very quiet.  
> 
> I read a little bit about this in the documentation, and I tried using the —norm argument to normalize the final sound, but it isn’t working. 
> 
> My call looks something like this:
> 
> sox -V —norm -m sound0.wav sound1.wav sound2.wav sound3.wav … sound100.wav  -r 44100  -e signed -b 16 output.wav trim 0 30.0
> 
> Can anyone tell me what I am doing wrong?  Should I not try to set the volume on each sub-file and then set the volume when I am doing the final combine?  
> Thanks!
> Bob
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-22  5:35 ` Erich Eckner
@ 2016-09-22 16:19   ` Bob S
  2016-09-22 17:37     ` Jeremy Nicoll - ml sox users
  0 siblings, 1 reply; 16+ messages in thread
From: Bob S @ 2016-09-22 16:19 UTC (permalink / raw)
  To: sox-users

>> 
>>  I am using sox to automatically assemble a soundtrack which described by a bunch of keyframes, each of which specifies a small sound file to be played at a certain pitch and volume.  When there are many keyframes, the overall soundtrack volume becomes very low.  I do a first pass to generate a sound file for each keyframe with the sound at the specified volume and pitch and with padding to place it at the right place in the overall soundtrack.  Then in a second pass I assemble all the files. (I was doing this with pipes and one big sox call, but the process was being terminated due to using too many resources on the server.)
>> 
>> I want the volume settings on the individual sounds to be respected, but the overall output file should be normal volume.  Right now even if all my keyframes are full volume, the combined result is very quiet.  
>> 
>> I read a little bit about this in the documentation, and I tried using the —norm argument to normalize the final sound, but it isn’t working. 
>> 
>> My call looks something like this:
>> 
>> sox -V —norm -m sound0.wav sound1.wav sound2.wav sound3.wav … sound100.wav  -r 44100  -e signed -b 16 output.wav trim 0 30.0
>> 
>> Can anyone tell me what I am doing wrong?  Should I not try to set the volume on each sub-file and then set the volume when I am doing the final combine?  
>> Thanks!
>> Bob

> 
> the problem is, that "norm" is invoked on the input files, which are
> then mixed and decreased in volume to prevent clipping. Try something like
> 
> sox -V -m sound0.wav sound1.wav sound2.wav sound3.wav … sound100.wav  -r
> 44100  -e signed -b 16 output.wav trim 0 30.0 norm
> 
> instead.
> 
> Cheers, Erich
> 
> On 22.09.2016 01:10, Bob S wrote:

Thanks for the reply.  Actually it sort of started working the way I had it.  I think I had something else wrong.  But the problem now, both with the way I wrote it above and if I try it the way you suggest, is the same:  The volume is loud, but there is also a loud hissing noise all the way through, static where there should be silence.  I also get that same result if I try the ‘mix-power’ argument, and if I set the volume for each track in the final call when I combine them together.

It seems like this might be from raising a low-volume sound way up, but I don’t really know why it would need to do that.  I have like a hundred little tracks being mixed together, and they are all mostly silence except for the part in each one where the sound effect plays.  Anyone have a suggestion for how to fix that?

Thanks,
Bob


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-22 16:19   ` Bob S
@ 2016-09-22 17:37     ` Jeremy Nicoll - ml sox users
  2016-09-22 17:56       ` Bob S
  2016-09-22 18:07       ` Bob S
  0 siblings, 2 replies; 16+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2016-09-22 17:37 UTC (permalink / raw)
  To: sox-users

On 2016-09-22 17:19, Bob S wrote:

> It seems like this might be from raising a low-volume sound way up,
> but I don’t really know why it would need to do that.  I have like a
> hundred little tracks being mixed together, and they are all mostly
> silence except for the part in each one where the sound effect plays.
> Anyone have a suggestion for how to fix that?

When you say 'silence' do you mean no signal at all, so if you looked at
it in a waveform editor there would be no waveform at all, or do you 
just
mean very quiet (ie a small waveform)?

What does the output of sox, with the  stat  and  stats   effects look
like for these files?   If you trim out one of the sections that you 
think
is silent, what do stat & stats say about such a section?

What do stat & stats say about one of the result file's meant-to-be 
silent
sections?

Personally rather than trying to do the whole thing in one command, I'd
suggest you try working in changing the level of just one or two of the
small files, and examine them then with stat & stats.  Then look at the
file you get if you mix those two files together, and see if you can see
what levels are changing.

-- 
Jeremy Nicoll - my opinions are my own

------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-22 17:37     ` Jeremy Nicoll - ml sox users
@ 2016-09-22 17:56       ` Bob S
  2016-09-23  4:56         ` Erich Eckner
  2016-09-22 18:07       ` Bob S
  1 sibling, 1 reply; 16+ messages in thread
From: Bob S @ 2016-09-22 17:56 UTC (permalink / raw)
  To: sox-users

> When you say 'silence' do you mean no signal at all, so if you looked at
> it in a waveform editor there would be no waveform at all, or do you 
> just
> mean very quiet (ie a small waveform)?
> 
> What does the output of sox, with the  stat  and  stats   effects look
> like for these files?   If you trim out one of the sections that you 
> think
> is silent, what do stat & stats say about such a section?
> 
> What do stat & stats say about one of the result file's meant-to-be 
> silent
> sections?
> 
> Personally rather than trying to do the whole thing in one command, I'd
> suggest you try working in changing the level of just one or two of the
> small files, and examine them then with stat & stats.  Then look at the
> file you get if you mix those two files together, and see if you can see
> what levels are changing.
> 
> -- 
> Jeremy Nicoll - my opinions are my own


Thanks Jeremy.  

Well, I am using the ‘pad’ command to insert what I assume is absolute silence. 

I have not used stat & stats, I’ll have to read up on those.

Also, for this example, I am not even changing the volume of each individual sample/track.  Everything is at full volume.
So say for example I have 4 sound effects being assembled (when really it is 100 — if I actually just have 4 then this doesn’t happen).
Each effect is 1/4 of a second long and they are spaced along a two second gap. And say they are all actually the same sound:

/ sound 1/ ………………………………………………………………………………
…………………………/ sound 1/ ……………………………………………………
………………………………………………………/ sound 1/ ………………………
 …………………………………………………………………………….../ sound 1/

So in my first loop I assemble each of those four tracks, using ‘pad’ to place them at the correct position along the whole soundtrack.
Then in the second pass I mix them all together.  And for some reason all that padded silence is adding up to static noise.

I will do some more investigation and try the stats thing.  But theoretically ‘pad’ should just add absolute silence, right? Adding 100 tracks of
it together shouldn’t add up to noise, should it?

Thanks
Bob



------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-22 17:37     ` Jeremy Nicoll - ml sox users
  2016-09-22 17:56       ` Bob S
@ 2016-09-22 18:07       ` Bob S
  1 sibling, 0 replies; 16+ messages in thread
From: Bob S @ 2016-09-22 18:07 UTC (permalink / raw)
  To: sox-users

Also, although I haven’t tried ‘stat’ yet, I took one of the intermediate files and opened it in Audacity, and the section that is made with ‘pad’ is not a flat line, like I expected.  It looks like low-level noise, which I imagine is causing the problem when all those tracks pile up. Is there any way to make ‘pad’ insert absolute silence, or is some sound necessary for it to actually take up time?
Thanks
Bob


------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-22 17:56       ` Bob S
@ 2016-09-23  4:56         ` Erich Eckner
  2016-09-23 21:43           ` Bob S
  0 siblings, 1 reply; 16+ messages in thread
From: Erich Eckner @ 2016-09-23  4:56 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1.1: Type: text/plain, Size: 3079 bytes --]

Hi Bob,

I think the problem is related to "dither". Two suggestions:
try disabling dither ("-D") in all but the last sox command and
try to minimize the number of "snippets" you combine, e.g.: put
non-overlapping sounds in one file in the first step. This way you will
end up with less dither-noise.

cheers,
Erich

On 22.09.2016 19:56, Bob S wrote:
>> When you say 'silence' do you mean no signal at all, so if you looked at
>> it in a waveform editor there would be no waveform at all, or do you 
>> just
>> mean very quiet (ie a small waveform)?
>>
>> What does the output of sox, with the  stat  and  stats   effects look
>> like for these files?   If you trim out one of the sections that you 
>> think
>> is silent, what do stat & stats say about such a section?
>>
>> What do stat & stats say about one of the result file's meant-to-be 
>> silent
>> sections?
>>
>> Personally rather than trying to do the whole thing in one command, I'd
>> suggest you try working in changing the level of just one or two of the
>> small files, and examine them then with stat & stats.  Then look at the
>> file you get if you mix those two files together, and see if you can see
>> what levels are changing.
>>
>> -- 
>> Jeremy Nicoll - my opinions are my own
> 
> 
> Thanks Jeremy.  
> 
> Well, I am using the ‘pad’ command to insert what I assume is absolute silence. 
> 
> I have not used stat & stats, I’ll have to read up on those.
> 
> Also, for this example, I am not even changing the volume of each individual sample/track.  Everything is at full volume.
> So say for example I have 4 sound effects being assembled (when really it is 100 — if I actually just have 4 then this doesn’t happen).
> Each effect is 1/4 of a second long and they are spaced along a two second gap. And say they are all actually the same sound:
> 
> / sound 1/ ………………………………………………………………………………
> …………………………/ sound 1/ ……………………………………………………
> ………………………………………………………/ sound 1/ ………………………
>  …………………………………………………………………………….../ sound 1/
> 
> So in my first loop I assemble each of those four tracks, using ‘pad’ to place them at the correct position along the whole soundtrack.
> Then in the second pass I mix them all together.  And for some reason all that padded silence is adding up to static noise.
> 
> I will do some more investigation and try the stats thing.  But theoretically ‘pad’ should just add absolute silence, right? Adding 100 tracks of
> it together shouldn’t add up to noise, should it?
> 
> Thanks
> Bob
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-23  4:56         ` Erich Eckner
@ 2016-09-23 21:43           ` Bob S
  2016-09-24  5:06             ` Erich Eckner
  0 siblings, 1 reply; 16+ messages in thread
From: Bob S @ 2016-09-23 21:43 UTC (permalink / raw)
  To: sox-users


> On Sep 22, 2016, at 11:56 PM, Erich Eckner <erich@eckner.net> wrote:
> 
> Hi Bob,
> 
> I think the problem is related to "dither". Two suggestions:
> try disabling dither ("-D") in all but the last sox command and
> try to minimize the number of "snippets" you combine, e.g.: put
> non-overlapping sounds in one file in the first step. This way you will
> end up with less dither-noise.
> 
> cheers,
> Erich

Thanks Erich,

	I did figure the problem was just too many overlapping tracks piling up, even if they were supposedly silent.  I wonder if something else is wrong, though — even in the partial sub-tracks, where a single effect has just been padded to the right length with ‘pad’, the padded part is not silent at all but actually a pretty loud static hiss for something that is supposed to be silence.  I tried adding -D, but that did not change anything.  Does it go before or after the input file in the sox call? Or after the output file?  I’ve tried all three with the same results.

For example, this file is a small sound effect padded with ‘silence’ for the first ten seconds:
https://dl.dropboxusercontent.com/u/4215526/sound77.wav

I’ve got to be doing something wrong to get that kind of noise, aren’t I?

Anyway, yesterday I rewrote the whole thing to assemble nonoverlapping tracks, like you say.  I had not done that originally because I figured that over time, a big error would be introduced near the end as sounds did not line up with their correct video frame.  But it seems to be OK and now I am only mixing two tracks together, so the problem is not so bad. The noise stays at the level you hear in the sample above.  But it’s still pretty annoying and I’d like to get rid of it.  

Bob
------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-23 21:43           ` Bob S
@ 2016-09-24  5:06             ` Erich Eckner
  2016-09-24 15:41               ` Jan Stary
  2016-09-24 17:49               ` Bob S
  0 siblings, 2 replies; 16+ messages in thread
From: Erich Eckner @ 2016-09-24  5:06 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1.1: Type: text/plain, Size: 3101 bytes --]

Hi Bob,

can you post the command you used to generate that file?
It is indeed not "silent" at the beginning:

>sox sound77.wav -n trim 0 9 stats

DC offset  -0.000002
Min level  -0.007812
Max level   0.007812
Pk lev dB     -42.14
RMS lev dB    -48.17
RMS Pk dB     -47.83
RMS Tr dB     -48.64
Crest factor    2.00
Flat factor     2.17
Pk count       99.0k
Bit-depth       1/8
Num samples     397k
Length s       9.000
Scale max   1.000000
Window s       0.050

However, if I do a pad:

>sox sound77.wav test.wav pad 10

and analyze the result, it's silent:

> sox test.wav -n trim 0 9 stats
DC offset   0.000000
Min level   0.000000
Max level   0.000000
Pk lev dB       -inf
RMS lev dB      -inf
RMS Pk dB       -inf
RMS Tr dB       -inf
Crest factor    1.00
Flat factor   111.97
Pk count        794k
Bit-depth       0/0
Num samples     397k
Length s       9.000
Scale max   1.000000
Window s       0.050

Something else seems to be wrong.

Cheers, Erich

On 23.09.2016 23:43, Bob S wrote:
> 
>> On Sep 22, 2016, at 11:56 PM, Erich Eckner <erich@eckner.net> wrote:
>>
>> Hi Bob,
>>
>> I think the problem is related to "dither". Two suggestions:
>> try disabling dither ("-D") in all but the last sox command and
>> try to minimize the number of "snippets" you combine, e.g.: put
>> non-overlapping sounds in one file in the first step. This way you will
>> end up with less dither-noise.
>>
>> cheers,
>> Erich
> 
> Thanks Erich,
> 
> 	I did figure the problem was just too many overlapping tracks piling up, even if they were supposedly silent.  I wonder if something else is wrong, though — even in the partial sub-tracks, where a single effect has just been padded to the right length with ‘pad’, the padded part is not silent at all but actually a pretty loud static hiss for something that is supposed to be silence.  I tried adding -D, but that did not change anything.  Does it go before or after the input file in the sox call? Or after the output file?  I’ve tried all three with the same results.
> 
> For example, this file is a small sound effect padded with ‘silence’ for the first ten seconds:
> https://dl.dropboxusercontent.com/u/4215526/sound77.wav
> 
> I’ve got to be doing something wrong to get that kind of noise, aren’t I?
> 
> Anyway, yesterday I rewrote the whole thing to assemble nonoverlapping tracks, like you say.  I had not done that originally because I figured that over time, a big error would be introduced near the end as sounds did not line up with their correct video frame.  But it seems to be OK and now I am only mixing two tracks together, so the problem is not so bad. The noise stays at the level you hear in the sample above.  But it’s still pretty annoying and I’d like to get rid of it.  
> 
> Bob
> ------------------------------------------------------------------------------
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-24  5:06             ` Erich Eckner
@ 2016-09-24 15:41               ` Jan Stary
  2016-09-24 17:14                 ` Erich Eckner
  2016-09-24 17:49               ` Bob S
  1 sibling, 1 reply; 16+ messages in thread
From: Jan Stary @ 2016-09-24 15:41 UTC (permalink / raw)
  To: sox-users

On Sep 24 07:06:23, erich@eckner.net wrote:
> Hi Bob,
> 
> can you post the command you used to generate that file?
> It is indeed not "silent" at the beginning:
> 
> >sox sound77.wav -n trim 0 9 stats
> 
> DC offset  -0.000002
> Min level  -0.007812
> Max level   0.007812
> Pk lev dB     -42.14
> RMS lev dB    -48.17
> RMS Pk dB     -47.83
> RMS Tr dB     -48.64
> Crest factor    2.00
> Flat factor     2.17
> Pk count       99.0k
> Bit-depth       1/8
> Num samples     397k
> Length s       9.000
> Scale max   1.000000
> Window s       0.050
> 
> However, if I do a pad:
> 
> >sox sound77.wav test.wav pad 10

The manpage says

     pad { length[@position(=)] }
	[...]
	position is optional for the first and last lengths specified
	and if omitted correspond to the beginning and the end of
	the audio respectively.

So if I am reading this right, you are padding
with 10 seconds of silence at the beginning.

Then in particular the first 9 seconds is silence:

> and analyze the result, it's silent:
> 
> > sox test.wav -n trim 0 9 stats
> DC offset   0.000000
> Min level   0.000000
> Max level   0.000000
> Pk lev dB       -inf
> RMS lev dB      -inf
> RMS Pk dB       -inf
> RMS Tr dB       -inf
> Crest factor    1.00
> Flat factor   111.97
> Pk count        794k
> Bit-depth       0/0
> Num samples     397k
> Length s       9.000
> Scale max   1.000000
> Window s       0.050

	Jan


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-24 15:41               ` Jan Stary
@ 2016-09-24 17:14                 ` Erich Eckner
  2016-09-27 20:55                   ` Bob S
  0 siblings, 1 reply; 16+ messages in thread
From: Erich Eckner @ 2016-09-24 17:14 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1.1: Type: text/plain, Size: 2086 bytes --]

Hi Jan,

I expected it to start with silence and was just checking, however Bobs
file does _not_ start with silence, although he claimed to pad 10
seconds at the beginning. That's why I wanted to know the actual command
in use.

cheers, Erich

On 24.09.2016 17:41, Jan Stary wrote:
> On Sep 24 07:06:23, erich@eckner.net wrote:
>> Hi Bob,
>>
>> can you post the command you used to generate that file?
>> It is indeed not "silent" at the beginning:
>>
>>> sox sound77.wav -n trim 0 9 stats
>>
>> DC offset  -0.000002
>> Min level  -0.007812
>> Max level   0.007812
>> Pk lev dB     -42.14
>> RMS lev dB    -48.17
>> RMS Pk dB     -47.83
>> RMS Tr dB     -48.64
>> Crest factor    2.00
>> Flat factor     2.17
>> Pk count       99.0k
>> Bit-depth       1/8
>> Num samples     397k
>> Length s       9.000
>> Scale max   1.000000
>> Window s       0.050
>>
>> However, if I do a pad:
>>
>>> sox sound77.wav test.wav pad 10
> 
> The manpage says
> 
>      pad { length[@position(=)] }
> 	[...]
> 	position is optional for the first and last lengths specified
> 	and if omitted correspond to the beginning and the end of
> 	the audio respectively.
> 
> So if I am reading this right, you are padding
> with 10 seconds of silence at the beginning.
> 
> Then in particular the first 9 seconds is silence:
> 
>> and analyze the result, it's silent:
>>
>>> sox test.wav -n trim 0 9 stats
>> DC offset   0.000000
>> Min level   0.000000
>> Max level   0.000000
>> Pk lev dB       -inf
>> RMS lev dB      -inf
>> RMS Pk dB       -inf
>> RMS Tr dB       -inf
>> Crest factor    1.00
>> Flat factor   111.97
>> Pk count        794k
>> Bit-depth       0/0
>> Num samples     397k
>> Length s       9.000
>> Scale max   1.000000
>> Window s       0.050
> 
> 	Jan
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-24  5:06             ` Erich Eckner
  2016-09-24 15:41               ` Jan Stary
@ 2016-09-24 17:49               ` Bob S
  1 sibling, 0 replies; 16+ messages in thread
From: Bob S @ 2016-09-24 17:49 UTC (permalink / raw)
  To: sox-users


> On Sep 24, 2016, at 12:06 AM, Erich Eckner <erich@eckner.net> wrote:
> 
> Hi Bob,
> 
> can you post the command you used to generate that file?
> It is indeed not "silent" at the beginning:
> 
>> sox sound77.wav -n trim 0 9 stats
> 
> DC offset  -0.000002
> Min level  -0.007812
> Max level   0.007812
> Pk lev dB     -42.14
> RMS lev dB    -48.17
> RMS Pk dB     -47.83
> RMS Tr dB     -48.64
> Crest factor    2.00
> Flat factor     2.17
> Pk count       99.0k
> Bit-depth       1/8
> Num samples     397k
> Length s       9.000
> Scale max   1.000000
> Window s       0.050
> 
> However, if I do a pad:
> 
>> sox sound77.wav test.wav pad 10
> 
> and analyze the result, it's silent:
> 
>> sox test.wav -n trim 0 9 stats
> DC offset   0.000000
> Min level   0.000000
> Max level   0.000000
> Pk lev dB       -inf
> RMS lev dB      -inf
> RMS Pk dB       -inf
> RMS Tr dB       -inf
> Crest factor    1.00
> Flat factor   111.97
> Pk count        794k
> Bit-depth       0/0
> Num samples     397k
> Length s       9.000
> Scale max   1.000000
> Window s       0.050
> 
> Something else seems to be wrong.
> 
> Cheers, Erich

Hey Erich,

	Thanks again for the reply.  Here is the call I use to generate file 92 for example:

sox -V   -t raw -r 11025 -e signed -b 8 -c 1 sound0000  -r 44100 sound92.wav vol 1 speed 0.93636363744736 pad 12.966666666667 10.966666666667 trim 0 13.033333333333

Here’s the result:
https://dl.dropboxusercontent.com/u/4215526/sound92.wav

I don’t know if it could be part of the problem, but here is the source effect file “sound0000”, which is not a wav but just raw samples:
https://dl.dropboxusercontent.com/u/4215526/sound0000


Bob








------------------------------------------------------------------------------
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-24 17:14                 ` Erich Eckner
@ 2016-09-27 20:55                   ` Bob S
  2016-09-27 21:30                     ` Erich Eckner
  0 siblings, 1 reply; 16+ messages in thread
From: Bob S @ 2016-09-27 20:55 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 844 bytes --]

Hey Erich, I don’t know if you saw my post — sorry to bother you but I am wondering you see anything wrong with the way I am calling sox here?

> Hey Erich,
> 
> 	Thanks again for the reply.  Here is the call I use to generate file 92 for example:
> 
> sox -V   -t raw -r 11025 -e signed -b 8 -c 1 sound0000  -r 44100 sound92.wav vol 1 speed 0.93636363744736 pad 12.966666666667 10.966666666667 trim 0 13.033333333333
> 
> Here’s the result:
> https://dl.dropboxusercontent.com/u/4215526/sound92.wav <https://dl.dropboxusercontent.com/u/4215526/sound92.wav>
> 
> I don’t know if it could be part of the problem, but here is the source effect file “sound0000”, which is not a wav but just raw samples:
> https://dl.dropboxusercontent.com/u/4215526/sound0000 <https://dl.dropboxusercontent.com/u/4215526/sound0000>

Thanks!
Bob


[-- Attachment #1.2: Type: text/html, Size: 1441 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-27 20:55                   ` Bob S
@ 2016-09-27 21:30                     ` Erich Eckner
  2016-09-29 16:40                       ` Bob S
  2016-09-29 16:49                       ` Bob S
  0 siblings, 2 replies; 16+ messages in thread
From: Erich Eckner @ 2016-09-27 21:30 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1.1: Type: text/plain, Size: 1640 bytes --]

Hi Bob,

yes, I saw your post (but had other stuff to do) - thanks for the reminder.

The problem seems to be the "speed" effect, which implies a "rate"
effect, which uses ffts and thus the zero from the pad effect may become
nonzero (but close to).

My suggestion is to either use "speed" on sound0000 and generate an
intermediate file or to explicitely use the "rate" effect _before_ "pad"
(but I'm not sure, the latter works).

cheers, Erich

On 27.09.2016 22:55, Bob S wrote:
> Hey Erich, I don’t know if you saw my post — sorry to bother you but I am wondering you see anything wrong with the way I am calling sox here?
> 
>> Hey Erich,
>>
>> 	Thanks again for the reply.  Here is the call I use to generate file 92 for example:
>>
>> sox -V   -t raw -r 11025 -e signed -b 8 -c 1 sound0000  -r 44100 sound92.wav vol 1 speed 0.93636363744736 pad 12.966666666667 10.966666666667 trim 0 13.033333333333
>>
>> Here’s the result:
>> https://dl.dropboxusercontent.com/u/4215526/sound92.wav <https://dl.dropboxusercontent.com/u/4215526/sound92.wav>
>>
>> I don’t know if it could be part of the problem, but here is the source effect file “sound0000”, which is not a wav but just raw samples:
>> https://dl.dropboxusercontent.com/u/4215526/sound0000 <https://dl.dropboxusercontent.com/u/4215526/sound0000>
> 
> Thanks!
> Bob
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Sox-users mailing list
> Sox-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-27 21:30                     ` Erich Eckner
@ 2016-09-29 16:40                       ` Bob S
  2016-09-29 16:49                       ` Bob S
  1 sibling, 0 replies; 16+ messages in thread
From: Bob S @ 2016-09-29 16:40 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 1059 bytes --]


> On Sep 27, 2016, at 4:30 PM, Erich Eckner <erich@eckner.net> wrote:
> 
> Hi Bob,
> 
> yes, I saw your post (but had other stuff to do) - thanks for the reminder.
> 
> The problem seems to be the "speed" effect, which implies a "rate"
> effect, which uses ffts and thus the zero from the pad effect may become
> nonzero (but close to).
> 
> My suggestion is to either use "speed" on sound0000 and generate an
> intermediate file or to explicitely use the "rate" effect _before_ "pad"
> (but I'm not sure, the latter works).
> 
> cheers, Erich


Hey Erich,

 	Thanks for the reply. However, I tried it without the ‘speed’ call and still got the same noise  But I think I know what the problem may be now.  I just noticed this warning:

sox WARN pad: Input audio too short; pads not applied: 1

So I guess the sound is too short for padding to work?  I’m not sure why the length of the sound would matter for padding.  And it *is* making the sound the length I specify, so ‘pad’ is doing something.  That is kind of weird.  

Bob


[-- Attachment #1.2: Type: text/html, Size: 2245 bytes --]

[-- Attachment #2: Type: text/plain, Size: 79 bytes --]

------------------------------------------------------------------------------

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: volume extremely low when combining many files
  2016-09-27 21:30                     ` Erich Eckner
  2016-09-29 16:40                       ` Bob S
@ 2016-09-29 16:49                       ` Bob S
  1 sibling, 0 replies; 16+ messages in thread
From: Bob S @ 2016-09-29 16:49 UTC (permalink / raw)
  To: sox-users


> On Sep 27, 2016, at 4:30 PM, Erich Eckner <erich@eckner.net> wrote:
> 
> Hi Bob,
> 
> yes, I saw your post (but had other stuff to do) - thanks for the reminder.
> 
> The problem seems to be the "speed" effect, which implies a "rate"
> effect, which uses ffts and thus the zero from the pad effect may become
> nonzero (but close to).
> 
> My suggestion is to either use "speed" on sound0000 and generate an
> intermediate file or to explicitely use the "rate" effect _before_ "pad"
> (but I'm not sure, the latter works).
> 
> cheers, Erich

Actually, I know earlier I said that the ‘-D’ option did not work for me, but I just tried it again since it seemed like dithering was suspect, and this time it worked!  I don’t know what happened before, maybe I put it in the wrong place. 

It still gives me that warning about pads not being applied, but it seems like they ARE being applied, so I don’t know what is up with that.  But it is working now — it was the -D option.

Thanks for all the help!

Bob


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-29 16:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-21 23:10 volume extremely low when combining many files Bob S
2016-09-22  5:35 ` Erich Eckner
2016-09-22 16:19   ` Bob S
2016-09-22 17:37     ` Jeremy Nicoll - ml sox users
2016-09-22 17:56       ` Bob S
2016-09-23  4:56         ` Erich Eckner
2016-09-23 21:43           ` Bob S
2016-09-24  5:06             ` Erich Eckner
2016-09-24 15:41               ` Jan Stary
2016-09-24 17:14                 ` Erich Eckner
2016-09-27 20:55                   ` Bob S
2016-09-27 21:30                     ` Erich Eckner
2016-09-29 16:40                       ` Bob S
2016-09-29 16:49                       ` Bob S
2016-09-24 17:49               ` Bob S
2016-09-22 18:07       ` Bob S

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).