How to generate a Reaktor ‘Multi Text’ module from Javascript data

I needed a way of programmatically adding large amounts of data to reaktor patches. Searching provided Martin Wood-Mitrovski’s GitHub page and he had already done the hard work for me. Thankyou Martin ;)

His script generates reactor primary macro files with a Multi Text module inside, populated with strings from a text file. Simply whack the text file in same directory and change the inputFile variable.

there’s a bit at the beginning of the code that says:

var fs = require("fs");

var args = process.argv;

inputFile = "strings.txt";
outputFile = "multiTextMacro.mdl";
if(args.length == 2) {
 console.log('Using default filenames');
}
else if(args.length == 3) {
 inputFile = args[2];
} else if(args.length > 3) {
 inputFile = args[2];
 outputFile = args[3];
}

change the inputFile = “strings.txt”;  to point to your file and you’re good to run it from node.