# 7. Core API Reference | ChannelGroup

A submix in the mixing hierarchy akin to a bus that can contain both Channel and ChannelGroup objects.

Create with System::createChannelGroup.

Channel management:

- ChannelGroup::getNumChannels Retrieves the number of Channels that feed into to this group.
- ChannelGroup::getChannel Retrieves the Channel at the specified index in the list of Channel inputs.

ChannelGroup management:

- ChannelGroup::addGroup Adds a ChannelGroup as an input to this group.
- ChannelGroup::getNumGroups Retrieves the number of ChannelGroups that feed into to this group.
- ChannelGroup::getGroup Retrieves the ChannelGroup at the specified index in the list of group inputs.
- ChannelGroup::getParentGroup Retrieves the ChannelGroup this object outputs to.

General:

- ChannelGroup::getName Retrieves the name set when the group was created.
- ChannelGroup::release Frees the memory for the group.

The following APIs are inherited from ChannelControl:

Playback:

- ChannelControl::isPlaying Retrieves the playing state.
- ChannelControl::stop Stops the Channel (or all Channels in nested ChannelGroups) from playing.
- ChannelControl::setPaused Sets the paused state.
- ChannelControl::getPaused Retrieves the paused state.
- ChannelControl::setMode Sets the playback mode that controls how this object behaves.
- ChannelControl::getMode Retrieves the playback mode bits that control how this object behaves.
- ChannelControl::setPitch Sets the relative pitch / playback rate.
- ChannelControl::getPitch Retrieves the relative pitch / playback rate.

Volume levels:

- ChannelControl::getAudibility Retrieves an estimation of the output volume.
- ChannelControl::setVolume Sets the volume level.
- ChannelControl::getVolume Retrieves the volume level.
- ChannelControl::setVolumeRamp Sets whether volume changes are ramped or instantaneous.
- ChannelControl::getVolumeRamp Retrieves whether volume changes are ramped or instantaneous.
- ChannelControl::setMute Sets the mute state.
- ChannelControl::getMute Retrieves the mute state.

Spatialization:

- ChannelControl::set3DAttributes Sets the 3D position and velocity used to apply panning, attenuation and doppler.
- ChannelControl::get3DAttributes Retrieves the 3D position and velocity used to apply panning, attenuation and doppler.
- ChannelControl::set3DConeOrientation Sets the orientation of a 3D cone shape, used for simulated occlusion.
- ChannelControl::get3DConeOrientation Retrieves the orientation of a 3D cone shape, used for simulated occlusion.
- ChannelControl::set3DConeSettings Sets the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.
- ChannelControl::get3DConeSettings Retrieves the angles and attenuation levels of a 3D cone shape, for simulated occlusion which is based on direction.
- ChannelControl::set3DCustomRolloff Sets a custom roll-off shape for 3D distance attenuation.
- ChannelControl::get3DCustomRolloff Retrieves the current custom roll-off shape for 3D distance attenuation.
- ChannelControl::set3DDistanceFilter Sets an override value for the 3D distance filter.
- ChannelControl::get3DDistanceFilter Retrieves the override values for the 3D distance filter.
- ChannelControl::set3DDopplerLevel Sets the amount by which doppler is scaled.
- ChannelControl::get3DDopplerLevel Retrieves the amount by which doppler is scaled.
- ChannelControl::set3DLevel Sets the blend between 3D panning and 2D panning.
- ChannelControl::get3DLevel Retrieves the blend between 3D panning and 2D panning.
- ChannelControl::set3DMinMaxDistance Sets the minimum and maximum distances used to calculate the 3D roll-off attenuation.
- ChannelControl::get3DMinMaxDistance Retrieves the minimum and maximum distances used to calculate the 3D roll-off attenuation.
- ChannelControl::set3DOcclusion Sets the 3D attenuation factors for the direct and reverb paths.
- ChannelControl::get3DOcclusion Retrieves the 3D attenuation factors for the direct and reverb paths.
- ChannelControl::set3DSpread Sets the spread of a 3D sound in speaker space.
- ChannelControl::get3DSpread Retrieves the spread of a 3D sound in speaker space.

Panning and level adjustment:

- ChannelControl::setPan Sets the left/right pan level.
- ChannelControl::setMixLevelsInput Sets the incoming volume level for each channel of a multi-channel signal.
- ChannelControl::setMixLevelsOutput Sets the outgoing volume levels for each speaker.
- ChannelControl::setMixMatrix Sets a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).
- ChannelControl::getMixMatrix Retrieves a 2 dimensional pan matrix that maps the signal from input channels (columns) to output speakers (rows).

Filtering:

- ChannelControl::setReverbProperties Sets the wet / send level for a particular reverb instance.
- ChannelControl::getReverbProperties Retrieves the wet / send level for a particular reverb instance.
- ChannelControl::setLowPassGain Sets the gain of the dry signal when built in lowpass / distance filtering is applied.
- ChannelControl::getLowPassGain Retrieves the gain of the dry signal when built in lowpass / distance filtering is applied.

DSP chain configuration:

- ChannelControl::addDSP Adds a DSP unit to the specified index in the DSP chain.
- ChannelControl::removeDSP Removes the specified DSP unit from the DSP chain.
- ChannelControl::getNumDSPs Retrieves the number of DSP units in the DSP chain.
- ChannelControl::getDSP Retrieves the DSP unit at the specified index in the DSP chain.
- ChannelControl::setDSPIndex Sets the index in the DSP chain of the specified DSP.
- ChannelControl::getDSPIndex Retrieves the index of a DSP inside the Channel or ChannelGroup's DSP chain.

Sample accurate scheduling:

- ChannelControl::getDSPClock Retrieves the DSP clock values at this point in time.
- ChannelControl::setDelay Sets a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.
- ChannelControl::getDelay Retrieves a sample accurate start (and/or stop) time relative to the parent ChannelGroup DSP clock.
- ChannelControl::addFadePoint Adds a sample accurate fade point at a time relative to the parent ChannelGroup DSP clock.
- ChannelControl::setFadePointRamp Adds a volume ramp at the specified time in the future using fade points.
- ChannelControl::removeFadePoints Removes all fade points between the two specified clock values (inclusive).
- ChannelControl::getFadePoints Retrieves information about stored fade points.

General:

- ChannelControl::setCallback Sets the callback for ChannelControl level notifications.
- ChannelControl::setUserData Sets a user value associated with this object.
- ChannelControl::getUserData Retrieves a user value associated with this object.
- ChannelControl::getSystemObject Retrieves the System that created this object.

## ChannelGroup::addGroup

Adds a ChannelGroup as an input to this group.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::addGroup(
      ChannelGroup *group,
      bool propagatedspclock = true,
      DSPConnection **connection = nullptr
    );

    FMOD_RESULT FMOD_ChannelGroup_AddGroup(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_CHANNELGROUP *group,
      FMOD_BOOL propagatedspclock,
      FMOD_DSPCONNECTION **connection
    );

    RESULT ChannelGroup.addGroup(
      ChannelGroup group,
      bool propagatedspclock = true
    );
    RESULT ChannelGroup.addGroup(
      ChannelGroup group,
      bool propagatedspclock,
      out DSPConnection connection
    );

    ChannelGroup.addGroup(
      group,
      propagatedspclock,
      connection
    );

group
  Group to add. (ChannelGroup)
propagatedspclock

  Recursively propagate this object's clock values to `group`.

  - Units: Boolean
connection Out Opt
  Connection between the head DSP of `group` and the tail DSP of this object. (DSPConnection)

See Also: ChannelGroup::getNumGroups, ChannelGroup::getGroup, ChannelGroup::getParentGroup

## ChannelGroup::getChannel

Retrieves the Channel at the specified index in the list of Channel inputs.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getChannel(
      int index,
      Channel **channel
    );

    FMOD_RESULT FMOD_ChannelGroup_GetChannel(
      FMOD_CHANNELGROUP *channelgroup,
      int index,
      FMOD_CHANNEL **channel
    );

    RESULT ChannelGroup.getChannel(
      int index,
      out Channel channel
    );

    ChannelGroup.getChannel(
      index,
      channel
    );

index

  Offset into the list of Channel inputs.

  - Range: [0, ChannelGroup::getNumChannels)
channel Out
  Channel at the specified index. (Channel)

## ChannelGroup::getGroup

Retrieves the ChannelGroup at the specified index in the list of group inputs.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getGroup(
      int index,
      ChannelGroup **group
    );

    FMOD_RESULT FMOD_ChannelGroup_GetGroup(
      FMOD_CHANNELGROUP *channelgroup,
      int index,
      FMOD_CHANNELGROUP **group
    );

    RESULT ChannelGroup.getGroup(
      int index,
      out ChannelGroup group
    );

    ChannelGroup.getGroup(
      index,
      group
    );

index

  Offset into the list of group inputs.

  - Range: [0, ChannelGroup::getNumGroups)
group Out
  Group at the specified index. (ChannelGroup)

See Also: ChannelGroup::addGroup, ChannelGroup::getParentGroup

## ChannelGroup::getName

Retrieves the name set when the group was created.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getName(
      char *name,
      int namelen
    );

    FMOD_RESULT FMOD_ChannelGroup_GetName(
      FMOD_CHANNELGROUP *channelgroup,
      char *name,
      int namelen
    );

    RESULT ChannelGroup.getName(
      out string name,
      int namelen
    );

    ChannelGroup.getName(
      name
    );

name Out
  Name of the group. (UTF-8 string)
namelen

  Length of `name`.

  - Units: Bytes

See Also: System::getMasterChannelGroup, System::createChannelGroup

## ChannelGroup::getNumChannels

Retrieves the number of Channels that feed into to this group.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getNumChannels(
      int *numchannels
    );

    FMOD_RESULT FMOD_ChannelGroup_GetNumChannels(
      FMOD_CHANNELGROUP *channelgroup,
      int *numchannels
    );

    RESULT ChannelGroup.getNumChannels(
      out int numchannels
    );

    ChannelGroup.getNumChannels(
      numchannels
    );

numchannels Out
  Number of Channels.

See Also: ChannelGroup::getChannel

## ChannelGroup::getNumGroups

Retrieves the number of ChannelGroups that feed into to this group.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getNumGroups(
      int *numgroups
    );

    FMOD_RESULT FMOD_ChannelGroup_GetNumGroups(
      FMOD_CHANNELGROUP *channelgroup,
      int *numgroups
    );

    RESULT ChannelGroup.getNumGroups(
      out int numgroups
    );

    ChannelGroup.getNumGroups(
      numgroups
    );

numgroups Out
  Number of ChannelGroups.

See Also: ChannelGroup::addGroup, ChannelGroup::getGroup, ChannelGroup::getParentGroup

## ChannelGroup::getParentGroup

Retrieves the ChannelGroup this object outputs to.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::getParentGroup(
      ChannelGroup **group
    );

    FMOD_RESULT FMOD_ChannelGroup_GetParentGroup(
      FMOD_CHANNELGROUP *channelgroup,
      FMOD_CHANNELGROUP **group
    );

    RESULT ChannelGroup.getParentGroup(
      out ChannelGroup group
    );

    ChannelGroup.getParentGroup(
      group
    );

group Out
  Output group. (ChannelGroup)

See Also: ChannelGroup::addGroup, ChannelGroup::getNumGroups, ChannelGroup::getGroup

## ChannelGroup::release

Frees the memory for the group.

C
C++
C#
JS

    FMOD_RESULT ChannelGroup::release();

    FMOD_RESULT FMOD_ChannelGroup_Release(FMOD_CHANNELGROUP *channelgroup);

    RESULT ChannelGroup.release();

    ChannelGroup.release();

Any Channels or ChannelGroups feeding into this group are moved to the master ChannelGroup.

See Also: System::createChannelGroup, System::getMasterChannelGroup