Audacity 3.2.0
aeffectx.h
Go to the documentation of this file.
1/*
2 * aeffectx.h - simple header to allow VeSTige compilation and eventually work
3 *
4 * Copyright (c) 2006 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
5 *
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
22 *
23 */
24
25
26#ifndef _AEFFECTX_H
27#define _AEFFECTX_H
28
29#define CCONST(a, b, c, d)( ( ( (int) a ) << 24 ) | \
30 ( ( (int) b ) << 16 ) | \
31 ( ( (int) c ) << 8 ) | \
32 ( ( (int) d ) << 0 ) )
33
34const int audioMasterAutomate = 0;
35const int audioMasterVersion = 1;
37const int audioMasterIdle = 3;
39// unsupported? 5
40const int audioMasterWantMidi = 6;
41const int audioMasterGetTime = 7;
43const int audioMasterSetTime = 9;
44const int audioMasterTempoAt = 10;
47const int audioMasterIOChanged = 13;
48const int audioMasterNeedIdle = 14;
49const int audioMasterSizeWindow = 15;
65// unsupported? 31
66const int audioMasterGetSpeakerArrangement = 31; // deprecated in 2.4?
71const int audioMasterSetIcon = 36;
72const int audioMasterCanDo = 37;
74const int audioMasterOpenWindow = 39;
78const int audioMasterBeginEdit = 43;
79const int audioMasterEndEdit = 44;
81const int audioMasterCloseFileSelector = 46; // currently unused
82const int audioMasterEditFile = 47; // currently unused
83const int audioMasterGetChunkFile = 48; // currently unused
84const int audioMasterGetInputSpeakerArrangement = 49; // currently unused
85
86const int effFlagsHasEditor = 1;
87const int effFlagsCanReplacing = 1 << 4; // very likely
88const int effFlagsProgramChunks = 1 << 5; // from Ardour
89const int effFlagsIsSynth = 1 << 8; // currently unused
90
91const int effOpen = 0;
92const int effClose = 1; // currently unused
93const int effSetProgram = 2; // currently unused
94const int effGetProgram = 3; // currently unused
95// The next one was gleaned from http://www.kvraudio.com/forum/viewtopic.php?p=1905347
96const int effSetProgramName = 4;
97const int effGetProgramName = 5; // currently unused
98// The next two were gleaned from http://www.kvraudio.com/forum/viewtopic.php?p=1905347
99const int effGetParamLabel = 6;
100const int effGetParamDisplay = 7;
101const int effGetParamName = 8; // currently unused
102const int effSetSampleRate = 10;
103const int effSetBlockSize = 11;
104const int effMainsChanged = 12;
105const int effEditGetRect = 13;
106const int effEditOpen = 14;
107const int effEditClose = 15;
108const int effEditIdle = 19;
109const int effEditTop = 20;
110const int effIdentify = 22; // from http://www.asseca.org/vst-24-specs/efIdentify.html
111const int effGetChunk = 23; // from Ardour
112const int effSetChunk = 24; // from Ardour
113const int effProcessEvents = 25;
114// The next one was gleaned from http://www.asseca.org/vst-24-specs/efCanBeAutomated.html
115const int effCanBeAutomated = 26;
116// The next one was gleaned from http://www.kvraudio.com/forum/viewtopic.php?p=1905347
118// The next one was gleaned from http://www.asseca.org/vst-24-specs/efGetPlugCategory.html
119const int effGetPlugCategory = 35;
120const int effGetEffectName = 45;
121const int effGetParameterProperties = 56; // missing
122const int effGetVendorString = 47;
123const int effGetProductString = 48;
124const int effGetVendorVersion = 49;
125const int effCanDo = 51; // currently unused
126// The next one was gleaned from http://www.asseca.org/vst-24-specs/efIdle.html
127const int effIdle = 53;
128const int effGetVstVersion = 58; // currently unused
129// The next one was gleaned from http://www.asseca.org/vst-24-specs/efBeginSetProgram.html
130const int effBeginSetProgram = 67;
131// The next one was gleaned from http://www.asseca.org/vst-24-specs/efEndSetProgram.html
132const int effEndSetProgram = 68;
133// The next one was gleaned from http://www.asseca.org/vst-24-specs/efShellGetNextPlugin.html
135// The next one was gleaned from http://www.asseca.org/vst-24-specs/efBeginLoadBank.html
136const int effBeginLoadBank = 75;
137// The next one was gleaned from http://www.asseca.org/vst-24-specs/efBeginLoadProgram.html
138const int effBeginLoadProgram = 76;
139
140// The next two were gleaned from http://www.kvraudio.com/forum/printview.php?t=143587&start=0
141const int effStartProcess = 71;
142const int effStopProcess = 72;
143
144const int kEffectMagic = CCONST( 'V', 's', 't', 'P' );
145const int kVstLangEnglish = 1;
146const int kVstMidiType = 1;
147
148const int kVstNanosValid = 1 << 8;
149const int kVstPpqPosValid = 1 << 9;
150const int kVstTempoValid = 1 << 10;
151const int kVstBarsValid = 1 << 11;
152const int kVstCyclePosValid = 1 << 12;
153const int kVstTimeSigValid = 1 << 13;
154const int kVstSmpteValid = 1 << 14; // from Ardour
155const int kVstClockValid = 1 << 15; // from Ardour
156
157const int kVstTransportPlaying = 1 << 1;
158const int kVstTransportCycleActive = 1 << 2;
160
161
162class RemoteVstPlugin;
163
164
166{
167public:
168 // 00
169 int type;
170 // 04
172 // 08
174 // 0c?
175 int flags;
176 // 10?
178 // 14?
180 // 18
181 char midiData[4];
182 // 1c?
183 char detune;
184 // 1d?
186 // 1e?
188 // 1f?
190
191} ;
192
193
194
195
197{
198 char dump[sizeof( VstMidiEvent )];
199
200} ;
201
202
203
204
206{
207public:
208 // 00
210 // 04
211 void *reserved;
212 // 08
214
215} ;
216
217
218
219
220// Not finished, neither really used
222{
223public:
224/* float stepFloat;
225 char label[64];
226 int flags;
227 int minInteger;
228 int maxInteger;
229 int stepInteger;
230 char shortLabel[8];
231 int category;
232 char categoryLabel[24];
233 char empty[128];*/
234
238 char label[64];
239 unsigned int flags;
240 unsigned int minInteger;
241 unsigned int maxInteger;
242 unsigned int stepInteger;
243 unsigned int largeStepInteger;
244 char shortLabel[8];
245 unsigned short displayIndex;
246 unsigned short category;
248 unsigned short reserved;
250 char future[16];
251
252} ;
253
254
255#include <stdint.h>
256
258{
259public:
260 // Never use virtual functions!!!
261 // 00-03
262 int magic;
263 // dispatcher 04-07
264 intptr_t (* dispatcher)( AEffect * , int , int , intptr_t, void * , float );
265 // process, quite sure 08-0b
266 void (* process)( AEffect * , float * * , float * * , int );
267 // setParameter 0c-0f
268 void (* setParameter)( AEffect * , int , float );
269 // getParameter 10-13
270 float (* getParameter)( AEffect * , int );
271 // programs 14-17
273 // Params 18-1b
275 // Input 1c-1f
277 // Output 20-23
279 // flags 24-27
280 int flags;
281 // Fill somewhere 28-2b
282 void * ptr1;
283 void * ptr2;
285 // Zeroes 34-37 38-3b
288 // 1.0f 3c-3f
290 // An object? pointer 40-43
291 void *ptr3;
292 // Zeroes 44-47
293 void *user;
294 // Id 48-4b
295 int32_t uniqueID;
296 int32_t version;
297 // processReplacing 50-53
298 void (* processReplacing)( AEffect * , float * * , float * * , int );
299
300} ;
301
302
303
304
306{
307public:
308 // 00
309 double samplePos;
310 // 08
312 // 10
314 // 18
315 double ppqPos;
316 // 20?
317 double tempo;
318 // 28
320 // 30?
322 // 38?
324 // 40?
326 // 44?
328 // unconfirmed 48 4c 50
329 char empty3[4 + 4 + 4];
330 // 54
331 int flags;
332
333} ;
334
335
336
337typedef intptr_t (* audioMasterCallback)( AEffect * , int32_t, int32_t, intptr_t, void * , float );
338
339
340// from http://www.asseca.org/vst-24-specs/efGetParameterProperties.html
342{
343 kVstParameterIsSwitch = 1 << 0, // parameter is a switch (on/off)
344 kVstParameterUsesIntegerMinMax = 1 << 1, // minInteger, maxInteger valid
345 kVstParameterUsesFloatStep = 1 << 2, // stepFloat, smallStepFloat, largeStepFloat valid
346 kVstParameterUsesIntStep = 1 << 3, // stepInteger, largeStepInteger valid
347 kVstParameterSupportsDisplayIndex = 1 << 4, // displayIndex valid
348 kVstParameterSupportsDisplayCategory = 1 << 5, // category, etc. valid
349 kVstParameterCanRamp = 1 << 6 // set if parameter value can ramp up/down
351
352// from http://www.asseca.org/vst-24-specs/efBeginLoadProgram.html
354{
355 int32_t version; // Format Version (should be 1)
356 int32_t pluginUniqueID; // UniqueID of the plug-in
357 int32_t pluginVersion; // Plug-in Version
358 int32_t numElements; // Number of Programs (Bank) or Parameters (Program)
359 char future[48]; // Reserved for future use
360};
361
362// from http://www.asseca.org/vst-24-specs/efGetPlugCategory.html
364{
365 kPlugCategUnknown = 0, // 0=Unknown, category not implemented
366 kPlugCategEffect, // 1=Simple Effect
367 kPlugCategSynth, // 2=VST Instrument (Synths, samplers,...)
368 kPlugCategAnalysis, // 3=Scope, Tuner, ...
369 kPlugCategMastering, // 4=Dynamics, ...
370 kPlugCategSpacializer, // 5=Panners, ...
371 kPlugCategRoomFx, // 6=Delays and Reverbs
372 kPlugSurroundFx, // 7=Dedicated surround processor
373 kPlugCategRestoration, // 8=Denoiser, ...
374 kPlugCategOfflineProcess, // 9=Offline Process
375 kPlugCategShell, // 10=Plug-in is container of other plug-ins @see effShellGetNextPlugin()
376 kPlugCategGenerator, // 11=ToneGenerator, ...
377 kPlugCategMaxCount // 12=Marker to count the categories
379
380
381
383{
384public:
385 short top;
386 short left;
387 short bottom;
388 short right;
389} ;
390
391#endif
VstPlugCategory
Definition: aeffectx.h:364
@ kPlugCategMaxCount
Definition: aeffectx.h:377
@ kPlugCategGenerator
Definition: aeffectx.h:376
@ kPlugCategSynth
Definition: aeffectx.h:367
@ kPlugCategRestoration
Definition: aeffectx.h:373
@ kPlugSurroundFx
Definition: aeffectx.h:372
@ kPlugCategAnalysis
Definition: aeffectx.h:368
@ kPlugCategOfflineProcess
Definition: aeffectx.h:374
@ kPlugCategRoomFx
Definition: aeffectx.h:371
@ kPlugCategUnknown
Definition: aeffectx.h:365
@ kPlugCategMastering
Definition: aeffectx.h:369
@ kPlugCategShell
Definition: aeffectx.h:375
@ kPlugCategEffect
Definition: aeffectx.h:366
@ kPlugCategSpacializer
Definition: aeffectx.h:370
const int audioMasterGetAutomationState
Definition: aeffectx.h:58
const int audioMasterGetChunkFile
Definition: aeffectx.h:83
const int effGetParamDisplay
Definition: aeffectx.h:100
const int effEditIdle
Definition: aeffectx.h:108
const int audioMasterGetDirectory
Definition: aeffectx.h:76
const int audioMasterOpenWindow
Definition: aeffectx.h:74
const int audioMasterOfflineRead
Definition: aeffectx.h:60
const int effGetVendorVersion
Definition: aeffectx.h:124
const int audioMasterCloseWindow
Definition: aeffectx.h:75
const int audioMasterTempoAt
Definition: aeffectx.h:44
const int effGetVstVersion
Definition: aeffectx.h:128
const int kVstLangEnglish
Definition: aeffectx.h:145
const int effIdle
Definition: aeffectx.h:127
const int kVstTimeSigValid
Definition: aeffectx.h:153
const int effEditClose
Definition: aeffectx.h:107
const int audioMasterSetTime
Definition: aeffectx.h:43
const int kVstCyclePosValid
Definition: aeffectx.h:152
const int effMainsChanged
Definition: aeffectx.h:104
const int effGetProgramName
Definition: aeffectx.h:97
const int effCanDo
Definition: aeffectx.h:125
const int effGetProgram
Definition: aeffectx.h:94
const int effGetParamLabel
Definition: aeffectx.h:99
const int kVstNanosValid
Definition: aeffectx.h:148
const int effGetChunk
Definition: aeffectx.h:111
const int audioMasterGetVendorVersion
Definition: aeffectx.h:69
const int audioMasterGetNumAutomatableParameters
Definition: aeffectx.h:45
const int effCanBeAutomated
Definition: aeffectx.h:115
const int audioMasterGetCurrentProcessLevel
Definition: aeffectx.h:57
const int kEffectMagic
Definition: aeffectx.h:144
const int effGetProductString
Definition: aeffectx.h:123
intptr_t(* audioMasterCallback)(AEffect *, int32_t, int32_t, intptr_t, void *, float)
Definition: aeffectx.h:337
const int effStartProcess
Definition: aeffectx.h:141
const int effShellGetNextPlugin
Definition: aeffectx.h:134
const int effEditTop
Definition: aeffectx.h:109
const int effFlagsProgramChunks
Definition: aeffectx.h:88
const int audioMasterSetIcon
Definition: aeffectx.h:71
const int effGetParamName
Definition: aeffectx.h:101
const int effGetProgramNameIndexed
Definition: aeffectx.h:117
const int audioMasterNeedIdle
Definition: aeffectx.h:48
const int effEditGetRect
Definition: aeffectx.h:105
const int audioMasterGetProductString
Definition: aeffectx.h:68
const int effSetBlockSize
Definition: aeffectx.h:103
const int effSetProgramName
Definition: aeffectx.h:96
const int effGetVendorString
Definition: aeffectx.h:122
const int audioMasterGetParameterQuantization
Definition: aeffectx.h:46
const int audioMasterGetInputLatency
Definition: aeffectx.h:52
const int kVstTransportPlaying
Definition: aeffectx.h:157
const int effClose
Definition: aeffectx.h:92
const int kVstSmpteValid
Definition: aeffectx.h:154
const int audioMasterOfflineWrite
Definition: aeffectx.h:61
const int audioMasterWantMidi
Definition: aeffectx.h:40
const int audioMasterPinConnected
Definition: aeffectx.h:38
const int effEditOpen
Definition: aeffectx.h:106
const int effFlagsIsSynth
Definition: aeffectx.h:89
const int audioMasterOfflineStart
Definition: aeffectx.h:59
const int kVstTransportChanged
Definition: aeffectx.h:159
const int audioMasterWillReplaceOrAccumulate
Definition: aeffectx.h:56
const int effProcessEvents
Definition: aeffectx.h:113
const int audioMasterUpdateDisplay
Definition: aeffectx.h:77
const int audioMasterGetOutputLatency
Definition: aeffectx.h:53
const int kVstMidiType
Definition: aeffectx.h:146
const int effGetParameterProperties
Definition: aeffectx.h:121
const int audioMasterGetTime
Definition: aeffectx.h:41
const int effGetEffectName
Definition: aeffectx.h:120
const int audioMasterSetOutputSampleRate
Definition: aeffectx.h:64
const int audioMasterGetInputSpeakerArrangement
Definition: aeffectx.h:84
const int effGetPlugCategory
Definition: aeffectx.h:119
const int audioMasterOpenFileSelector
Definition: aeffectx.h:80
const int audioMasterEndEdit
Definition: aeffectx.h:79
const int kVstClockValid
Definition: aeffectx.h:155
const int effSetProgram
Definition: aeffectx.h:93
const int audioMasterIdle
Definition: aeffectx.h:37
const int audioMasterIOChanged
Definition: aeffectx.h:47
const int audioMasterGetNextPlug
Definition: aeffectx.h:55
const int effFlagsCanReplacing
Definition: aeffectx.h:87
VstParameterFlags
Definition: aeffectx.h:342
@ kVstParameterUsesIntegerMinMax
Definition: aeffectx.h:344
@ kVstParameterUsesIntStep
Definition: aeffectx.h:346
@ kVstParameterUsesFloatStep
Definition: aeffectx.h:345
@ kVstParameterSupportsDisplayIndex
Definition: aeffectx.h:347
@ kVstParameterSupportsDisplayCategory
Definition: aeffectx.h:348
@ kVstParameterIsSwitch
Definition: aeffectx.h:343
@ kVstParameterCanRamp
Definition: aeffectx.h:349
const int effBeginSetProgram
Definition: aeffectx.h:130
const int effStopProcess
Definition: aeffectx.h:142
const int audioMasterOfflineGetCurrentPass
Definition: aeffectx.h:62
const int audioMasterEditFile
Definition: aeffectx.h:82
const int effOpen
Definition: aeffectx.h:91
const int effBeginLoadBank
Definition: aeffectx.h:136
const int audioMasterGetPreviousPlug
Definition: aeffectx.h:54
#define CCONST(a, b, c, d)
Definition: aeffectx.h:29
const int audioMasterProcessEvents
Definition: aeffectx.h:42
const int audioMasterGetBlockSize
Definition: aeffectx.h:51
const int kVstTransportCycleActive
Definition: aeffectx.h:158
const int effSetSampleRate
Definition: aeffectx.h:102
const int audioMasterCloseFileSelector
Definition: aeffectx.h:81
const int audioMasterCurrentId
Definition: aeffectx.h:36
const int kVstTempoValid
Definition: aeffectx.h:150
const int audioMasterAutomate
Definition: aeffectx.h:34
const int audioMasterVendorSpecific
Definition: aeffectx.h:70
const int effBeginLoadProgram
Definition: aeffectx.h:138
const int audioMasterGetSpeakerArrangement
Definition: aeffectx.h:66
const int kVstPpqPosValid
Definition: aeffectx.h:149
const int audioMasterVersion
Definition: aeffectx.h:35
const int audioMasterBeginEdit
Definition: aeffectx.h:78
const int audioMasterGetVendorString
Definition: aeffectx.h:67
const int audioMasterGetSampleRate
Definition: aeffectx.h:50
const int effFlagsHasEditor
Definition: aeffectx.h:86
const int kVstBarsValid
Definition: aeffectx.h:151
const int audioMasterOfflineGetCurrentMetaPass
Definition: aeffectx.h:63
const int effEndSetProgram
Definition: aeffectx.h:132
const int audioMasterGetLanguage
Definition: aeffectx.h:73
const int audioMasterSizeWindow
Definition: aeffectx.h:49
const int effIdentify
Definition: aeffectx.h:110
const int effSetChunk
Definition: aeffectx.h:112
const int audioMasterCanDo
Definition: aeffectx.h:72
VST Effects class, conforming to VST layout.
Definition: aeffectx.h:258
int numParams
Definition: aeffectx.h:274
int empty3a
Definition: aeffectx.h:286
void * ptr2
Definition: aeffectx.h:283
int numOutputs
Definition: aeffectx.h:278
void * ptr3
Definition: aeffectx.h:291
int32_t version
Definition: aeffectx.h:296
void * ptr1
Definition: aeffectx.h:282
int numInputs
Definition: aeffectx.h:276
int empty3b
Definition: aeffectx.h:287
void(* setParameter)(AEffect *, int, float)
Definition: aeffectx.h:268
int initialDelay
Definition: aeffectx.h:284
int flags
Definition: aeffectx.h:280
int numPrograms
Definition: aeffectx.h:272
float unkown_float
Definition: aeffectx.h:289
int magic
Definition: aeffectx.h:262
void(* processReplacing)(AEffect *, float **, float **, int)
Definition: aeffectx.h:298
void(* process)(AEffect *, float **, float **, int)
Definition: aeffectx.h:266
int32_t uniqueID
Definition: aeffectx.h:295
intptr_t(* dispatcher)(AEffect *, int, int, intptr_t, void *, float)
Definition: aeffectx.h:264
float(* getParameter)(AEffect *, int)
Definition: aeffectx.h:270
void * user
Definition: aeffectx.h:293
char dump[sizeof(VstMidiEvent)]
Definition: aeffectx.h:198
VstEvent * events[1]
Definition: aeffectx.h:213
int numEvents
Definition: aeffectx.h:209
void * reserved
Definition: aeffectx.h:211
char reserved1
Definition: aeffectx.h:187
char midiData[4]
Definition: aeffectx.h:181
char noteOffVelocity
Definition: aeffectx.h:185
int noteLength
Definition: aeffectx.h:177
char reserved2
Definition: aeffectx.h:189
int deltaFrames
Definition: aeffectx.h:173
int noteOffset
Definition: aeffectx.h:179
int byteSize
Definition: aeffectx.h:171
char detune
Definition: aeffectx.h:183
unsigned short displayIndex
Definition: aeffectx.h:245
unsigned int maxInteger
Definition: aeffectx.h:241
unsigned short reserved
Definition: aeffectx.h:248
unsigned int minInteger
Definition: aeffectx.h:240
unsigned int largeStepInteger
Definition: aeffectx.h:243
unsigned int flags
Definition: aeffectx.h:239
unsigned short category
Definition: aeffectx.h:246
unsigned int stepInteger
Definition: aeffectx.h:242
unsigned short numParametersInCategory
Definition: aeffectx.h:247
char categoryLabel[24]
Definition: aeffectx.h:249
short right
Definition: aeffectx.h:388
short left
Definition: aeffectx.h:386
short top
Definition: aeffectx.h:385
short bottom
Definition: aeffectx.h:387
double tempo
Definition: aeffectx.h:317
double sampleRate
Definition: aeffectx.h:311
double cycleEndPos
Definition: aeffectx.h:323
double barStartPos
Definition: aeffectx.h:319
char empty3[4+4+4]
Definition: aeffectx.h:329
double nanoSeconds
Definition: aeffectx.h:313
double cycleStartPos
Definition: aeffectx.h:321
int timeSigDenominator
Definition: aeffectx.h:327
double ppqPos
Definition: aeffectx.h:315
double samplePos
Definition: aeffectx.h:309
int timeSigNumerator
Definition: aeffectx.h:325
int32_t version
Definition: aeffectx.h:355
int32_t pluginUniqueID
Definition: aeffectx.h:356
int32_t numElements
Definition: aeffectx.h:358
int32_t pluginVersion
Definition: aeffectx.h:357
char future[48]
Definition: aeffectx.h:359