I have a bunch of multisampled instruments (among them the NI Maschine library) on my harddrive that never really gets used, and turning all of them into fully mapped renoise instruments one-by-one would probably give me RSI.
I didn’t find an existing tool to do all this massconversion for me (and I sort-of wanted to do this myself), so this weekend I wrote a python tool that does just that. I’m posting it here in case someone else might find use for it.
Most of the samples in my collection are WAVs, which causes most instruments waste more disk space than necessary. So I threw together another tool that attempts to shrink an instrument by recompressing its samples (requires the flac encoder). My instrument collection shrunk by 55%, but your milage may vary. This tool will not work for all existing instruments (yet), but it should work for all instrument created with massconverter.
These tools are only tested on Windows, but they should work on any platform.
And a final note: there are probably bugs lurking about (it’s just a quick hack afterall), tell me if you find a show stopper.
Example usage doing both mass conversion and instrument shrinking (flags are explained in the readme below):
# harvester.py -c "D:\Samples\Maschine" "D:\Samples\Renoise\Converted" <locates samples in the first folder and put instruments second><br> <br> # xrnishrink.py -m "D:\Samples\Renoise\Converted" "D:\Samples\Renoise\Converted-and-shrunken"<br> <locates instruments in the first folder and puts shrunken ones second><br> <br> <br>``` <br> <br> readme.txt<br> ```<br><br> What is this?<br> -----------------<br> This is a python tool that converts organized note-annotated samples into note-mapped renoise<br> instruments.<br> <br> It can handle wav-files without any external dependencies (other than python), and flac support<br> can be added by installing the mutagen library: http://code.google.com/p/mutagen/<br> <br> Also included is a script that attempts to shrink the filesize of a renoise instrument by<br> recompressing the audiosamples within. This is mainly useful when you have converted a bunch of<br> wav-samples, and you dont want to open up each of them in renoise and re-saving.<br> This tool requires "flac" or "flac.exe" to be in the same directory, or in $PATH.<br> <br> <br> How do I use the converter?<br> ---------------------------<br> usage syntax: harvester.py [-h] [-m] [-c] sourcedir targetdir<br> <br> sourcedir: directory that will be scanned for instrument folders<br> targetdir: directory where the xrni instruments will be created<br> <br> -m: look for multiple instruments within the same folder<br> e.g<br> Instruments/Flute A C4.wav<br> Flute A F#4.wav<br> Flute B C4.wav<br> ...<br> Without this flag, each directory will be treated as a single instrument instrument<br> (and can have multiple samples mapped to the same key).<br> <br> -c: used when converting NI Maschine libraries<br> The flag tells harvester to skip some directories which speeds up the process,<br> and add some annotations to the instrument filenames.<br> <br> How do I use the instrument shrinker?<br> --------------------------------------<br> usage syntax: xrnishrink.py [-h] [-m] source target<br> <br> source: file to shrink, or directory to scan<br> target: target directory for shrunken instruments.<br> <br> -m: scan source directory and shrink all xrnis found.<br> <br> Additional notes:<br> ----------------<br> 1)<br> The instrument naming isnt always solid, and how good the names turn out will depend on how<br> you name your directories and samples.<br> <br> Assume running the converter on the following directory structure:<br> SourceDir/Violins/Rusty violin C4.wav<br> /Rusty violin G4.wav<br> ...<br> <br> The instrument will be named: Violins-Rusty violin.xrni<br> <br> The base note can be anywhere in the sample filename.<br> <br> 2)<br> The tool isnt very fault-tolerant when it comes to finding files, and it assumes that all samples<br> has a "Name"-tag with a filename that exists.<br> <br> Otherwise it will try to load a nonexisting file and crash.<br> <br>``` <br> <br> [b]Edit: [/b] updated zip-file and readme.</locates></locates>