VST2.4 specs 
HOME   |   Software       VST2.4 specs :: FIRST   -   PREV   -   NEXT

audioMaster callback functions


C++: VstIntPtr function audioMasterCallback(AEffect* e, VstInt32 opcode, VstInt32 index, VstIntPtr value, void* ptr, float opt);
Delphi: function audioMasterCallback(e: PAEffect; opcode, index: VstInt32; value: VstIntPtr; ptr: pointer; opt: Single): VstIntPtr; cdecl;
always returns 0, unless otherwise defined.
all string-pointers points to zero terminated strings.
e[ ]: = plugin receives as entry parameter
x[ ]: = plugin returns to host

The plugin calls the audioMasterCallback() function with the opcodes 00 thru 49:
0. audioMasterAutomate   >= VST1.0   @see AudioEffect::setParameterAutomated()
plugin notifies host that the plug has changed a parameter value thru its GUI or MIDI.
e[index]: parameter index
e[opt]: parameter value
x[return]: 0

1. audioMasterVersion   >= VST1.0   @see AudioEffect::getMasterVersion()
plugin requests host VST-specification version, currently 2 (0 for older)
x[return]: Host VST version (for example 2400 for VST2.4)

2. audioMasterCurrentId   >= VST1.0   @see AudioEffect::getCurrentUniqueId()
plugin requests host for current unique identifier
x[return]: current unique ID of a shell plug-in (in VST2.3 x[return]: the unique ID of the plug that is currently loaded)

3. audioMasterIdle   >= VST1.0   @see AudioEffect::masterIdle()
plugin calls host idle routine (this will call effEditIdle for all open editors too)
has no arguments

4. audioMasterPinConnected   >= VST1.0 ... deprecated in VST2.4r2   @see AudioEffect::isInputConnected(), AudioEffect::isOutputConnected()
plugin inquires host if an input or output is being connected
e[index]: enumerates input or output counting from zero
e[value]: 0 = input, else = output
x[return]: the return value is 0 for <true> such that older versions will always return true.

// VstEvents + VstTimeInfo
5. unknown   >= VST2.0
not defined

6. audioMasterWantMidi   >= VST2.0 ... deprecated in VST2.4   @see void AudioEffectX::wantEvents()
(might need to be re-enabled to ensure 2.3/2.4 compatibility)
plugin (VSTi2.0 thru VSTi2.3) calls this to tell the host that the plugin is an instrument
e[value]: is a filter which is currently ignored

7. audioMasterGetTime   >= VST2.0   @see VstTimeInfoFlags, AudioEffectX::getTimeInfo()
e[value]: request mask, should contain a mask indicating which fields are required (see valid masks above), as some items may require extensive conversions. For valid masks see VstTimeInfo.Flags
e[ptr]: returns VstTimeInfo* or null if not supported

8. audioMasterProcessEvents   >= VST2.0   @see VstEvents, AudioEffectX::sendVstEventsToHost()
plugin informs host that the plugin has MIDI events ready for the host to process
e[ptr]: pointer to VstEvents*
x[return]: 1 = supported and processed OK

9. audioMasterSetTime   >= VST2.0 ... deprecated in VST2.4   @see VstTimeInfoFlags, AudioEffectX::setTimeInfo()
e[value]: filter
e[ptr]: pointer to VstTimenfo*

10. audioMasterTempoAt   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::tempoAt()
( might need to be enabled to ensure 2.3/2.4 compatibility)
e[value]: sample frame location
x[return]: tempo (in bpm * 10000)

11. audioMasterGetNumAutomatableParameters   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::getNumAutomatableParameters()
plugin asks host number of automatable Parameters
x[return]: number of automatable Parameters (should be <= than numParams)

12. audioMasterGetParameterQuantization   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::getParameterQuantization()
e[value]: parameter index (-1: all, any)
x[return]: integer value for +1.0 representation, or 1 if full single float precision is maintained in automation. // connections, configuration

13. audioMasterIOChanged   >= VST2.0   @see AudioEffectX::ioChanged()
plugin notifies host the numInputs and/or numOutputs of plugin has changed
x[return]: 1 = supported

14. audioMasterNeedIdle   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::needIdle()
plugin needs idle calls (outside its editor window)
has no arguments

15. audioMasterSizeWindow   >= VST2.0   (editor)   @see AudioEffectX::sizeWindow()
plugin requests host to resize the window of the plugin editor
e[index]: new width in pixels
e[value]: new height in pizels
x[return]: 1 = supported

16. audioMasterGetSampleRate   >= VST2.0   @see AudioEffectX::updateSampleRate()
x[return]: current sample rate

17. audioMasterGetBlockSize   >= VST2.0   @see AudioEffectX::updateBlockSize()
x[return]: current block size

18. audioMasterGetInputLatency   >= VST2.0   @see AudioEffectX::getInputLatency()
plugin requests input latency from host
x[return]: input latency in samples

19. audioMasterGetOutputLatency   >= VST2.0   @see AudioEffectX::getOutputLatency()
plugin requests output latency from host
x[return]: output latency in samples

20. audioMasterGetPreviousPlug   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::getPreviousPlug()
e[value]: input pin (-1: first to come),
x[ptr]: host returns pointer to cEffect*

21. audioMasterGetNextPlug   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::getNextPlug()
e[value]: output pin (-1: first to come),
x[ptr]: host returns pointer to cEffect*

22. audioMasterWillReplaceOrAccumulate   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::willProcessReplacing()
x[return]: 0 = not supported, 1 = replace, 2 = accumulate

23. audioMasterGetCurrentProcessLevel   >= VST2.0   @see AudioEffectX::getCurrentProcessLevel()
x[return]: currentProcessLevel

24. audioMasterGetAutomationState   >= VST2.0   @see AudioEffectX::getAutomationState()
x[return]: 0 = not supported, 1 = off, 2 = read, 3 = write, 4 = read/write

25. audioMasterOfflineStart   >= VST2.0   @see AudioEffectX::offlineStart()
e[index]: number of new audio files to start
e[value]: number of audio files to start
e[ptr]: pointer to *audioFiles
x[return]: 0 = error, 1 = OK

26. audioMasterOfflineRead   >= VST2.0   @see AudioEffectX::offlineRead()
e[index]: 1 = readSource
e[value]: option of type VstOfflineOption
e[ptr]: points to offline* offline structure, see below.
x[return]: 0 = error, 1 = OK

27. audioMasterOfflineWrite   >= VST2.0   @see AudioEffectX::offlineWrite()
e[index]: 1 = readSource
e[value]: option of type VstOfflineOption
e[ptr]: points to offline* offline structure, see below.
x[return]: 0 = error, 1 = OK

28. audioMasterOfflineGetCurrentPass   >= VST2.0   @see AudioEffectX::offlineGetCurrentPass()
x[return]: 0 = error, 1 = OK

29. audioMasterOfflineGetCurrentMetaPass   >= VST2.0   @see AudioEffectX::offlineGetCurrentMetaPass()
x[return]: 0 = error, 1 = OK

30. audioMasterSetOutputSampleRate   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::setOutputSamplerate()
for variable i/o
e[opt]: sample rate

31. audioMasterGetSpeakerArrangement   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::getOutputSpeakerArrangement()
x[return]: host returns a pointer to VstSpeakerArrangement* structure

32. audioMasterGetVendorString   >= VST2.0   @see AudioEffectX::getHostVendorString()
x[ptr]: host returns a pointer to a string identifying the vendor (max 64 char)
x[return]: 0 = error, 1 = OK

33. audioMasterGetProductString   >= VST2.0   @see AudioEffectX::getHostProductString()
x[ptr]: host returns a pointer to a string with product name (max 64 char)
x[return]: 0 = error, 1 = OK

34. audioMasterGetVendorVersion   >= VST2.0   @see AudioEffectX::getHostVendorVersion()
x[return]: vendor-specific version

35. audioMasterVendorSpecific   >= VST2.0   @see AudioEffectX::hostVendorSpecific()
no definition, vendor specific handling
x[return]: 0 = not supported

36. audioMasterSetIcon   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::setIcon()
e[ptr]: void*, format not defined yet
x[return]: 0 = error, 1 = OK

37. audioMasterCanDo   >= VST2.0   @see AudioEffectX::canHostDo()
plugin queries if host 'cando'
e[ptr]: string-pointer to cando string
x[returns]: 0 = No, 1='cando', 0='don't know' (default)
br> 38. audioMasterGetLanguage   >= VST2.0   @see AudioEffectX::getHostLanguage()
plugin queries what language is set for the host
x[returns]: see enum VstHostLanguage

39. audioMasterOpenWindow   >= VST2.0 ... deprecated in VST2.4   (editor)   @see AudioEffectX::openWindow()
e[ptr]: pointer to window*
x[return]: host returns platform specific pointer*

40. audioMasterCloseWindow   >= VST2.0 ... deprecated in VST2.4   @see AudioEffectX::closeWindow()
close window,
e[ptr]: platform specific handle

41. audioMasterGetDirectory   >= VST2.0   @see AudioEffectX::getDirectory()
plugin requests host for plugin directory
x[ptr]: string-pointer to directory, FSSpec on MAC

42. audioMasterUpdateDisplay   >= VST2.0   @see AudioEffectX::updateDisplay()
Something has changed, update the host's 'multi-fx' display.
x[return]: 1 = supported

43. audioMasterBeginEdit   >= VST2.1   (editor)   @see AudioEffectX::beginEdit()
plugin calls this before a setParameterAutomated with mouse move (one per Mouse Down). It tells the host that if it needs to, it has to record automation data for this control
e[index]: parameter index
x[return]: 1 = supported by host

44. audioMasterEndEdit   >= VST2.1   (editor)   @see AudioEffectX::endEdit()
plugin calls this after a setParameterAutomated (on Mouse Up). It notifies the host that this control is no more moved by the mouse
e[index]: parameter index
x[return]: 1 = supported by host

45. audioMasterOpenFileSelector   >= VST2.1   (editor)   @see AudioEffectX::openFileSelector()
plugin requests: open a fileselector window
e[ptr]: pointer to VstFileSelect*
x[return]: 1 = supported by host

46. audioMasterCloseFileSelector   >= VST2.2   (editor)   @see AudioEffectX::closeFileSelector()
plugin requests: close a fileselector operation, must be always called after an openFileSelector !
e[ptr]: pointer to VstFileSelect*
x[return]: 1 = supported by host

47. audioMasterEditFile   >= VST2.2 ... deprecated in VST2.4   @see AudioEffectX::editFile()
open an editor for audio (defined by XML text in <ptr>)
e[ptr]: pointer to XML text
x[return]: 0 = error, 1 = OK

48. audioMasterGetChunkFile   >= VST2.2 ... deprecated in VST2.4   @see AudioEffectX::getChunkFile()
plugin requests the native path of currently loading bank or project (called from writeChunk)
x[ptr]: pointer to char[2048] or (MAC)sizeof(FSSpec)
x[return]: 0 = error, 1 = OK

49. audioMasterGetInputSpeakerArrangement   >= VST2.3 ... deprecated in VST2.4   @see AudioEffectX::getInputSpeakerArrangement()
x[return]: host returns a pointer to VstSpeakerArrangement* structure
__________________________________________________________________________________________________________
ONLY the following audioMaster callbacks are allowed before the initial DLL-call "main()" or "VstPluginMain()" returns to host:
{01} audioMasterVersion
{06} audioMasterWantMidi ... deprecated in VST2.4
{32} audioMasterGetVendorString
{33} audioMasterGetProductString
{34} audioMasterGetVendorVersion
{38} audioMasterGetLanguage
{41} audioMasterGetDirectory

FIRST   -   PREV   -   NEXT   -   TOP