tibia/templates/vst3/tibia-index.js

52 lines
1.1 KiB
JavaScript
Raw Normal View History

2023-12-11 17:54:54 +00:00
var path = require("path");
var sep = path.sep;
2024-02-01 08:15:00 +00:00
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"
}
};
2024-01-10 12:14:46 +00:00
2024-02-19 13:40:03 +00:00
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++;
}
}
2024-02-01 08:15:00 +00:00
}
2024-01-10 12:14:46 +00:00
2023-12-11 17:54:54 +00:00
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);
};