2 * IMPORTANT: The author of Carla has no connection with the
3 * author of the VeSTige VST-compatibility header, has had no
4 * involvement in its creation.
6 * The VeSTige header is included in this package in the good-faith
7 * belief that it has been cleanly and legally reverse engineered
8 * without reference to the official VST SDK and without its
9 * developer(s) having agreed to the VST SDK license agreement.
13 * simple header to allow VeSTige compilation and eventually work
15 * Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public
19 * License as published by the Free Software Foundation; either
20 * version 2 of the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 * General Public License for more details.
27 * You should have received a copy of the GNU General Public
28 * License along with this program (see COPYING); if not, write to the
29 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
30 * Boston, MA 02110-1301 USA.
37 #if ! (defined(WIN32) || defined(_WIN32) || defined(__WIN32__))
41 #define CCONST(a, b, c, d)( ( ( (int) a ) << 24 ) | \
42 ( ( (int) b ) << 16 ) | \
43 ( ( (int) c ) << 8 ) | \
44 ( ( (int) d ) << 0 ) )
46 #define audioMasterAutomate 0
47 #define audioMasterVersion 1
48 #define audioMasterCurrentId 2
49 #define audioMasterIdle 3
50 #define audioMasterPinConnected 4
52 #define audioMasterWantMidi 6
53 #define audioMasterGetTime 7
54 #define audioMasterProcessEvents 8
55 #define audioMasterSetTime 9
56 #define audioMasterTempoAt 10
57 #define audioMasterGetNumAutomatableParameters 11
58 #define audioMasterGetParameterQuantization 12
59 #define audioMasterIOChanged 13
60 #define audioMasterNeedIdle 14
61 #define audioMasterSizeWindow 15
62 #define audioMasterGetSampleRate 16
63 #define audioMasterGetBlockSize 17
64 #define audioMasterGetInputLatency 18
65 #define audioMasterGetOutputLatency 19
66 #define audioMasterGetPreviousPlug 20
67 #define audioMasterGetNextPlug 21
68 #define audioMasterWillReplaceOrAccumulate 22
69 #define audioMasterGetCurrentProcessLevel 23
70 #define audioMasterGetAutomationState 24
71 #define audioMasterOfflineStart 25
72 #define audioMasterOfflineRead 26
73 #define audioMasterOfflineWrite 27
74 #define audioMasterOfflineGetCurrentPass 28
75 #define audioMasterOfflineGetCurrentMetaPass 29
76 #define audioMasterSetOutputSampleRate 30
78 #define audioMasterGetSpeakerArrangement 31 // deprecated in 2.4?
79 #define audioMasterGetVendorString 32
80 #define audioMasterGetProductString 33
81 #define audioMasterGetVendorVersion 34
82 #define audioMasterVendorSpecific 35
83 #define audioMasterSetIcon 36
84 #define audioMasterCanDo 37
85 #define audioMasterGetLanguage 38
86 #define audioMasterOpenWindow 39
87 #define audioMasterCloseWindow 40
88 #define audioMasterGetDirectory 41
89 #define audioMasterUpdateDisplay 42
90 #define audioMasterBeginEdit 43
91 #define audioMasterEndEdit 44
92 #define audioMasterOpenFileSelector 45
93 #define audioMasterCloseFileSelector 46 // currently unused
94 #define audioMasterEditFile 47 // currently unused
95 #define audioMasterGetChunkFile 48 // currently unused
96 #define audioMasterGetInputSpeakerArrangement 49 // currently unused
98 #define effFlagsHasEditor 1
99 #define effFlagsCanReplacing (1 << 4) // very likely
100 #define effFlagsIsSynth (1 << 8) // currently unused
104 #define effSetProgram 2
105 #define effGetProgram 3
106 #define effGetProgramName 5
107 #define effGetParamName 8
108 #define effSetSampleRate 10
109 #define effSetBlockSize 11
110 #define effMainsChanged 12
111 #define effEditGetRect 13
112 #define effEditOpen 14
113 #define effEditClose 15
114 #define effEditIdle 19
115 #define effEditTop 20
116 #define effProcessEvents 25
117 #define effGetPlugCategory 35
118 #define effGetEffectName 45
119 #define effGetVendorString 47
120 #define effGetProductString 48
121 #define effGetVendorVersion 49
124 #define effGetParameterProperties 56
125 #define effGetVstVersion 58
126 #define effShellGetNextPlugin 70
127 #define effStartProcess 71
128 #define effStopProcess 72
130 #define effBeginSetProgram 67
131 #define effEndSetProgram 68
133 #ifdef WORDS_BIGENDIAN
135 #define kEffectMagic 0x50747356
138 #define kEffectMagic 0x56737450
141 #define kVstLangEnglish 1
142 #define kVstMidiType 1
144 struct RemoteVstPlugin
;
146 #define kVstTransportChanged 1
147 #define kVstTransportPlaying (1 << 1)
148 #define kVstTransportCycleActive (1 << 2)
149 #define kVstTransportRecording (1 << 3)
151 #define kVstAutomationWriting (1 << 6)
152 #define kVstAutomationReading (1 << 7)
154 #define kVstNanosValid (1 << 8)
155 #define kVstPpqPosValid (1 << 9)
156 #define kVstTempoValid (1 << 10)
157 #define kVstBarsValid (1 << 11)
158 #define kVstCyclePosValid (1 << 12)
159 #define kVstTimeSigValid (1 << 13)
160 #define kVstSmpteValid (1 << 14)
161 #define kVstClockValid (1 << 15)
182 char noteOffVelocity
;
189 typedef struct _VstMidiEvent VstMidiEvent
;
194 char dump
[sizeof (VstMidiEvent
)];
198 typedef struct _VstEvent VstEvent
;
207 VstEvent
* events
[2];
210 enum Vestige2StringConstants
212 VestigeMaxNameLen
= 64,
213 VestigeMaxLabelLen
= 64,
214 VestigeMaxShortLabelLen
= 8,
215 VestigeMaxCategLabelLen
= 24,
216 VestigeMaxFileNameLen
= 100
222 kPlugCategUnknown
= 0,
227 kPlugCategSpacializer
,
230 kPlugCategRestoration
,
231 kPlugCategOfflineProcess
,
237 typedef struct _VstEvents VstEvents
;
239 struct _VstParameterProperties
241 float stepFloat
; /* float step */
242 float smallStepFloat
; /* small float step */
243 float largeStepFloat
; /* large float step */
244 char label
[VestigeMaxLabelLen
]; /* parameter label */
245 int32_t flags
; /* @see VstParameterFlags */
246 int32_t minInteger
; /* integer minimum */
247 int32_t maxInteger
; /* integer maximum */
248 int32_t stepInteger
; /* integer step */
249 int32_t largeStepInteger
; /* large integer step */
250 char shortLabel
[VestigeMaxShortLabelLen
]; /* short label, recommended: 6 + delimiter */
251 int16_t displayIndex
; /* index where this parameter should be displayed (starting with 0) */
252 int16_t category
; /* 0: no category, else group index + 1 */
253 int16_t numParametersInCategory
; /* number of parameters in category */
254 int16_t reserved
; /* zero */
255 char categoryLabel
[VestigeMaxCategLabelLen
]; /* category label, e.g. "Osc 1" */
256 char future
[16]; /* reserved for future use */
259 typedef struct _VstParameterProperties VstParameterProperties
;
261 enum VstParameterFlags
263 kVstParameterIsSwitch
= 1 << 0, /* parameter is a switch (on/off) */
264 kVstParameterUsesIntegerMinMax
= 1 << 1, /* minInteger, maxInteger valid */
265 kVstParameterUsesFloatStep
= 1 << 2, /* stepFloat, smallStepFloat, largeStepFloat valid */
266 kVstParameterUsesIntStep
= 1 << 3, /* stepInteger, largeStepInteger valid */
267 kVstParameterSupportsDisplayIndex
= 1 << 4, /* displayIndex valid */
268 kVstParameterSupportsDisplayCategory
= 1 << 5, /* category, etc. valid */
269 kVstParameterCanRamp
= 1 << 6 /* set if parameter value can ramp up/down */
274 // Never use virtual functions!!!
278 intptr_t (__cdecl
*dispatcher
) (struct _AEffect
*, int, int, intptr_t, void *, float);
279 // process, quite sure 08-0b
280 void (__cdecl
*process
) (struct _AEffect
*, float **, float **, int);
281 // setParameter 0c-0f
282 void (__cdecl
*setParameter
) (struct _AEffect
*, int, float);
283 // getParameter 10-13
284 float (__cdecl
*getParameter
) (struct _AEffect
*, int);
295 // Fill somewhere 28-2b
299 // Zeroes 30-33 34-37 38-3b
303 // An object? pointer 40-43
309 // plugin version 4c-4f
311 // processReplacing 50-53
312 void (__cdecl
*processReplacing
) (struct _AEffect
*, float **, float **, int);
315 typedef struct _AEffect AEffect
;
317 typedef struct _VstTimeInfo
319 /* info from online documentation of VST provided by Steinberg */
327 double cycleStartPos
;
329 int32_t timeSigNumerator
;
330 int32_t timeSigDenominator
;
332 int32_t smpteFrameRate
;
333 int32_t samplesToNextClock
;
338 typedef intptr_t (__cdecl
*audioMasterCallback
) (AEffect
*, int32_t, int32_t, intptr_t, void *, float);