VST2SDK
A recreation of the popular Steinberg VST 2.x SDK.
Loading...
Searching...
No Matches
vst.h
Go to the documentation of this file.
1/* An attempt at an untained clean room reimplementation of the widely popular VST 2.x SDK.
2 * Copyright (c) 2020 Xaymar Dirks <info@xaymar.com> (previously known as Michael Fabian Dirks)
3 *
4 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
5 * following conditions are met:
6 *
7 * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
8 * disclaimer.
9 *
10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
11 * following disclaimer in the documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
14 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
16 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
17 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
18 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
19 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
20 */
21
22// Please refer to README.md and LICENSE for further information.
23
24// Protect against double inclusion in practically every compiler available.
25#pragma once
26#ifndef VST2SDK_VST_H
27/** @private */
28#define VST2SDK_VST_H
29
30/* The VST 2.x alignment appears to be 8 for both 32 and 64-bit. This alignment is ignored by some earlier Windows
31 * platforms and compilers, but we don't care about those.
32 */
33#pragma pack(push, 8)
34
35#ifdef __cplusplus
36#include <cinttypes>
37extern "C" {
38#else
39#include <inttypes.h>
40#endif
41
42/** Standard calling convention across plug-ins and hosts.
43 * On some older Windows platforms this is not __cdecl but something similar to __stdcall. We don't really care about
44 * those old platforms anyway so __cdecl it is.
45 */
46#define VST_FUNCTION_INTERFACE __cdecl
47
48/** Maximum number of channels/streams/inputs/outputs supported by VST 2.x
49 */
50#define VST_MAX_CHANNELS 32 // Couldn't find any audio editing software which would attempt to add more channels.
51
52/** Convert four numbers into a FourCC
53 */
54#define VST_FOURCC(a,b,c,d) ((((uint32_t)a) << 24) | (((uint32_t)b) << 16) | (((uint32_t)c) << 8) | (((uint32_t)d) << 0))
55
56/** Known Status Codes
57 */
59 /** Unknown / False
60 * We either don't know the answer or we can't handle the data/notification.
61 *
62 * @sa VST_HOST_OPCODE
63 * @sa VST_EFFECT_OPCODE
64 */
66 /** @sa VST_STATUS_0 */
68 /** @sa VST_STATUS_0 */
70 /** @sa VST_STATUS_0 */
72
73 /** Yes / True
74 * We've handled the data/notification.
75 *
76 * @sa VST_HOST_OPCODE
77 * @sa VST_EFFECT_OPCODE
78 */
80 /** @sa VST_STATUS_1 */
82 /** @sa VST_STATUS_1 */
84 /** @sa VST_STATUS_1 */
86
87 /** No
88 * We're unable to handle the data/notification.
89 *
90 * @sa VST_HOST_OPCODE
91 * @sa VST_EFFECT_OPCODE
92 */
94 /** @sa VST_STATUS_m1 */
96
97 _VST_STATUS_PAD = 0xFFFFFFFFul,
98};
99
100/** Known Buffer Sizes
101 */
115}; // This is an enum because I started to dislike macros.
116
117/** Valid VST 1.x and 2.x versions
118 * The format is either a single digit or four digits in Base10 format.
119 *
120 * @code{.c}
121 * // Converts a Base10 VST version to a uint8_t[4] representation of the version.
122 * uint32_t expand_vst_version(uint32_t v) {
123 * if (v < 10) { //
124 * return v << 24;
125 * }
126 * uint8_t major = v / 1000;
127 * uint8_t minor = (v / 100) % 10;
128 * uint8_t revision = (v / 10) % 10;
129 * uint8_t patch = v % 10;
130 * return (major << 24) | (minor << 16) | (revision << 8) | patch;
131 * }
132 * @endcode
133 */
135 VST_VERSION_1 = 0, // Anything before 2.0, used by official plug-ins.
136 VST_VERSION_1_0_0_0 = 1000, // 1.0, used by some third-party plug-ins.
137 VST_VERSION_1_1_0_0 = 1100, // 1.1, used by some third-party plug-ins.
138 VST_VERSION_2 = 2, // 2.0, used by official plug-ins.
139 VST_VERSION_2_0_0_0 = 2000, // 2.0, used by some third-party plug-ins.
140 VST_VERSION_2_1_0_0 = 2100, // 2.1
141 VST_VERSION_2_2_0_0 = 2200, // 2.2
142 VST_VERSION_2_3_0_0 = 2300, // 2.3
143 VST_VERSION_2_4_0_0 = 2400, // 2.4
144
145 // Pad to force 32-bit number.
146 _VST_VERSION_PAD = 0xFFFFFFFFul,
147};
148
149/** Window/Editor Rectangle.
150 * The order is counter-clockwise starting from the top.
151 */
153 int16_t top;
154 int16_t left;
155 int16_t bottom;
156 int16_t right;
157};
158
159/** Flags for parameters.
160 * @sa vst_parameter_properties_t
161 */
163 /** Parameter is an on/off switch.
164 *
165 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
166 */
168 /** @sa VST_PARAMETER_FLAG_1ls0 */
170
171 /** Parameter limits are set as integers.
172 *
173 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
174 */
176 /** @sa VST_PARAMETER_FLAG_1ls1 */
178
179 /** Parameter uses float steps.
180 *
181 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
182 */
184 /** @sa VST_PARAMETER_FLAG_1ls2 */
186
187 /** Parameter uses integer steps.
188 *
189 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
190 */
192 /** @sa VST_PARAMETER_FLAG_1ls3 */
194
195 /** Parameter has an display order index for the default editor.
196 *
197 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
198 */
200 /** @sa VST_PARAMETER_FLAG_1ls4 */
202
203 /** Parameter has a category for the default editor.
204 *
205 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
206 */
208 /** @sa VST_PARAMETER_FLAG_1ls5 */
210
211 /** Parameter can be gradually increased/decreased.
212 *
213 * @sa VST_EFFECT_OPCODE_PARAM_IS_AUTOMATABLE
214 */
216 /** @sa VST_PARAMETER_FLAG_1ls6 */
218
220};
221
222/** Information about a parameter.
223 *
224 * @important Many VST hosts and plug-ins expect their parameters to be normalized within 0.0 and 1.0.
225 */
227 /** Float Step value
228 *
229 * Some hosts and plug-ins expect this to be within 0 and 1.0.
230 *
231 * @note Requires @ref VST_PARAMETER_FLAG_STEP_FLOAT to be set.
232 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
233 */
234 float step_f32;
235
236 /** Float small step value
237 * This is used for "tiny" changes.
238 *
239 * Some hosts and plug-ins expect this to be within 0 and 1.0.
240 *
241 * @note Requires @ref VST_PARAMETER_FLAG_STEP_FLOAT to be set.
242 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
243 */
245
246 /** Float large step value
247 * This is used for "huge" changes.
248 *
249 * Some hosts and plug-ins expect this to be within 0 and 1.0.
250 *
251 * @note Requires @ref VST_PARAMETER_FLAG_STEP_FLOAT to be set.
252 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
253 */
255
256 /** Human-readable name for this parameter.
257 *
258 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
259 */
261
262 /** Parameter Flags
263 *
264 * Any combination of @ref VST_PARAMETER_FLAG.
265 */
266 uint32_t flags;
267
268 /** Minimum Integer value
269 *
270 * @note Requires @ref VST_PARAMETER_FLAG_INTEGER_LIMITS to be set.
271 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
272 */
274
275 /** Maximum Integer value
276 *
277 * @note Requires @ref VST_PARAMETER_FLAG_INTEGER_LIMITS to be set.
278 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
279 */
281
282 /** Integer Step value
283 *
284 * @note Requires @ref VST_PARAMETER_FLAG_STEP_INT to be set.
285 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
286 */
287 int32_t step_i32;
288
289 /** Short Human-readable label for this parameter.
290 *
291 * I have no idea why this exists?
292 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
293 */
295
296 /** Display order index.
297 *
298 * @note Requires @ref VST_PARAMETER_FLAG_INDEX to be set.
299 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
300 */
301 uint16_t index;
302
303 /** Category index
304 *
305 * Must either be 0 for no category, or any number increasing from 1 onwards.
306 *
307 * @note Requires @ref VST_PARAMETER_FLAG_CATEGORY to be set.
308 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
309 */
310 uint16_t category;
311
312 /** How many parameters are in this category?
313 * This allows the plug-in to specify the same category multiple times.
314 *
315 * @note Requires @ref VST_PARAMETER_FLAG_CATEGORY to be set.
316 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
317 */
319
320 uint16_t _unknown_00; // Must be set to 0.
321
322 /** Human-readable name for the category this parameter is in.
323 *
324 * @note Requires @ref VST_PARAMETER_FLAG_CATEGORY to be set.
325 * @note Ignored if @ref VST_EFFECT_FLAG_EDITOR is set.
326 */
328
329 char _reserved[16]; // Reserved for future expansions?
330};
331
333 // Default Types
339 VST_SPEAKER_TYPE_LEFT_REAR = 5, // Rear/Surround Left
340 VST_SPEAKER_TYPE_RIGHT_REAR = 6, // Rear/Surround Right
341 // 7
342 // 8
343 // 9
344 VST_SPEAKER_TYPE_LEFT_SIDE = 10, // Side Left
345 VST_SPEAKER_TYPE_RIGHT_SIDE = 11, // Side Right
346 // 12
347 // 13
348 // 14
349 // 15
350 // ...
351
352 // User Types (seen rarely, but never exceeds -32)
385
386
387 // Pad to force 32-bit number.
388 _VST_SPEAKER_TYPE_PAD = 0xFFFFFFFFul,
389};
390
392 /** Azimuth in Radians
393 * Range: -PI (Left) through 0.0 (Right) to PI (Left)
394 *
395 * @note Must be 10.0 if this is a LFE.
396 */
397 float azimuth;
398
399 /** Altitude in Radians
400 * Range: -PI/2 (Bottom) to PI/2 (Top)
401 *
402 * @note Must be 10.0 if this is a LFE.
403 */
404 float altitude;
405
406 /** Distance in Meters
407 * range: 0 to +-Infinity
408 *
409 * @note Must be 0.0 if this is a LFE.
410 */
411 float distance;
412
413 float _unknown_00; // Must be set to 0
414
415 /** Human readable name for this speaker.
416 *
417 * Some hosts will behave weird if you use "L", "R", "C", "Ls", "Rs", "Lc", "Rc", "LFE", "Lfe", "Sl", "Sr", "Cs",
418 * and other 2 to 3 letter short codes. Best not to use those if you like your plug-in in a not-crashy state.
419 */
421
422 /** The type of the speaker
423 *
424 * See VST_SPEAKER_TYPE
425 *
426 * If the above is one of those short codes some host seems to overwrite this with their own. Memory safety is
427 * optional apparently.
428 */
429 int32_t type;
430
431 uint8_t _reserved[28]; // Reserved for future expansions?
432};
433
435 /** Custom speaker arrangement.
436 *
437 * Accidentally discovered through random testing.
438 */
440
441 /** Unknown/Empty speaker layout.
442 */
444
445 /** Mono
446 */
448
449 /** Stereo
450 */
452
453 /** Quadraphonic
454 */
456
457 /** 5.0 (Old Surround)
458 *
459 * L, R, C, RL, RR
460 */
462
463 /** 5.1 (Old Surround)
464 *
465 * L, R, C, LFE, RL, RR
466 */
468
469 /** 7.1 (Full Surround)
470 *
471 * L, R, C, LFE, SL, SR, RL, RR
472 */
474
475 // Pad to force 32-bit number.
477};
478
480 int32_t type; // See VST_SPEAKER_ARRANGEMENT_TYPE
481 int32_t channels; // Number of channels in this arrangement.
482 struct vst_speaker_properties_t speakers[VST_MAX_CHANNELS]; // Array of speaker properties, actual size defined by channels.
483};
484
486 /** Ignored?
487 */
489
490 /** Stream is in Stereo
491 *
492 * Can't be used with VST_STREAM_FLAG_USE_TYPE.
493 */
496
497 /** Stream is defined by VST_SPEAKER_ARRANGEMENT_TYPE
498 *
499 * Can't be used with VST_STREAM_FLAG_STEREO.
500 */
503};
504
506 /** Human-readable name for this stream.
507 */
509
510 /** Stream flags
511 * Any combination of VST_STREAM_FLAG
512 */
513 int32_t flags;
514
515 /** Stream arrangement (optional)
516 * See VST_SPEAKER_ARRANGEMENT_TYPE
517 */
518 int32_t type;
519
520 /** Human-readable label for this stream.
521 */
523
524 uint8_t _reserved[48]; // 48 bytes of uninitialized data, always.
525};
526
527//------------------------------------------------------------------------------------------------------------------------
528// VST Host related Things
529//------------------------------------------------------------------------------------------------------------------------
530
531struct vst_effect_t; // Pre-define vst_effect_t so we can use it below.
532
533/** Plug-in to Host Op-Codes
534 * These Op-Codes are emitted by the plug-in and the host _may_ handle them or return 0 (false).
535 * We have no guarantees about anything actually happening.
536 */
538 /** Update automation for a given Parameter
539 *
540 * Must be used to notify the host that the parameter was changed by the user if a custom editor is used.
541 *
542 * @param p_int1 Parameter Index
543 * @param p_float Parameter Value
544 * @return Expected to return... something.
545 */
546 VST_HOST_OPCODE_00 = 0x00, // cb(vst, 0x00, ?, 0, 0);
547 /** @sa VST_HOST_OPCODE_00 */
549 /** @sa VST_HOST_OPCODE_00 */
551
552 /** Retrieve the Hosts VST Version.
553 *
554 * @return See VST_VERSION enumeration.
555 */
557 /** @sa VST_HOST_OPCODE_01 */
559
560 /** Get the currently selected effect id in container plug-ins.
561 *
562 * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
563 *
564 * @return The currently selected unique effect id in this container.
565 */
566 VST_HOST_OPCODE_02 = 0x02, // bool cb(0, 0x02, 0, 0, 0);
567 /** @sa VST_HOST_OPCODE_02 */
569
570 /** Some sort of idle keep-alive?
571 *
572 * Seems to be called only in editor windows when a modal popup is present.
573 */
575 /** @sa VST_HOST_OPCODE_03 */
577
579
580 //--------------------------------------------------------------------------------
581 // VST 2.x starts here.
582 //--------------------------------------------------------------------------------
583
585
587
589
591
593
595
597
599
600 /** Notify the host that numInputs/numOutputs/delay/numParams has changed.
601 * Only supported if the host replies @ref VST_STATUS_TRUE to @ref VST_HOST_OPCODE_SUPPORTS query for
602 * @ref vst_host_supports_t.acceptIOChanges.
603 *
604 * @note In VST 2.3 and earlier calling this outside of @ref VST_EFFECT_OPCODE_IDLE may result in a crash.
605 * @note In VST 2.3 and later this may only be called while between @ref VST_EFFECT_OPCODE_PROCESS_END and
606 * @ref VST_EFFECT_OPCODE_PROCESS_BEGIN.
607 *
608 * @return @ref VST_STATUS_TRUE if supported and handled otherwise @ref VST_STATUS_FALSE.
609 */
611 /** @sa VST_HOST_OPCODE_0D */
613
615
617
619
621
623
625
627
629
631
633
635
637
639
641
643
645
647
649
650 /** Retrieve the vendor name into the ptr buffer.
651 *
652 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_VENDOR_NAME.
653 */
655 /** @sa VST_HOST_OPCODE_20 */
657
658 /** Retrieve the product name into the ptr buffer.
659 *
660 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_PRODUCT_NAME.
661 */
663 /** @sa VST_HOST_OPCODE_21 */
665
666 /** Retrieve the vendor version in return value.
667 *
668 * @return Version.
669 */
671 /** @sa VST_HOST_OPCODE_22 */
673
674 /** User defined OP Code, for custom interaction.
675 *
676 */
678 /** @sa VST_HOST_OPCODE_23 */
680
682
683 /** Check if the host supports a certain feature.
684 *
685 * @param p_ptr `char[...]` Zero terminated string for which feature we want to support.
686 * @return @ref VST_STATUS_TRUE if the feature is supported otherwise @ref VST_STATUS_FALSE.
687 */
689 /** @sa VST_HOST_OPCODE_25 */
691
693
694 /** Crash the host if p_ptr isn't nullptr. */
696
697 /** Crash the host if p_ptr isn't nullptr. */
699
701
702 /** Request an update of the editor window.
703 *
704 */
706 /** @sa VST_HOST_OPCODE_2A */
708
709 /** Notify host that a parameter is being edited.
710 *
711 * @param p_int1 Parameter index.
712 */
714 /** @sa VST_HOST_OPCODE_2B */
716
717 /** Notify host that parameter is no longer being edited.
718 *
719 * @param p_int1 Parameter index.
720 */
722 /** @sa VST_HOST_OPCODE_2C */
724
728
729 // Highest number of known OPCODE.
731
732 // Pad to force 32-bit number.
733 _VST_HOST_OPCODE_PAD = 0xFFFFFFFFul,
734};
735
736/** Plug-in to Host support checks
737 *
738 * Provided as `char* p_ptr` in the VST_EFFECT_OPCODE_SUPPORTS op code.
739 *
740 * Harvested via strings command and just checking what hosts actually responded to.
741 */
743 /** Does the host support modifying input/output/params/delay when programs, banks or parameters are changed?
744 * This only means that the host supports this inside of @ref VST_EFFECT_OPCODE_IDLE (VST 2.3 or earlier) or outside
745 * of a @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and @ref VST_EFFECT_OPCODE_PROCESS_END group.
746 *
747 * Signals that the host supports the following:
748 * - @ref VST_HOST_OPCODE_IO_MODIFIED
749 *
750 * @return @ref VST_STATUS_TRUE if it supports it.
751 */
752 const char* acceptIOChanges;
753
754 /** Is the host using process begin/end instead of idle?
755 * The host may opt to emit @ref VST_EFFECT_OPCODE_IDLE or @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and
756 * @ref VST_EFFECT_OPCODE_PROCESS_END when running in VST 2.3 compatibility mode.
757 *
758 * @sa VST_EFFECT_OPCODE_PROCESS_BEGIN
759 * @sa VST_EFFECT_OPCODE_PROCESS_END
760 * @sa VST_EFFECT_OPCODE_IDLE
761 * @deprecated (VST 2.4) This behavior is the default in VST 2.4 and later.
762 * @return @ref VST_STATUS_TRUE if it supports it.
763 */
764 const char* startStopProcess;
765
766 /** Does the host support container plug-ins?
767 *
768 * Signals that the host and plug-in support the following:
769 * - @ref VST_HOST_OPCODE_CURRENT_EFFECT_ID
770 * - @ref VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID
771 *
772 * @note Is shell a reference to Windows shell menus?
773 *
774 * @return @ref VST_STATUS_TRUE if the host supports it _and_ the current plug-in is a container plug-in.
775 */
776 const char* shellCategory;
777
778 const char* sendVstEvents;
779 const char* receiveVstEvents;
780
781 const char* sendVstMidiEvent;
784
785 const char* sendVstTimeInfo;
786 const char* reportConnectionChanges; // Seems related to speakers?
787 const char* sizeWindow;
788 const char* offline;
789
790 const char* openFileSelector;
791 const char* closeFileSelector;
792} /** @private */ vst_host_supports = {
793 .acceptIOChanges = "acceptIOChanges",
794 .startStopProcess = "startStopProcess",
795 .shellCategory = "shellCategory",
796 .sendVstEvents = "sendVstEvents",
797 .receiveVstEvents = "receiveVstEvents",
798 .sendVstMidiEvent = "sendVstMidiEvent",
799 .receiveVstMidiEvent = "receiveVstMidiEvent",
800 .sendVstMidiEventFlagIsRealtime = "sendVstMidiEventFlagIsRealtime",
801 .sendVstTimeInfo = "sendVstTimeInfo",
802 .reportConnectionChanges = "reportConnectionChanges",
803 .sizeWindow = "sizeWindow",
804 .offline = "offline",
805 .openFileSelector = "openFileSelector",
806 .closeFileSelector = "closeFileSelector",
807};
808
809/** Plug-in to Host callback
810 *
811 * The plug-in may call this to attempt to change things on the host side. The host side is free to ignore all requests, annoyingly enough.
812 *
813 * @param opcode See VST_HOST_OPCODE
814 * @param p_str Zero terminated string or null on call.
815 * @return ?
816 */
817typedef intptr_t (VST_FUNCTION_INTERFACE *vst_host_callback_t)(struct vst_effect_t* plugin, int32_t opcode, int32_t p_int1, int64_t p_int2, const char* p_str, float p_float);
818
819//------------------------------------------------------------------------------------------------------------------------
820// VST Plug-in/Effect related Things
821//------------------------------------------------------------------------------------------------------------------------
822
823/** Magic Number identifying a VST 2.x plug-in structure
824 *
825 * @sa vst_effect_t.magic_numer
826 */
827#define VST_MAGICNUMBER VST_FOURCC('V', 's', 't', 'P')
828
829/** Default VST 2.x Sample Rate
830 * All VST 2.x hosts expect you to initialize your plug-in to these default values.
831 *
832 * @sa VST_EFFECT_OPCODE_SET_SAMPLE_RATE
833 */
834#define VST_DEFAULT_SAMPLE_RATE 44100.0f
835
836/** Default VST 2.x Block Size
837 * All VST 2.x hosts expect you to initialize your plug-in to these default values.
838 *
839 * @sa VST_EFFECT_OPCODE_SET_BLOCK_SIZE
840 */
841#define VST_DEFAULT_BLOCK_SIZE 1024
842
843/** Plug-in Categories
844 * Pre-defined category grouping that also affect host behavior when handling the plug-in. This is not just a UI/UX
845 * thing, it actually affects what plug-ins can do, so place your plug-in into the correct category.
846 *
847 */
850
851 /** Generic Effects
852 * Examples: Distortion, Pitch Shift, ...
853 *
854 * Supports: Delay (Optional), Tail Samples, MIDI
855 */
857 /** @sa VST_EFFECT_CATEGORY_01 */
859
860 /** Instruments
861 * Examples: Instruments, Synths, Samplers, ...
862 *
863 * Supports: Delay (Optional), Tail Samples, MIDI
864 */
866 /** @sa VST_EFFECT_CATEGORY_02 */
868
869 /** Metering
870 * Examples: Loudness Meters, Volume Analysis, ...
871 *
872 * Supports: Tail Samples, MIDI
873 * @note Delay causes crashes in some hosts. Fun.
874 */
876 /** @sa VST_EFFECT_CATEGORY_03 */
878
879 /** Mastering
880 * Examples: Compressors, Limiters, ...
881 *
882 * Supports: Delay, Tail Samples (optional), MIDI
883 */
885 /** @sa VST_EFFECT_CATEGORY_04 */
887
888 /** Spatializers
889 * Examples: Channel Panning, Expanders, ...
890 *
891 * Supports: Tail Samples (optional), MIDI
892 */
894 /** @sa VST_EFFECT_CATEGORY_05 */
896
897 /** Delay/Echo
898 * Examples: Echo, Reverb, Room Simulation, Delay, ...
899 *
900 * Supports: Delay, Tail Samples, MIDI
901 */
903 /** @sa VST_EFFECT_CATEGORY_06 */
905
907
908 /** Restoration
909 * Examples: Noise Filtering, Upsamplers, ...
910 *
911 * Supports: Delay, Tail Samples, MIDI
912 * @note Some DAWs allocate additional processing time to these.
913 */
915 /** @sa VST_EFFECT_CATEGORY_08 */
917
918 /** Offline Processing
919 * Examples: Nothing
920 * Supports: Nothing
921 */
923 /** @sa VST_EFFECT_CATEGORY_09 */
924 VST_EFFECT_CATEGORY_OFFLINE = 0x09, // Offline Processing VST? Seems to receive all audio data prior to playback.
925
926 /** Container Plug-in
927 * This plug-in contains multiple effects in one and requires special handling on both sides.
928 *
929 * Host handling:
930 * @code{.c}
931 * uint32_t current_select_id;
932 *
933 * // ... in intptr_t vst_host_callback(vst_effect_t* plugin, VST_HOST_OPCODE opcode, ...)
934 * case VST_HOST_OPCODE_SUPPORTS: {
935 * char* text = (char*)p_ptr;
936 * // The plug-in may ask the host if it even supports containers at all and changes behavior if we don't.
937 * if (text && strcmp(text, vst_host_supports.shellCategory) == 0) {
938 * return VST_STATUS_TRUE;
939 * }
940 * }
941 * case VST_HOST_OPCODE_CURRENT_EFFECT_ID:
942 * return current_selected_id;
943 * // ...
944 *
945 * // ... in whatever you use to load plug-ins ...
946 * current_select_id;
947 * vst_effect_t* plugin = plugin_main(&vst_host_callback);
948 * int32_t plugin_category = plugin->control(plugin, VST_EFFECT_OPCODE_CATEGORY, 0, 0, 0, 0)
949 * if (plugin_category == VST_EFFECT_CATEGORY_CONTAINER) {
950 * char effect_name[VST_BUFFER_SIZE_EFFECT_NAME] effect_name;
951 * int32_t effect_id;
952 * // Iterate over all contained effects.
953 * while ((effect_id = plugin->control(plugin, VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID, 0, 0, effect_name, 0)) != 0) {
954 * // Contained effects must be named as far as I can tell.
955 * if (effect_name[0] != 0) {
956 * // Do some logic that does the necessary things to list these in the host.
957 * }
958 * }
959 * } else {
960 * // Do things to list only this plugin in the host.
961 * }
962 * // ...
963 * @endcode
964 *
965 * Plug-in handling:
966 * @code{.c}
967 * // ... in vst_effect for the container
968 * size_t current_effect_idx;
969 * int32_t effect_list[] = {
970 * // ... list of effect ids.
971 * }
972 * // ... in control(...)
973 * case VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID:
974 * // Make sure current_effect_idx doesn't exceed the maximum.
975 * if (current_effect_idx > ARRAYSIZEOF(effect_list)) {
976 * current_effect_idx;
977 * return 0;
978 * }
979 * // Some code that turns effect indices into names to store into p_ptr.
980 * return effect_list[current_effect_idx++]; // Return the effect id.
981 * // ...
982 *
983 * VST_ENTRYPOINT {
984 * // Ensure the host VST 2.x compatible.
985 * int32_t vst_version = callback(nullptr, VST_HOST_OPCODE_VST_VERSION, 0, 0, 0, 0);
986 * if (vst_version == 0) {
987 * return 0; // It's not so we exit early.
988 * }
989 *
990 * // Check if the host wants
991 * int32_t effect_id = callback(nullptr, VST_HOST_OPCODE_CURRENT_EFFECT_ID, 0, 0, 0);
992 * if (effect_id == 0) {
993 * // ... logic specific to making the container.
994 * return new vst_container_effect();
995 * } else {
996 * // ... logic specific to make sub effects
997 * return new vst_sub_effect();
998 * }
999 * }
1000 *
1001 * // ...
1002 * @endcode
1003 */
1005 /** @sa VST_EFFECT_CATEGORY_0A */
1007
1008 /** Waveform Generators
1009 * Examples: Sine Wave Generator, ...
1010 * Supports: Delay, Tail Samples
1011 *
1012 * I don't know why this exists, there's only one plug-in that has it and all it does is generate a 400hz sine wave.
1013 *
1014 * @sa VST_EFFECT_CATEGORY_INSTRUMENT
1015 */
1017 /** @sa VST_EFFECT_CATEGORY_0B */
1019
1020 /** @private */
1021 VST_EFFECT_CATEGORY_MAX, // Not part of specification, marks maximum category.
1022
1023 /** @private */
1024 _VST_EFFECT_CATEGORY_PAD = 0xFFFFFFFFul,
1025};
1026
1027/** Effect Flags
1028 */
1030 /** Effect provides a custom editor.
1031 * The host will not provide a generic editor interface and expects @ref VST_EFFECT_OPCODE_EDITOR_OPEN and
1032 * @ref VST_EFFECT_OPCODE_EDITOR_CLOSE to work as expected. We are in charge of notifying the host about various
1033 * things like which parameter is in focus and stuff.
1034 *
1035 * @sa VST_EFFECT_OPCODE_EDITOR_GET_RECT
1036 * @sa VST_EFFECT_OPCODE_EDITOR_OPEN
1037 * @sa VST_EFFECT_OPCODE_EDITOR_CLOSE
1038 * @sa VST_EFFECT_OPCODE_EDITOR_DRAW
1039 * @sa VST_EFFECT_OPCODE_EDITOR_MOUSE
1040 * @sa VST_EFFECT_OPCODE_EDITOR_KEYBOARD
1041 * @sa VST_EFFECT_OPCODE_EDITOR_KEEP_ALIVE
1042 * @sa VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN
1043 * @sa VST_EFFECT_OPCODE_EDITOR_VKEY_UP
1044 * @sa VST_HOST_OPCODE_EDITOR_UPDATE
1045 * @sa VST_HOST_OPCODE_PARAM_START_EDIT
1046 * @sa VST_HOST_OPCODE_PARAM_STOP_EDIT
1047 * @sa VST_HOST_OPCODE_PARAM_UPDATE
1048 */
1050 /** @sa VST_EFFECT_FLAG_1ls0 */
1052
1053 //1 << 1,
1054 //1 << 2, // Only seen when the plug-in responds to VST_EFFECT_OPCODE_09. Seems to be ignored by hosts entirely.
1055 //1 << 3, // Only seen when the plug-in behaves differently in mono mode. Seems to be ignored by hosts entirely.
1056
1057 /** Effect uses process_float.
1058 *
1059 * @sa vst_effect_t.process_float
1060 * @sa vst_effect_process_float_t
1061 * @deprecated (VST 2.4) Must be set in VST 2.4 and later or the host should fail to load the plug-in.
1062 */
1064 /** @sa VST_EFFECT_FLAG_1ls4 */
1066
1067 /** Effect supports saving/loading programs/banks from unformatted chunk data.
1068 * When not set some sort of format is expected that I've yet to decipher.
1069 *
1070 * @sa VST_EFFECT_OPCODE_GET_CHUNK_DATA
1071 * @sa VST_EFFECT_OPCODE_SET_CHUNK_DATA
1072 */
1074 /** @sa VST_EFFECT_FLAG_1ls5 */
1076
1077 //1 << 6,
1078 //1 << 7,
1079
1080 /** Effect is an Instrument/Generator
1081 *
1082 * This must be set in addition to @ref VST_EFFECT_CATEGORY_INSTRUMENT otherwise instruments don't work right.
1083 * @note (VST 2.x) Flag is new to VST 2.x and later.
1084 */
1086 /** @sa VST_EFFECT_FLAG_1ls8 */
1088
1089 /** Effect does not produce tail samples when the input is silent.
1090 *
1091 * Not to be confused with choosing to tell the host there is no tail.
1092 * @sa VST_EFFECT_OPCODE_GET_TAIL_SAMPLES
1093 * @note (VST 2.x) Flag is new to VST 2.x and later.
1094 */
1096 /** @sa VST_EFFECT_FLAG_1ls9 */
1098
1099 //1 << 10,
1100 //1 << 11,
1101
1102 /** Effect supports process_double.
1103 * The host can freely choose between process_float and process_double as required.
1104 *
1105 * @note (VST 2.4) Available in VST 2.4 and later only.
1106 * @sa vst_effect_t.process_double
1107 * @sa vst_effect_process_double_t
1108 */
1110 /** @sa VST_EFFECT_FLAG_1ls12 */
1112};
1113
1114/** Host to Plug-in Op-Codes
1115 * These Op-Codes are emitted by the host and we must either handle them or return 0 (false).
1116 */
1118 /** Create/Initialize the effect (if it has not been created already).
1119 *
1120 * @return Always 0.
1121 */
1123 /** @sa VST_EFFECT_OPCODE_00 */
1125 /** @sa VST_EFFECT_OPCODE_00 */
1127
1128 /** Destroy the effect (if there is any) and free its memory.
1129 *
1130 * This should destroy the actual object created by VST_ENTRYPOINT.
1131 *
1132 * @return Always 0.
1133 */
1135 /** @sa VST_EFFECT_OPCODE_01 */
1137
1138 /** Set which program number is currently select.
1139 *
1140 * @param p_int2 The program number to set. Can be negative for some reason.
1141 */
1143 /** @sa VST_EFFECT_OPCODE_02 */
1145 /** @sa VST_EFFECT_OPCODE_02 */
1147
1148 /** Get currently selected program number.
1149 *
1150 * @return The currently set program number. Can be negative for some reason.
1151 */
1153 /** @sa VST_EFFECT_OPCODE_03 */
1155 /** @sa VST_EFFECT_OPCODE_03 */
1157
1158 /** Set the name of the currently selected program.
1159 *
1160 * @param p_ptr `const char[VST_BUFFER_SIZE_PROGRAM_NAME]` Zero terminated string.
1161 */
1163 /** @sa VST_EFFECT_OPCODE_04 */
1165 /** @sa VST_EFFECT_OPCODE_04 */
1167
1168 /** Get the name of the currently selected program.
1169 *
1170 * @param p_ptr `char[VST_BUFFER_SIZE_PROGRAM_NAME]` Zero terminated string.
1171 */
1173 /** @sa VST_EFFECT_OPCODE_05 */
1175 /** @sa VST_EFFECT_OPCODE_05 */
1177
1178 /** Get the value? label for the parameter.
1179 *
1180 * @param p_int1 Parameter index.
1181 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_LABEL]' Zero terminated string.
1182 * @return 0 on success, 1 on failure.
1183 */
1185 /** @sa VST_EFFECT_OPCODE_06 */
1187 /** @sa VST_EFFECT_OPCODE_06 */
1189 /** @sa VST_EFFECT_OPCODE_06 */
1191
1192 /** Get the string representing the value for the parameter.
1193 *
1194 * @param p_int1 Parameter index.
1195 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_VALUE]' Zero terminated string.
1196 * @return 0 on success, 1 on failure.
1197 */
1199 /** @sa VST_EFFECT_OPCODE_07 */
1201 /** @sa VST_EFFECT_OPCODE_07 */
1203 /** @sa VST_EFFECT_OPCODE_07 */
1205 /** @sa VST_EFFECT_OPCODE_07 */
1207
1208 /** Get the name for the parameter.
1209 *
1210 * @param p_int1 Parameter index.
1211 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_NAME]' Zero terminated string.
1212 * @return 0 on success, 1 on failure.
1213 */
1215 /** @sa VST_EFFECT_OPCODE_08 */
1217 /** @sa VST_EFFECT_OPCODE_08 */
1219 /** @sa VST_EFFECT_OPCODE_08 */
1221
1222 /**
1223 *
1224 * @deprecated: (VST 2.3+) Not used in VST 2.3 or later.
1225 */
1227
1228 /** Set the new sample rate for the plugin to use.
1229 *
1230 * @param p_float New sample rate as a float (double on 64-bit because register upgrades).
1231 */
1233 /** @sa VST_EFFECT_OPCODE_0A */
1235 /** @sa VST_EFFECT_OPCODE_0A */
1237
1238 /** Sets the block size, which is the maximum number of samples passed into the effect via process calls.
1239 *
1240 * @param p_int2 The maximum number of samples to be passed in.
1241 */
1243 /** @sa VST_EFFECT_OPCODE_0B */
1245 /** @sa VST_EFFECT_OPCODE_0B */
1247
1248 /** Effect processing should be suspended/paused or resumed/unpaused.
1249 *
1250 * Unclear if this is should result in a flush of buffers. In VST 2.3+ this is quite clear as we get process
1251 * begin/end.
1252 *
1253 * @param p_int2 @ref VST_STATUS_FALSE if the effect should suspend processing, @ref VST_STATUS_TRUE if it should
1254 * resume.
1255 */
1257 /** @sa VST_EFFECT_OPCODE_0C */
1259 /** @sa VST_EFFECT_OPCODE_0C */
1261 /** @sa VST_EFFECT_OPCODE_0C */
1263
1264 /** Retrieve the client rect size of the plugins window.
1265 * If no window has been created, returns the default rect.
1266 *
1267 * @param p_ptr Pointer of type 'struct vst_rect_t*'.
1268 * @return On success, returns 1 and updates p_ptr to the rect. On failure, returns 0.
1269 */
1271 /** @sa VST_EFFECT_OPCODE_0D */
1273 /** @sa VST_EFFECT_OPCODE_0D */
1275 /** @sa VST_EFFECT_OPCODE_0D */
1277
1278 /** Create the window for the plugin.
1279 *
1280 * @param p_ptr HWND of the parent window.
1281 * @return 0 on failure, or HWND on success.
1282 */
1284 /** @sa VST_EFFECT_OPCODE_0E */
1286 /** @sa VST_EFFECT_OPCODE_0E */
1288
1289 /** Destroy the plugins window.
1290 *
1291 * @return Always 0.
1292 */
1294 /** @sa VST_EFFECT_OPCODE_0F */
1296 /** @sa VST_EFFECT_OPCODE_0F */
1298
1299 /** Window Draw Event?
1300 *
1301 * Ocasionally called simultaneously as WM_DRAW on windows.
1302 *
1303 * @note Present in some VST 2.1 or earlier plugins.
1304 *
1305 * @note Appears to be Mac OS exclusive.
1306 *
1307 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1308 */
1310 /** @sa VST_EFFECT_OPCODE_10 */
1312 /** @sa VST_EFFECT_OPCODE_10 */
1314
1315 /** Window Mouse Event?
1316 *
1317 * Called at the same time mouse events happen.
1318 *
1319 * @note Present in some VST 2.1 or earlier plugins.
1320 *
1321 * @note Appears to be Mac OS exclusive.
1322 *
1323 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1324 */
1326 /** @sa VST_EFFECT_OPCODE_11 */
1328 /** @sa VST_EFFECT_OPCODE_11 */
1330
1331 /** Window Keyboard Event?
1332 *
1333 * Called at the same time keyboard events happen.
1334 *
1335 * @note Present in some VST 2.1 or earlier plugins.
1336 *
1337 * @note Appears to be Mac OS exclusive.
1338 *
1339 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1340 */
1342 /** @sa VST_EFFECT_OPCODE_12 */
1344 /** @sa VST_EFFECT_OPCODE_12 */
1346
1347 /** Window/Editor Idle/Keep-Alive Callback?
1348 *
1349 * Does not receive any parameters. Randomly called when nothing happens? Idle/Keep-Alive callback?
1350 */
1352 /** @sa VST_EFFECT_OPCODE_13 */
1354
1355 /** Window Focus Event?
1356 *
1357 * Sometimes called when the editor window goes back into focus.
1358 *
1359 * @note Present in some VST 2.1 or earlier plugins.
1360 * @note Appears to be Mac OS exclusive.
1361 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1362 */
1364
1365 /** Window Unfocus Event?
1366 *
1367 * Sometimes called when the editor window goes out of focus.
1368 *
1369 * @note Present in some VST 2.1 or earlier plugins.
1370 * @note Appears to be Mac OS exclusive.
1371 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1372 */
1374
1375 /**
1376 *
1377 * @note Present in some VST 2.1 or earlier plugins.
1378 * @important Almost all plug-ins return the @ref VST_FOURCC 'NvEf' (0x4E764566) here.
1379 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1380 */
1382 /** @sa VST_EFFECT_OPCODE_16 */
1384
1385 /** Get Chunk Data
1386 *
1387 * Save current program or bank state to a buffer.
1388 * Behavior is different based on the @ref VST_EFFECT_FLAG_CHUNKS flag.
1389 *
1390 * @sa VST_EFFECT_FLAG_CHUNKS
1391 * @param p_int1 0 means Bank, 1 means Program, nothing else used?
1392 * @param p_ptr `void**` Pointer to a potential pointer containing your own chunk data.
1393 * @return Size of the Chunk Data in bytes.
1394 */
1396 /** @sa VST_EFFECT_OPCODE_17 */
1398
1399 /** Set Chunk Data
1400 *
1401 * Restore current program or bank state from a buffer.
1402 * Behavior is different based on the @ref VST_EFFECT_FLAG_CHUNKS flag.
1403 *
1404 * @sa VST_EFFECT_FLAG_CHUNKS
1405 * @param p_int1 0 means Bank, 1 means Program, nothing else used?
1406 * @param p_int2 Size of the Chunk Data in bytes.
1407 * @param p_ptr `void*` Pointer to a buffer containing chunk data.
1408 */
1410 /** @sa VST_EFFECT_OPCODE_18 */
1412
1413 //--------------------------------------------------------------------------------
1414 // VST 2.x starts here.
1415 //--------------------------------------------------------------------------------
1416
1417 /**
1418 *
1419 * Appears to be related to midi and audio events.
1420 * @note (VST 2.0+) Available from VST 2.0 onwards.
1421 */
1423
1424 /** Can the parameter be automated?
1425 *
1426 * @note (VST 2.0+) Available from VST 2.0 onwards.
1427 * @param p_int1 Index of the parameter.
1428 * @return 1 if the parameter can be automated, otherwise 0.
1429 */
1431 /** @sa VST_EFFECT_OPCODE_1A */
1433 /** @sa VST_EFFECT_OPCODE_1A */
1435 /** @sa VST_EFFECT_OPCODE_1A */
1437
1438 /** Set Parameter value from string representation.
1439 *
1440 * @note (VST 2.0+) Available from VST 2.0 onwards.
1441 * @param p_int1 Index of the parameter.
1442 * @param p_ptr `const char*` Zero terminated string representation of the value to set.
1443 * @return 1 if it worked, otherwise 0.
1444 */
1446 /** @sa VST_EFFECT_OPCODE_1B */
1448 /** @sa VST_EFFECT_OPCODE_1B */
1450
1451 /**
1452 *
1453 *
1454 * @note (VST 2.0+) Available from VST 2.0 onwards.
1455 */
1457
1458 /**
1459 *
1460 * @note (VST 2.0+) Available from VST 2.0 onwards.
1461 * @sa VST_EFFECT_OPCODE_05
1462 */
1464
1465 /**
1466 *
1467 *
1468 * @note (VST 2.0+) Available from VST 2.0 onwards.
1469 */
1471
1472 /** Input connected.
1473 *
1474 *
1475 * @note (VST 2.0+) Available from VST 2.0 onwards.
1476 */
1478
1479 /** Input disconnected.
1480 *
1481 *
1482 * @note (VST 2.0+) Available from VST 2.0 onwards.
1483 */
1485
1486 /** Retrieve properties for the given input index.
1487 *
1488 * @note (VST 2.0+) Available from VST 2.0 onwards.
1489 * @param p_int1 Index of the input to get the properties for.
1490 * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected input provided by the host.
1491 * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
1492 */
1494 /** @sa VST_EFFECT_OPCODE_21 */
1496
1497 /** Retrieve properties for the given output index.
1498 *
1499 * @note (VST 2.0+) Available from VST 2.0 onwards.
1500 * @param p_int1 Index of the output to get the properties for.
1501 * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected output provided by the host.
1502 * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
1503 */
1505 /** @sa VST_EFFECT_OPCODE_22 */
1507
1508 /** Retrieve category of this effect.
1509 *
1510 * @note (VST 2.0+) Available from VST 2.0 onwards.
1511 * @return The category that this effect is in, see @ref VST_EFFECT_CATEGORY.
1512 */
1514 /** @sa VST_EFFECT_OPCODE_23 */
1516 /** @sa VST_EFFECT_OPCODE_23 */
1518
1519 /**
1520 *
1521 *
1522 * @note (VST 2.0+) Available from VST 2.0 onwards.
1523 */
1525
1526 /**
1527 *
1528 *
1529 * @note (VST 2.0+) Available from VST 2.0 onwards.
1530 */
1532
1533 /**
1534 *
1535 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1536 * @note (VST 2.0+) Available from VST 2.0 onwards.
1537 */
1539
1540 /**
1541 *
1542 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1543 * @note (VST 2.0+) Available from VST 2.0 onwards.
1544 */
1546
1547 /**
1548 *
1549 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1550 * @note (VST 2.0+) Available from VST 2.0 onwards.
1551 */
1553
1554 /**
1555 *
1556 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1557 * @note (VST 2.0+) Available from VST 2.0 onwards.
1558 */
1560
1561 /** Host wants to change the speaker arrangement.
1562 *
1563 * @note (VST 2.0+) Available from VST 2.0 onwards.
1564 * @param p_int2 Pointer to a @ref vst_speaker_arrangement_t for the input.
1565 * @param p_ptr Pointer to a @ref vst_speaker_arrangement_t for the output.
1566 * @return @ref VST_STATUS_TRUE if we accept the new arrangement, @ref VST_STATUS_FALSE if we don't in which case
1567 * the host is required to ask for the speaker arrangement via @ref VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
1568 * and may retry this op-code with different values.
1569 * @sa vst_effect_t.num_inputs
1570 * @sa vst_effect_t.num_outputs
1571 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
1572 */
1574 /** @sa VST_EFFECT_OPCODE_2A */
1576
1577 /**
1578 *
1579 *
1580 */
1582
1583 /** Enable/Disable bypassing the effect.
1584 *
1585 * See @ref VST_EFFECT_OPCODE_SUPPORTS with @ref vst_effect_supports_t.bypass for more information.
1586 *
1587 * @note (VST 2.0+) Available from VST 2.0 onwards.
1588 * @param p_int2 Zero if bypassing the effect is disabled, otherwise 1.
1589 */
1591 /** @sa VST_EFFECT_OPCODE_2C */
1593
1594 /** Retrieve the effect name into the ptr buffer.
1595 *
1596 * @note (VST 2.0+) Available from VST 2.0 onwards.
1597 * @bug Various hosts only provide a buffer that is 32 bytes long.
1598 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME.
1599 * @return Always 0, even on failure.
1600 */
1602 /** @sa VST_EFFECT_OPCODE_2D */
1604 /** @sa VST_EFFECT_OPCODE_2D */
1606 /** @sa VST_EFFECT_OPCODE_2D */
1608
1609 /** Translate an error code to a string.
1610 *
1611 * @bug Some hosts provide unexpected data in p_ptr.
1612 * @note (VST 2.0+) Available from VST 2.0 onwards.
1613 * @deprecated (VST 2.4+) Fairly sure this is deprecated in VST 2.4 and later.
1614 * @param p_ptr A zero terminated char buffer with undefined size.
1615 * @return @ref VST_STATUS_TRUE if we could translate the error, @ref VST_STATUS_FALSE if not.
1616 */
1618 /** @sa VST_EFFECT_OPCODE_2E */
1620
1621 /** Retrieve the vendor name into the ptr buffer.
1622 *
1623 * @note (VST 2.0+) Available from VST 2.0 onwards.
1624 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_VENDOR_NAME.
1625 */
1627 /** @sa VST_EFFECT_OPCODE_2F */
1629 /** @sa VST_EFFECT_OPCODE_2F */
1631
1632 /** Retrieve the product name into the ptr buffer.
1633 *
1634 * @note (VST 2.0+) Available from VST 2.0 onwards.
1635 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_PRODUCT_NAME.
1636 */
1638 /** @sa VST_EFFECT_OPCODE_30 */
1640 /** @sa VST_EFFECT_OPCODE_30 */
1642
1643 /** Retrieve the vendor version in return value.
1644 *
1645 * @note (VST 2.0+) Available from VST 2.0 onwards.
1646 * @return Version.
1647 */
1649 /** @sa VST_EFFECT_OPCODE_31 */
1651 /** @sa VST_EFFECT_OPCODE_31 */
1653
1654 /** User-defined Op-Code for VST extensions.
1655 *
1656 * @note (VST 2.0+) Available from VST 2.0 onwards.
1657 * All parameters are undefined by the standard and left up to the host/plug-in. Use @ref VST_EFFECT_OPCODE_SUPPORTS
1658 * and @ref VST_EFFECT_OPCODE_VENDOR_NAME + @ref VST_EFFECT_OPCODE_VENDOR_VERSION to check if the plug-in is
1659 * compatible with your expected format.
1660 */
1662 /** @sa VST_EFFECT_OPCODE_32 */
1664
1665 /** Test for support of a specific named feature.
1666 *
1667 * @note (VST 2.0+) Available from VST 2.0 onwards.
1668 * @param p_ptr A zero terminated char buffer of undefined size containing the feature name.
1669 * @return @ref VST_STATUS_YES if the feature is supported, @ref VST_STATUS_NO if the feature is not supported,
1670 * @ref VST_STATUS_UNKNOWN in all other cases.
1671 */
1673 /** @sa VST_EFFECT_OPCODE_33 */
1675
1676 /** Number of samples that are at the tail at the end of playback.
1677 *
1678 * @note (VST 2.0+) Available from VST 2.0 onwards.
1679 * @return @ref VST_STATUS_UNKNOWN for automatic tail size, @ref VST_STATUS_TRUE for no tail, any other number above
1680 * 1 for the number of samples the tail has.
1681 */
1683 /** @sa VST_EFFECT_OPCODE_34 */
1685 /** @sa VST_EFFECT_OPCODE_34 */
1687
1688 /** Notify effect that it is idle?
1689 *
1690 * @note (VST 2.0+) Available from VST 2.0 onwards.
1691 * @deprecated (VST 2.4+) As of VST 2.4 the default behavior is @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and
1692 * @ref VST_EFFECT_OPCODE_PROCESS_END which allows cleaner control flows.
1693 * @sa vst_host_supports.startStopProcess
1694 */
1696 /** @sa VST_EFFECT_OPCODE_35 */
1698
1699 /**
1700 *
1701 *
1702 * @note (VST 2.0+) Available from VST 2.0 onwards.
1703 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1704 */
1706
1707 /**
1708 *
1709 *
1710 * @note (VST 2.0+) Available from VST 2.0 onwards.
1711 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1712 */
1714
1715 /** Parameter Properties
1716 *
1717 * @note (VST 2.0+) Available from VST 2.0 onwards.
1718 * @param p_int1 Parameter index to get properties for.
1719 * @param p_ptr Pointer to @ref vst_parameter_properties_t for the given parameter.
1720 * @return @ref VST_STATUS_YES if supported, otherwise @ref VST_STATUS_NO.
1721 */
1723 /** @sa VST_EFFECT_OPCODE_38 */
1725 /** @sa VST_EFFECT_OPCODE_38 */
1727
1728 /**
1729 *
1730 * @note (VST 2.0+) Available from VST 2.0 onwards.
1731 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1732 */
1734
1735 /** Retrieve the VST Version supported.
1736 *
1737 * @note (VST 2.0+) Available from VST 2.0 onwards.
1738 * @sa VST_VERSION
1739 * @return One of the valid enums in @ref VST_VERSION
1740 */
1742 /** @sa VST_EFFECT_OPCODE_3A */
1744
1745 //--------------------------------------------------------------------------------
1746 // VST 2.1
1747 //--------------------------------------------------------------------------------
1748
1749 /** Editor Virtual Key Down Input
1750 *
1751 * @note (VST 2.1+) Available from VST 2.1 onwards.
1752 * @param p_int1 ASCII character that represents the virtual key code.
1753 * @param p_int2 Virtual Key Code
1754 * @param p_float Modifiers being held down (bitfield)
1755 * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE
1756 */
1758 /** @sa VST_EFFECT_OPCODE_3B */
1760
1761 /** Editor Virtual Key Up Event
1762 *
1763 * @note (VST 2.1+) Available from VST 2.1 onwards.
1764 * @param p_int1 ASCII character that represents the virtual key code.
1765 * @param p_int2 Virtual Key Code
1766 * @param p_float Modifiers being held down (bitfield)
1767 * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE
1768 */
1770 /** @sa VST_EFFECT_OPCODE_3C */
1772
1773 /**
1774 *
1775 * @note (VST 2.1+) Available from VST 2.1 onwards.
1776 * @param p_int2 A value between 0 and 2.
1777 */
1779
1780 /**
1781 *
1782 * Midi related
1783 * @note (VST 2.1+) Available from VST 2.1 onwards.
1784 */
1786
1787 /**
1788 *
1789 * Midi related
1790 * @note (VST 2.1+) Available from VST 2.1 onwards.
1791 */
1793
1794 /**
1795 *
1796 * Midi related
1797 * @note (VST 2.1+) Available from VST 2.1 onwards.
1798 */
1800
1801 /**
1802 *
1803 * Midi related
1804 * @note (VST 2.1+) Available from VST 2.1 onwards.
1805 */
1807
1808 /**
1809 *
1810 * Midi related
1811 * @note (VST 2.1+) Available from VST 2.1 onwards.
1812 */
1814
1815 /** Host is starting to set up a program.
1816 * Emitted prior to the host loading a program.
1817 *
1818 * @note (VST 2.1+) Available from VST 2.1 onwards.
1819 * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
1820 */
1822 /** @sa VST_EFFECT_OPCODE_43 */
1824
1825 /** Host is done setting up a program.
1826 * Emitted after the host finished loading a program.
1827 *
1828 * @note (VST 2.1+) Available from VST 2.1 onwards.
1829 * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
1830 */
1832 /** @sa VST_EFFECT_OPCODE_44 */
1834
1835 //--------------------------------------------------------------------------------
1836 // VST 2.3
1837 //--------------------------------------------------------------------------------
1838
1839 /** Host wants to know the current speaker arrangement.
1840 *
1841 * @note (VST 2.3+) Available from VST 2.3 onwards.
1842 * @param p_int2 Pointer to @ref vst_speaker_arrangement_t for the input.
1843 * @param p_ptr Pointer to @ref vst_speaker_arrangement_t for the output.
1844 * @return @ref VST_STATUS_TRUE if we were successful, otherwise @ref VST_STATUS_FALSE.
1845 */
1847 /** @sa VST_EFFECT_OPCODE_45 */
1849
1850 /** Get the next effect contained in this effect.
1851 * This returns the next effect based on an effect internal counter, the host does not provide any index.
1852 *
1853 * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
1854 *
1855 * @note (VST 2.3+) Available from VST 2.3 onwards.
1856 * @param p_ptr Pointer to a char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME to store the name of the next effect.
1857 * @return Next effects unique_id
1858 */
1860 /** @sa VST_EFFECT_OPCODE_46 */
1862
1863 /** Begin processing of audio.
1864 *
1865 * Host is requesting that we prepare for a new section of audio separate from the previous section.
1866 * @note (VST 2.3+) Available from VST 2.3 onwards.
1867 */
1869 /** @sa VST_EFFECT_OPCODE_47 */
1871
1872 /** End processing of audio.
1873 *
1874 * Host is requesting that we stop processing audio and go into idle instead.
1875 * @note (VST 2.3+) Available from VST 2.3 onwards.
1876 */
1878 /** @sa VST_EFFECT_OPCODE_48 */
1880
1881 /**
1882 *
1883 *
1884 * @note (VST 2.3+) Available from VST 2.3 onwards.
1885 */
1887
1888 /**
1889 *
1890 * @note (VST 2.3+) Available from VST 2.3 onwards.
1891 * @sa VST_EFFECT_CATEGORY_SPATIAL
1892 * @param p_int2 Unknown meaning.
1893 * @param p_float Unknown meaning, usually 1.0
1894 */
1896
1897 /** Host wants to know if we can load the provided bank data.
1898 * Should be emitted prior to @ref VST_EFFECT_OPCODE_SET_CHUNK_DATA by the host.
1899 *
1900 * @note (VST 2.3+) Available from VST 2.3 onwards.
1901 * @param p_ptr Unknown structured data.
1902 * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
1903 * @ref VST_STATUS_UNKNOWN if this isn't supported.
1904 */
1906 /** @sa VST_EFFECT_OPCODE_4B */
1908
1909 /** Host wants to know if we can load the provided program data.
1910 * Should be emitted prior to @ref VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN by the host.
1911 *
1912 * @note (VST 2.3+) Available from VST 2.3 onwards.
1913 * @param p_ptr Unknown structured data.
1914 * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
1915 * @ref VST_STATUS_UNKNOWN if this isn't supported.
1916 */
1918 /** @sa VST_EFFECT_OPCODE_4C */
1920
1921 //--------------------------------------------------------------------------------
1922 // VST 2.4
1923 //--------------------------------------------------------------------------------
1924
1925 /**
1926 *
1927 *
1928 * @note (VST 2.4+) Available from VST 2.4 onwards.
1929 */
1931
1932 /**
1933 *
1934 *
1935 * @note (VST 2.4+) Available from VST 2.4 onwards.
1936 */
1938
1939 /**
1940 *
1941 *
1942 * @note (VST 2.4+) Available from VST 2.4 onwards.
1943 */
1945
1946 /** @private */
1947 VST_EFFECT_OPCODE_MAX,
1948
1949 /** @private */
1950 _VST_EFFECT_OPCODE_PAD = 0xFFFFFFFFul,
1951};
1952
1953/** Host to Plug-in support checks
1954 *
1955 * Provided as `char* p_ptr` in the VST_EFFECT_OPCODE_SUPPORTS op code.
1956 *
1957 * Harvested via strings command and just checking what plug-ins actually responded to.
1958 */
1960 /** Effect supports alternative bypass.
1961 * The alternative bypass still has the host call process/process_float/process_double and expects us to compensate
1962 * for our delay/latency, copy inputs to outputs, and do minimal work. If we don't support it the host will not call
1963 * process/process_float/process_double at all while bypass is enabled.
1964 *
1965 * @note VST 2.3 or later only.
1966 * @return VST_STATUS_TRUE if we support this, otherwise VST_STATUS_FALSE.
1967 */
1968 const char* bypass;
1969
1970 const char* sendVstEvents;
1971 const char* receiveVstEvents;
1972 const char* sendVstMidiEvent;
1974 const char* midiProgramNames; // VST 2.1 or later.
1976 const char* offline;
1977 // The following were only found in VST 2.3 plug-ins
1979 const char* conformsToWindowRules; // Mac OS only, invalid in VST 2.4. Seems related to vst_host_supports.sizeWindow
1980 const char* plugAsSend;
1981 const char* mixDryWet;
1982 const char* noRealTime;
1983 const char* multipass;
1984 const char* metapass;
1985 const char* _1in1out;
1986 const char* _1in2out;
1987 const char* _2in1out;
1988 const char* _2in2out;
1989 const char* _2in4out;
1990 const char* _4in2out;
1991 const char* _4in4out;
1992 const char* _4in8out;
1993 const char* _8in4out;
1994 const char* _8in8out;
1995} /** @private */ vst_effect_supports = {
1996 .bypass = "bypass",
1997 .sendVstEvents = "sendVstEvents",
1998 .receiveVstEvents = "receiveVstEvents",
1999 .sendVstMidiEvent = "sendVstMidiEvent",
2000 .receiveVstMidiEvent = "receiveVstMidiEvent",
2001 .midiProgramNames = "midiProgramNames",
2002 .receiveVstTimeInfo = "receiveVstTimeInfo",
2003 .offline = "offline",
2004 .plugAsChannelInsert = "plugAsChannelInsert",
2005 .conformsToWindowRules = "conformsToWindowRules",
2006 .plugAsSend = "plugAsSend",
2007 .mixDryWet = "mixDryWet",
2008 .noRealTime = "noRealTime",
2009 .multipass = "multipass",
2010 .metapass = "metapass",
2011 ._1in1out = "1in1out",
2012 ._1in2out = "1in2out",
2013 ._2in1out = "2in1out",
2014 ._2in2out = "2in2out",
2015 ._2in4out = "2in4out",
2016 ._4in2out = "4in2out",
2017 ._4in4out = "4in4out",
2018 ._4in8out = "4in8out",
2019 ._8in4out = "8in4out",
2020 ._8in8out = "8in8out",
2021};
2022
2023/** Control the VST through an opcode and up to four parameters.
2024 *
2025 * @sa VST_EFFECT_OPCODE
2026 *
2027 * @param self Pointer to the effect itself.
2028 * @param opcode The opcode to run, see @ref VST_EFFECT_OPCODE.
2029 * @param p_int1 Parameter, see @ref VST_EFFECT_OPCODE.
2030 * @param p_int2 Parameter, see @ref VST_EFFECT_OPCODE.
2031 * @param p_ptr Parameter, see @ref VST_EFFECT_OPCODE.
2032 * @param p_float Parameter, see @ref VST_EFFECT_OPCODE.
2033 */
2034typedef intptr_t (VST_FUNCTION_INTERFACE* vst_effect_control_t)(struct vst_effect_t* self, int32_t opcode, int32_t p_int1, intptr_t p_int2, void* p_ptr, float p_float);
2035
2036/** Process the given number of samples in inputs and outputs.
2037 *
2038 * Used to handle input data and provides output data. We seem to be the ones that provide the output buffer?
2039 *
2040 * @param self Pointer to the effect itself.
2041 * @param inputs Pointer to an array of 'const float[samples]' with size @ref vst_effect_t.num_inputs.
2042 * @param outputs Pointer to an array of 'float[samples]' with size @ref vst_effect_t.num_outputs.
2043 * @param samples Number of samples per channel in inputs and outputs.
2044 */
2045typedef void (VST_FUNCTION_INTERFACE* vst_effect_process_t) (struct vst_effect_t* self, const float* const* inputs, float** outputs, int32_t samples);
2046
2047/** Updates the value for the parameter at the given index, or does nothing if out of bounds.
2048 *
2049 * @param self Pointer to the effect itself.
2050 * @param index Parameter index.
2051 * @param value New value for the parameter.
2052 */
2053typedef void(VST_FUNCTION_INTERFACE* vst_effect_set_parameter_t)(struct vst_effect_t* self, uint32_t index, float value);
2054
2055/** Retrieve the current value of the parameter at the given index, or do nothing if out of bounds.
2056 *
2057 * @param self Pointer to the effect itself.
2058 * @param index Parameter index.
2059 * @return Current value of the parameter.
2060 */
2061typedef float(VST_FUNCTION_INTERFACE* vst_effect_get_parameter_t)(struct vst_effect_t* self, uint32_t index);
2062
2063/** Process the given number of single samples in inputs and outputs.
2064 *
2065 * Process input and overwrite the output in place. Host provides output buffers.
2066 *
2067 * @important Not thread-safe on MacOS for some reason or another.
2068 *
2069 * @param self Pointer to the effect itself.
2070 * @param inputs Pointer to an array of 'const float[samples]' with size numInputs.
2071 * @param outputs Pointer to an array of 'float[samples]' with size numOutputs.
2072 * @param samples Number of samples per channel in inputs.
2073 */
2074typedef void(VST_FUNCTION_INTERFACE* vst_effect_process_float_t)(struct vst_effect_t* self, const float* const* inputs, float** outputs, int32_t samples);
2075
2076/** Process the given number of double samples in inputs and outputs.
2077 *
2078 * Process input and overwrite the output in place. Host provides output buffers.
2079 *
2080 * @note (VST 2.4+) Available from VST 2.4 and later.
2081 *
2082 * @param self Pointer to the effect itself.
2083 * @param inputs Pointer to an array of 'const double[samples]' with size numInputs.
2084 * @param outputs Pointer to an array of 'double[samples]' with size numOutputs.
2085 * @param samples Number of samples per channel in inputs.
2086 */
2087typedef void (VST_FUNCTION_INTERFACE* vst_effect_process_double_t)(struct vst_effect_t* self, const double* const* inputs, double** outputs, int32_t samples);
2088
2089/** Plug-in Effect definition
2090 */
2092 /** VST Magic Number
2093 *
2094 * Should always be VST_FOURCC('VstP')
2095 *
2096 * @sa VST_MAGICNUMBER
2097 */
2099
2100 /** Control Function
2101 * @sa vst_effect_control_t
2102 * @sa VST_EFFECT_OPCODE
2103 */
2104 vst_effect_control_t control;
2105
2106 /** Process Function
2107 * @sa vst_effect_process_t
2108 * @deprecated (VST 2.4+) Deprecated and practically unsupported in all VST 2.4 compatible hosts and may treat it
2109 * as just another @ref vst_effect_t.process_float.
2110 */
2112
2113 /** Set Parameter Function
2114 * @sa vst_effect_set_parameter_t
2115 */
2117
2118 /** Get Parameter Function
2119 * @sa vst_effect_get_parameter_t
2120 */
2122
2123 /** Number of available pre-defined programs.
2124 *
2125 * @sa VST_EFFECT_OPCODE_PROGRAM_LOAD
2126 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN
2127 * @sa VST_EFFECT_OPCODE_PROGRAM_SET
2128 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_NAME
2129 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_END
2130 * @sa VST_EFFECT_OPCODE_PROGRAM_GET
2131 * @sa VST_EFFECT_OPCODE_PROGRAM_GET_NAME
2132 * @sa VST_EFFECT_FLAG_CHUNKS
2133 * @sa VST_EFFECT_OPCODE_SET_CHUNK_DATA
2134 * @sa VST_EFFECT_OPCODE_GET_CHUNK_DATA
2135 */
2137
2138 /** Number of available parameters.
2139 * All programs must have at least this many parameters.
2140 *
2141 * @sa VST_HOST_OPCODE_IO_MODIFIED
2142 */
2143 int32_t num_params;
2144
2145 /** Number of available input streams.
2146 *
2147 *
2148 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
2149 * @sa VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES
2150 * @sa VST_HOST_OPCODE_IO_MODIFIED
2151 */
2152 int32_t num_inputs;
2153
2154 /** Number of available output streams.
2155 *
2156 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
2157 * @sa VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES
2158 * @sa VST_HOST_OPCODE_IO_MODIFIED
2159 */
2161
2162 /** Effect Flags
2163 *
2164 * @sa VST_EFFECT_FLAGS
2165 */
2166 int32_t flags;
2167
2168 void* _unknown_00; // Must be zero when created. Reserved for host?
2169 void* _unknown_01; // Must be zero when created. Reserved for host?
2170
2171 /** Initial delay before processing of samples can actually begin in Samples.
2172 *
2173 * @note The host can modify this at runtime so it is not safe.
2174 * @note Should be reinitialized when the effect is resumed.
2175 *
2176 * @sa VST_HOST_OPCODE_IO_MODIFIED
2177 */
2178 int32_t delay;
2179
2180 int32_t _unknown_02; // Unknown int32_t values.
2182
2183 /** Ratio of Input to Output production
2184 * Defines how much output data is produced relative to input data when using 'process' instead of 'processFloat'.
2185 * Example: A ratio of 2.0 means we produce twice as much output as we receive input.
2186 *
2187 * Range: >0.0 to Infinity
2188 * Default: 1.0
2189 * @note Ignored in VST 2.4 or with VST_EFFECT_FLAG_SUPPORTS_FLOAT.
2190 */
2192
2193 /** Effect Internal Pointer
2194 *
2195 * You can freely set this to point at some sort of class or similar for use in your own effect. The host must
2196 * never modify this or the data available through this.
2197 */
2199
2200 /** Host Internal Pointer
2201 *
2202 * The host may set this to point at data related to your effect instance that the host needs. The effect must
2203 * never modify this or the data available through this.
2204 */
2205 void* host_internal; // Pointer to Host internal data.
2206
2207 /** Id of the plugin.
2208 *
2209 * Due to this not being enough for uniqueness, it should not be used alone for indexing.
2210 * Ideally you want to index like this:
2211 * [unique_id][module_name][version][flags]
2212 * If any of the checks after unique_id fail, you default to the first possible choice.
2213 *
2214 * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
2215 *
2216 * BUG: Some broken hosts rely on this alone to save information about VST plug-ins.
2217 */
2218 int32_t unique_id;
2219
2220 /** Plugin version
2221 *
2222 * Unrelated to the minimum VST Version, but often the same.
2223 */
2224 int32_t version;
2225
2226 //--------------------------------------------------------------------------------
2227 // VST 2.x starts here.
2228 //--------------------------------------------------------------------------------
2229
2230 /** Process function for in-place single (32-bit float) processiong.
2231 * @sa vst_effect_process_single_t
2232 * @note (VST 2.0+) Available from VST 2.0 and later.
2233 */
2235
2236 //--------------------------------------------------------------------------------
2237 // VST 2.4 starts here.
2238 //--------------------------------------------------------------------------------
2239
2240 /** Process function for in-place double (64-bit float) processiong.
2241 * @sa vst_effect_process_double_t
2242 * @note (VST 2.4+) Available from VST 2.4 and later.
2243 */
2245
2246 // Everything after this is unknown and was present in reacomp-standalone.dll.
2247 uint8_t _unknown[56]; // 56-bytes of something. Could also just be 52-bytes.
2248};
2249
2250/** VST 2.x Entry Point for all platforms
2251 *
2252 * Must be present in VST 2.x plug-ins but must not be present in VST 1.x plug-ins.
2253 *
2254 * @return A new instance of the VST 2.x effect.
2255 */
2256#define VST_ENTRYPOINT
2257 vst_effect_t* VSTPluginMain(vst_host_callback_t callback)
2258
2259/** [DEPRECATED] VST 1.x Entry Point for Windows
2260 *
2261 * Do not implement in VST 2.1 or later plug-ins!
2262 *
2263 * @return A new instance of the VST 1.x effect.
2264 */
2265#define VST_ENTRYPOINT_WINDOWS
2266 vst_effect_t* MAIN(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2267
2268/** [DEPRECATED] VST 1.x Entry Point for MacOS
2269 *
2270 * Do not implement in VST 2.1 or later plug-ins!
2271 *
2272 * @return A new instance of the VST 1.x effect.
2273 */
2274#define VST_ENTRYPOINT_MACOS
2275 vst_effect_t* main_macho(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2276
2277/** [DEPRECATED] VST 2.3 Entry Point for PowerPC
2278 *
2279 * Present in some VST 2.3 and earlier compatible plug-ins that support MacOS.
2280 *
2281 * @return A new instance of the VST 2.x effect.
2282 */
2283#define VST_ENTRYPOINT_MACOS_POWERPC
2284 vst_effect_t* main(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2285
2286#ifdef __cplusplus
2287}
2288#endif
2289#pragma pack(pop)
2290#endif
Host to Plug-in support checks.
Definition vst.h:1959
const char * _2in1out
Definition vst.h:1987
const char * _4in4out
Definition vst.h:1991
const char * plugAsChannelInsert
Definition vst.h:1978
const char * _1in1out
Definition vst.h:1985
const char * _4in8out
Definition vst.h:1992
const char * _2in2out
Definition vst.h:1988
const char * _8in4out
Definition vst.h:1993
const char * _1in2out
Definition vst.h:1986
const char * _2in4out
Definition vst.h:1989
const char * sendVstEvents
Definition vst.h:1970
const char * _4in2out
Definition vst.h:1990
const char * conformsToWindowRules
Definition vst.h:1979
const char * mixDryWet
Definition vst.h:1981
const char * receiveVstEvents
Definition vst.h:1971
const char * receiveVstTimeInfo
Definition vst.h:1975
const char * noRealTime
Definition vst.h:1982
const char * bypass
Effect supports alternative bypass.
Definition vst.h:1968
const char * _8in8out
Definition vst.h:1994
const char * plugAsSend
Definition vst.h:1980
const char * multipass
Definition vst.h:1983
const char * midiProgramNames
Definition vst.h:1974
const char * receiveVstMidiEvent
Definition vst.h:1973
const char * offline
Definition vst.h:1976
const char * metapass
Definition vst.h:1984
const char * sendVstMidiEvent
Definition vst.h:1972
Plug-in Effect definition.
Definition vst.h:2091
int32_t num_outputs
Number of available output streams.
Definition vst.h:2160
int32_t magic_number
VST Magic Number.
Definition vst.h:2098
vst_effect_process_double_t process_double
Process function for in-place double (64-bit float) processiong.
Definition vst.h:2244
int32_t _unknown_02
Definition vst.h:2180
int32_t unique_id
Id of the plugin.
Definition vst.h:2218
vst_effect_process_t process
Process Function.
Definition vst.h:2111
int32_t flags
Effect Flags.
Definition vst.h:2166
float input_output_ratio
Ratio of Input to Output production Defines how much output data is produced relative to input data w...
Definition vst.h:2191
int32_t num_programs
Number of available pre-defined programs.
Definition vst.h:2136
vst_effect_process_float_t process_float
Process function for in-place single (32-bit float) processiong.
Definition vst.h:2234
int32_t version
Plugin version.
Definition vst.h:2224
void * host_internal
Host Internal Pointer.
Definition vst.h:2205
vst_effect_set_parameter_t set_parameter
Set Parameter Function.
Definition vst.h:2116
uint8_t _unknown[56]
Definition vst.h:2247
void * _unknown_01
Definition vst.h:2169
int32_t _unknown_03
Definition vst.h:2181
int32_t num_params
Number of available parameters.
Definition vst.h:2143
void * effect_internal
Effect Internal Pointer.
Definition vst.h:2198
vst_effect_get_parameter_t get_parameter
Get Parameter Function.
Definition vst.h:2121
int32_t delay
Initial delay before processing of samples can actually begin in Samples.
Definition vst.h:2178
int32_t num_inputs
Number of available input streams.
Definition vst.h:2152
void * _unknown_00
Definition vst.h:2168
vst_effect_control_t control
Control Function.
Definition vst.h:2104
Plug-in to Host support checks.
Definition vst.h:742
const char * acceptIOChanges
Does the host support modifying input/output/params/delay when programs, banks or parameters are chan...
Definition vst.h:752
const char * openFileSelector
Definition vst.h:790
const char * receiveVstMidiEvent
Definition vst.h:782
const char * offline
Definition vst.h:788
const char * sendVstEvents
Definition vst.h:778
const char * sendVstMidiEventFlagIsRealtime
Definition vst.h:783
const char * reportConnectionChanges
Definition vst.h:786
const char * startStopProcess
Is the host using process begin/end instead of idle? The host may opt to emit VST_EFFECT_OPCODE_IDLE ...
Definition vst.h:764
const char * sendVstMidiEvent
Definition vst.h:781
const char * sizeWindow
Definition vst.h:787
const char * receiveVstEvents
Definition vst.h:779
const char * closeFileSelector
Definition vst.h:791
const char * sendVstTimeInfo
Definition vst.h:785
const char * shellCategory
Does the host support container plug-ins?
Definition vst.h:776
Information about a parameter.
Definition vst.h:226
char label[VST_BUFFER_SIZE_PARAM_LABEL]
Short Human-readable label for this parameter.
Definition vst.h:294
char category_label[VST_BUFFER_SIZE_CATEGORY_LABEL]
Human-readable name for the category this parameter is in.
Definition vst.h:327
uint32_t flags
Parameter Flags.
Definition vst.h:266
uint16_t category
Category index.
Definition vst.h:310
int32_t max_value_i32
Maximum Integer value.
Definition vst.h:280
char name[VST_BUFFER_SIZE_PARAM_LONG_NAME]
Human-readable name for this parameter.
Definition vst.h:260
float step_f32
Float Step value.
Definition vst.h:234
float step_large_f32
Float large step value This is used for "huge" changes.
Definition vst.h:254
int32_t step_i32
Integer Step value.
Definition vst.h:287
uint16_t index
Display order index.
Definition vst.h:301
int32_t min_value_i32
Minimum Integer value.
Definition vst.h:273
float step_small_f32
Float small step value This is used for "tiny" changes.
Definition vst.h:244
uint16_t num_parameters_in_category
How many parameters are in this category? This allows the plug-in to specify the same category multip...
Definition vst.h:318
Window/Editor Rectangle.
Definition vst.h:152
int16_t left
Definition vst.h:154
int16_t top
Definition vst.h:153
int16_t bottom
Definition vst.h:155
int16_t right
Definition vst.h:156
struct vst_speaker_properties_t speakers[VST_MAX_CHANNELS]
Definition vst.h:482
int32_t type
The type of the speaker.
Definition vst.h:429
float azimuth
Azimuth in Radians Range: -PI (Left) through 0.0 (Right) to PI (Left)
Definition vst.h:397
float distance
Distance in Meters range: 0 to +-Infinity.
Definition vst.h:411
float altitude
Altitude in Radians Range: -PI/2 (Bottom) to PI/2 (Top)
Definition vst.h:404
char name[VST_BUFFER_SIZE_SPEAKER_NAME]
Human readable name for this speaker.
Definition vst.h:420
uint8_t _reserved[28]
Definition vst.h:431
int32_t type
Stream arrangement (optional) See VST_SPEAKER_ARRANGEMENT_TYPE.
Definition vst.h:518
int32_t flags
Stream flags Any combination of VST_STREAM_FLAG.
Definition vst.h:513
char label[VST_BUFFER_SIZE_STREAM_LABEL]
Human-readable label for this stream.
Definition vst.h:522
char name[VST_BUFFER_SIZE_STREAM_NAME]
Human-readable name for this stream.
Definition vst.h:508
uint8_t _reserved[48]
Definition vst.h:524
VST_SPEAKER_ARRANGEMENT_TYPE
Definition vst.h:434
@ VST_SPEAKER_ARRANGEMENT_TYPE_7_1
7.1 (Full Surround)
Definition vst.h:473
@ VST_SPEAKER_ARRANGEMENT_TYPE_UNKNOWN
Unknown/Empty speaker layout.
Definition vst.h:443
@ _VST_SPEAKER_ARRANGEMENT_TYPE_PAD
Definition vst.h:476
@ VST_SPEAKER_ARRANGEMENT_TYPE_5_1
5.1 (Old Surround)
Definition vst.h:467
@ VST_SPEAKER_ARRANGEMENT_TYPE_CUSTOM
Custom speaker arrangement.
Definition vst.h:439
@ VST_SPEAKER_ARRANGEMENT_TYPE_MONO
Mono.
Definition vst.h:447
@ VST_SPEAKER_ARRANGEMENT_TYPE_STEREO
Stereo.
Definition vst.h:451
@ VST_SPEAKER_ARRANGEMENT_TYPE_5_0
5.0 (Old Surround)
Definition vst.h:461
@ VST_SPEAKER_ARRANGEMENT_TYPE_4_0
Quadraphonic.
Definition vst.h:455
#define VST_FOURCC(a, b, c, d)
Convert four numbers into a FourCC.
Definition vst.h:54
VST_VERSION
Valid VST 1.x and 2.x versions The format is either a single digit or four digits in Base10 format.
Definition vst.h:134
@ VST_VERSION_1_1_0_0
Definition vst.h:137
@ VST_VERSION_2_1_0_0
Definition vst.h:140
@ VST_VERSION_2_0_0_0
Definition vst.h:139
@ _VST_VERSION_PAD
Definition vst.h:146
@ VST_VERSION_2
Definition vst.h:138
@ VST_VERSION_2_2_0_0
Definition vst.h:141
@ VST_VERSION_2_3_0_0
Definition vst.h:142
@ VST_VERSION_2_4_0_0
Definition vst.h:143
@ VST_VERSION_1_0_0_0
Definition vst.h:136
@ VST_VERSION_1
Definition vst.h:135
void(VST_FUNCTION_INTERFACE * vst_effect_process_t)(struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples)
Process the given number of samples in inputs and outputs.
Definition vst.h:2045
#define VST_MAX_CHANNELS
Maximum number of channels/streams/inputs/outputs supported by VST 2.x.
Definition vst.h:50
void(VST_FUNCTION_INTERFACE * vst_effect_set_parameter_t)(struct vst_effect_t *self, uint32_t index, float value)
Updates the value for the parameter at the given index, or does nothing if out of bounds.
Definition vst.h:2053
VST_HOST_OPCODE
Plug-in to Host Op-Codes These Op-Codes are emitted by the plug-in and the host may handle them or re...
Definition vst.h:537
@ VST_HOST_OPCODE_28
Crash the host if p_ptr isn't nullptr.
Definition vst.h:698
@ VST_HOST_OPCODE_04
Definition vst.h:578
@ VST_HOST_OPCODE_18
Definition vst.h:634
@ VST_HOST_OPCODE_EDITOR_UPDATE
Definition vst.h:707
@ VST_HOST_OPCODE_CURRENT_EFFECT_ID
Definition vst.h:568
@ VST_HOST_OPCODE_PARAM_START_EDIT
Definition vst.h:715
@ VST_HOST_OPCODE_PARAM_STOP_EDIT
Definition vst.h:723
@ VST_HOST_OPCODE_06
Definition vst.h:586
@ VST_HOST_OPCODE_1A
Definition vst.h:638
@ VST_HOST_OPCODE_0F
Definition vst.h:616
@ VST_HOST_OPCODE_2F
Definition vst.h:727
@ VST_HOST_OPCODE_IO_MODIFIED
Definition vst.h:612
@ VST_HOST_OPCODE_1B
Definition vst.h:640
@ VST_HOST_OPCODE_12
Definition vst.h:622
@ VST_HOST_OPCODE_KEEPALIVE_OR_IDLE
Definition vst.h:576
@ VST_HOST_OPCODE_07
Definition vst.h:588
@ VST_HOST_OPCODE_1C
Definition vst.h:642
@ VST_HOST_OPCODE_08
Definition vst.h:590
@ VST_HOST_OPCODE_27
Crash the host if p_ptr isn't nullptr.
Definition vst.h:695
@ VST_HOST_OPCODE_20
Retrieve the vendor name into the ptr buffer.
Definition vst.h:654
@ VST_HOST_OPCODE_2B
Notify host that a parameter is being edited.
Definition vst.h:713
@ VST_HOST_OPCODE_16
Definition vst.h:630
@ VST_HOST_OPCODE_25
Check if the host supports a certain feature.
Definition vst.h:688
@ VST_HOST_OPCODE_1D
Definition vst.h:644
@ VST_HOST_OPCODE_23
User defined OP Code, for custom interaction.
Definition vst.h:677
@ VST_HOST_OPCODE_15
Definition vst.h:628
@ VST_HOST_OPCODE_24
Definition vst.h:681
@ VST_HOST_OPCODE_19
Definition vst.h:636
@ VST_HOST_OPCODE_05
Definition vst.h:584
@ VST_HOST_OPCODE_1E
Definition vst.h:646
@ VST_HOST_OPCODE_29
Definition vst.h:700
@ VST_HOST_OPCODE_01
Retrieve the Hosts VST Version.
Definition vst.h:556
@ VST_HOST_OPCODE_AUTOMATE
Definition vst.h:548
@ VST_HOST_OPCODE_0A
Definition vst.h:594
@ VST_HOST_OPCODE_26
Definition vst.h:692
@ VST_HOST_OPCODE_11
Definition vst.h:620
@ VST_HOST_OPCODE_0C
Definition vst.h:598
@ VST_HOST_OPCODE_10
Definition vst.h:618
@ VST_HOST_OPCODE_2C
Notify host that parameter is no longer being edited.
Definition vst.h:721
@ VST_HOST_OPCODE_13
Definition vst.h:624
@ VST_HOST_OPCODE_0E
Definition vst.h:614
@ VST_HOST_OPCODE_2D
Definition vst.h:725
@ VST_HOST_OPCODE_0D
Notify the host that numInputs/numOutputs/delay/numParams has changed.
Definition vst.h:610
@ VST_HOST_OPCODE_00
Update automation for a given Parameter.
Definition vst.h:546
@ VST_HOST_OPCODE_17
Definition vst.h:632
@ VST_HOST_OPCODE_03
Some sort of idle keep-alive?
Definition vst.h:574
@ VST_HOST_OPCODE_PRODUCT_NAME
Definition vst.h:664
@ VST_HOST_OPCODE_2A
Request an update of the editor window.
Definition vst.h:705
@ VST_HOST_OPCODE_02
Get the currently selected effect id in container plug-ins.
Definition vst.h:566
@ VST_HOST_OPCODE_VENDOR_VERSION
Definition vst.h:672
@ VST_HOST_OPCODE_14
Definition vst.h:626
@ VST_HOST_OPCODE_VENDOR_NAME
Definition vst.h:656
@ VST_HOST_OPCODE_2E
Definition vst.h:726
@ VST_HOST_OPCODE_MAX
Definition vst.h:730
@ VST_HOST_OPCODE_22
Retrieve the vendor version in return value.
Definition vst.h:670
@ _VST_HOST_OPCODE_PAD
Definition vst.h:733
@ VST_HOST_OPCODE_21
Retrieve the product name into the ptr buffer.
Definition vst.h:662
@ VST_HOST_OPCODE_VST_VERSION
Definition vst.h:558
@ VST_HOST_OPCODE_SUPPORTS
Definition vst.h:690
@ VST_HOST_OPCODE_CUSTOM
Definition vst.h:679
@ VST_HOST_OPCODE_PARAM_UPDATE
Definition vst.h:550
@ VST_HOST_OPCODE_1F
Definition vst.h:648
@ VST_HOST_OPCODE_0B
Definition vst.h:596
@ VST_HOST_OPCODE_09
Definition vst.h:592
void(VST_FUNCTION_INTERFACE * vst_effect_process_double_t)(struct vst_effect_t *self, const double *const *inputs, double **outputs, int32_t samples)
Process the given number of double samples in inputs and outputs.
Definition vst.h:2087
VST_STATUS
Known Status Codes.
Definition vst.h:58
@ VST_STATUS_ERROR
Definition vst.h:69
@ VST_STATUS_0
Unknown / False We either don't know the answer or we can't handle the data/notification.
Definition vst.h:65
@ VST_STATUS_YES
Definition vst.h:85
@ VST_STATUS_m1
No We're unable to handle the data/notification.
Definition vst.h:93
@ VST_STATUS_1
Yes / True We've handled the data/notification.
Definition vst.h:79
@ _VST_STATUS_PAD
Definition vst.h:97
@ VST_STATUS_TRUE
Definition vst.h:81
@ VST_STATUS_SUCCESS
Definition vst.h:83
@ VST_STATUS_FALSE
Definition vst.h:67
@ VST_STATUS_UNKNOWN
Definition vst.h:71
@ VST_STATUS_NO
Definition vst.h:95
VST_SPEAKER_TYPE
Definition vst.h:332
@ VST_SPEAKER_TYPE_RIGHT_REAR
Definition vst.h:340
@ _VST_SPEAKER_TYPE_PAD
Definition vst.h:388
@ VST_SPEAKER_TYPE_RIGHT
Definition vst.h:336
@ VST_SPEAKER_TYPE_CENTER
Definition vst.h:337
@ VST_SPEAKER_TYPE_LFE
Definition vst.h:338
@ VST_SPEAKER_TYPE_USER_09
Definition vst.h:376
@ VST_SPEAKER_TYPE_USER_25
Definition vst.h:360
@ VST_SPEAKER_TYPE_MONO
Definition vst.h:334
@ VST_SPEAKER_TYPE_USER_04
Definition vst.h:381
@ VST_SPEAKER_TYPE_USER_11
Definition vst.h:374
@ VST_SPEAKER_TYPE_USER_10
Definition vst.h:375
@ VST_SPEAKER_TYPE_USER_12
Definition vst.h:373
@ VST_SPEAKER_TYPE_USER_30
Definition vst.h:355
@ VST_SPEAKER_TYPE_USER_32
Definition vst.h:353
@ VST_SPEAKER_TYPE_USER_20
Definition vst.h:365
@ VST_SPEAKER_TYPE_USER_15
Definition vst.h:370
@ VST_SPEAKER_TYPE_RIGHT_SIDE
Definition vst.h:345
@ VST_SPEAKER_TYPE_LEFT_SIDE
Definition vst.h:344
@ VST_SPEAKER_TYPE_USER_13
Definition vst.h:372
@ VST_SPEAKER_TYPE_USER_02
Definition vst.h:383
@ VST_SPEAKER_TYPE_USER_23
Definition vst.h:362
@ VST_SPEAKER_TYPE_USER_28
Definition vst.h:357
@ VST_SPEAKER_TYPE_USER_05
Definition vst.h:380
@ VST_SPEAKER_TYPE_USER_01
Definition vst.h:384
@ VST_SPEAKER_TYPE_LEFT
Definition vst.h:335
@ VST_SPEAKER_TYPE_USER_07
Definition vst.h:378
@ VST_SPEAKER_TYPE_USER_27
Definition vst.h:358
@ VST_SPEAKER_TYPE_USER_18
Definition vst.h:367
@ VST_SPEAKER_TYPE_USER_29
Definition vst.h:356
@ VST_SPEAKER_TYPE_USER_21
Definition vst.h:364
@ VST_SPEAKER_TYPE_USER_06
Definition vst.h:379
@ VST_SPEAKER_TYPE_USER_26
Definition vst.h:359
@ VST_SPEAKER_TYPE_USER_19
Definition vst.h:366
@ VST_SPEAKER_TYPE_USER_31
Definition vst.h:354
@ VST_SPEAKER_TYPE_USER_24
Definition vst.h:361
@ VST_SPEAKER_TYPE_USER_22
Definition vst.h:363
@ VST_SPEAKER_TYPE_USER_17
Definition vst.h:368
@ VST_SPEAKER_TYPE_USER_08
Definition vst.h:377
@ VST_SPEAKER_TYPE_LEFT_REAR
Definition vst.h:339
@ VST_SPEAKER_TYPE_USER_14
Definition vst.h:371
@ VST_SPEAKER_TYPE_USER_16
Definition vst.h:369
@ VST_SPEAKER_TYPE_USER_03
Definition vst.h:382
VST_EFFECT_CATEGORY
Plug-in Categories Pre-defined category grouping that also affect host behavior when handling the plu...
Definition vst.h:848
@ VST_EFFECT_CATEGORY_0A
Container Plug-in This plug-in contains multiple effects in one and requires special handling on both...
Definition vst.h:1004
@ VST_EFFECT_CATEGORY_EFFECT
Definition vst.h:858
@ VST_EFFECT_CATEGORY_02
Instruments Examples: Instruments, Synths, Samplers, ...
Definition vst.h:865
@ VST_EFFECT_CATEGORY_METERING
Definition vst.h:877
@ VST_EFFECT_CATEGORY_01
Generic Effects Examples: Distortion, Pitch Shift, ...
Definition vst.h:856
@ VST_EFFECT_CATEGORY_08
Restoration Examples: Noise Filtering, Upsamplers, ...
Definition vst.h:914
@ VST_EFFECT_CATEGORY_WAVEGENERATOR
Definition vst.h:1018
@ VST_EFFECT_CATEGORY_09
Offline Processing Examples: Nothing Supports: Nothing.
Definition vst.h:922
@ VST_EFFECT_CATEGORY_SPATIAL
Definition vst.h:895
@ VST_EFFECT_CATEGORY_07
Definition vst.h:906
@ VST_EFFECT_CATEGORY_06
Delay/Echo Examples: Echo, Reverb, Room Simulation, Delay, ...
Definition vst.h:902
@ VST_EFFECT_CATEGORY_OFFLINE
Definition vst.h:924
@ VST_EFFECT_CATEGORY_0B
Waveform Generators Examples: Sine Wave Generator, ... Supports: Delay, Tail Samples.
Definition vst.h:1016
@ VST_EFFECT_CATEGORY_05
Spatializers Examples: Channel Panning, Expanders, ...
Definition vst.h:893
@ VST_EFFECT_CATEGORY_MASTERING
Definition vst.h:886
@ VST_EFFECT_CATEGORY_RESTORATION
Definition vst.h:916
@ VST_EFFECT_CATEGORY_UNCATEGORIZED
Definition vst.h:849
@ VST_EFFECT_CATEGORY_03
Metering Examples: Loudness Meters, Volume Analysis, ...
Definition vst.h:875
@ VST_EFFECT_CATEGORY_INSTRUMENT
Definition vst.h:867
@ VST_EFFECT_CATEGORY_DELAY_OR_ECHO
Definition vst.h:904
@ VST_EFFECT_CATEGORY_04
Mastering Examples: Compressors, Limiters, ...
Definition vst.h:884
@ VST_EFFECT_CATEGORY_CONTAINER
Definition vst.h:1006
VST_EFFECT_FLAG
Effect Flags.
Definition vst.h:1029
@ VST_EFFECT_FLAG_SILENT_TAIL
Definition vst.h:1097
@ VST_EFFECT_FLAG_1ls9
Effect does not produce tail samples when the input is silent.
Definition vst.h:1095
@ VST_EFFECT_FLAG_CHUNKS
Definition vst.h:1075
@ VST_EFFECT_FLAG_1ls4
Effect uses process_float.
Definition vst.h:1063
@ VST_EFFECT_FLAG_1ls5
Effect supports saving/loading programs/banks from unformatted chunk data.
Definition vst.h:1073
@ VST_EFFECT_FLAG_EDITOR
Definition vst.h:1051
@ VST_EFFECT_FLAG_SUPPORTS_FLOAT
Definition vst.h:1065
@ VST_EFFECT_FLAG_1ls0
Effect provides a custom editor.
Definition vst.h:1049
@ VST_EFFECT_FLAG_INSTRUMENT
Definition vst.h:1087
@ VST_EFFECT_FLAG_1ls12
Effect supports process_double.
Definition vst.h:1109
@ VST_EFFECT_FLAG_1ls8
Effect is an Instrument/Generator.
Definition vst.h:1085
@ VST_EFFECT_FLAG_SUPPORTS_DOUBLE
Definition vst.h:1111
VST_BUFFER_SIZE
Known Buffer Sizes.
Definition vst.h:102
@ VST_BUFFER_SIZE_SPEAKER_NAME
Definition vst.h:112
@ VST_BUFFER_SIZE_STREAM_NAME
Definition vst.h:113
@ VST_BUFFER_SIZE_PARAM_VALUE
Definition vst.h:105
@ VST_BUFFER_SIZE_STREAM_LABEL
Definition vst.h:106
@ VST_BUFFER_SIZE_PARAM_LABEL
Definition vst.h:103
@ VST_BUFFER_SIZE_VENDOR_NAME
Definition vst.h:114
@ VST_BUFFER_SIZE_PARAM_NAME
Definition vst.h:104
@ VST_BUFFER_SIZE_PROGRAM_NAME
Definition vst.h:108
@ VST_BUFFER_SIZE_CATEGORY_LABEL
Definition vst.h:107
@ VST_BUFFER_SIZE_EFFECT_NAME
Definition vst.h:109
@ VST_BUFFER_SIZE_PARAM_LONG_NAME
Definition vst.h:110
@ VST_BUFFER_SIZE_PRODUCT_NAME
Definition vst.h:111
void(VST_FUNCTION_INTERFACE * vst_effect_process_float_t)(struct vst_effect_t *self, const float *const *inputs, float **outputs, int32_t samples)
Process the given number of single samples in inputs and outputs.
Definition vst.h:2074
VST_PARAMETER_FLAG
Flags for parameters.
Definition vst.h:162
@ VST_PARAMETER_FLAG_SWITCH
Definition vst.h:169
@ VST_PARAMETER_FLAG_1ls6
Parameter can be gradually increased/decreased.
Definition vst.h:215
@ VST_PARAMETER_FLAG_1ls5
Parameter has a category for the default editor.
Definition vst.h:207
@ VST_PARAMETER_FLAG_1ls4
Parameter has an display order index for the default editor.
Definition vst.h:199
@ VST_PARAMETER_FLAG_1ls2
Parameter uses float steps.
Definition vst.h:183
@ VST_PARAMETER_FLAG_INTEGER_LIMITS
Definition vst.h:177
@ VST_PARAMETER_FLAG_STEP_FLOAT
Definition vst.h:185
@ VST_PARAMETER_FLAG_INDEX
Definition vst.h:201
@ VST_PARAMETER_FLAG_CATEGORY
Definition vst.h:209
@ VST_PARAMETER_FLAG_RAMPING
Definition vst.h:217
@ VST_PARAMETER_FLAG_1ls3
Parameter uses integer steps.
Definition vst.h:191
@ VST_PARAMETER_FLAG_1ls0
Parameter is an on/off switch.
Definition vst.h:167
@ VST_PARAMETER_FLAG_STEP_INT
Definition vst.h:193
@ VST_PARAMETER_FLAG_1ls1
Parameter limits are set as integers.
Definition vst.h:175
@ _VST_PARAMETER_FLAG_PAD
Definition vst.h:219
#define VST_FUNCTION_INTERFACE
Standard calling convention across plug-ins and hosts.
Definition vst.h:46
VST_EFFECT_OPCODE
Host to Plug-in Op-Codes These Op-Codes are emitted by the host and we must either handle them or ret...
Definition vst.h:1117
@ VST_EFFECT_OPCODE_WINDOW_MOUSE
Definition vst.h:1327
@ VST_EFFECT_OPCODE_2A
Host wants to change the speaker arrangement.
Definition vst.h:1573
@ VST_EFFECT_OPCODE_GETVENDORVERSION
Definition vst.h:1650
@ VST_EFFECT_OPCODE_20
Input disconnected.
Definition vst.h:1484
@ VST_EFFECT_OPCODE_14
Window Focus Event?
Definition vst.h:1363
@ VST_EFFECT_OPCODE_PARAM_VALUE_TO_STRING
Definition vst.h:1206
@ VST_EFFECT_OPCODE_PARAM_GETLABEL
Definition vst.h:1186
@ VST_EFFECT_OPCODE_4E
Definition vst.h:1937
@ VST_EFFECT_OPCODE_43
Host is starting to set up a program.
Definition vst.h:1821
@ VST_EFFECT_OPCODE_3E
Midi related.
Definition vst.h:1785
@ VST_EFFECT_OPCODE_32
User-defined Op-Code for VST extensions.
Definition vst.h:1661
@ VST_EFFECT_OPCODE_03
Get currently selected program number.
Definition vst.h:1152
@ VST_EFFECT_OPCODE_SET_CHUNK_DATA
Definition vst.h:1411
@ VST_EFFECT_OPCODE_21
Retrieve properties for the given input index.
Definition vst.h:1493
@ VST_EFFECT_OPCODE_PRODUCT_NAME
Definition vst.h:1641
@ VST_EFFECT_OPCODE_4B
Host wants to know if we can load the provided bank data.
Definition vst.h:1905
@ VST_EFFECT_OPCODE_PARAM_NAME
Definition vst.h:1220
@ VST_EFFECT_OPCODE_1C
Definition vst.h:1456
@ VST_EFFECT_OPCODE_41
Midi related.
Definition vst.h:1806
@ VST_EFFECT_OPCODE_SET_SAMPLE_RATE
Definition vst.h:1236
@ VST_EFFECT_OPCODE_CREATE
Definition vst.h:1124
@ VST_EFFECT_OPCODE_EDITOR_GET_RECT
Definition vst.h:1276
@ VST_EFFECT_OPCODE_SET_SPEAKER_ARRANGEMENT
Definition vst.h:1575
@ VST_EFFECT_OPCODE_PARAM_GETVALUE
Definition vst.h:1200
@ VST_EFFECT_OPCODE_PROGRAM_SET_NAME
Definition vst.h:1166
@ VST_EFFECT_OPCODE_06
Get the value? label for the parameter.
Definition vst.h:1184
@ VST_EFFECT_OPCODE_0A
Set the new sample rate for the plugin to use.
Definition vst.h:1232
@ VST_EFFECT_OPCODE_10
Window Draw Event?
Definition vst.h:1309
@ VST_EFFECT_OPCODE_2F
Retrieve the vendor name into the ptr buffer.
Definition vst.h:1626
@ VST_EFFECT_OPCODE_PROGRAM_GET
Definition vst.h:1156
@ VST_EFFECT_OPCODE_28
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1552
@ VST_EFFECT_OPCODE_4D
Definition vst.h:1930
@ VST_EFFECT_OPCODE_01
Destroy the effect (if there is any) and free its memory.
Definition vst.h:1134
@ VST_EFFECT_OPCODE_3C
Editor Virtual Key Up Event.
Definition vst.h:1769
@ VST_EFFECT_OPCODE_1B
Set Parameter value from string representation.
Definition vst.h:1445
@ VST_EFFECT_OPCODE_SET_BLOCK_SIZE
Definition vst.h:1246
@ VST_EFFECT_OPCODE_IDLE
Definition vst.h:1697
@ VST_EFFECT_OPCODE_33
Test for support of a specific named feature.
Definition vst.h:1672
@ VST_EFFECT_OPCODE_04
Set the name of the currently selected program.
Definition vst.h:1162
@ VST_EFFECT_OPCODE_09
Definition vst.h:1226
@ VST_EFFECT_OPCODE_PARAM_GET_NAME
Definition vst.h:1218
@ VST_EFFECT_OPCODE_BANK_LOAD
Definition vst.h:1907
@ VST_EFFECT_OPCODE_EDITOR_MOUSE
Definition vst.h:1329
@ VST_EFFECT_OPCODE_WINDOW_CREATE
Definition vst.h:1285
@ VST_EFFECT_OPCODE_0B
Sets the block size, which is the maximum number of samples passed into the effect via process calls.
Definition vst.h:1242
@ VST_EFFECT_OPCODE_PARAM_GET_VALUE
Definition vst.h:1202
@ VST_EFFECT_OPCODE_39
Definition vst.h:1733
@ VST_EFFECT_OPCODE_05
Get the name of the currently selected program.
Definition vst.h:1172
@ VST_EFFECT_OPCODE_1A
Can the parameter be automated?
Definition vst.h:1430
@ VST_EFFECT_OPCODE_19
Appears to be related to midi and audio events.
Definition vst.h:1422
@ VST_EFFECT_OPCODE_PROGRAM_SET_END
Definition vst.h:1833
@ VST_EFFECT_OPCODE_GET_PROGRAM
Definition vst.h:1154
@ VST_EFFECT_OPCODE_12
Window Keyboard Event?
Definition vst.h:1341
@ VST_EFFECT_OPCODE_42
Midi related.
Definition vst.h:1813
@ VST_EFFECT_OPCODE_EFFECT_CATEGORY
Definition vst.h:1515
@ VST_EFFECT_OPCODE_PARAM_IS_AUTOMATABLE
Definition vst.h:1434
@ VST_EFFECT_OPCODE_WINDOW_DRAW
Definition vst.h:1311
@ VST_EFFECT_OPCODE_DESTROY
Definition vst.h:1136
@ VST_EFFECT_OPCODE_SETBLOCKSIZE
Definition vst.h:1244
@ VST_EFFECT_OPCODE_02
Set which program number is currently select.
Definition vst.h:1142
@ VST_EFFECT_OPCODE_48
End processing of audio.
Definition vst.h:1877
@ VST_EFFECT_OPCODE_GETNAME2
Definition vst.h:1639
@ VST_EFFECT_OPCODE_CUSTOM
Definition vst.h:1663
@ VST_EFFECT_OPCODE_2E
Translate an error code to a string.
Definition vst.h:1617
@ VST_EFFECT_OPCODE_3D
Definition vst.h:1778
@ VST_EFFECT_OPCODE_EDITOR_KEEP_ALIVE
Definition vst.h:1353
@ VST_EFFECT_OPCODE_PARAM_PROPERTIES
Definition vst.h:1726
@ VST_EFFECT_OPCODE_TAIL_SAMPLES
Definition vst.h:1686
@ VST_EFFECT_OPCODE_30
Retrieve the product name into the ptr buffer.
Definition vst.h:1637
@ VST_EFFECT_OPCODE_PARAM_VALUE
Definition vst.h:1204
@ VST_EFFECT_OPCODE_35
Notify effect that it is idle?
Definition vst.h:1695
@ VST_EFFECT_OPCODE_PROGRAM_GET_NAME
Definition vst.h:1176
@ VST_EFFECT_OPCODE_0D
Retrieve the client rect size of the plugins window.
Definition vst.h:1270
@ VST_EFFECT_OPCODE_1E
Definition vst.h:1470
@ VST_EFFECT_OPCODE_PROGRAM_LOAD
Definition vst.h:1919
@ VST_EFFECT_OPCODE_23
Retrieve category of this effect.
Definition vst.h:1513
@ VST_EFFECT_OPCODE_VST_VERSION
Definition vst.h:1743
@ VST_EFFECT_OPCODE_36
Definition vst.h:1705
@ VST_EFFECT_OPCODE_CATEGORY
Definition vst.h:1517
@ VST_EFFECT_OPCODE_EDITOR_OPEN
Definition vst.h:1287
@ VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN
Definition vst.h:1759
@ VST_EFFECT_OPCODE_00
Create/Initialize the effect (if it has not been created already).
Definition vst.h:1122
@ VST_EFFECT_OPCODE_2B
Definition vst.h:1581
@ VST_EFFECT_OPCODE_SUSPEND_RESUME
Definition vst.h:1260
@ VST_EFFECT_OPCODE_24
Definition vst.h:1524
@ VST_EFFECT_OPCODE_PARAM_LABEL
Definition vst.h:1190
@ VST_EFFECT_OPCODE_40
Midi related.
Definition vst.h:1799
@ VST_EFFECT_OPCODE_22
Retrieve properties for the given output index.
Definition vst.h:1504
@ VST_EFFECT_OPCODE_4F
Definition vst.h:1944
@ VST_EFFECT_OPCODE_47
Begin processing of audio.
Definition vst.h:1868
@ VST_EFFECT_OPCODE_38
Parameter Properties.
Definition vst.h:1722
@ VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
Definition vst.h:1848
@ VST_EFFECT_OPCODE_0E
Create the window for the plugin.
Definition vst.h:1283
@ VST_EFFECT_OPCODE_3B
Editor Virtual Key Down Input.
Definition vst.h:1757
@ VST_EFFECT_OPCODE_BYPASS
Definition vst.h:1592
@ VST_EFFECT_OPCODE_EDITOR_KEYBOARD
Definition vst.h:1345
@ VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES
Definition vst.h:1495
@ VST_EFFECT_OPCODE_VENDOR_NAME
Definition vst.h:1630
@ VST_EFFECT_OPCODE_PARAM_ISAUTOMATABLE
Definition vst.h:1432
@ VST_EFFECT_OPCODE_WINDOW_KEYBOARD
Definition vst.h:1343
@ VST_EFFECT_OPCODE_GET_PROGRAM_NAME
Definition vst.h:1174
@ VST_EFFECT_OPCODE_17
Get Chunk Data.
Definition vst.h:1395
@ VST_EFFECT_OPCODE_31
Retrieve the vendor version in return value.
Definition vst.h:1648
@ VST_EFFECT_OPCODE_2D
Retrieve the effect name into the ptr buffer.
Definition vst.h:1601
@ VST_EFFECT_OPCODE_07
Get the string representing the value for the parameter.
Definition vst.h:1198
@ VST_EFFECT_OPCODE_PROCESS_END
Definition vst.h:1879
@ VST_EFFECT_OPCODE_SET_PROGRAM
Definition vst.h:1144
@ VST_EFFECT_OPCODE_27
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1545
@ VST_EFFECT_OPCODE_EDITOR_DRAW
Definition vst.h:1313
@ VST_EFFECT_OPCODE_15
Window Unfocus Event?
Definition vst.h:1373
@ VST_EFFECT_OPCODE_49
Definition vst.h:1886
@ VST_EFFECT_OPCODE_NAME
Definition vst.h:1607
@ VST_EFFECT_OPCODE_EDITOR_CLOSE
Definition vst.h:1297
@ VST_EFFECT_OPCODE_29
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1559
@ VST_EFFECT_OPCODE_3A
Retrieve the VST Version supported.
Definition vst.h:1741
@ VST_EFFECT_OPCODE_11
Window Mouse Event?
Definition vst.h:1325
@ VST_EFFECT_OPCODE_PARAM_GET_LABEL
Definition vst.h:1188
@ VST_EFFECT_OPCODE_SETSAMPLERATE
Definition vst.h:1234
@ VST_EFFECT_OPCODE_0F
Destroy the plugins window.
Definition vst.h:1293
@ VST_EFFECT_OPCODE_GET_CHUNK_DATA
Definition vst.h:1397
@ VST_EFFECT_OPCODE_INITIALIZE
Definition vst.h:1126
@ VST_EFFECT_OPCODE_GETTAILSAMPLES
Definition vst.h:1684
@ VST_EFFECT_OPCODE_18
Set Chunk Data.
Definition vst.h:1409
@ VST_EFFECT_OPCODE_EFFECT_NAME
Definition vst.h:1605
@ VST_EFFECT_OPCODE_GET_PARAMETER_PROPERTIES
Definition vst.h:1724
@ VST_EFFECT_OPCODE_PARAM_AUTOMATABLE
Definition vst.h:1436
@ VST_EFFECT_OPCODE_PARAM_GETNAME
Definition vst.h:1216
@ VST_EFFECT_OPCODE_4A
Definition vst.h:1895
@ VST_EFFECT_OPCODE_08
Get the name for the parameter.
Definition vst.h:1214
@ VST_EFFECT_OPCODE_13
Window/Editor Idle/Keep-Alive Callback?
Definition vst.h:1351
@ VST_EFFECT_OPCODE_45
Host wants to know the current speaker arrangement.
Definition vst.h:1846
@ VST_EFFECT_OPCODE_WINDOW_GETRECT
Definition vst.h:1272
@ VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES
Definition vst.h:1506
@ VST_EFFECT_OPCODE_PARAM_VALUE_FROM_STRING
Definition vst.h:1449
@ VST_EFFECT_OPCODE_GETVENDOR
Definition vst.h:1628
@ VST_EFFECT_OPCODE_PROCESS_BEGIN
Definition vst.h:1870
@ VST_EFFECT_OPCODE_1D
Definition vst.h:1463
@ VST_EFFECT_OPCODE_PAUSE_UNPAUSE
Definition vst.h:1258
@ VST_EFFECT_OPCODE_4C
Host wants to know if we can load the provided program data.
Definition vst.h:1917
@ VST_EFFECT_OPCODE_26
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1538
@ VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID
Definition vst.h:1861
@ VST_EFFECT_OPCODE_GETNAME
Definition vst.h:1603
@ VST_EFFECT_OPCODE_VENDOR_VERSION
Definition vst.h:1652
@ VST_EFFECT_OPCODE_46
Get the next effect contained in this effect.
Definition vst.h:1859
@ VST_EFFECT_OPCODE_SET_PROGRAM_NAME
Definition vst.h:1164
@ VST_EFFECT_OPCODE_FOURCC
Definition vst.h:1383
@ VST_EFFECT_OPCODE_37
Definition vst.h:1713
@ VST_EFFECT_OPCODE_44
Host is done setting up a program.
Definition vst.h:1831
@ VST_EFFECT_OPCODE_3F
Midi related.
Definition vst.h:1792
@ VST_EFFECT_OPCODE_WINDOW_DESTROY
Definition vst.h:1295
@ VST_EFFECT_OPCODE_EDITOR_VKEY_UP
Definition vst.h:1771
@ VST_EFFECT_OPCODE_1F
Input connected.
Definition vst.h:1477
@ VST_EFFECT_OPCODE_34
Number of samples that are at the tail at the end of playback.
Definition vst.h:1682
@ VST_EFFECT_OPCODE_2C
Enable/Disable bypassing the effect.
Definition vst.h:1590
@ VST_EFFECT_OPCODE_PROGRAM_SET
Definition vst.h:1146
@ VST_EFFECT_OPCODE_SUPPORTS
Definition vst.h:1674
@ VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN
Definition vst.h:1823
@ VST_EFFECT_OPCODE_16
Definition vst.h:1381
@ VST_EFFECT_OPCODE_TRANSLATE_ERROR
Definition vst.h:1619
@ VST_EFFECT_OPCODE_EDITOR_RECT
Definition vst.h:1274
@ VST_EFFECT_OPCODE_25
Definition vst.h:1531
@ VST_EFFECT_OPCODE_PARAM_SET_VALUE
Definition vst.h:1447
@ VST_EFFECT_OPCODE_SUSPEND
Definition vst.h:1262
@ VST_EFFECT_OPCODE_0C
Effect processing should be suspended/paused or resumed/unpaused.
Definition vst.h:1256
VST_STREAM_FLAG
Definition vst.h:485
@ VST_STREAM_FLAG_STEREO
Definition vst.h:495
@ VST_STREAM_FLAG_1ls2
Stream is defined by VST_SPEAKER_ARRANGEMENT_TYPE.
Definition vst.h:501
@ VST_STREAM_FLAG_1ls0
Ignored?
Definition vst.h:488
@ VST_STREAM_FLAG_1ls1
Stream is in Stereo.
Definition vst.h:494
@ VST_STREAM_FLAG_USE_TYPE
Definition vst.h:502
float(VST_FUNCTION_INTERFACE * vst_effect_get_parameter_t)(struct vst_effect_t *self, uint32_t index)
Retrieve the current value of the parameter at the given index, or do nothing if out of bounds.
Definition vst.h:2061