# How do i change autopitch modulator value using script

**URL:** https://qa.fmod.com/t/how-do-i-change-autopitch-modulator-value-using-script/19670
**Category:** FMOD Studio
**Created:** [December 21, 2022, 1:06pm UTC](https://qa.fmod.com/t/how-do-i-change-autopitch-modulator-value-using-script/19670 "2022-12-21T13:06:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![maulikkaloliya](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@maulikkaloliya](https://qa.fmod.com/u/maulikkaloliya)
#### Post date: [December 21, 2022, 1:06pm UTC](https://qa.fmod.com/t/how-do-i-change-autopitch-modulator-value-using-script/19670/1 "2022-12-21T13:06:06Z")

</div>

Hello i have successfully added “AutopitchModulator” on sound using

```auto
var sound = track[0].addSound(event.parameters[0], "SingleSound", 0, 1000);
var autopitchModulator = sound.addModulator("AutopitchModulator", "pitch");

```

Now I wanted to change value of **Root Pitch** and **Min Pitch** value using script, i can’t able to find any ways to add this.

Can you please help on this.

---

<div class="post-metadata">

### Author: ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)
#### Post date: [December 22, 2022, 4:56am UTC](https://qa.fmod.com/t/how-do-i-change-autopitch-modulator-value-using-script/19670/2 "2022-12-22T04:56:01Z")

</div>

Hi,

To change those values its:

```auto
autopitchModulator.root = X;
autiopitchModulator.pitchAtMinimum = Y;

```

To see what functions and variables are attached to a `ManagedObject` like the `AutopitchModulator` use the `.dump()` function. It will display all the useful information e.g.

```auto
autiopitchModulator.dump();
(ManagedObject:AutopitchModulator):
id: "{66e30e67-3a8f-44df-b634-c07ebaff20ab}",
entity: "AutopitchModulator",
isValid: true,
relationships: (ManagedRelationshipMap:AutopitchModulator),
properties: (ManagedPropertyMap:AutopitchModulator),
isOfType: <function>,
isOfExactType: <function>,
uiModulationDrawerVisible: undefined,
uiTriggerBehaviorDrawerVisible: undefined,
nameOfPropertyBeingModulated: "pitch",
root: 0,
pitchAtMinimum: 0,
automators: [],
modulators: [],
snapshotProperties: [],
customBindings: null,
objectBeingModulated: (ManagedObject:SingleSound),
addAutomator: <function>,
addModulator: <function>,
dump: <function>,
document: <function>,

```

Hope this helps!

---

<div class="post-metadata">

### Author: ![maulikkaloliya](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@maulikkaloliya](https://qa.fmod.com/u/maulikkaloliya)
#### Post date: [December 22, 2022, 6:14am UTC](https://qa.fmod.com/t/how-do-i-change-autopitch-modulator-value-using-script/19670/3 "2022-12-22T06:14:38Z")

</div>

Thanks, and dump() function helps a lot.
