FMOD & Reaper timeline sync - trigger events without game engine

Hey all

This question is inspired by Thomas Fritz work on Wwisper which allows events to be triggered in the middleware to video in Reaper.

For me FMOD has a few distinct advantages in eduction and it would be very useful to allow the students to work on sound and music design projects that did not include coding and a game engine, especially at introductory levels e.g., first year degree or level 3 (FE).

I realise that full integration is complicated but even event triggering from Reaper would be useful, essentially using FMOD as a sample player as, to an extent, parameters could be simulated in the DAW or controlled by Command instruments. However, before I go down the route I thought it’d be worth to check the feasibility of such a project as time is always a factor and my coding skills are rudimentary at best.

Alternatively is there a way of syncing video to the Sandbox?

Thanks
J

1 Like

That would be pretty cool, and I can see why it would be useful.
I got this working in a very basic way by creating an eel script that sends a command to the FMOD Studio scripting system over TCP. Here are the steps if you would like to try yourself:

  1. Download and install SWS https://www.sws-extension.org/
  2. In Reaper, hit ‘?’ to open the action list
  3. Select “New Action → Load ReaScript
  4. Save this text to a new file called “fmod-play-event.eel
    current_project = EnumProjects(-1, project_full_path);
    marker_count = CountProjectMarkers(current_project, num_markers, num_regions);
    play_pos = GetPlayPosition();
    GetLastMarkerAndCurRegion(current_project, play_pos, marker_index, region_index);
    EnumProjectMarkers(marker_index, isregn, pos, rgnend, #region_name, marker_id);
    
    // Get event guid from marker name
    strcpy_substr(#guid, #region_name,2,38);
    
    // Create play event command
    msg = strcpy(#, "studio.project.lookup('");
    strcat(msg,#guid);
    strcat(msg,"').play();");
    
    // Send packet to FMOD Studio
    port = 3663;
    ip_address = "127.0.0.1";
    tcp_connection = tcp_connect(ip_address,port);
    tcp_connection > 0 ? (
      success = tcp_send(tcp_connection, msg);
      tcp_close(tcp_connection);
    ) :
    ShowConsoleMsg("No Connection");
    
  5. Find the newly loaded script by searching for “fmod-play-event
  6. Right click on it and select “Copy selected action command ID”. Paste that somewhere for use in step 8
  7. Create a marker in your project
  8. Rename it with the following syntax:
    ! {fmod event guid} {command ID}
    
    The guid should be a guid to an FMOD event, which you can get by right clicking on
    an event in FMOD Studio and selecting
    “Copy GUID”. An example marker name would be:
    ! {1f687138-e06c-40f5-9bac-57f84bbcedd3} _RSe375bd84ebc2cb196a79bf42d6bf5bf921039b66
    

With that setup, when the playhead passes over the marker, it should start playing the event in FMOD Studio.

Not ideal having to use GUIDs and a long command ID in a marker name- but that’s probably sufficient to get you started with your own scripts. I will write up a task for the Dev team to potentially investigate support for this in the future.

We also have an existing feature request to add some kind of sequencing support to the Sandbox- I have registered your intertest in that task as well.

1 Like

Jeff you absolute superstar!!
I’m going to try and get around to testing this out as soon as possible but this looks like it might meet my needs at least as a very helpful starting point.

Best

J

Thank you Jeff !! It works on my side but it is still very limited. I can trigger an event from Reaper but the event has to be selected in Fmod. It is complicated to access several events (I use multiple event browser tabs).
Is there another way to make it work with several events ?

Once again, thank you and I hope this work can be pushed forward.

Would love to see something like Wwispee for FMOD, especially using automation for controlling parameters!

1 Like

You could try modifying the script to navigate to the event in a new tab before playing it. Try replacing the msg and strcat lines in the original script with something like this:

msg = strcpy(#, "var ev = studio.project.lookup('");

strcat(msg,#guid);
strcat(msg,"'); if(ev.isPlaying()) { studio.window.triggerAction(studio.window.actions.NewTab); } studio.window.navigateTo(ev); ev.play();");

That could mean lots of browser tabs opening though. You can experiment with the Scripting API to make more complex behaviors yourself.