Cacophony Forums

Unofficial Mackie User Forums => DL1608/DL806/DL32R/ProDX Mixers => Topic started by: ToH2002 on March 06, 2017, 12:56:59 AM

Title: Tool to prepare DL32R multichannel files for your DAW
Post by: ToH2002 on March 06, 2017, 12:56:59 AM
Hi there,

I've built a little tool (unfortunately Windows only) to make life with the DL32R's multichannel wave files a little easier. It uses SOX to de-multiplex and concatenate your multichannel wave files into individual mono and stereo wave files. You can download it here: http://www.liveprompter.com/downloads/other/AudioDemuxer.zip  (http://www.liveprompter.com/downloads/other/AudioDemuxer.zip)

DISCLAIMER: this is a simple utility I've knocked together for my own use - I'll distribute it here in the hope that it may save some of you a bit of work and make life a little easier. I give no guarantees and accept no responsibility should anything go wrong during installation or operation of this program.

To install it, you need to do the following:

Now, start up AudioDemuxer.exe and drag the first in a set of DL32R recording files (e.g. My Song_1.wav) into AudioDemuxer's central text box. Choose a demuxing profile from the choice box below and then click "Process". AudioDemuxer will now extract individual tracks from your recording and stitch them together afterwards - all ready for import in your DAW.

Now what's with the profiles?

In your AudioDemuxer directory, there is a folder named "Profiles" that contains some simple text files that tell AudioDemuxer which tracks to extract and how to name them. You can also tell AudioDemuxer to pull individual channels together into a stereo file - pretty handy when recording stereo instruments like a synth or piano.

The profile files simply contain one line per track that looks like <name>,<channel(s)>, e.g. "Piano,3 4". This means, the "Piano" track will be created as a stereo track, using channels 3 and 4 from the recording file. Hint: obviously, track names shouldn't contain commas - that would mess things up ;-)

I have included some profiles as examples, but you should build your own ones for your specific requirements - it's easy!

I've built the "profiles" capability into it because I regularly mix recordings of my band's practice sessions and gigs. Since we have a mix of mono and stereo instruments, preparing files for mixing was always a bit of a nuisance and required much fiddling with WaveAgent. With profiles, it now simply means that I created a profile once for my band's setup, and now I only drag files into AudioDemuxer and get all my files ready to drag them into my DAW. Since I've made the track names start with the track number, they are also sorted correctly so that I really only select all of them and drag them over.

Hope this will help some of you here!

BTW: sorry about the Mac and Linux crew; I only built this for Windows! But it is built using a multi-platform library (wxWidgets), so if anyone wants to have a go at building it for Mac or Linux, let me know!

Cheers,

Torsten
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on March 06, 2017, 02:43:39 AM
Holy crap, sounds awesome.

I will try to give it a shakedown cruise and let you know how it does tomorrow.

Thanks so much!
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on March 06, 2017, 04:42:31 PM

I've built a little tool (unfortunately Windows only) to make life with the DL32R's multichannel wave files a little easier. It uses SOX to de-multiplex and concatenate your multichannel wave files into individual mono and stereo wave files. You can download it here: http://www.cornerweb.de/downloads/AudioDemuxer.zip  (http://www.cornerweb.de/downloads/AudioDemuxer.zip)


Hey home boy....    This is the shiznit....    Created a profile for my band in 5 piece configuration and 7 piece....    It worked beautifully...

Suggestions for future frontend enhancements:

1. Allow some type of dynamic input in addition to the profiles... Like if someone clicks a checkbox to include information, it will prepend it before fore the filename, so someone like me who does a lot of recordings a week sometimes, will simply be able to click the "prepend filename" button and enter "2017-03-04" and that will be added in front of the tracks, allow me to easily search for the date in files and find everything (video, audio, text notes) that is related to that...

2. Add a way to combine the multiple multitrack wav files into one large multitrack wav for when I record a full show and someone wants it in multitrack wav for use in audacity or whatever they use.  Or save as .mogg?  dunno, just another option?   Maybe your profiles already support that.

3. Get Mackie to link this from their documentation or something - this is awesome.   

THANK YOU...

THANK YOU.....    *THANK YOU*

Did I say "thank you"????
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: ToH2002 on March 11, 2017, 07:52:50 PM
Hey John,

glad it works for you!

I like the idea of having a few options to modify filenames; although I'm not sure if I want to add anything to the interface - it's so nice and clean ;-). But how about having an option in the AudioDemuxer.ini:


Or would you want to choose a prefix every time you demux some files? Then I might simply add some radio boxes that allow to choose date, filename, or nothing.

Re: combining multiple multitracks to one large multi: that's super easy using SOX directly: sox.exe file_1.wav file_2.wav file_3.wav file_4.wav output_file.wav - not really necessary to build a front-end to do that...  But I'm not sure combining the files would be a good idea: once WAV files get too big, some programs may have problems with them, since officially, WAV files must not exceed 2 GB. Also, some filesystems like FAT32 can't deal with files larger than 2 GB. So I wouldn't really go there.

Re: posting this to Mackie's documentation: I'll post this again in a separate post and ask the moderator to make it sticky. Don't really want to go too official with this little homebrew tool...

Cheers,

Torsten
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on March 11, 2017, 10:01:25 PM

I like the idea of having a few options to modify filenames; although I'm not sure if I want to add anything to the interface - it's so nice and clean ;-). But how about having an option in the AudioDemuxer.ini:

  • Prepend={DATE}
  • Prepend={FILENAME}
  • Prepend=My Silly Prefix

Or would you want to choose a prefix every time you demux some files? Then I might simply add some radio boxes that allow to choose date, filename, or nothing.


I think the .ini route would be fine....   I'm sure I am not the only person out there who records their own band at every rehearsal and every gig, as well as doing it for other people.

If it would put the date, or let me put the band name, or show location, or something, at least it would make it easy to search for on my NAS with 2TB of sessions and growing.

Thanks again for all you are doing....    This has reduced my workflow steps, and given me a few minutes of my life back!
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: nedorama on March 16, 2017, 04:35:31 PM
John -

Pro Tools can import multi-channel WAV files, so I'm not sure why you didn't just spend the $50 to buy a new iLok and have Pro Tools back. For anyone who's paid already for Pro Tools, it's a much easier solution. Yes it's $50 for a new dongle, but then you have all of that functionality back. If I lost my iLok, I'd buy another one that day.
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on March 22, 2017, 04:15:25 PM
John -

Pro Tools can import multi-channel WAV files, so I'm not sure why you didn't just spend the $50 to buy a new iLok and have Pro Tools back. For anyone who's paid already for Pro Tools, it's a much easier solution. Yes it's $50 for a new dongle, but then you have all of that functionality back. If I lost my iLok, I'd buy another one that day.

I thought I responded to this already but I guess my iPad didn't submit it.. sigh....   

It's a little more complicated than just replacing the iLok... I purchased from an online vendor, not Sweetwater, Guitar Center or even Amazon, the outright purchased version, and it was gosh, 3-4 years ago now, so it was an older version.  I COULD have replaced the iLok if only I had registered the product, but I didn't, and by the time I lost the dongle, I had also lost any record of my purchase.  I don't remember the vendor, don't even have access to the credit cards I had back then, etc.

So I'm SOL...  It's either buy it again, or subscribe, etc.     I'm using other tools these days such as Audition, Studio One and even Audacity for simple edits.

Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: ToH2002 on May 22, 2017, 12:15:12 AM
Suggestions for future frontend enhancements:

1. Allow some type of dynamic input in addition to the profiles... Like if someone clicks a checkbox to include information, it will prepend it before fore the filename, so someone like me who does a lot of recordings a week sometimes, will simply be able to click the "prepend filename" button and enter "2017-03-04" and that will be added in front of the tracks, allow me to easily search for the date in files and find everything (video, audio, text notes) that is related to that...

Hey John,

I've finally found some time to address this - I've added some radio buttons to the GUI that allow you to select a prefix; "none", "date", "filename" or "custom", with a text box to enter a custom prefix. It's a quick and dirty solution, no filtering for illegal characters, so behave when choosing "custom".

Same download link as the first post - why don't you give it a whirl and let me know if it works for you?

Cheers,

Torsten
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on May 22, 2017, 01:36:12 AM
Sweet... had two shows over the weekend and screwed up one and forgot to stop the recording between sets, soooo 4 hours of recording in 22 tracks multitrack wav format that I have not even looked at yet....   

That'll be a good test =)

Thanks!
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on May 24, 2017, 04:54:29 AM
Worked perfectly appending my own date to the front (my date and time is off by MONTHS on the dl32r)

I appreciate this greatly!!!!!!!Q
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: Weogo on June 02, 2017, 04:39:26 PM
Hi Torsten,

Another Thanks!

The program is working nicely for me!

I have a backlog of files to work on and this will make it that bit easier...

Good health,  Weogo 
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: rhollinshead on June 22, 2017, 04:54:00 PM
I stumbled across this post and saw that it catered for Windows guys but not Mac/Unix guys... so thought I would drop in some code that may be useful for you guys that are currently not using Windows. It's not supported, it's just here as code that I use in processing my files that may be useful for others. Don't come bitching about how you don't like it etc... it's a freebie that was never meant for wider use.

Like ToH2002's solution, it's backbone is sox, so you will need that (download and install SOX (http://sox.sourceforge.net)). Make sure it's on your path!

Save the code as demuxer.sh and then ./demuxer.sh to run.

You'll need to put your files from the DL32R into the path as specified by INPUT_DIR. EXTRACT_DIR and OUTPUT_DIR is where the output from Sox goes... I tend to keep these the same and use the "solo" and "whole" in the file names to differentiate if needs be. I am guessing you guys all want to be working with the "whole".

Only gotcha - don't use an underscore (_) in the FILE_PREFIX (e.g. when setting a filename in the record section of the the Mackie DL32R, use a name that doesn't use an _ !)

Apart from that, you're good to go.

Let me know if it's any use to any of you. And remember you need plenty of disk space. Yes, I know there is no error checking and the like... but this was 5 minutes of code that was intended for my use only, not any commercial operation by any means!

If it's any use to any of you, a donation to the MS Society would make you an angel (https://donate.mssociety.org.uk/)

Code: [Select]
# QUICK DIRTY DEMUXER FOR MACKIE DL32R by Russ Hollinshead
INPUT_DIR=~/Desktop/russtemp
EXTRACT_DIR=~/Desktop/russtemp/out
OUTPUT_DIR=~/Desktop/russtemp/out
FILE_PREFIX=Festival

#find number of channels in filename
#the number directly before the .wav
echo "Getting the number of channels in the recording..."
MAX_TRACK_NUMBER=`soxi $INPUT_DIR/*.wav | grep Channels | cut -f2 -d: | sed "s/ //g" | tail -1`
echo "NOTIFICATION: Found $MAX_TRACK_NUMBER channels of audio in the multitracks recording."

echo "Finding the number of chunked files..."

MAX_CHUNK_NUMBER=0
LS_OUTPUT=`ls -1 $INPUT_DIR`

for f in $LS_OUTPUT; do
  CURRENT_CHUNK_NUMBER_FOUND=`echo $f | cut -f2 -d_ | cut -f1 -d.`
  echo $f | cut -f2 -d_ | cut -f1 -d.
  echo currently looking at chunk number ${CURRENT_CHUNK_NUMBER_FOUND}
  if [[ ${CURRENT_CHUNK_NUMBER_FOUND} -gt ${MAX_CHUNK_NUMBER} ]]; then
     MAX_CHUNK_NUMBER=${CURRENT_CHUNK_NUMBER_FOUND}
     echo MAX_CHUNK_NUMBER is ${CURRENT_CHUNK_NUMBER_FOUND}
  fi
done

echo FOUND ${MAX_CHUNK_NUMBER} multitrack files containing ${MAX_TRACK_NUMBER} channels of audio. Lets get seperating!

# EXTRACT THE INDIVIDUAL CHANNEL TRACKS
for (( CHUNK_NUMBER=1; CHUNK_NUMBER<=${MAX_CHUNK_NUMBER}; CHUNK_NUMBER++ )); do
   for (( CHANNEL=1; CHANNEL<=${MAX_TRACK_NUMBER}; CHANNEL++ )); do
      sox ${INPUT_DIR}/${FILE_PREFIX}_${CHUNK_NUMBER}.wav ${EXTRACT_DIR}/solo_${FILE_PREFIX}_${CHUNK_NUMBER}_${CHANNEL}.wav remix ${CHANNEL}
   done
done

# STITCH ALL THE INDIVIDUAL TRACKS
for (( CHANNEL=1; CHANNEL<=${MAX_TRACK_NUMBER}; CHANNEL++ )); do
   COMMAND_ARGS=""
   for (( CHUNK_NUMBER=1; CHUNK_NUMBER<=${MAX_CHUNK_NUMBER}; CHUNK_NUMBER++ )); do
      COMMAND_ARGS="${COMMAND_ARGS} ${EXTRACT_DIR}/solo_${FILE_PREFIX}_${CHUNK_NUMBER}_${CHANNEL}.wav"
      if [ $CHUNK_NUMBER = ${MAX_CHUNK_NUMBER} ]; then
        sox $COMMAND_ARGS $OUTPUT_DIR/whole-${FILE_PREFIX}_channel-${CHANNEL}.wav
        COMMAND_ARGS=""
      fi
   done
done
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on July 01, 2017, 03:08:30 PM
Noice....  I ditched my mac stuff in favor of more affordable and more powerful winders based solutions, but I do have several FreeBSD servers in my business, so I might put one of those to work using your script =)

Thanks rhollinshead... and believe me, people will bitch, even if it's free... no, especially if it's free. Hahahaha

Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on December 22, 2017, 04:30:05 AM
Man, AudioDemuxer has been working great until today...     Sigh, it opens, it's in the task bar, but the window never appears....

Reinstalled, no luck...     Reinstalled SOX

Let me know if you can think of anything that might be keeping it from opening the GUI.
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: JohnMHoyt on December 22, 2017, 04:38:28 AM
Nevermind.... It just was not showing the window until I hovered over it and hit MAXIMUM size, boom open....

Fixed now, it was user error =)
Thank God - I use this thing every week, sometimes multiple times.

Merry Christmas!
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: VoiceofDuum on March 18, 2019, 02:13:24 AM
Hi Torsten,

AudioDemuxer looks amazing! Thank you for writing it. But for some reason on my setup it's going what looks like one step too far. I created a profile that's the same as the default 16-track mono profile but left off Tracks 6-16 since I only need the first five. It patiently goes through as indicated:

New File: E:\Euphony concert\Euphony_3.wav
7 file(s) in set

Starting Demuxing
Euphony_1 (1)->Track 1_1
Euphony_1 (2)->Track 2_1
Euphony_1 (3)->Track 3_1
Euphony_1 (4)->Track 4_1
Euphony_1 (5)->Track 5_1
Euphony_2 (1)->Track 1_2
Euphony_2 (2)->Track 2_2
Euphony_2 (3)->Track 3_2
Euphony_2 (4)->Track 4_2
Euphony_2 (5)->Track 5_2
Euphony_3 (1)->Track 1_3
Euphony_3 (2)->Track 2_3
Euphony_3 (3)->Track 3_3
Euphony_3 (4)->Track 4_3
Euphony_3 (5)->Track 5_3
Euphony_4 (1)->Track 1_4
Euphony_4 (2)->Track 2_4
Euphony_4 (3)->Track 3_4
Euphony_4 (4)->Track 4_4
Euphony_4 (5)->Track 5_4
Euphony_5 (1)->Track 1_5
Euphony_5 (2)->Track 2_5
Euphony_5 (3)->Track 3_5
Euphony_5 (4)->Track 4_5
Euphony_5 (5)->Track 5_5
Euphony_6 (1)->Track 1_6
Euphony_6 (2)->Track 2_6
Euphony_6 (3)->Track 3_6
Euphony_6 (4)->Track 4_6
Euphony_6 (5)->Track 5_6
Euphony_7 (1)->Track 1_7
Euphony_7 (2)->Track 2_7
Euphony_7 (3)->Track 3_7
Euphony_7 (4)->Track 4_7
Euphony_7 (5)->Track 5_7

concatenate files:
Track 1.wav
Track 2.wav
Track 3.wav
Track 4.wav
Track 5.wav

Done!

And then it removes all the files it just created, and I'm right back where I started. I can watch it build and then delete the files in the source audio folder. Looked everywhere on the computer - files are gone.

AudioDemuxer does log error messages, saying some of the files couldn't be deleted but they were:

19:28:14: File 'E:\Euphony concert\Track 1_1.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:14: File 'E:\Euphony concert\Track 1_2.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:14: File 'E:\Euphony concert\Track 2_1.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:14: File 'E:\Euphony concert\Track 2_2.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:14: File 'E:\Euphony concert\Track 3_1.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:14: File 'E:\Euphony concert\Track 3_2.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:15: File 'E:\Euphony concert\Track 4_1.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:15: File 'E:\Euphony concert\Track 4_2.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:15: File 'E:\Euphony concert\Track 5_1.wav' couldn't be removed (error 0: the operation completed successfully.)
19:28:15: File 'E:\Euphony concert\Track 5_2.wav' couldn't be removed (error 0: the operation completed successfully.)


Can you figure out from this what I'm doing wrong? Thanks for any assistance. The original engineer recorded all 32 channels, and the prospect of going through seven 32-track WAVs to manually select and concatenate five tracks seems arduous.

(Win10 Home 64-bit, target DAW PT11 or Audacity)

Cheers ... Clayton
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: VoiceofDuum on March 25, 2019, 03:35:05 PM
While waiting for a moderator to approve my previous post, I figured out how to talk to Sox with a lengthy batch file to accomplish what I needed. Still would be nice to know why AudioDemuxer didn't want to do it, though, for future projects.
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: ToH2002 on April 23, 2019, 10:09:10 PM
Hey Clayton,

sorry for only noticing your post right now - could you somehow share your profile file and the .wav recording files (cloud storage, dropbox link etc)? I'd like to have a look at what's happening here...

Cheers,

Torsten
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: ToH2002 on March 04, 2020, 08:47:15 PM
Hi all,

quick update - unfortunately, a server re-organization shot the original links - I've updated the URLs now in the first post; these should work!

Cheers,

Torsten
Title: Re: Tool to prepare DL32R multichannel files for your DAW
Post by: deixismou on March 30, 2020, 08:41:19 PM
Hey everyone,

Had I noticed this thread, I probably wouldn't have written my own script. But, for what it's worth, here's my own attempt at a solution for Linux / Unix / MacOS users. Like rhollinshead, I opted for a bash script wrapped around sox, but added some useful features to change the output based on my various needs.

https://gitlab.com/deixismou/utility-scripts/-/blob/master/bin/mackie-batch

It has the following features:

1. output to single multi-channel file OR split into multiple files for each channel
2. can optionally identify and prune empty channels from your output (no more USB routing on the DL32R before the gig!! just record all 32 channels and be done with it).
3. You can manually set the ratio threshold for pruning empty tracks (if say your tracks are fairly quiet).
4. You can choose your output directory, but the default works
5. The tracks are automatically named according to your session folder name
6. It has reasonably good error handling, so it shouldn't mangle anything (although it will probably break your toaster,  sleep with your wife and shave your cat... no warranties)  8)

Here are some usage examples:

Code: [Select]
# To see all options and help text, use the -h flag
$ mackie-batch -h

# In the same directory as your .wav files
# By default (no arguments), you get one .w64 file for each channel in a directory called SESSION_FILES
$ mackie-batch

# From some other directory
# Output is the same as above
$ mackie-batch path/to/your/files

# To prune empty channels, use the -p flag
$ mackie-batch -p

# To output to a single multi-channel .w64 file, use the -m flag
$ mackie-batch -p -m

If you find it useful, great. Feel free to hit me up on gitlab.com if you find a bug or have any improvements you want to contribute.