For AIFF you likely have to use a different tool. I made the macro for MP4Box because you mentioned MP4Box in your OP.
FFmpeg is a pretty good command line tool for many A/V formats (except for ISO Media, where MP4Box excels).
So, either…
find out the FFmpeg syntax and rewrite the macro for it
or, if you are going store the files anyway as m4a/mp4, you could convert them before and then join them with the MP4Box macro (the joining itself is lossless, nothing gets transcoded)
Edit:
Here is the FFmpeg documentation to join files of the same codec.
However, FFmpeg looks like overkill here and it seems to be easier with sox. It works simply like that:
Thanks so much for sharing your work here! Personally I find it very exciting as it could vastly ease my management of a very large library. Alas, I'm no coder, don't know what to do with an "MP4Box: command not found." I tried to re-install via brew and got "gpac 1.0.1 is already installed and up-to-date." I followed your good instruction re paths but still get this same error. Could you help me out without too much trouble?
mp4box is /usr/local/bin/mp4box
mp4box is /Applications/GPAC.app/Contents/MacOS//mp4box
pamela@MBP ~ %
and, embarrassed as I am to say it, both items under variables (Parameter and varname) are empty. I have nothing like the populated list you have but then I'm not very far into KM yet.
Your patience really does make you a Tech Saint, Tom. Thank you so much.
If I can ask you one more basic and probably obvious question ; ) is it the case that we trigger the script by selecting our folder and pressing the shortcut? If so I'm unable to find any evidence of success on my Mac. What else am I missing?
Well I'm not smart enough to workout the other triggers, apart from adjusting the macro combination (the default triggered another app so I had to change it slightly). When I click "Try," I get no return as I did before we added the path. I select the files in finder, press the macro keys, then look and listen carefully but nothing occurs. Then I check for a new file anywhere on the computer and still nothing.
You should get a script output in a KM window, like this:
The joined file is written to the folder where the source files are.
But you definitively have to select the files, not the folder. As macro hotkey trigger you can use whatever you want. The Try or Run button in KM also works.
Hmm. Perhaps there's something off about my KM installation. I'll poke around for a day and see if I can figure it out. I'll report back tomorrow. Thanks again for everything!
Eureka! I clicked "Run" and finder had to ask for permission to use Downloads, where the files happened to be. Get your handy notifications and everything. You are a genius and a gentleman, Tom. Seriously, this is awesome.