# How do I Set Panning for a bus in code?

**URL:** <https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032>\
**Category:** FMOD Studio\
**Created:** [August 28, 2015, 3:12pm UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032 "2015-08-28T15:12:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jscott](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jscott](https://qa.fmod.com/u/jscott)\
**Post date:** [August 28, 2015, 3:12pm UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032/1 "2015-08-28T15:12:12Z")

</div>

I’m using a bus to set certain sounds to only play in either left or right speakers of my stereo setup.

I can easily adjust the panning in FMOD Studio, but I’d like to be able to set this in code as well.  
I would expect to find a Bus::setPan function, but none exists.

I’m willing to consider alternative ways of sending my sounds to a single L/R channel.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [August 30, 2015, 1:43am UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032/2 "2015-08-30T01:43:01Z")

</div>

The key way to do this is through automation. You could possibly use sends from events, if you want to send to a certain bus, and control the level with automation?  
Automation exposes the control to the programmer so that they can alter the behavior the sound designer has created.

---

<div class="post-metadata">

**Author:** ![jscott](https://avatars.discourse-cdn.com/v4/letter/j/48db29/32.png) [@jscott](https://qa.fmod.com/u/jscott)\
**Post date:** [August 31, 2015, 2:45pm UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032/3 "2015-08-31T14:45:14Z")

</div>

> [@](#):
>
> The key way to do this is through automation. You could possibly use sends from events, if you want to send to a certain bus, and control the level with automation?  
> Automation exposes the control to the programmer so that they can alter the behavior the sound designer has created.

I expected that to be the case. However, can you elaborate on how to add automation to a bus? With an event, I can right-click a the panner knob and “Add Automation.” This option does not exist for the bus panner knob.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 1, 2015, 12:16am UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032/4 "2015-09-01T00:16:19Z")

</div>

I was thinking more you have a bus already panned to left, and a bus panned to right, and you have 2 sends with automation on them inside the event.

You might as well just automate the master track’s output pan though, in this case, it would be more direct.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [September 1, 2015, 12:14am UTC](https://qa.fmod.com/t/how-do-i-set-panning-for-a-bus-in-code/12032/5 "2015-09-01T00:14:40Z")

</div>

Actually I should mention you can use getChannelGroup in the FMOD event API and then use ChannelControl::setPan, but you may be stomping on studio settings so it would be best to be careful and test that it works properly. Maybe a bus that studio doesnt touch for example.
