# set parameter value from command line

**URL:** <https://qa.fmod.com/t/set-parameter-value-from-command-line/13937>\
**Category:** FMOD Studio\
**Created:** [June 11, 2018, 8:25pm UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937 "2018-06-11T20:25:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qusax](https://avatars.discourse-cdn.com/v4/letter/q/edb3f5/32.png) [@qusax](https://qa.fmod.com/u/qusax)\
**Post date:** [June 11, 2018, 8:25pm UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937/1 "2018-06-11T20:25:14Z")

</div>

Hi,

Trying for days now to set a parameter in fmod studio on osx from the command line  
Is this possible?  
If so… how??

I want to use it for an escaperoom game ( so real life ) setup with external inputs to trigger events/parameters. Or is there a better way to do thid kind of things?

Thanks!

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [June 13, 2018, 5:24am UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937/2 "2018-06-13T05:24:52Z")

</div>

Hi Rogier,

You can only set parameter values through the application running FMOD. You would need to create an external script that sends commands to the application running FMOD when it receives these inputs from the room.

It is hard to recommend a better way as we’re not sure what your current setup is like.

It would likely be easier to just have the external inputs talk directly to the application running FMOD.

Thanks,  
Richard

---

<div class="post-metadata">

**Author:** ![Janussaire](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janussaire](https://qa.fmod.com/u/Janussaire)\
**Post date:** [February 2, 2022, 9:15am UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937/3 "2022-02-02T09:15:25Z")

</div>

> [@richard\_simms](#):
>
> You can only set parameter values through the application running FMOD. You would need to create an external script that sends commands to the application running FMOD when it receives these inputs from the room.
> 
> It is hard to recommend a better way as we’re not sure what your current setup is like.
> 
> It would likely be easier to just have the external inputs talk directly to the application running FMOD.

Hello,  
Is it still impossible with Fmod Studio version 2.02 to set a parameter value from the console ?  
I can set the master bus of the mixer like this (Thanks to Alessandro Famà):

var masterBus = studio.project.workspace.mixer.masterBus;  
masterBus.volume = -2;

And I can send “masterBus.volume = -2;” from TCP/IP, after creating “var masterBus” in Fmod Studio console, to change the vlaue.

Is there a way to do it for a parameter?

Thanks for tour answers!

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [February 2, 2022, 1:10pm UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937/4 "2022-02-02T13:10:26Z")

</div>

ah you mean by using the scripting api?  
You can do it like this as far as I know (example):

```auto
var event = studio.project.lookup("event:/Music/Level 03"); // get your ManagedObject:Event
var parameters = event.getParameterPresets(); // get an array of ManagedObject:GameParameter's
event.setCursorPosition(parameters[0], 1.0); // set the value of the GameParameter, could also be a Timeline

```

---

<div class="post-metadata">

**Author:** ![Janussaire](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@Janussaire](https://qa.fmod.com/u/Janussaire)\
**Post date:** [February 4, 2022, 8:52am UTC](https://qa.fmod.com/t/set-parameter-value-from-command-line/13937/5 "2022-02-04T08:52:12Z")

</div>

Thanks for your help, it works 🙂
