VST 3 Interfaces: IInfoListener Class Reference
Author: Steinberg

VST 3 Interfaces VST 3.8 SDK for developing VST plug-in

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
IInfoListener Class Referenceabstract

Channel context interface: Vst::IInfoListener. More...

`#include <ivstchannelcontextinfo.h>`

Inheritance diagram for IInfoListener:

## Public Member Functions
virtual tresult | setChannelContextInfos (IAttributeList *list)=0
| Receive the channel context infos from host.
Public Member Functions inherited from FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Static Public Attributes
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Channel context interface: Vst::IInfoListener.

- [plug imp]
- [extends IEditController]
- [released: 3.6.5]
- [optional]

Allows the host to inform the plug-in about the context in which the plug-in is instantiated, mainly channel based info (color, name, index,...). Index can be defined inside a namespace (for example, index start from 1 to N for Type Input/Output Channel (Index namespace) and index start from 1 to M for Type Audio Channel).
As soon as the plug-in provides this IInfoListener interface, the host will call setChannelContextInfos for each change occurring to this channel (new name, new color, new indexation,...)

# Example

//------------------------------------------------------------------------
tresult PLUGIN_API MyPlugin::setChannelContextInfos (IAttributeList* list)
{
if (list)
{
// optional we can ask for the Channel Name Length
int64 length;
if (list->getInt (ChannelContext::kChannelNameLengthKey, length) == kResultTrue)
{
...
}
// get the Channel Name where we, as plug-in, are instantiated
String128 name;
if (list->getString (ChannelContext::kChannelNameKey, name, sizeof (name)) == kResultTrue)
{
...
}
// get the Channel UID
if (list->getString (ChannelContext::kChannelUIDKey, name, sizeof (name)) == kResultTrue)
{
...
}
// get Channel RuntimeID
int64 runtimeId;
if (list->getInt (ChannelContext::kChannelRuntimeIDKey, runtimeId) == kResultTrue)
{
...
}
// get Channel Index
int64 index;
if (list->getInt (ChannelContext::kChannelIndexKey, index) == kResultTrue)
{
...
}
// get the Channel Color
int64 color;
if (list->getInt (ChannelContext::kChannelColorKey, color) == kResultTrue)
{
uint32 channelColor = (uint32)color;
String str;
str.printf ("%x%x%x%x", ChannelContext::GetAlpha (channelColor),
ChannelContext::GetRed (channelColor),
ChannelContext::GetGreen (channelColor),
ChannelContext::GetBlue (channelColor));
String128 string128;
Steinberg::UString (string128, 128).fromAscii (str);
...
}
// get Channel Index Namespace Order of the current used index namespace
if (list->getInt (ChannelContext::kChannelIndexNamespaceOrderKey, index) == kResultTrue)
{
...
}
// get the channel Index Namespace Length
if (list->getInt (ChannelContext::kChannelIndexNamespaceLengthKey, length) == kResultTrue)
{
...
}
// get the channel Index Namespace
String128 namespaceName;
if (list->getString (ChannelContext::kChannelIndexNamespaceKey, namespaceName, sizeof (namespaceName)) == kResultTrue)
{
...
}
// get plug-in Channel Location
int64 location;
if (list->getInt (ChannelContext::kChannelPluginLocationKey, location) == kResultTrue)
{
String128 string128;
switch (location)
{
case ChannelContext::kPreVolumeFader:
Steinberg::UString (string128, 128).fromAscii ("PreVolFader");
break;
case ChannelContext::kPostVolumeFader:
Steinberg::UString (string128, 128).fromAscii ("PostVolFader");
break;
case ChannelContext::kUsedAsPanner:
Steinberg::UString (string128, 128).fromAscii ("UsedAsPanner");
break;
default: Steinberg::UString (string128, 128).fromAscii ("unknown!");
break;
}
}
// do not forget to call addRef () if you want to keep this list
}
}
Steinberg::Vst::IAttributeList
Attribute list used in IMessage and IStreamAttributes: Vst::IAttributeList.
Definition ivstattributes.h:41
Steinberg::Vst::IAttributeList::getString
virtual tresult getString(AttrID id, TChar *string, uint32 sizeInBytes)=0
Gets string value (UTF16).
Steinberg::Vst::IAttributeList::getInt
virtual tresult getInt(AttrID id, int64 &value)=0
Gets integer value.
Steinberg::int64
int64_t int64
Steinberg::tresult
int32 tresult
Steinberg::uint32
uint32_t uint32
Steinberg::Vst::String128
TChar String128[128]
128 character UTF-16 string
Definition vsttypes.h:79
Steinberg::Vst::ChannelContext::kChannelNameLengthKey
const CString kChannelNameLengthKey
integer (int64) [optional]: number of characters in kChannelNameKey
Definition ivstchannelcontextinfo.h:228
Steinberg::Vst::ChannelContext::kChannelPluginLocationKey
const CString kChannelPluginLocationKey
integer (int64) [optional]: routing position of the plug-in in the channel (see ChannelPluginLocation...
Definition ivstchannelcontextinfo.h:260
Steinberg::Vst::ChannelContext::kChannelColorKey
const CString kChannelColorKey
color (ColorSpec) [optional]: used color for the channel in mixer or track
Definition ivstchannelcontextinfo.h:231
Steinberg::Vst::ChannelContext::kChannelNameKey
const CString kChannelNameKey
string (TChar) [optional]: name of the channel like displayed in the mixer
Definition ivstchannelcontextinfo.h:225
Steinberg::Vst::ChannelContext::kChannelIndexKey
const CString kChannelIndexKey
integer (int64) [optional]: index of the channel in a channel index namespace, start with 1 not 0!
Definition ivstchannelcontextinfo.h:235
Steinberg::Vst::ChannelContext::kChannelUIDKey
const CString kChannelUIDKey
Keys used as AttrID (Attribute ID) in the return IAttributeList of IInfoListener::setChannelContextIn...
Definition ivstchannelcontextinfo.h:215
Steinberg::Vst::ChannelContext::kChannelIndexNamespaceLengthKey
const CString kChannelIndexNamespaceLengthKey
integer (int64) [optional]: number of characters in kChannelIndexNamespaceKey
Definition ivstchannelcontextinfo.h:252
Steinberg::Vst::ChannelContext::kChannelRuntimeIDKey
const CString kChannelRuntimeIDKey
integer (int64) [optional]: runtime id to identify a channel (may change when reloading project)
Definition ivstchannelcontextinfo.h:222
Steinberg::Vst::ChannelContext::kChannelIndexNamespaceKey
const CString kChannelIndexNamespaceKey
string (TChar) [optional]: name of the channel index namespace for example "Input",...
Definition ivstchannelcontextinfo.h:249
Steinberg::Vst::ChannelContext::kPreVolumeFader
@ kPreVolumeFader
Definition ivstchannelcontextinfo.h:172
Steinberg::Vst::ChannelContext::kPostVolumeFader
@ kPostVolumeFader
Definition ivstchannelcontextinfo.h:173
Steinberg::Vst::ChannelContext::kUsedAsPanner
@ kUsedAsPanner
Definition ivstchannelcontextinfo.h:174
Steinberg::Vst::ChannelContext::kChannelIndexNamespaceOrderKey
const CString kChannelIndexNamespaceOrderKey
integer (int64) [optional]: define the order of the current used index namespace, start with 1 not 0!
Definition ivstchannelcontextinfo.h:244
Steinberg::Vst::ChannelContext::GetRed
ColorComponent GetRed(ColorSpec cs)
Returns the Red part of the given ColorSpec.
Definition ivstchannelcontextinfo.h:200
Steinberg::Vst::ChannelContext::GetBlue
ColorComponent GetBlue(ColorSpec cs)
Returns the Blue part of the given ColorSpec.
Definition ivstchannelcontextinfo.h:190
Steinberg::Vst::ChannelContext::GetAlpha
ColorComponent GetAlpha(ColorSpec cs)
Returns the Alpha part of the given ColorSpec.
Definition ivstchannelcontextinfo.h:205
Steinberg::Vst::ChannelContext::GetGreen
ColorComponent GetGreen(ColorSpec cs)
Returns the Green part of the given ColorSpec.
Definition ivstchannelcontextinfo.h:195
Steinberg::kResultTrue
kResultTrue

## Member Function Documentation

## ◆ setChannelContextInfos()

virtual tresult setChannelContextInfos | ( | IAttributeList * | list | ) |
| pure virtual

Receive the channel context infos from host.

Note
  [UI-thread & (Initialized | Connected | Setup Done | Activated | Processing)]

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.