tibia/templates/vst3/tibia-index.js
Stefano D'Angelo 8f24eb7b8b parameter_unmap
2024-02-19 14:40:03 +01:00

52 lines
1.1 KiB
JavaScript

var path = require("path");
var sep = path.sep;
module.exports = function (data, api, outputCommon, outputData) {
if (outputData) {
data.tibia.vst3 = {
units: {
"bar": "bars",
"beat": "beats",
"bpm": "BPM",
"cent": "ct",
"cm": "cm",
"coef": "",
"db": "dB",
"degree": "deg",
"frame": "frames",
"hz": "Hz",
"inch": "\"",
"khz": "kHz",
"km": "km",
"m": "m",
"mhz": "MHz",
"midiNote": "MIDI note",
"mile": "mi",
"min": "mins",
"mm": "mm",
"ms": "ms",
"oct": "octaves",
"pc": "%",
"s": "s",
"semitone12TET": "semi"
}
};
var j = 0;
for (var i = 0; i < data.product.parameters.length; i++) {
var p = data.product.parameters[i]
p.paramIndex = i;
if (p.isLatency)
p.dataIndex = -1;
else {
p.dataIndex = j;
j++;
}
}
}
api.generateFileFromTemplateFile(`data${sep}Info.plist`, `data${sep}Info.plist`, data);
api.copyFile(`src${sep}vst3.c`, `src${sep}vst3.c`);
api.generateFileFromTemplateFile(`src${sep}data.h`, `src${sep}data.h`, data);
};