VST 3 Interfaces: IUnitInfo 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
IUnitInfo Class Referenceabstract

Edit controller extension to describe the plug-in structure: Vst::IUnitInfo. More...

`#include <ivstunits.h>`

Inheritance diagram for IUnitInfo:

## Public Member Functions
virtual int32 | getUnitCount ()=0
| Returns the flat count of units.
virtual tresult | getUnitInfo (int32 unitIndex, UnitInfo &info)=0
| Gets UnitInfo for a given index in the flat list of unit.
virtual int32 | getProgramListCount ()=0
| Gets the count of Program List.
virtual tresult | getProgramListInfo (int32 listIndex, ProgramListInfo &info)=0
| Gets for a given index the Program List Info.
virtual tresult | getProgramName (ProgramListID listId, int32 programIndex, String128 name)=0
| Gets for a given program list ID and program index its program name.
virtual tresult | getProgramInfo (ProgramListID listId, int32 programIndex, CString attributeId, String128 attributeValue)=0
| Gets for a given program list ID, program index and attributeId the associated attribute value.
virtual tresult | hasProgramPitchNames (ProgramListID listId, int32 programIndex)=0
| Returns kResultTrue if the given program index of a given program list ID supports PitchNames.
virtual tresult | getProgramPitchName (ProgramListID listId, int32 programIndex, int16 midiPitch, String128 name)=0
| Gets the PitchName for a given program list ID, program index and pitch.
virtual UnitID | getSelectedUnit ()=0
| Gets the current selected unit.
virtual tresult | selectUnit (UnitID unitId)=0
| Sets a new selected unit.
virtual tresult | getUnitByBus (MediaType type, BusDirection dir, int32 busIndex, int32 channel, UnitID &unitId)=0
| Gets the according unit if there is an unambiguous relation between a channel or a bus and a unit.
virtual tresult | setUnitProgramData (int32 listOrUnitId, int32 programIndex, IBStream *data)=0
| Receives a preset data stream.
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

Edit controller extension to describe the plug-in structure: Vst::IUnitInfo.

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

IUnitInfo describes the internal structure of the plug-in.

- The root unit is the component itself, so getUnitCount must return 1 at least.
- The root unit id has to be 0 (kRootUnitId).
- Each unit can reference one program list - this reference must not change.
- Each unit, using a program list, references one program of the list.

See also
  vst3Units, IUnitHandler

## Member Function Documentation

## ◆ getUnitCount()

virtual int32 getUnitCount | ( |  | ) |
| pure virtual

Returns the flat count of units.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getUnitInfo()

virtual tresult getUnitInfo | ( | int32 | unitIndex,
|  | UnitInfo & | info )
| pure virtual

Gets UnitInfo for a given index in the flat list of unit.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getProgramListCount()

virtual int32 getProgramListCount | ( |  | ) |
| pure virtual

Gets the count of Program List.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getProgramListInfo()

virtual tresult getProgramListInfo | ( | int32 | listIndex,
|  | ProgramListInfo & | info )
| pure virtual

Gets for a given index the Program List Info.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getProgramName()

virtual tresult getProgramName | ( | ProgramListID | listId,
|  | int32 | programIndex,
|  | String128 | name )
| pure virtual

Gets for a given program list ID and program index its program name.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getProgramInfo()

virtual tresult getProgramInfo | ( | ProgramListID | listId,
|  | int32 | programIndex,
|  | CString | attributeId,
|  | String128 | attributeValue )
| pure virtual

Gets for a given program list ID, program index and attributeId the associated attribute value.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ hasProgramPitchNames()

virtual tresult hasProgramPitchNames | ( | ProgramListID | listId,
|  | int32 | programIndex )
| pure virtual

Returns kResultTrue if the given program index of a given program list ID supports PitchNames.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getProgramPitchName()

virtual tresult getProgramPitchName | ( | ProgramListID | listId,
|  | int32 | programIndex,
|  | int16 | midiPitch,
|  | String128 | name )
| pure virtual

Gets the PitchName for a given program list ID, program index and pitch.

If PitchNames are changed the plug-in should inform the host with IUnitHandler::notifyProgramListChange.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getSelectedUnit()

virtual UnitID getSelectedUnit | ( |  | ) |
| pure virtual

Gets the current selected unit.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ selectUnit()

virtual tresult selectUnit | ( | UnitID | unitId | ) |
| pure virtual

Sets a new selected unit.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ getUnitByBus()

virtual tresult getUnitByBus | ( | MediaType | type,
|  | BusDirection | dir,
|  | int32 | busIndex,
|  | int32 | channel,
|  | UnitID & | unitId )
| pure virtual

Gets the according unit if there is an unambiguous relation between a channel or a bus and a unit.

This method mainly is intended to find out which unit is related to a given MIDI input channel.

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## ◆ setUnitProgramData()

virtual tresult setUnitProgramData | ( | int32 | listOrUnitId,
|  | int32 | programIndex,
|  | IBStream * | data )
| pure virtual

Receives a preset data stream.

- If the component supports program list data (IProgramListData), the destination of the data stream is the program specified by list-Id and program index (first and second parameter)
- If the component supports unit data (IUnitData), the destination is the unit specified by the first parameter - in this case parameter programIndex is < 0).

Note
  [UI-thread & (Initialized | Connected)]

Implemented in EditControllerEx1.

## Member Data Documentation

## ◆ iid

const FUID iid
| static

Empty

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