Hey Everyone,
How could I separate a WAV file into two WAV files, one containing everything under, the other containing everything over a certain volume (say, -10 dB)?
I know it is not a basic thing to do, but what is this filter called? Some "gate" filter? Is there a command line tool for that? SoX doesn't do this, unfortunately.
The reason I want this is because I need to process differently the louder and the quieter parts in an audio file (of course, I want a transition when I mix them again eventually, but that's a different issue).
Thanks in advance.
+ Reply to Thread
Results 1 to 10 of 10
-
-
I think what you want would be fairly impossible because audio is rarely continuous. ie there tends to be tiny sections of silence or quieter parts even throughout longer, louder sections. You'd probably end up with a file split in all sorts of odd places if you just used a gate.
Using some sort of loudness analysis would be better whereby the whole file is analysised and split into sections according to a predetermined average volume over a period of time, but while there's tools for analysing volume (ie ReplayGain) I don't know of any that'd automatically do what you want.
In what way do you need to process the louder and quieter parts differently? Compressing the whole audio to even out the volume rather than splitting it isn't an option? -
That's exactly what I want.
I'll mix them together again eventually anyway, so the the audio track will be "full" again.
I didn't want to tell, because I didn't want advices on how to avoid the requested separation.
I want to equalize differently the louder parts with my special equalizer. And no, I can't use a different equalizer.
Compressing is only an option if it is flexible and can compress only over a certain volume, leaving everything else intact.
I figured out maybe SoX could still do what I want. The "compand" effect could work, but either some of the parameters don't make sense to me or don't work as documented. -
I think I understand what you want - back in the 1970's I had a pre-amp (analog of course) that did something like this - low level stuff high frequency roll off filters were applied and high levels no equalisation other than what overall mid and high boost globally you applied. It also had an Unlimit button that applied up to 6db upward expansion on crescendos and 3db downward expansion on quieter passages. Worked well as I remember - I think I still have it somewhere in my store room or as my friends refer to it pandora's box
PS it was a Phase Linear 4000 PreampLast edited by netmask56; 1st Jun 2015 at 02:09.
SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851 -
-
-
-
Sox should be able to do that. It has an Expansion function, and a Gate is just an extreme form of (downward) expansion. And, assuming you have sample-accurate phase alignment, you could easily do boolean mixing ([orig] - [gated]) to get the opposite ([gated-only]) section.
I use Sox only rarely (as the tools I normally use are just as powerful, but with GUIs so I don't have to mess with that and can concentrate more on the sound and be efficient in my workflow), so I cannot help with the command line parameters. But it's not that hard to look them up.
hello_hello means well and is starting off on the right track, but is not accurate with the final assumption: A gate would replace lower sounds with silence, so there is no sample discontinuity in the signal, only a (temporary) discontinuity in the quality of the signal. If the 2 sub-parts are ultimately going to be reunited, the process COULD work.
Here's a storybook analogy:
You have a train with tall cars and short cars. The train is always joined the same way with no leeway, so the cars are spaced exactly the way they are intended even if the train is moving (in any direction) or stopped. You run the train down the track, but at some point there is a GIANT with a scythe (sickle) who sees the train coming near and in dull anger sweeps his scythe above the train intending to scoop away the train. But he misses his mark and is only able to connect with the tops of the taller cars. Now, he has such force & infinite speed that it is a clean cut and, like Wile-E-Coyote going over a cliff, the tops stay suspended in mid-air where they are while the remainder of the train passes underneath. Once the train has gone down a ways, the suspension no longer holds and the tops of the tall cars fall directly down to the track, each in their place of last entirety. The GIANT thinks he's won and so moves on. The train finally pulls into the station and unloads what it can and realizes the problem and dispatches an army of cranes to help restore the tops to the broken sections of the train. Preparations take a long time, but finally all is ready. It just so happens that there is one separate crane for each broken section, so the cranes move out to the site on a parallel track and set up camp each beside a corresponding top. On the foreman's whistle they all connect & raise the tops, holding until the train can travel back up the track (it was in waiting in the depot this whole time) to be back in the same spot that they were at the time of being dismembered. The cranes do their work plopping them down properly and the welders re-weld the tops back onto the taller cars. Unfortunately, the amount of time that had elapsed was enough to weather & rust the exposed tops, so they look awkwardly red and rounded compared to their shorter brethren, even though they still fit together perfectly. The End.
Scott
...<edit>Understand that you have the very strong possibility of thoroughly ruining your sound if you aren't extremely careful. And it sounds like what you are attempting to do can be more easily & accurately done, and more sonically-pleasing, with a 2-(or more)-stage compressor. I also look ascanse at someone who "needs help!" but is withholding of information.Last edited by Cornucopia; 1st Jun 2015 at 10:51.
-
Yeah, that was my final thought yesterday: I have to figure out how to use SoX's compand.
I think I have a realistic picture of the risks. That's why I said in my original post that it wasn't a basic thing to do and I need a (smooth) transition when I mix the separated parts together again. I'll test repeatedly anyway if the result sounds good or not.
Similar Threads
-
Increasing Audio volume on AVI/DivX/Xvid with AC3 Audio
By Spacedementia87 in forum User guidesReplies: 21Last Post: 24th Dec 2021, 07:21 -
Volume normalization for 5.1 audio
By chrisr34000 in forum AudioReplies: 2Last Post: 22nd Jan 2014, 10:55 -
Why does ffmpeg audio volume cmd -af "volume=50dB" not work?
By pxstein in forum Newbie / General discussionsReplies: 7Last Post: 7th Nov 2013, 10:21 -
Dialogue Volume in LCD TV is low while action/music volume is high
By Biker Biker in forum DVB / IPTVReplies: 4Last Post: 2nd Mar 2013, 01:41 -
AC3 Filter volume problem across speakers.
By chrisssj2 in forum AudioReplies: 1Last Post: 24th Feb 2011, 09:36