Debian Codegraph @

notes/opcodes.org

raw
1
2 * opcode tables
3
4 ** host
5
6 | opcode | value | notes |
7 |--------+----------------------------------------+-----------------------------------------------------------------------------------|
8 | 0 | audioMasterAutomate | |
9 | 1 | audioMasterVersion | :JUCE returns 2400 |
10 | 2 | audioMasterCurrentId? | :REAPER returns 0xDEAD |
11 | | | :REAPER-plugins call this in the ctor |
12 | 6 | audioMasterWantMidi | :called as response to effMainsChanged with ivalue=1 |
13 | | | :REAPER returns 1 |
14 | 7 | audioMasterGetTime | :called by hypercyclic/tonespace as response to effMainsChanged with ivalue=65024 |
15 | | | :REAPER returns an address |
16 | 8 | audioMasterProcessEvents | :REAPER returns 1 |
17 | | | :REAPER crashes with tained VstEvents-data |
18 | 10 | audioMasterTempoAt | |
19 | 11 | ? | :REAPER returns 0x10000 (65536) |
20 | 12 | ? | :REAPER returns 1 |
21 | 13 | ? | :called with 0-args in Protoverb:main and hypercyclic:eff:12 |
22 | 13? | ? | :Protoverb calls in main (and as response to effcode:30514?) |
23 | 14 | ? | :Renoise_Redux calls this (without args) in main |
24 | | | :REAPER returns 0 |
25 | 15 | audioMasterSizeWindow | |
26 | 16 | audioMasterGetSampleRate | |
27 | 17 | audioMasterGetBlockSize | |
28 | 19 | ? | :REAPER returns 0x2800, 0x33FF, 0x2FFF, 0x3400, 0x3000 when called... |
29 | | | :...repeatedly while handling effProcessEvents (args are ignored) |
30 | 23 | audioMasterGetCurrentProcessLevel | :called by JUCE-plugins with 0-args as response to effMainsChanged |
31 | 32 | audioMasterGetVendorString | |
32 | 33 | audioMasterGetProductString | |
33 | 34 | audioMasterGetVendorVersion | :JUCE returns 0x0101 (257) |
34 | 37 | audioMasterCanDo | |
35 | 42 | ? | :Protoverb calls as response to effSetProgramName |
36 | 43 | audioMasterBeginEdit | :called by JUCE-plugins with index of a GUI-changed parameter (no more args) |
37 | 44 | audioMasterEndEdit | :called by JUCE-plugins with index of a GUI-changed parameter (no more args) |
38 | 48 | audioMasterGetDirectory? | :REAPER returns filename of reaper-project file (.RPP) |
39 |--------+----------------------------------------+-----------------------------------------------------------------------------------|
40 | | audioMasterCurrentId? | |
41 | | audioMasterGetDirectory? | |
42 | | audioMasterUpdateDisplay | |
43 | | audioMasterGetAutomationState | |
44 | | audioMasterGetNumAutomatableParameters | |
45 | | audioMasterIdle | |
46 | | audioMasterIOChanged | |
47 | | audioMasterNeedIdle | |
48 | | audioMasterPinConnected | |
49 | | audioMasterSetOutputSampleRate | |
50 |--------+----------------------------------------+-----------------------------------------------------------------------------------|
51 | | audioMasterGetLanguage | JUCE-ignore |
52 | | audioMasterGetOutputSpeakerArrangement | JUCE-ignore |
53 | | audioMasterGetParameterQuantization | JUCE-ignore |
54 | | audioMasterGetPreviousPlug | JUCE-ignore |
55 | | audioMasterGetNextPlug | JUCE-ignore |
56 | | audioMasterSetTime | JUCE-ignore |
57 | | audioMasterWillReplaceOrAccumulate | JUCE-ignore |
58 | | audioMasterGetInputLatency | JUCE-ignore |
59 | | audioMasterGetOutputLatency | JUCE-ignore |
60 | | audioMasterOpenWindow | JUCE-ignore |
61 | | audioMasterCloseWindow | JUCE-ignore |
62 | | audioMasterSetIcon | JUCE-ignore |
63 | | audioMasterOfflineGetCurrentMetaPass | JUCE-ignore |
64 | | audioMasterOfflineGetCurrentPass | JUCE-ignore |
65 | | audioMasterOfflineRead | JUCE-ignore |
66 | | audioMasterOfflineStart | JUCE-ignore |
67 | | audioMasterOfflineWrite | JUCE-ignore |
68 | | audioMasterVendorSpecific | JUCE-ignore |
69 | | | |
70
71
72
73 ** plugin
74
75
76 | opcode | value | notes |
77 |------------+-----------------------------+---------------------------------------------------------------------------------------------------------|
78 | 0 | effOpen | :REAPER calls with 0 (at the very beginning) |
79 | 1 | effClose | :CRASH |
80 | | | :REAPER calls with 0 (at the very end) |
81 | 2 | effSetProgram | set program# via ivalue |
82 | 3 | effGetProgram | returns current program# |
83 | 4 | effSetProgramName | :needs a valid ptr, Protoverb calls hostCode:42 |
84 | 5 | effGetProgramName | writes current program name into ptr |
85 | 6 | effGetParamLabel | unit (e.g. "dB") |
86 | 7 | effGetParamDisplay | string representation of current value (e.g. "-23") |
87 | 8 | effGetParamName | human readable name (e.g. "Gain") |
88 | 9 | | |
89 | 10 | effSetSampleRate | :Protoverb prints "AM_AudioMan::reset()" |
90 | 11 | effSetBlockSize | |
91 | 12 | effMainsChanged | :Protoverb does resume/reset and calls audioMasterWantMidi |
92 | | | :Digits calls audioMasterWantMidi |
93 | | | :BowEcho/Danaides calls audioMasterWantMidi, audioMasterGetCurrentProcessLevel |
94 | | | :hypercyclic/tonespace calls audioMasterWantMidi, audioMasterGetTime, audioMasterGetCurrentProcessLevel |
95 | | | :REAPER calls with ivalue=1/0 |
96 | 13 | effEditGetRect | :Protoverb prints "AM_VST_Editor::getRect" and CRASH |
97 | 14 | effEditOpen | :Protoverb prints "AM_VST_Editor::open" and EXIT |
98 | 15 | effEditClose | :Protoverb prints "closed editor." |
99 | 19 | effEditIdle | :REAPER calls repeatedly every 50ms |
100 | | | :JUCE (>=7?) requires polling for GUI |
101 | 22 | effIdentify | :Protoverv returns 0x4E764566 |
102 | 23 | effGetChunk | :Protoverb returns 0x317 (or 0x307) and writes an address into ptr |
103 | 24 | effSetChunk | :Protoverb returns 1 |
104 | 25 | effProcessEvents | :Protoverb returns 1 |
105 | 26 | | :Protoverb returns 1 |
106 | 29 | effGetProgramNameIndexed | :Protoverb returns 1 and ptr:"initialize" |
107 | 33 | effGetInputProperties | :Protoverb returns 1 and ptr:"Protoverb-In0" |
108 | 34 | effGetOutputProperties | :Protoverb returns 1 and ptr:"Protoverb-Out0" |
109 | 35 | effGetPlugCategory | :JUCE RETURNS VstPlugCategory |
110 | 35 | | :REAPER calls with 0 |
111 | | | :InstaLooper returns 0 |
112 | | | :Protoverb/BowEcho/Danaides/reacom.vst returns 1 |
113 | | | :Digits/hypercyclic/tonespace returns 2 |
114 | 41 | | :crashes when called with (0,0,"name41",0) |
115 | 45 | effGetEffectName | :Protoverb returns 1 and ptr:"Protoverb" |
116 | 47 | effGetVendorString | :Protoverb returns 1 and ptr:"u-he"; prints getVendorString() |
117 | 48 | effGetProductString | :Protoverb returns 1 and ptr:"Protoverb 1.0.0" |
118 | 49 | effGetVendorVersion | :Protoverb returns 0x10000 |
119 | 50 | effVendorSpecific | :REAPER only calls this if 'hasCockosExtensions' is supported |
120 | 51 | effCanDo | :Protoverb returns 0xFFFFFFFFFFFFFFFF (with ptr:"") |
121 | 53 | | :REAPER calls repeatedly every 50ms |
122 | 56 | | :REAPER calls with ptr to zeroed memory |
123 | | | :all return 0 |
124 | 58 | effGetVstVersion | :Protoverb returns 2400 (0x960) |
125 | 59 | effKeysRequired? | :Protoverb prints "u-he plugin doesn't use key" |
126 | 63 | | :Protoverb returns 0xFFFFFFFFFFFFFFFF (with ptr:"") |
127 | 71 | | :REAPER calls with 0 |
128 | | | :Protoverb returns 1, rest returns 0 |
129 | 72 | | :REAPER calls with 0 |
130 | 77 | effSetProcessPrecision | :REAPER calls with 1 |
131 | | | :Protoverb returns 1, rest returns 0 |
132 | 30514 | | :Protoverb calls hostCode:13 |
133 | 0xDEADBEEF | | :REAPER ask for function? |
134 |------------+-----------------------------+---------------------------------------------------------------------------------------------------------|
135 | | effGetTailSize | |
136 | | effGetCurrentMidiProgram | |
137 | | effGetSpeakerArrangement | |
138 | | effGetNumMidiInputChannels | |
139 | | effGetNumMidiOutputChannels | |
140 | | | |
141 | | effCanBeAutomated | :takes index |
142 | | effString2Parameter | |
143 | | effSetSpeakerArrangement | |
144 | | effSetBypass | |
145 | | effSetTotalSampleToProcess | |
146 | | effConnectInput | |
147 | | effConnectOutput | |
148 | | effIdle | |
149 | | effShellGetNextPlugin | |
150 | | effStartProcess | |
151 | | effStopProcess | |
152 | | effEditDraw | |
153 | | effEditMouse | |
154 | | effEditSleep | |
155 | | effEditTop | |
156
157 ** flags
158
159 | bit | name | notes |
160 |-----+----------------------------+-----------------------|
161 | 1 | effFlagsHasEditor | |
162 | 2 | | always 0 |
163 | 3 | | always 0 |
164 | 4 | | always 0 |
165 | 5 | ?? | always 1 |
166 | 6 | ?? | InstaLooper=0, else 1 |
167 | 7 | | always 0 |
168 | 8 | | always 0 |
169 | 9 | effFlagsIsSynth | |
170 | 10 | ?? | |
171 | 11 | | always 0 |
172 | 12 | | always 0 |
173 | 13 | | always 0 |
174 | 14 | | always 0 |
175 | 15 | | always 0 |
176 | 16 | | always 0 |
177 |-----+----------------------------+-----------------------|
178 | ? | effFlagsCanDoubleReplacing | |
179 | ? | effFlagsCanReplacing | |
180 | ? | effFlagsNoSoundInStop | |
181 | ? | effFlagsProgramChunks | |
182
183
184 * Host opcodes and how they are handled by JUCE
185
186
187 | audioMaster-opcode | IN | OUT | return | notes |
188 |----------------------------------------+------------------+-------------+------------------+-----------------------------------------------------------------|
189 | audioMasterAutomate | index, fvalue | - | 0 | |
190 | audioMasterProcessEvents | ptr(VstEvents*)) | - | 0 | |
191 | audioMasterGetTime | - | - | &vsttime | |
192 | audioMasterIdle | - | - | 0 | |
193 | audioMasterSizeWindow | index, value | | 1 | setWindowSize(index,value) |
194 | audioMasterUpdateDisplay | - | - | 0 | triggerAsyncUpdate() |
195 | audioMasterIOChanged | - | - | 0 | setLatencyDelay |
196 | audioMasterNeedIdle | - | - | 0 | startTimer(50) |
197 | audioMasterGetSampleRate | - | - | samplerate | |
198 | audioMasterGetBlockSize | - | - | blocksize | |
199 | audioMasterWantMidi | - | - | 0 | wantsMidi=true |
200 | audioMasterGetDirectory | - | - | (char*)directory | |
201 | audioMasterTempoAt | - | - | 10000*bpm | |
202 | audioMasterGetAutomationState | - | - | 0/1/2/3/4 | 0 = not supported, 1 = off, 2 = read, 3 = write, 4 = read/write |
203 | audioMasterBeginEdit | index | - | 0 | gesture |
204 | audioMasterEndEdit | index | - | 0 | gesture |
205 | audioMasterPinConnected | index,value | - | 0/1 | 0=true; value=direction |
206 | audioMasterGetCurrentProcessLevel | - | - | 4/0 | 4 if not realtime |
207 |----------------------------------------+------------------+-------------+------------------+-----------------------------------------------------------------|
208 | audioMasterCanDo | ptr(char[]) | - | 1/0 | 1 if we can handle feature |
209 | audioMasterVersion | - | - | 2400 | |
210 | audioMasterCurrentId | - | - | shellUIDToCreate | |
211 | audioMasterGetNumAutomatableParameters | - | - | 0 | |
212 | audioMasterGetVendorVersion | - | - | 0x0101 | |
213 | audioMasterGetVendorString | - | ptr(char[]) | ptr | getHostName() |
214 | audioMasterGetProductString | - | ptr(char[]) | ptr | getHostName() |
215 | audioMasterSetOutputSampleRate | - | - | 0 | |
216 |----------------------------------------+------------------+-------------+------------------+-----------------------------------------------------------------|
217 | audioMasterGetLanguage | | | | JUCE-ignore |
218 | audioMasterGetOutputSpeakerArrangement | | | | JUCE-ignore |
219 | audioMasterGetParameterQuantization | | | | JUCE-ignore |
220 | audioMasterGetPreviousPlug | | | | JUCE-ignore |
221 | audioMasterGetNextPlug | | | | JUCE-ignore |
222 | audioMasterSetTime | | | | JUCE-ignore |
223 | audioMasterWillReplaceOrAccumulate | | | | JUCE-ignore |
224 | audioMasterGetInputLatency | | | | JUCE-ignore |
225 | audioMasterGetOutputLatency | | | | JUCE-ignore |
226 | audioMasterOpenWindow | | | | JUCE-ignore |
227 | audioMasterCloseWindow | | | | JUCE-ignore |
228 | audioMasterSetIcon | | | | JUCE-ignore |
229 | audioMasterOfflineGetCurrentMetaPass | | | | JUCE-ignore |
230 | audioMasterOfflineGetCurrentPass | | | | JUCE-ignore |
231 | audioMasterOfflineRead | | | | JUCE-ignore |
232 | audioMasterOfflineStart | | | | JUCE-ignore |
233 | audioMasterOfflineWrite | | | | JUCE-ignore |
234 | audioMasterVendorSpecific | | | | JUCE-ignore |
235 | | | | | |
236
237
238 * effcode:12 effMainsChanged
239
240 ** JUCE resume
241 - isProcessLevelOffline()
242 - hostCallback (&vstEffect, Vst2::audioMasterGetCurrentProcessLevel, 0, 0, 0, 0);
243 - deleteTempChannels()
244 - hostCallback (&vstEffect, Vst2::audioMasterWantMidi, 0, 1, 0, 0);
245 -
246
247
248 23/autioMasterGetTime/6
249 - 23: audioMasterGetCurrentProcessLevel
250 - 6: audioMasterWantMidi
251
252
253 | opcode | value |
254 |-----------------------------------+-------|
255 | effMainsChanged | 12 |
256 | audioMasterWantMidi | 6 |
257 | audioMasterGetCurrentProcessLevel | 23 |