Added support for Ardour
[klaudia.git] / fst / vestige / aeffectx.h
blob28a42d2d8756b75e65b60f63d8baddaeabf7c1b3
1 /*
2 * aeffectx.h - simple header to allow VeSTige compilation and eventually work
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
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.
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.
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.
26 #ifndef _AEFFECTX_H
27 #define _AEFFECTX_H
30 #define audioMasterAutomate 0
31 #define audioMasterVersion 1
32 #define audioMasterCurrentId 2
33 #define audioMasterIdle 3
34 #define audioMasterPinConnected 4
35 // unsupported? 5
36 #define audioMasterWantMidi 6
37 #define audioMasterGetTime 7
38 #define audioMasterProcessEvents 8
39 #define audioMasterSetTime 9
40 #define audioMasterTempoAt 10
41 #define audioMasterGetNumAutomatableParameters 11
42 #define audioMasterGetParameterQuantization 12
43 #define audioMasterIOChanged 13
44 #define audioMasterNeedIdle 14
45 #define audioMasterSizeWindow 15
46 #define audioMasterGetSampleRate 16
47 #define audioMasterGetBlockSize 17
48 #define audioMasterGetInputLatency 18
49 #define audioMasterGetOutputLatency 19
50 #define audioMasterGetPreviousPlug 20
51 #define audioMasterGetNextPlug 21
52 #define audioMasterWillReplaceOrAccumulate 22
53 #define audioMasterGetCurrentProcessLevel 23
54 #define audioMasterGetAutomationState 24
55 #define audioMasterOfflineStart 25
56 #define audioMasterOfflineRead 26
57 #define audioMasterOfflineWrite 27
58 #define audioMasterOfflineGetCurrentPass 28
59 #define audioMasterOfflineGetCurrentMetaPass 29
60 #define audioMasterSetOutputSampleRate 30
61 // unsupported? 31
62 #define audioMasterGetSpeakerArrangement 31 // deprecated in 2.4?
63 #define audioMasterGetVendorString 32
64 #define audioMasterGetProductString 33
65 #define audioMasterGetVendorVersion 34
66 #define audioMasterVendorSpecific 35
67 #define audioMasterSetIcon 36
68 #define audioMasterCanDo 37
69 #define audioMasterGetLanguage 38
70 #define audioMasterOpenWindow 39
71 #define audioMasterCloseWindow 40
72 #define audioMasterGetDirectory 41
73 #define audioMasterUpdateDisplay 42
74 #define audioMasterBeginEdit 43
75 #define audioMasterEndEdit 44
76 #define audioMasterOpenFileSelector 45
77 #define audioMasterCloseFileSelector 46// currently unused
78 #define audioMasterEditFile 47// currently unused
79 #define audioMasterGetChunkFile 48// currently unused
80 #define audioMasterGetInputSpeakerArrangement 49 // currently unused
82 #define effFlagsHasEditor 1
83 // very likely
84 #define effFlagsCanReplacing (1 << 4)
85 // currently unused
86 #define effFlagsIsSynth (1 << 8)
88 #define effOpen 0
89 //currently unused
90 #define effClose 1
91 // currently unused
92 #define effSetProgram 2
93 // currently unused
94 #define effGetProgram 3
95 // currently unused
96 #define effGetProgramName 5
97 #define effGetParamLabel 6
98 // currently unused
99 #define effGetParamName 8
100 // this is a guess
101 #define effSetSampleRate 10
102 #define effSetBlockSize 11
103 #define effMainsChanged 12
104 #define effEditGetRect 13
105 #define effEditOpen 14
106 #define effEditClose 15
107 #define effEditIdle 19
108 #define effProcessEvents 25
109 #define effGetEffectName 45
110 // missing
111 #define effGetParameterProperties 47
112 #define effGetVendorString 47
113 #define effGetProductString 48
114 #define effGetVendorVersion 49
115 // currently unused
116 #define effCanDo 51
117 // currently unused
118 #define effGetVstVersion 58
120 #ifdef WORDS_BIGENDIAN
121 // "VstP"
122 #define kEffectMagic 0x50747356
123 #else
124 // "PtsV"
125 #define kEffectMagic 0x56737450
126 #endif
128 #define kVstLangEnglish 1
129 #define kVstMidiType 1
130 #define kVstTransportPlaying (1 << 1)
131 #define kVstParameterUsesFloatStep (1 << 2)
132 #define kVstTempoValid (1 << 10)
133 #define kVstBarsValid (1 << 11)
134 #define kVstTransportChanged 1
136 typedef struct VSTPlugin VSTPlugin;
139 typedef struct VstMidiEvent
141 // 00
142 int type;
143 // 04
144 int byteSize;
145 // 08
146 int deltaFrames;
147 // 0c?
148 int flags;
149 // 10?
150 int noteLength;
151 // 14?
152 int noteOffset;
153 // 18
154 char midiData[4];
155 // 1c?
156 char detune;
157 // 1d?
158 char noteOffVelocity;
159 // 1e?
160 char reserved1;
161 // 1f?
162 char reserved2;
164 } VstMidiEvent;
169 typedef struct VstEvent
171 char dump[sizeof( VstMidiEvent )];
173 } VstEvent ;
178 typedef struct VstEvents
180 // 00
181 int numEvents;
182 // 04
183 int reserved;
184 // 08
185 VstEvent * events[];
186 } VstEvents;
191 // Not finished, neither really used
192 typedef struct VstParameterProperties
194 float stepFloat;
195 char label[64];
196 int flags;
197 int minInteger;
198 int maxInteger;
199 int stepInteger;
200 char shortLabel[8];
201 int category;
202 char categoryLabel[24];
203 char empty[128];
205 } VstParameterProperties;
210 typedef struct AEffect
212 // Never use c++!!!
213 // 00-03
214 int magic;
215 // dispatcher 04-07
216 int (* dispatcher)( struct AEffect * , int , int , int , void * , float );
217 // process, quite sure 08-0b
218 void (* process)( struct AEffect * , float * * , float * * , int );
219 // setParameter 0c-0f
220 void (* setParameter)( struct AEffect * , int , float );
221 // getParameter 10-13
222 float (* getParameter)( struct AEffect * , int );
223 // programs 14-17
224 int numPrograms;
225 // Params 18-1b
226 int numParams;
227 // Input 1c-1f
228 int numInputs;
229 // Output 20-23
230 int numOutputs;
231 // flags 24-27
232 int flags;
233 // Fill somewhere 28-2b
234 VSTPlugin * user;
235 // Zeroes 2c-2f 30-33 34-37 38-3b
236 char empty3[4 + 4 + 4 + 4];
237 // 1.0f 3c-3f
238 float unkown_float;
239 // An object? pointer 40-43
240 char empty4[4];
241 // Zeroes 44-47
242 char empty5[4];
243 // Id 48-4b
244 char unused_id[4];
245 // Don't know 4c-4f
246 char unknown1[4];
247 // processReplacing 50-53
248 void (* processReplacing)( struct AEffect * , float * * , float * * , int );
250 int uniqueID;
252 } AEffect;
257 typedef struct VstTimeInfo
259 // 00
260 double samplePos;
261 // 08
262 double sampleRate;
263 // unconfirmed 10 18
264 char empty1[8 + 8];
265 // 20?
266 double tempo;
267 // unconfirmed 28 30 38
268 char empty2[8 + 8 + 8];
269 // 40?
270 int timeSigNumerator;
271 // 44?
272 int timeSigDenominator;
273 // unconfirmed 48 4c 50
274 char empty3[4 + 4 + 4];
275 // 54
276 int flags;
278 } VstTimeInfo;
283 typedef long int (* audioMasterCallback)( AEffect * , long int , long int ,
284 long int , void * , float );
285 // we don't use it, may be noise
286 #define VSTCALLBACK
291 #endif