You can achieve this using the FMOD Studio scripting API. I happen to have a script that iterates over event properties and writes them to a CSV file already, so here is an adaptation that writes multi instrument properties to a CSV.
Write CSV
function createFile() {
var outputPath = studio.project.filePath;
outputPath = outputPath.substr(0, outputPath.lastIndexOf("/") + 1) + "multisounds.csv";
var textFile = studio.system.getFile(outputPath);
if (!textFile.open(studio.system.openMode.WriteOnly)) {
alert("Failed to open file {0}\n\nCheck the file is not read-only.".format(outputPath));
console.error("Failed to open file {0}.".format(outputPath));
return null;
}
return textFile;
}
function writeHeader(textFile) {
textFile.writeText("eventName, startTime, duration, assetName");
textFile.writeText(",\n");
}
function writeLine(textFile, eventName, startTime, duration, assetName) {
textFile.writeText(eventName + ", ");
textFile.writeText(startTime + ", ");
textFile.writeText(duration + ", ");
textFile.writeText(assetName);
textFile.writeText(",\n");
}
function exportAllMultisoundsToCSV() {
var textFile = createFile();
writeHeader(textFile);
// 1. Get all events
var events = studio.project.model.Event.findInstances()
events.forEach(function (event) {
// 2. Get all multi instrument in an event
event.selectables.forEach(function (selectable) {
if (selectable.entity && selectable.entity == "MultiSound") {
// 3. Get all sounds in multi instrument
selectable.sounds.forEach(function (sound) {
// 4. Write to file event name and multi instrument properties
var eventName = event.name;
var startTime = selectable.start;
var duration = selectable.length;
var assetName = sound.audioFile.assetPath;
writeLine(textFile, eventName, startTime, duration, assetName);
});
}
});
});
textFile.close();
}
If you want to add any other properties to the CSV you can use the .dump() function to see available properties of event, selectable etc. Running event.dump()
inside the loop for example will give you:
.dump()
(ManagedObject:Event):
id: "{70e98c2f-ab13-4c5e-b0cc-4fe49b6e9b60}",
entity: "Event",
isValid: true,
relationships: (ManagedRelationshipMap:Event),
properties: (ManagedPropertyMap:Event),
isOfType: <function>,
isOfExactType: <function>,
note: undefined,
color: "Default",
name: "New Event",
isDefault: false,
outputFormat: 1,
uiMarkerTracksVisible: true,
uiMaxMarkerTracksVisible: 8,
folder: (ManagedObject:MasterEventFolder),
items: [],
selectables: [(ManagedObject:MultiSound)],
tags: [],
commandSounds: [],
profilerTrackers: [],
profilerGraphs: [],
uiLastParameterSelection: (ManagedObject:Timeline),
mixer: (ManagedObject:EventMixer),
masterTrack: (ManagedObject:MasterTrack),
mixerInput: (ManagedObject:MixerInput),
automatableProperties: (ManagedObject:EventAutomatableProperties),
markerTracks: [(ManagedObject:MarkerTrack)],
groupTracks: [],
returnTracks: [],
timeline: (ManagedObject:Timeline),
parameters: [],
userProperties: [],
references: [],
sandboxEmitters: [],
banks: [],
defaultEvent: null,
clonedEvents: [],
is3D: <function>,
isOneShot: <function>,
isPlaying: <function>,
isPaused: <function>,
isStopping: <function>,
isRecording: <function>,
play: <function>,
togglePause: <function>,
stopImmediate: <function>,
stopNonImmediate: <function>,
returnToStart: <function>,
keyOff: <function>,
toggleRecording: <function>,
getPath: <function>,
get3DAttributes: <function>,
set3DAttributes: <function>,
getCursorPosition: <function>,
setCursorPosition: <function>,
getPlayheadPosition: <function>,
getParameterPresets: <function>,
addGameParameter: <function>,
addGroupTrack: <function>,
addReturnTrack: <function>,
addMarkerTrack: <function>,
addTagToEvent: <function>,
getItem: <function>,
dump: <function>,
document: <function>,
And if you decided you wanted to add the guid for example you could change the writeHeader
and writeLine
functions to:
function writeHeader(textFile) {
textFile.writeText("id, eventName, startTime, duration, assetName");
textFile.writeText(",\n");
}
function writeLine(id, textFile, eventName, startTime, duration, assetName) {
textFile.writeText(id + ", ");
textFile.writeText(eventName + ", ");
textFile.writeText(startTime + ", ");
textFile.writeText(duration + ", ");
textFile.writeText(assetName);
textFile.writeText(",\n");
}
...
writeLine(event.id, textFile, eventName, startTime, duration, assetName);
...
Hopefully that’s enough to get you started.