# Anyone using a Stream Deck with FMOD Studio/scripting api?

**URL:** <https://qa.fmod.com/t/anyone-using-a-stream-deck-with-fmod-studio-scripting-api/21618>\
**Category:** FMOD Studio\
**Created:** [May 13, 2024, 3:35pm UTC](https://qa.fmod.com/t/anyone-using-a-stream-deck-with-fmod-studio-scripting-api/21618 "2024-05-13T15:35:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EdGray](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@EdGray](https://qa.fmod.com/u/EdGray)\
**Post date:** [May 13, 2024, 3:35pm UTC](https://qa.fmod.com/t/anyone-using-a-stream-deck-with-fmod-studio-scripting-api/21618/1 "2024-05-13T15:35:43Z")

</div>

As the title suggests, I want to integrate my Stream Deck into FMOD to hopefully speed up repetitive tasks. I was wondering if anyone else has tried this?

My instinct is to create custom keyboard shortcuts using the scripting api and then send those key commands from the Stream Deck.

In terms of the scripting api am I right in thinking that anything you can do from a right-click menu in FMOD can be done via scripting as well? And following on from that is it possible to reference where the mouse pointer currently is in a script?

For example say I right click in between 2 effects and add a gain plugin - can I recreate that behaviour via a script?

---

<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:** [May 16, 2024, 5:58am UTC](https://qa.fmod.com/t/anyone-using-a-stream-deck-with-fmod-studio-scripting-api/21618/2 "2024-05-16T05:58:52Z")

</div>

What you want is entirely possible using the Scripting API, yes. You can add a script to the “Scripts” menu in Studio with [`menu.addMenuItem(description)`](https://www.fmod.com/docs/2.02/studio/scripting-api-reference-menu.html#menuaddmenuitemdescription), which will also allow you to specify a sequence of keys that triggers the function assigned to the `execute` argument.

While actions that are listed under right click aren’t _directly_ trigger-able via the API, their functionality can definitely be accomplished using the API. The position of the mouse cursor cannot be retrieved, but the currently selected entity or entities in the browser, deck, or editor can be retrieved using functions from [`Studio.Window`](https://www.fmod.com/docs/2.02/studio/scripting-api-reference-window.html).

> [@EdGray](#):
>
> For example say I right click in between 2 effects and add a gain plugin - can I recreate that behaviour via a script?

A simple example of this that adds a Gain effect to the master track of the selected event would be:

```js
var event = studio.window.browserCurrent();
var newEffect = studio.project.create("GainEffect");
newEffect.owner = event.masterTrack.mixerGroup.effectChain;

```

You can then trigger those functions, or a function containing those functions, from the `execute` parameter of the previously mentioned `addMenuItem()`.

For more information, I would recommend taking a look at our [Scripting Terminal reference](https://www.fmod.com/docs/2.02/studio/scripting-terminal-reference.html) for some basic examples of scripting functionality, and at the existing scripts included in the `./Scripts` directory of your FMOD Studio install.

---

<div class="post-metadata">

**Author:** ![EdGray](https://avatars.discourse-cdn.com/v4/letter/e/bbe5ce/32.png) [@EdGray](https://qa.fmod.com/u/EdGray)\
**Post date:** [May 16, 2024, 9:41am UTC](https://qa.fmod.com/t/anyone-using-a-stream-deck-with-fmod-studio-scripting-api/21618/3 "2024-05-16T09:41:23Z")

</div>

Amazing stuff Leah thanks so much! That’s more than enough for me to get started with a Stream Deck integration.
