# Does FMOD Studio event can't control channel in code directly?

**URL:** https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580
**Category:** FMOD Studio
**Created:** [December 8, 2017, 8:03am UTC](https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580 "2017-12-08T08:03:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![SmilegateEnt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SmilegateEnt](https://qa.fmod.com/u/SmilegateEnt)
#### Post date: [December 8, 2017, 8:03am UTC](https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580/1 "2017-12-08T08:03:07Z")

</div>

Hi all!

I made 2d / 3d 3ound event in FMOD Studio and play in my codes.

Because sounds was declicked, I want to set ChannelControl::setVolumeRamp() as false.  
But when I trying, I can’t get ChannelControl instance from EventInstance and receive error code which is FMOD\_ERR\_STUDIO\_NOT\_LOADED.

how to access ChannelControl directly in FMOD Studio EventInstance?  
I’ll appriciate any your suggestions.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [December 10, 2017, 9:33pm UTC](https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580/2 "2017-12-10T21:33:13Z")

</div>

> [@](#):
>
> Hi all!
> 
> I made 2d / 3d 3ound event in FMOD Studio and play in my codes.
> 
> Because sounds was declicked, I want to set ChannelControl::setVolumeRamp() as false.  
> But when I trying, I can’t get ChannelControl instance from EventInstance and receive error code which is FMOD\_ERR\_STUDIO\_NOT\_LOADED.
> 
> how to access ChannelControl directly in FMOD Studio EventInstance?  
> I’ll appriciate any your suggestions.

Are you able to share some of the code you are using?

---

<div class="post-metadata">

### Author: ![SmilegateEnt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@SmilegateEnt](https://qa.fmod.com/u/SmilegateEnt)
#### Post date: [December 12, 2017, 12:09am UTC](https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580/3 "2017-12-12T00:09:04Z")

</div>

Heres are my codes.  
EventDescStub is wrapper class of FMOD::Studio::EventDescription, and EventInstanceStub is wrapper class of FMOD::Studio::EventInstance.

//------------------------------------------------------------------------------------------  
FMOD::Studio::EventDescStub\* pEventDesc = \_GetEvent( “BlablaEventName” );  
if( pEventDesc )  
{  
FMOD::Studio::EventInstanceStub\* pEventInstance = pEventDesc-\>CreateInstance();  
if( pEventInstance && pEventInstance-\>IsValid() )  
{  
pEventInstance-\>Start(); // Event Sound is created and played well.

```
    FMOD::ChanngelGroup* pChanngelGroup = pEventInstance->GetChannelGroup();
    if( pChanngelGroup )
    {
         // But pChannelGroup is always NULL, and FMOD_RESULT value is 
         // FMOD_ERR_STUDIO_NOT_LOADED
         pChanngelGroup->setVolumeRamp( false );
    }
}

```

///------------------------------------------------------------------------------------------------  
What’s the exactly meaning “channel group” in FMOD Studio?  
( I knowed that in FMod EX, I could set channel in the “FMOD::Sound” Instance. Then, what’s the difference FMOD EX channel vs FMOD Studio ChannelGroup? )

Should I must set groups in FMOD Studio Tools for ramp?

Thanks for your Any suggestions.

---

<div class="post-metadata">

### Author: ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)
#### Post date: [December 12, 2017, 12:41am UTC](https://qa.fmod.com/t/does-fmod-studio-event-cant-control-channel-in-code-directly/13580/4 "2017-12-12T00:41:38Z")

</div>

An eventInstance’s channelGroup will only be available once the event has finished being created. This can take a little time, but there are a couple ways of doing this.

Have a look at our docs for some more information:

[https://fmod.com/resources/documentation-api?page=content/generated/FMOD\_Studio\_EventInstance\_GetChannelGroup.html#/](https://fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_EventInstance_GetChannelGroup.html#/)
