How does one further split WAVs with indexed CUE files?

Discussion in 'Software' started by MokuseiFolf13, Feb 10, 2025 at 11:35 PM.

  1. MokuseiFolf13

    MokuseiFolf13 Ultrasonic

    Joined:
    Dec 25, 2021
    Messages:
    133
    Likes Received:
    29
    Basically I got my hands on the Synclavier Sample Library (not physical copies, but CDDA from the internet archive), which thankfully include CUE files in order for me to divide the 700mb file down to 70-88 individual WAV tracks. Problem is, it's kind of a pain to further chop each sample down from every track-- and yes, I've used several tools to try to automate this process, namely WaveKnife among others.

    What gives me some amount of hope is that in the CUE file, there lies index data which pertains to the booklet scans provided. What I'm basically asking is if it's possible to further divide these tracks down to the sample using those very same time coordinates, avoiding the risk of having each of the samples getting cut off?

    Any and all help is greatly appreciated, and I look forward to your answers~!
     
  2.  
  3. clone

    clone Audiosexual

    Joined:
    Feb 5, 2021
    Messages:
    7,816
    Likes Received:
    3,442
    My first answer would normally be Waveknife too, but since you have already ruled that out; have you ever used Sound eXchange? aka SoX. https://sourceforge.net/projects/sox/ . I'm interested to see what solutions you find about this one.

    Probably still a pain. But it's often a good answer to these "what to do if not on a *nix based system?" audio puzzles you might use some utility like bchunk for, if you were. You still need to get the cuesheet/.bin ripped to wavs first, for use in SoX. Bchunk is so fast for this, like dd speeds.

    And then a GPT generated script
    Here’s a Windows batch script that extracts track start times from a CUE file and uses SoX to split the WAV file accordingly.

    Prerequisites:
    1. Download & Install SoX (Ensure sox.exe is in your system's PATH).
      • Download SoX for Windows
    2. Place the .cue and .wav file in the same folder.
    3. Run the script in the Command Prompt (cmd).
    Batch Script to Split WAV Using SoX (split_wav.bat)
    batch
    @echo off
    setlocal enabledelayedexpansion

    REM Set the input WAV and CUE file
    set WAVFILE=input.wav
    set CUEFILE=input.cue

    REM Check if the files exist
    if not exist "%WAVFILE%" echo WAV file not found! & exit /b
    if not exist "%CUEFILE%" echo CUE file not found! & exit /b

    REM Convert CUE timestamps (MM:SS:FF) to seconds
    set PREV_TIME=0
    set COUNT=1

    for /f "tokens=2,3,4 delims=:" %%A in ('findstr /R "INDEX 01" "%CUEFILE%"') do (
    set /a MM=%%A
    set /a SS=%%B
    set /a FF=%%C
    set /a SECONDS=MM*60+SS+FF/75

    if !COUNT! GTR 1 (
    set /a DURATION=SECONDS-PREV_TIME
    echo Splitting Track !COUNT!-1 at !PREV_TIME! for !DURATION! seconds...
    sox "%WAVFILE%" "Track_!COUNT!-1.wav" trim !PREV_TIME! !DURATION!
    )

    set PREV_TIME=!SECONDS!
    set /a COUNT+=1
    )

    REM Process last track
    echo Splitting last track at !PREV_TIME!...
    sox "%WAVFILE%" "Track_!COUNT!.wav" trim !PREV_TIME!

    echo Splitting complete!
    exit /b

    How It Works:
    1. Extracts track start times from the CUE file.
    2. Converts timestamps from MM:SS:FF format to seconds.
    3. Uses SoX to trim the WAV file into separate tracks.
    4. Saves output files as Track_01.wav, Track_02.wav, etc.
    How to Use:
    1. Place split_wav.bat in the same folder as input.wav and input.cue.
    2. Open Command Prompt (cmd) and navigate to the folder.
    3. Run:

      split_wav.bat

    4. The script will generate Track_01.wav, Track_02.wav, etc.
     
  4. skeltoid

    skeltoid Kapellmeister

    Joined:
    May 2, 2018
    Messages:
    80
    Likes Received:
    57
    It is easy with foobar.
     
  5. Olaf

    Olaf Platinum Record

    Joined:
    Jun 5, 2011
    Messages:
    579
    Likes Received:
    253
  6. bluerover

    bluerover Audiosexual

    Joined:
    May 3, 2013
    Messages:
    1,347
    Likes Received:
    1,193
    I use CoolUtils.Total.Audio.Converter. Bring the CUE file up in the GUI's browser, select the *.cue file, then click the format you want to rip it to - buttons located up at the top of the GUI (MP3, FLAC, WAV, OGG, you name it!) I'm always ripping TR24 ISO images to its individual FLAC files. It's that easy!
     
  7. Semarus

    Semarus Producer

    Joined:
    Mar 26, 2022
    Messages:
    257
    Likes Received:
    112
    Is he asking for a cue splitter or is he asking to not only split to individual files (the tracks), but also to automatically slice the individual samples from each of the individual files into their own files? It sounds like the latter.
     
  8. saccamano

    saccamano Audiosexual

    Joined:
    Mar 26, 2023
    Messages:
    1,398
    Likes Received:
    573
    Location:
    CBGB omfug
    I think you are correct. I don't know of any tool that does that automagically. Once you have the files out of the main .wav you'll need a sampler with an audio editor to trim and groom the samples themselves.
     
  9. clone

    clone Audiosexual

    Joined:
    Feb 5, 2021
    Messages:
    7,816
    Likes Received:
    3,442
    It's the latter, or he would not have mentioned Waveknife. It was the preferred tool for chopping up samples from wav files back in the sample cd era where everything was iso files.
     
  10. stopped

    stopped Platinum Record

    Joined:
    Mar 22, 2016
    Messages:
    653
    Likes Received:
    247
    presuming silence exists between the samples audacity should do it (or soundforge or cubase or or or)
     
  11. tracer

    tracer Member

    Joined:
    Oct 10, 2011
    Messages:
    92
    Likes Received:
    13
    Location:
    Cologne Germany
    I used in the past "EAC"(Exact Audio Copy) for such Jobs, and i remember it makes a excellent Job! Far as i know there was a solid cue-tool option for this ALSO outside from "RIP a Audio-CD and then work on the cues" (Cause processing Audio-CDs was the Mainjob, but not only) May give it a try if none of the ones you try now really is what you're looking for...
     
Loading...
Similar Threads - does further split Forum Date
What do other DAWs have that REAPER doesn't? (songwriting, composition, music production) DAW Jan 25, 2025
Does anyone know where this specific lead sound is from? Working with Sound Jan 20, 2025
what gear does mike shinoda use? Studio Jan 19, 2025
Why does music on Instagram sound better? Mixing and Mastering Jan 18, 2025
Does Live 12 support Intel Core Ultra 5? Live Jan 10, 2025
Loading...