@Paalo I think it’s possible! Note that I’m a self taught when it comes to programming, so make sure to test this 
I would first export a .json file from FMOD Studio with the selected FMOD Events in the hierarchy:
studio.menu.addMenuItem({
name: "Unity\\ExportEventsVoiceJson",
isEnabled: function() {
var events = studio.window.browserSelection();
return events
},
execute: function() {
var events = studio.window.browserSelection();
var eventsObj = [];
var event = {};
for (x = 0; x < events.length; x++) {
var newEvent = events[x].getPath();
var newVoices = events[x].automatableProperties.maxVoices
eventsObj.push({
'path': newEvent,
'value': newVoices
})
}
event.eventsObj = event;
var str = JSON.stringify(eventsObj, null, 2);
var fileName = studio.system.getText("File Name", "NewFile");
var projectPath = studio.project.filePath;
projectPath = projectPath.substr(0, projectPath.lastIndexOf("/"));
var filePath = projectPath + "/" + fileName + ".json";
var file = studio.system.getFile(filePath);
file.open(studio.system.openMode.WriteOnly);
file.writeText(str);
file.close();
}});
This will create a new .json file in the root directory of your FMOD project. It will look like this for example:
[
{
"path": "event:/2_Playing FMOD Events/2D Event",
"value": 1
},
{
"path": "event:/2_Playing FMOD Events/3D Event",
"value": 2
},
{
"path": "event:/2_Playing FMOD Events/Loop",
"value": 3
}
]
Now manually change the values in the .json file to your desired max voices for each event.
This script will read the .json file, apply the voices values you specified in the .json file, build the banks for your desired platform and revert the values back to the original state. Just enter the platform and the file name of the .json file created earlier.
studio.menu.addMenuItem({
name: "Unity\\CustomMaxVoicesJSON",
isEnabled: function() {
return 1;
},
execute: function() {
var oldVoiceNumber = [];
var platform = studio.system.getText("Enter the Platform", "Switch");
var fileName = studio.system.getText("File Name", "NewFile");
var projectPath = studio.project.filePath;
projectPath = projectPath.substr(0, projectPath.lastIndexOf("/"));
var filePath = projectPath + "/" + fileName + ".json";
var file = studio.system.getFile(filePath);
file.open(studio.system.openMode.ReadOnly);
var fileSize = file.size();
var events = JSON.parse(file.readText(fileSize));
for (x = 0; x < events.length; x++) {
var event = studio.project.lookup(events[x].path);
var value = events[x].value;
oldVoiceNumber[x] = event.automatableProperties.maxVoices;
event.automatableProperties.maxVoices = value;
}
studio.project.build({
platforms: platform
});
for (x = 0; x < events.length; x++) {
var event = studio.project.lookup(events[x].path);
event.automatableProperties.maxVoices = oldVoiceNumber[x];
}
}});
I guess you can skip the first script if you manually create the .json file, but you know, it’s fun to also automate that the very first time.