# Python connect to Fmod project

**URL:** <https://qa.fmod.com/t/python-connect-to-fmod-project/20997>\
**Category:** FMOD Studio\
**Created:** [December 15, 2023, 8:31am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997 "2023-12-15T08:31:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenken0615](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@Kenken0615](https://qa.fmod.com/u/Kenken0615)\
**Post date:** [December 15, 2023, 8:31am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/1 "2023-12-15T08:31:49Z")

</div>

I wanna find a way to control FMOD project from python. For example, i develop a python app, it will has ability to command Fmod Studio to build banks, or make events for users.  
Because we have group of people need to use fmod project but not all people have fmod studio app.

In addition, Is it possibile to live updates assets from daw without opening fmod studio?

I found that it is possibile to connect FMOD studio by port 3663, but i dont’t know how could Fmod studio respond the connection. Could you please give me an example that if fmod studio can print “HelloWorld” in console window when clients establish connection to fmod studio. And i want to know how fmod studio can continue listening to the connection.

Thank you so much

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 18, 2023, 12:46am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/2 "2023-12-18T00:46:40Z")

</div>

As mentioned in the [Terminal Interface](https://www.fmod.com/docs/2.02/studio/scripting-terminal-reference.html#terminal-interface) section of the Studio Scripting Reference, you can send data to Studio via TCP/IP over port 3663, which will be interpreted as Javascript encoded in UTF8. This will give you access to all the normal console commands - a “Hello World” command should be as simple as sending `console.log("Hello World")`.

> [@Kenken0615](#):
>
> In addition, Is it possibile to live updates assets from daw without opening fmod studio?

If you render or modify assets in your assets directory, FMOD Studio should automatically detect changes and update accordingly, though some files may need to be refreshed/imported. Additionally, we have a [Reaper integration](https://www.fmod.com/docs/2.02/studio/appendix-b-reaper-integration.html), which will allow you to link your Reaper project and its renders to your FMOD Studio project, and export Reaper timelines to events.

---

<div class="post-metadata">

**Author:** ![Kenken0615](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@Kenken0615](https://qa.fmod.com/u/Kenken0615)\
**Post date:** [December 18, 2023, 3:22am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/3 "2023-12-18T03:22:11Z")

</div>

I understand, thank you very much!  
By the way, may i ask that how FMOD studio can give a respond to the client. For example, a client ask for an event name of GUID, fmod will give a respond to this client.

What’s more, when ‘Live Update’ is enabled in FMod, can FMod request Unity to release and reload the currently playing resources, allowing me to make real-time changes to this resource in other DAWs?

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 19, 2023, 12:35am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/4 "2023-12-19T00:35:06Z")

</div>

> [@Kenken0615](#):
>
> By the way, may i ask that how FMOD studio can give a respond to the client. For example, a client ask for an event name of GUID, fmod will give a respond to this client.

This may depend on what Python functionality you’re using to connect and send commands via TCP/IP. For example, using Packet Sender, I am able to view the output of the console after sending commands to Studio. While I assume it is possible, I’m unsure it’s possible to view the console output with the Python functionality you’re using.

As for executing specific commands, if there is no existing single command in the API, you will need to handle it as a combination of more complex commands yourself. For example, you can use [`studio.project.lookup()`](https://www.fmod.com/docs/2.02/studio/scripting-api-reference-project.html#projectlookup) to look up a ManagedObject using a path or GUID, but you will need to retrieve the information you want from the ManagedObject yourself. You can send these commands together:

```JS
var myGUID = "{your-event-guid-here}"
var object = studio.project.lookup(myGUID);
console.log(object.name);

```

> [@Kenken0615](#):
>
> What’s more, when ‘Live Update’ is enabled in FMod, can FMod request Unity to release and reload the currently playing resources, allowing me to make real-time changes to this resource in other DAWs?

If you’re connected to a game using Live Update, and make changes to the project in FMOD Studio, the changes will automatically be sent to the running game. This should include changes made to assets.

---

<div class="post-metadata">

**Author:** ![Kenken0615](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@Kenken0615](https://qa.fmod.com/u/Kenken0615)\
**Post date:** [December 19, 2023, 4:02am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/5 "2023-12-19T04:02:46Z")

</div>

> [@Leah\_FMOD](#):
>
> This may depend on what Python functionality you’re using to connect and send commands via TCP/IP. For example, using Packet Sender, I am able to view the output of the console after sending commands to Studio. While I assume it is possible, I’m unsure it’s possible to view the console output with the Python functionality you’re using.

If FMOD doesn’t send any information outward, we won’t see any output in the Python client. What i want to ask is that if FMOD Studio can send messages externally through JavaScript. It seems there isn’t a method for that currently; while external control of FMOD Studio via TCP/IP is possible, FMOD Studio doesn’t seem to respond outwardly. I think exploring Wwise’s WAAPI might be beneficial. It’s very useful for programmers to create auxiliary tools as it allows other clients to interact with Wwise, and Wwise will return the required information to the client. This wouldn’t be difficult for you as there are already methods to control FMOD Studio using TCP/IP to execute JavaScript-related code. You’d just need to add some APIs that FMOD can use to transmit information externally

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [December 20, 2023, 12:49am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/6 "2023-12-20T00:49:14Z")

</div>

> [@Kenken0615](#):
>
> If FMOD doesn’t send any information outward, we won’t see any output in the Python client. What i want to ask is that if FMOD Studio can send messages externally through JavaScript.

Apologies if I was unclear: yes, you should be able to read console output in your Python client by reading from the socket FMOD Studio is using. You can see an example of this (in C#) used in our Unity integration in [`EditorUtils.GetScriptOutput()`](https://github.com/fmod/fmod-for-unity/blob/2.02/Assets/Plugins/FMOD/src/Editor/EditorUtils.cs#L943), where we use NetworkStream to send commands to and read the output from FMOD Studio via 127.0.01:3663.

---

<div class="post-metadata">

**Author:** ![Kenken0615](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@Kenken0615](https://qa.fmod.com/u/Kenken0615)\
**Post date:** [December 20, 2023, 6:59am UTC](https://qa.fmod.com/t/python-connect-to-fmod-project/20997/7 "2023-12-20T06:59:27Z")

</div>

Thanks a lot, i got you!
