VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member
    Join Date
    Apr 2007
    Location
    Hungary
    Search Comp PM
    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.
    Quote Quote  
  2. 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?
    Quote Quote  
  3. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by zee944 View Post
    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.
    What kind of processing?

    Quote Quote  
  4. Member
    Join Date
    Apr 2007
    Location
    Hungary
    Search Comp PM
    Originally Posted by hello_hello View Post
    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.
    That's exactly what I want. I'll mix them together again eventually anyway, so the the audio track will be "full" again.

    Originally Posted by newpball View Post
    What kind of processing?
    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.
    Quote Quote  
  5. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    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 Preamp
    Last edited by netmask56; 1st Jun 2015 at 03: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
    Quote Quote  
  6. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by zee944 View Post
    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.
    Because you have a special equalizer and it's a secret.......

    But you really want help....

    Okay.....

    Quote Quote  
  7. Member
    Join Date
    Apr 2007
    Location
    Hungary
    Search Comp PM
    Originally Posted by newpball View Post
    I think I was pretty clear about what I needed help in; the equalization part is irrelevant.
    If you can't help in the separation, nitpicking won't help either.
    Quote Quote  
  8. Banned
    Join Date
    Oct 2014
    Location
    Northern California
    Search PM
    Originally Posted by zee944 View Post
    Originally Posted by newpball View Post
    I think I was pretty clear about what I needed help in; the equalization part is irrelevant.
    No you are not.

    If you want help you should explain what you are looking for and upload a sample and tell us what you want fixed.

    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    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 11:51.
    Quote Quote  
  10. Member
    Join Date
    Apr 2007
    Location
    Hungary
    Search Comp PM
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!