It would be really handy for testing some different possibilities, without having to remove the instrument or mute the entire track (which by the way doesn’t work for non audio instruments). The instrument should then be grayed out, translucide, or something similar, for visual feedback.
I’m used to the shift+m shortcut of my DAW to toggle the activation/deactivation of a separate clip and I’m missing this feature in FMOD.
EDIT: deactivate entire sheets could also by handy (at least instruments contained in it)
You can use scripting to detect if you have an instrument selected, and then use a keyboard shortcut to toggle the volume of the instrument between -oodB (muted) and 0dB. You can also change the colour of the instrument to indicate whether the instrument is muted or not.
Use isEnabled
to check for if studio.window.editorCurrent().entity
returns an instrument.
https://www.fmod.com/resources/documentation-studio?version=2.1&page=scripting-api-reference-menu.html
Thanks for the idea! I did something slightly better, by storing the original volume and color in the instrument name (I never rename instruments!), so that I can retrieve it at the next toogle by parsing the name string. Does another idea come to mind for storing those data? I also extended it to snapshots intensity.
So here’s my first FMOD script:
var entity = {};
studio.menu.addMenuItem({
name: "Instrument Deactivation Toggle",
keySequence: "Shift+M",
// Enables the script if the selected object is one of those instruments
isEnabled: function () {
entity = studio.window.editorCurrent().entity;
return (["SingleSound", "SoundScatterer", "MultiSound", "EventSound", "SnapshotModule"].indexOf(entity) > -1);
},
execute: function () {
var instrument = studio.window.editorCurrent();
var volume = instrument.volume;
var intensity = instrument.intensity;
var name = instrument.name;
var color = instrument.color;
if (volume == -80 || intensity == 0) {
// retrieve stored data in the instrument name
// exit the script if the volume was manually set to -inf
try { var data = name.split(" "); }
catch (e) { return; }
instrument.name = null;
if (entity == "SnapshotModule")
instrument.intensity = data[0];
else
instrument.volume = data[0];
instrument.color = data[1];
}
else {
instrument.color = "Black";
if (entity == "SnapshotModule") {
// stores data in the instrument name
instrument.name = intensity + " " + color;
instrument.intensity = 0;
}
else {
// stores data in the instrument name
instrument.name = volume + " " + color;
instrument.volume = -80;
}
};
}
});