Embedded Components

Most Audio components and some Control components can be embedded in a Plugin via the GetComponents(props) reserved function. You can interact with these components via their controls and audio pins. Other types of pins are not supported, such as Control, USB, Mediacast, or Dataport pins.

Note:  Inventory components cannot be embedded in a plugin.

Tip: Go to Storing Secrets in Plugins to see an example of storing Strings in an Embedded Component.

Accessing Controls of an Embedded Component

Finding Control Names

The best tool to obtain the correct control names for any component is the "Component Controls" pane in Q-SYS Designer Software (QDS).

To show this pane, select Tools > View Component Controls Info. You then select any component in your design.

Accessing Embedded Components during Runtime

The name you assign to the component will be added to the global table for access of that component during the runtime. For example, if you defined a crossfader with the name of Xfade, you would use Xfade["crossfade.to.B"].Boolean = true to execute a crossfade.

If you create components using a loop, you can access them via the global table. For example: 

Copy
 -- Part of GetComponents(props)
 for x = 1, (props["Output Count"].Value) do
  table.insert(
    components,
    {
      Name = "XFader" .. x,
      Type = "crossfader",
      Properties = {
        ["multi_channel_type"] = multiTypeIndex,
        ["multi_channel_count"] = props["Count"].Value
      }
    }
  )
 end


-- Part of runtime
local XFaders = {}
for i = 1, Properties["Output Count"].Value do
  table.insert(XFaders, _G["XFader" .. i])
end

Tip: Remember that Properties are configured in Design Time and are read-only during Runtime.

Supported Components

Audio Components

Control Components

Monitor Components