Bulk Removal of Wav Headers

Discussion in 'Samplers, Synthesizers' started by SirGigantor, Oct 27, 2023.

  1. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    Hello,

    Sometimes I prefer to convert NCW files to WAV files to use on my own. For some reason, this sometimes seems to result in there being something wrong with the WAV headers which can cause errors.

    Does anyone know of a good way to strip the WAV headers out of a whole directory at a time?

    Thanks.
     
  2.  
  3. fiction

    fiction Audiosexual

    Joined:
    Jun 21, 2011
    Messages:
    1,920
    Likes Received:
    702
  4. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    Yeah, I've got Sox, I've been looking around for how to do it on all a full directory. Do you know the command line switches to do it?

    I figured Sox should be able to do it, but I just need to know how to do it on a full directory and output the files with, basically, a modified file name . . . .
     
  5. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    Can I just tell tell it to run on a whole directory and will it just input and output as different files?

    Like will:

    Sox ./Input/*.wav ./Ouput/*.wav

    Just rewrite the files without blank headers, or do I have to do something else?

    I've got Bash installed on my Windows Console, so I can do Bash commands if you know how to do it with those.
     
  6. fiction

    fiction Audiosexual

    Joined:
    Jun 21, 2011
    Messages:
    1,920
    Likes Received:
    702
    Sure. Like this:
    sox file1.wav --bits 16 --encoding signed-integer --endian little file1.raw

    The options "bits", "encoding" and "endian" let you change the encoding of the raw output files.
    This can all be done natively in Windows without using bash etc.

    Example for use in a batch file:
    for %%i in *.wav do sox "%%i" --bits 16 --encoding signed-integer --endian little "%%i.raw"

    You'll end up with raw file names like file1.wav.raw.
     
  7. Deuterium

    Deuterium Kapellmeister

    Joined:
    Oct 15, 2021
    Messages:
    117
    Likes Received:
    44
    I have converted a lot of ncw to wav and I cant say i remember any such issue with the files
     
  8. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    It only seems to happen sometimes, and it might still turn out to be another problem. Sometimes I go to loop them in SampleRobot, but only loads some of them. If I go to Bjoerns Mapper or Endless Wave, it returns errors that's it's unable to write the Pitch data to the Key File, so I can only assume it's that there's something different about the WAV header. I saw mentioned in a forum some where that Kontakt can actually read a slightly longer than normal header, so some of them might be that . . . .
     
  9. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36

    I'll give that a try and see what it does. It seems like it should work as long as it's the WAV Headers causing the problem.
     
  10. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36

    For some reason that didn't work, but the similar code on this site did:

    https://madskjeldgaard.dk/posts/sox-tutorial-batch-processing/

    Is yours PowerShell only?

    Regardless, it worked fine, the files wouldn't load in SampleRobot, then I just converted them from 24bit to 24bit via Sox, and they loaded right away, so that was the problem . . .
     
  11. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    Also, it's some of these ones for the SIEL PX that are giving me the issue:

    https://synthmagic.co.uk/free-stuff/

    It's usually fine, like they play fine, but I sometimes like looping and using the autoend function in SampleRobot, which is very efficient.

    I might have spoke too soon, only some of them loaded into SampleRobot, so I'll have to mess with Sox more. But they'll also get errors in Bjoern's stuff. It might be something to do with SampleRobot and how it does things (which, from what I understand, is actually Chicken Systems in terms of reading, writing, importing, exporting, etc . . . ).
     
  12. canbi

    canbi Kapellmeister

    Joined:
    Jun 12, 2023
    Messages:
    150
    Likes Received:
    51
    thats a lot of sylabes for converting :rofl:

    but yes, sox rocks
     
  13. SirGigantor

    SirGigantor Ultrasonic

    Joined:
    Oct 14, 2022
    Messages:
    126
    Likes Received:
    36
    All you need is this:

    for file in *.wav; do sox "$file" -b 16 --encoding signed-integer --endian little "16bit_$file"; done

    Probably any bitrate would work, I think specifying the encoding probably ensures that it's converted into a whole new file.

    I'm one of those people, where, if there's a problem, I just look into how to solve it en bulk and get it over with. It was work to find the solution, but it's solved forever, now . . .
     
  14. stopped

    stopped Platinum Record

    Joined:
    Mar 22, 2016
    Messages:
    585
    Likes Received:
    209
    soundforge batch converter should also do the job
     
  15. Deuterium

    Deuterium Kapellmeister

    Joined:
    Oct 15, 2021
    Messages:
    117
    Likes Received:
    44
    RX has a batch converter too
     
Loading...
Similar Threads - Bulk Removal Headers Forum Date
Adjust loudness and compression in bulk? Working with Sound Jun 2, 2023
Software to bulk convert mp4 to mp3 Mac / Hackintosh Apr 25, 2022
Bulk conversion of .fxp presets to .aupreset Mac / Hackintosh Mar 7, 2015
How to bulk dump? Instruments Dec 1, 2014
Question about methods used for sfx removal Mixing and Mastering Mar 9, 2024
Loading...