Hi! I’m wondering if there’s a way to create loop regions, transitions, and transition regions using FMOD Studio’s scripting API?
I’m able to successfully create a marker track by using Event.addMarkerTrack() and then calling MarkerTrack.addNamedMarker(), but so far I haven’t found a way to add loop or transition regions. Is this functionality available / am I missing something in the Scripting API Reference?
Once you have the event in a variable you can add different markers and regions through the markerTracks array. The following is for version 2.00.06 and older.
var event = studio.window.browserCurrent(); // Grab the currently selected event in the browser
var markerTrack = event.markerTracks[0]; // Grab the first marker track
var namedMarker = markerTrack.addNamedMarker("Start", 0); // Creates a named marker called 'Start' at the beginning (0 second) position of the timeline
var region = markerTrack.addRegion(5, 10, project.regionLoopMode.Looping); // Creates a loop region at the 5 second position that is 10 seconds long
var transitionMarker = markerTrack.addTransitionMarker (5, "Start"); // Creates a named marker called 'Start' at the beginning (0 second) position of the timeline