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
601
602 /** Notify the host that numInputs/numOutputs/delay/numParams has changed.
603 * Only supported if the host replies @ref VST_STATUS_TRUE to @ref VST_HOST_OPCODE_SUPPORTS query for
604 * @ref vst_host_supports_t.acceptIOChanges.
605 *
606 * @note In VST 2.3 and earlier calling this outside of @ref VST_EFFECT_OPCODE_IDLE may result in a crash.
607 * @note In VST 2.3 and later this may only be called while between @ref VST_EFFECT_OPCODE_PROCESS_END and
608 * @ref VST_EFFECT_OPCODE_PROCESS_BEGIN.
609 *
610 * @return @ref VST_STATUS_TRUE if supported and handled otherwise @ref VST_STATUS_FALSE.
611 */
613 /** @sa VST_HOST_OPCODE_0E */
615
617
619
621
623
625
627
629
631
633
635
637
639
641
643
645
647
649
651
652 /** Retrieve the vendor name into the ptr buffer.
653 *
654 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_VENDOR_NAME.
655 */
657 /** @sa VST_HOST_OPCODE_21 */
659
660 /** Retrieve the product name into the ptr buffer.
661 *
662 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_PRODUCT_NAME.
663 */
665 /** @sa VST_HOST_OPCODE_22 */
667
668 /** Retrieve the vendor version in return value.
669 *
670 * @return Version.
671 */
673 /** @sa VST_HOST_OPCODE_23 */
675
676 /** User defined OP Code, for custom interaction.
677 *
678 */
680 /** @sa VST_HOST_OPCODE_24 */
682
684
685 /** Check if the host supports a certain feature.
686 *
687 * @param p_ptr `char[...]` Zero terminated string for which feature we want to support.
688 * @return @ref VST_STATUS_TRUE if the feature is supported otherwise @ref VST_STATUS_FALSE.
689 */
691 /** @sa VST_HOST_OPCODE_26 */
693
695
697
699
700 /** Request an update of the editor window.
701 *
702 */
704 /** @sa VST_HOST_OPCODE_2A */
706
707 /** Notify host that a parameter is being edited.
708 *
709 * @param p_int1 Parameter index.
710 */
712 /** @sa VST_HOST_OPCODE_2B */
714
715 /** Notify host that parameter is no longer being edited.
716 *
717 * @param p_int1 Parameter index.
718 */
720 /** @sa VST_HOST_OPCODE_2C */
722
726
727 // Highest number of known OPCODE.
729
730 // Pad to force 32-bit number.
731 _VST_HOST_OPCODE_PAD = 0xFFFFFFFFul,
732};
733
734/** Plug-in to Host support checks
735 *
736 * Provided as `char* p_ptr` in the VST_EFFECT_OPCODE_SUPPORTS op code.
737 *
738 * Harvested via strings command and just checking what hosts actually responded to.
739 */
741 /** Does the host support modifying input/output/params/delay when programs, banks or parameters are changed?
742 * This only means that the host supports this inside of @ref VST_EFFECT_OPCODE_IDLE (VST 2.3 or earlier) or outside
743 * of a @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and @ref VST_EFFECT_OPCODE_PROCESS_END group.
744 *
745 * Signals that the host supports the following:
746 * - @ref VST_HOST_OPCODE_IO_MODIFIED
747 *
748 * @return @ref VST_STATUS_TRUE if it supports it.
749 */
750 const char* acceptIOChanges;
751
752 /** Is the host using process begin/end instead of idle?
753 * The host may opt to emit @ref VST_EFFECT_OPCODE_IDLE or @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and
754 * @ref VST_EFFECT_OPCODE_PROCESS_END when running in VST 2.3 compatibility mode.
755 *
756 * @sa VST_EFFECT_OPCODE_PROCESS_BEGIN
757 * @sa VST_EFFECT_OPCODE_PROCESS_END
758 * @sa VST_EFFECT_OPCODE_IDLE
759 * @deprecated (VST 2.4) This behavior is the default in VST 2.4 and later.
760 * @return @ref VST_STATUS_TRUE if it supports it.
761 */
762 const char* startStopProcess;
763
764 /** Does the host support container plug-ins?
765 *
766 * Signals that the host and plug-in support the following:
767 * - @ref VST_HOST_OPCODE_CURRENT_EFFECT_ID
768 * - @ref VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID
769 *
770 * @note Is shell a reference to Windows shell menus?
771 *
772 * @return @ref VST_STATUS_TRUE if the host supports it _and_ the current plug-in is a container plug-in.
773 */
774 const char* shellCategory;
775
776 const char* sendVstEvents;
777 const char* receiveVstEvents;
778
779 const char* sendVstMidiEvent;
782
783 const char* sendVstTimeInfo;
784 const char* reportConnectionChanges; // Seems related to speakers?
785 const char* sizeWindow;
786 const char* offline;
787
788 const char* openFileSelector;
789 const char* closeFileSelector;
790} /** @private */ vst_host_supports = {
791 .acceptIOChanges = "acceptIOChanges",
792 .startStopProcess = "startStopProcess",
793 .shellCategory = "shellCategory",
794 .sendVstEvents = "sendVstEvents",
795 .receiveVstEvents = "receiveVstEvents",
796 .sendVstMidiEvent = "sendVstMidiEvent",
797 .receiveVstMidiEvent = "receiveVstMidiEvent",
798 .sendVstMidiEventFlagIsRealtime = "sendVstMidiEventFlagIsRealtime",
799 .sendVstTimeInfo = "sendVstTimeInfo",
800 .reportConnectionChanges = "reportConnectionChanges",
801 .sizeWindow = "sizeWindow",
802 .offline = "offline",
803 .openFileSelector = "openFileSelector",
804 .closeFileSelector = "closeFileSelector",
805};
806
807/** Plug-in to Host callback
808 *
809 * 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.
810 *
811 * @param opcode See VST_HOST_OPCODE
812 * @param p_str Zero terminated string or null on call.
813 * @return ?
814 */
815typedef 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);
816
817//------------------------------------------------------------------------------------------------------------------------
818// VST Plug-in/Effect related Things
819//------------------------------------------------------------------------------------------------------------------------
820
821/** Magic Number identifying a VST 2.x plug-in structure
822 *
823 * @sa vst_effect_t.magic_numer
824 */
825#define VST_MAGICNUMBER VST_FOURCC('V', 's', 't', 'P')
826
827/** Default VST 2.x Sample Rate
828 * All VST 2.x hosts expect you to initialize your plug-in to these default values.
829 *
830 * @sa VST_EFFECT_OPCODE_SET_SAMPLE_RATE
831 */
832#define VST_DEFAULT_SAMPLE_RATE 44100.0f
833
834/** Default VST 2.x Block Size
835 * All VST 2.x hosts expect you to initialize your plug-in to these default values.
836 *
837 * @sa VST_EFFECT_OPCODE_SET_BLOCK_SIZE
838 */
839#define VST_DEFAULT_BLOCK_SIZE 1024
840
841/** Plug-in Categories
842 * Pre-defined category grouping that also affect host behavior when handling the plug-in. This is not just a UI/UX
843 * thing, it actually affects what plug-ins can do, so place your plug-in into the correct category.
844 *
845 */
848
849 /** Generic Effects
850 * Examples: Distortion, Pitch Shift, ...
851 *
852 * Supports: Delay (Optional), Tail Samples, MIDI
853 */
855 /** @sa VST_EFFECT_CATEGORY_01 */
857
858 /** Instruments
859 * Examples: Instruments, Synths, Samplers, ...
860 *
861 * Supports: Delay (Optional), Tail Samples, MIDI
862 */
864 /** @sa VST_EFFECT_CATEGORY_02 */
866
867 /** Metering
868 * Examples: Loudness Meters, Volume Analysis, ...
869 *
870 * Supports: Tail Samples, MIDI
871 * @note Delay causes crashes in some hosts. Fun.
872 */
874 /** @sa VST_EFFECT_CATEGORY_03 */
876
877 /** Mastering
878 * Examples: Compressors, Limiters, ...
879 *
880 * Supports: Delay, Tail Samples (optional), MIDI
881 */
883 /** @sa VST_EFFECT_CATEGORY_04 */
885
886 /** Spatializers
887 * Examples: Channel Panning, Expanders, ...
888 *
889 * Supports: Tail Samples (optional), MIDI
890 */
892 /** @sa VST_EFFECT_CATEGORY_05 */
894
895 /** Delay/Echo
896 * Examples: Echo, Reverb, Room Simulation, Delay, ...
897 *
898 * Supports: Delay, Tail Samples, MIDI
899 */
901 /** @sa VST_EFFECT_CATEGORY_06 */
903
905
906 /** Restoration
907 * Examples: Noise Filtering, Upsamplers, ...
908 *
909 * Supports: Delay, Tail Samples, MIDI
910 * @note Some DAWs allocate additional processing time to these.
911 */
913 /** @sa VST_EFFECT_CATEGORY_08 */
915
916 /** Offline Processing
917 * Examples: Nothing
918 * Supports: Nothing
919 */
921 /** @sa VST_EFFECT_CATEGORY_09 */
922 VST_EFFECT_CATEGORY_OFFLINE = 0x09, // Offline Processing VST? Seems to receive all audio data prior to playback.
923
924 /** Container Plug-in
925 * This plug-in contains multiple effects in one and requires special handling on both sides.
926 *
927 * Host handling:
928 * @code{.c}
929 * uint32_t current_select_id;
930 *
931 * // ... in intptr_t vst_host_callback(vst_effect_t* plugin, VST_HOST_OPCODE opcode, ...)
932 * case VST_HOST_OPCODE_SUPPORTS: {
933 * char* text = (char*)p_ptr;
934 * // The plug-in may ask the host if it even supports containers at all and changes behavior if we don't.
935 * if (text && strcmp(text, vst_host_supports.shellCategory) == 0) {
936 * return VST_STATUS_TRUE;
937 * }
938 * }
939 * case VST_HOST_OPCODE_CURRENT_EFFECT_ID:
940 * return current_selected_id;
941 * // ...
942 *
943 * // ... in whatever you use to load plug-ins ...
944 * current_select_id;
945 * vst_effect_t* plugin = plugin_main(&vst_host_callback);
946 * int32_t plugin_category = plugin->control(plugin, VST_EFFECT_OPCODE_CATEGORY, 0, 0, 0, 0)
947 * if (plugin_category == VST_EFFECT_CATEGORY_CONTAINER) {
948 * char effect_name[VST_BUFFER_SIZE_EFFECT_NAME] effect_name;
949 * int32_t effect_id;
950 * // Iterate over all contained effects.
951 * while ((effect_id = plugin->control(plugin, VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID, 0, 0, effect_name, 0)) != 0) {
952 * // Contained effects must be named as far as I can tell.
953 * if (effect_name[0] != 0) {
954 * // Do some logic that does the necessary things to list these in the host.
955 * }
956 * }
957 * } else {
958 * // Do things to list only this plugin in the host.
959 * }
960 * // ...
961 * @endcode
962 *
963 * Plug-in handling:
964 * @code{.c}
965 * // ... in vst_effect for the container
966 * size_t current_effect_idx;
967 * int32_t effect_list[] = {
968 * // ... list of effect ids.
969 * }
970 * // ... in control(...)
971 * case VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID:
972 * // Make sure current_effect_idx doesn't exceed the maximum.
973 * if (current_effect_idx > ARRAYSIZEOF(effect_list)) {
974 * current_effect_idx;
975 * return 0;
976 * }
977 * // Some code that turns effect indices into names to store into p_ptr.
978 * return effect_list[current_effect_idx++]; // Return the effect id.
979 * // ...
980 *
981 * VST_ENTRYPOINT {
982 * // Ensure the host VST 2.x compatible.
983 * int32_t vst_version = callback(nullptr, VST_HOST_OPCODE_VST_VERSION, 0, 0, 0, 0);
984 * if (vst_version == 0) {
985 * return 0; // It's not so we exit early.
986 * }
987 *
988 * // Check if the host wants
989 * int32_t effect_id = callback(nullptr, VST_HOST_OPCODE_CURRENT_EFFECT_ID, 0, 0, 0);
990 * if (effect_id == 0) {
991 * // ... logic specific to making the container.
992 * return new vst_container_effect();
993 * } else {
994 * // ... logic specific to make sub effects
995 * return new vst_sub_effect();
996 * }
997 * }
998 *
999 * // ...
1000 * @endcode
1001 */
1003 /** @sa VST_EFFECT_CATEGORY_0A */
1005
1006 /** Waveform Generators
1007 * Examples: Sine Wave Generator, ...
1008 * Supports: Delay, Tail Samples
1009 *
1010 * 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.
1011 *
1012 * @sa VST_EFFECT_CATEGORY_INSTRUMENT
1013 */
1015 /** @sa VST_EFFECT_CATEGORY_0B */
1017
1018 /** @private */
1019 VST_EFFECT_CATEGORY_MAX, // Not part of specification, marks maximum category.
1020
1021 /** @private */
1022 _VST_EFFECT_CATEGORY_PAD = 0xFFFFFFFFul,
1023};
1024
1025/** Effect Flags
1026 */
1028 /** Effect provides a custom editor.
1029 * The host will not provide a generic editor interface and expects @ref VST_EFFECT_OPCODE_EDITOR_OPEN and
1030 * @ref VST_EFFECT_OPCODE_EDITOR_CLOSE to work as expected. We are in charge of notifying the host about various
1031 * things like which parameter is in focus and stuff.
1032 *
1033 * @sa VST_EFFECT_OPCODE_EDITOR_GET_RECT
1034 * @sa VST_EFFECT_OPCODE_EDITOR_OPEN
1035 * @sa VST_EFFECT_OPCODE_EDITOR_CLOSE
1036 * @sa VST_EFFECT_OPCODE_EDITOR_DRAW
1037 * @sa VST_EFFECT_OPCODE_EDITOR_MOUSE
1038 * @sa VST_EFFECT_OPCODE_EDITOR_KEYBOARD
1039 * @sa VST_EFFECT_OPCODE_EDITOR_KEEP_ALIVE
1040 * @sa VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN
1041 * @sa VST_EFFECT_OPCODE_EDITOR_VKEY_UP
1042 * @sa VST_HOST_OPCODE_EDITOR_UPDATE
1043 * @sa VST_HOST_OPCODE_PARAM_START_EDIT
1044 * @sa VST_HOST_OPCODE_PARAM_STOP_EDIT
1045 * @sa VST_HOST_OPCODE_PARAM_UPDATE
1046 */
1048 /** @sa VST_EFFECT_FLAG_1ls0 */
1050
1051 //1 << 1,
1052 //1 << 2, // Only seen when the plug-in responds to VST_EFFECT_OPCODE_09. Seems to be ignored by hosts entirely.
1053 //1 << 3, // Only seen when the plug-in behaves differently in mono mode. Seems to be ignored by hosts entirely.
1054
1055 /** Effect uses process_float.
1056 *
1057 * @sa vst_effect_t.process_float
1058 * @sa vst_effect_process_float_t
1059 * @deprecated (VST 2.4) Must be set in VST 2.4 and later or the host should fail to load the plug-in.
1060 */
1062 /** @sa VST_EFFECT_FLAG_1ls4 */
1064
1065 /** Effect supports saving/loading programs/banks from unformatted chunk data.
1066 * When not set some sort of format is expected that I've yet to decipher.
1067 *
1068 * @sa VST_EFFECT_OPCODE_GET_CHUNK_DATA
1069 * @sa VST_EFFECT_OPCODE_SET_CHUNK_DATA
1070 */
1072 /** @sa VST_EFFECT_FLAG_1ls5 */
1074
1075 //1 << 6,
1076 //1 << 7,
1077
1078 /** Effect is an Instrument/Generator
1079 *
1080 * This must be set in addition to @ref VST_EFFECT_CATEGORY_INSTRUMENT otherwise instruments don't work right.
1081 * @note (VST 2.x) Flag is new to VST 2.x and later.
1082 */
1084 /** @sa VST_EFFECT_FLAG_1ls8 */
1086
1087 /** Effect does not produce tail samples when the input is silent.
1088 *
1089 * Not to be confused with choosing to tell the host there is no tail.
1090 * @sa VST_EFFECT_OPCODE_GET_TAIL_SAMPLES
1091 * @note (VST 2.x) Flag is new to VST 2.x and later.
1092 */
1094 /** @sa VST_EFFECT_FLAG_1ls9 */
1096
1097 //1 << 10,
1098 //1 << 11,
1099
1100 /** Effect supports process_double.
1101 * The host can freely choose between process_float and process_double as required.
1102 *
1103 * @note (VST 2.4) Available in VST 2.4 and later only.
1104 * @sa vst_effect_t.process_double
1105 * @sa vst_effect_process_double_t
1106 */
1108 /** @sa VST_EFFECT_FLAG_1ls12 */
1110};
1111
1112/** Host to Plug-in Op-Codes
1113 * These Op-Codes are emitted by the host and we must either handle them or return 0 (false).
1114 */
1116 /** Create/Initialize the effect (if it has not been created already).
1117 *
1118 * @return Always 0.
1119 */
1121 /** @sa VST_EFFECT_OPCODE_00 */
1123 /** @sa VST_EFFECT_OPCODE_00 */
1125
1126 /** Destroy the effect (if there is any) and free its memory.
1127 *
1128 * This should destroy the actual object created by VST_ENTRYPOINT.
1129 *
1130 * @return Always 0.
1131 */
1133 /** @sa VST_EFFECT_OPCODE_01 */
1135
1136 /** Set which program number is currently select.
1137 *
1138 * @param p_int2 The program number to set. Can be negative for some reason.
1139 */
1141 /** @sa VST_EFFECT_OPCODE_02 */
1143 /** @sa VST_EFFECT_OPCODE_02 */
1145
1146 /** Get currently selected program number.
1147 *
1148 * @return The currently set program number. Can be negative for some reason.
1149 */
1151 /** @sa VST_EFFECT_OPCODE_03 */
1153 /** @sa VST_EFFECT_OPCODE_03 */
1155
1156 /** Set the name of the currently selected program.
1157 *
1158 * @param p_ptr `const char[VST_BUFFER_SIZE_PROGRAM_NAME]` Zero terminated string.
1159 */
1161 /** @sa VST_EFFECT_OPCODE_04 */
1163 /** @sa VST_EFFECT_OPCODE_04 */
1165
1166 /** Get the name of the currently selected program.
1167 *
1168 * @param p_ptr `char[VST_BUFFER_SIZE_PROGRAM_NAME]` Zero terminated string.
1169 */
1171 /** @sa VST_EFFECT_OPCODE_05 */
1173 /** @sa VST_EFFECT_OPCODE_05 */
1175
1176 /** Get the value? label for the parameter.
1177 *
1178 * @param p_int1 Parameter index.
1179 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_LABEL]' Zero terminated string.
1180 * @return 0 on success, 1 on failure.
1181 */
1183 /** @sa VST_EFFECT_OPCODE_06 */
1185 /** @sa VST_EFFECT_OPCODE_06 */
1187 /** @sa VST_EFFECT_OPCODE_06 */
1189
1190 /** Get the string representing the value for the parameter.
1191 *
1192 * @param p_int1 Parameter index.
1193 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_VALUE]' Zero terminated string.
1194 * @return 0 on success, 1 on failure.
1195 */
1197 /** @sa VST_EFFECT_OPCODE_07 */
1199 /** @sa VST_EFFECT_OPCODE_07 */
1201 /** @sa VST_EFFECT_OPCODE_07 */
1203 /** @sa VST_EFFECT_OPCODE_07 */
1205
1206 /** Get the name for the parameter.
1207 *
1208 * @param p_int1 Parameter index.
1209 * @param p_ptr 'char[VST_BUFFER_SIZE_PARAM_NAME]' Zero terminated string.
1210 * @return 0 on success, 1 on failure.
1211 */
1213 /** @sa VST_EFFECT_OPCODE_08 */
1215 /** @sa VST_EFFECT_OPCODE_08 */
1217 /** @sa VST_EFFECT_OPCODE_08 */
1219
1220 /**
1221 *
1222 * @deprecated: (VST 2.3+) Not used in VST 2.3 or later.
1223 */
1225
1226 /** Set the new sample rate for the plugin to use.
1227 *
1228 * @param p_float New sample rate as a float (double on 64-bit because register upgrades).
1229 */
1231 /** @sa VST_EFFECT_OPCODE_0A */
1233 /** @sa VST_EFFECT_OPCODE_0A */
1235
1236 /** Sets the block size, which is the maximum number of samples passed into the effect via process calls.
1237 *
1238 * @param p_int2 The maximum number of samples to be passed in.
1239 */
1241 /** @sa VST_EFFECT_OPCODE_0B */
1243 /** @sa VST_EFFECT_OPCODE_0B */
1245
1246 /** Effect processing should be suspended/paused or resumed/unpaused.
1247 *
1248 * Unclear if this is should result in a flush of buffers. In VST 2.3+ this is quite clear as we get process
1249 * begin/end.
1250 *
1251 * @param p_int2 @ref VST_STATUS_FALSE if the effect should suspend processing, @ref VST_STATUS_TRUE if it should
1252 * resume.
1253 */
1255 /** @sa VST_EFFECT_OPCODE_0C */
1257 /** @sa VST_EFFECT_OPCODE_0C */
1259 /** @sa VST_EFFECT_OPCODE_0C */
1261
1262 /** Retrieve the client rect size of the plugins window.
1263 * If no window has been created, returns the default rect.
1264 *
1265 * @param p_ptr Pointer of type 'struct vst_rect_t*'.
1266 * @return On success, returns 1 and updates p_ptr to the rect. On failure, returns 0.
1267 */
1269 /** @sa VST_EFFECT_OPCODE_0D */
1271 /** @sa VST_EFFECT_OPCODE_0D */
1273 /** @sa VST_EFFECT_OPCODE_0D */
1275
1276 /** Create the window for the plugin.
1277 *
1278 * @param p_ptr HWND of the parent window.
1279 * @return 0 on failure, or HWND on success.
1280 */
1282 /** @sa VST_EFFECT_OPCODE_0E */
1284 /** @sa VST_EFFECT_OPCODE_0E */
1286
1287 /** Destroy the plugins window.
1288 *
1289 * @return Always 0.
1290 */
1292 /** @sa VST_EFFECT_OPCODE_0F */
1294 /** @sa VST_EFFECT_OPCODE_0F */
1296
1297 /** Window Draw Event?
1298 *
1299 * Ocasionally called simultaneously as WM_DRAW on windows.
1300 *
1301 * @note Present in some VST 2.1 or earlier plugins.
1302 *
1303 * @note Appears to be Mac OS exclusive.
1304 *
1305 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1306 */
1308 /** @sa VST_EFFECT_OPCODE_10 */
1310 /** @sa VST_EFFECT_OPCODE_10 */
1312
1313 /** Window Mouse Event?
1314 *
1315 * Called at the same time mouse events happen.
1316 *
1317 * @note Present in some VST 2.1 or earlier plugins.
1318 *
1319 * @note Appears to be Mac OS exclusive.
1320 *
1321 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1322 */
1324 /** @sa VST_EFFECT_OPCODE_11 */
1326 /** @sa VST_EFFECT_OPCODE_11 */
1328
1329 /** Window Keyboard Event?
1330 *
1331 * Called at the same time keyboard events happen.
1332 *
1333 * @note Present in some VST 2.1 or earlier plugins.
1334 *
1335 * @note Appears to be Mac OS exclusive.
1336 *
1337 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1338 */
1340 /** @sa VST_EFFECT_OPCODE_12 */
1342 /** @sa VST_EFFECT_OPCODE_12 */
1344
1345 /** Window/Editor Idle/Keep-Alive Callback?
1346 *
1347 * Does not receive any parameters. Randomly called when nothing happens? Idle/Keep-Alive callback?
1348 */
1350 /** @sa VST_EFFECT_OPCODE_13 */
1352
1353 /** Window Focus Event?
1354 *
1355 * Sometimes called when the editor window goes back into focus.
1356 *
1357 * @note Present in some VST 2.1 or earlier plugins.
1358 * @note Appears to be Mac OS exclusive.
1359 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1360 */
1362
1363 /** Window Unfocus Event?
1364 *
1365 * Sometimes called when the editor window goes out of focus.
1366 *
1367 * @note Present in some VST 2.1 or earlier plugins.
1368 * @note Appears to be Mac OS exclusive.
1369 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1370 */
1372
1373 /**
1374 *
1375 * @note Present in some VST 2.1 or earlier plugins.
1376 * @important Almost all plug-ins return the @ref VST_FOURCC 'NvEf' (0x4E764566) here.
1377 * @deprecated (VST 2.4+) Likely deprecated in VST 2.4 and later.
1378 */
1380 /** @sa VST_EFFECT_OPCODE_16 */
1382
1383 /** Get Chunk Data
1384 *
1385 * Save current program or bank state to a buffer.
1386 * Behavior is different based on the @ref VST_EFFECT_FLAG_CHUNKS flag.
1387 *
1388 * @sa VST_EFFECT_FLAG_CHUNKS
1389 * @param p_int1 0 means Bank, 1 means Program, nothing else used?
1390 * @param p_ptr `void**` Pointer to a potential pointer containing your own chunk data.
1391 * @return Size of the Chunk Data in bytes.
1392 */
1394 /** @sa VST_EFFECT_OPCODE_17 */
1396
1397 /** Set Chunk Data
1398 *
1399 * Restore current program or bank state from a buffer.
1400 * Behavior is different based on the @ref VST_EFFECT_FLAG_CHUNKS flag.
1401 *
1402 * @sa VST_EFFECT_FLAG_CHUNKS
1403 * @param p_int1 0 means Bank, 1 means Program, nothing else used?
1404 * @param p_int2 Size of the Chunk Data in bytes.
1405 * @param p_ptr `void*` Pointer to a buffer containing chunk data.
1406 */
1408 /** @sa VST_EFFECT_OPCODE_18 */
1410
1411 //--------------------------------------------------------------------------------
1412 // VST 2.x starts here.
1413 //--------------------------------------------------------------------------------
1414
1415 /**
1416 *
1417 * Appears to be related to midi and audio events.
1418 * @note (VST 2.0+) Available from VST 2.0 onwards.
1419 */
1421
1422 /** Can the parameter be automated?
1423 *
1424 * @note (VST 2.0+) Available from VST 2.0 onwards.
1425 * @param p_int1 Index of the parameter.
1426 * @return 1 if the parameter can be automated, otherwise 0.
1427 */
1429 /** @sa VST_EFFECT_OPCODE_1A */
1431 /** @sa VST_EFFECT_OPCODE_1A */
1433 /** @sa VST_EFFECT_OPCODE_1A */
1435
1436 /** Set Parameter value from string representation.
1437 *
1438 * @note (VST 2.0+) Available from VST 2.0 onwards.
1439 * @param p_int1 Index of the parameter.
1440 * @param p_ptr `const char*` Zero terminated string representation of the value to set.
1441 * @return 1 if it worked, otherwise 0.
1442 */
1444 /** @sa VST_EFFECT_OPCODE_1B */
1446 /** @sa VST_EFFECT_OPCODE_1B */
1448
1449 /**
1450 *
1451 *
1452 * @note (VST 2.0+) Available from VST 2.0 onwards.
1453 */
1455
1456 /**
1457 *
1458 * @note (VST 2.0+) Available from VST 2.0 onwards.
1459 * @sa VST_EFFECT_OPCODE_05
1460 */
1462
1463 /**
1464 *
1465 *
1466 * @note (VST 2.0+) Available from VST 2.0 onwards.
1467 */
1469
1470 /** Input connected.
1471 *
1472 *
1473 * @note (VST 2.0+) Available from VST 2.0 onwards.
1474 */
1476
1477 /** Input disconnected.
1478 *
1479 *
1480 * @note (VST 2.0+) Available from VST 2.0 onwards.
1481 */
1483
1484 /** Retrieve properties for the given input index.
1485 *
1486 * @note (VST 2.0+) Available from VST 2.0 onwards.
1487 * @param p_int1 Index of the input to get the properties for.
1488 * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected input provided by the host.
1489 * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
1490 */
1492 /** @sa VST_EFFECT_OPCODE_21 */
1494
1495 /** Retrieve properties for the given output index.
1496 *
1497 * @note (VST 2.0+) Available from VST 2.0 onwards.
1498 * @param p_int1 Index of the output to get the properties for.
1499 * @param p_ptr Pointer to @ref vst_stream_properties_t for the selected output provided by the host.
1500 * @return @ref VST_STATUS_TRUE if p_ptr is updated, @ref VST_STATUS_FALSE otherwise.
1501 */
1503 /** @sa VST_EFFECT_OPCODE_22 */
1505
1506 /** Retrieve category of this effect.
1507 *
1508 * @note (VST 2.0+) Available from VST 2.0 onwards.
1509 * @return The category that this effect is in, see @ref VST_EFFECT_CATEGORY.
1510 */
1512 /** @sa VST_EFFECT_OPCODE_23 */
1514 /** @sa VST_EFFECT_OPCODE_23 */
1516
1517 /**
1518 *
1519 *
1520 * @note (VST 2.0+) Available from VST 2.0 onwards.
1521 */
1523
1524 /**
1525 *
1526 *
1527 * @note (VST 2.0+) Available from VST 2.0 onwards.
1528 */
1530
1531 /**
1532 *
1533 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1534 * @note (VST 2.0+) Available from VST 2.0 onwards.
1535 */
1537
1538 /**
1539 *
1540 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1541 * @note (VST 2.0+) Available from VST 2.0 onwards.
1542 */
1544
1545 /**
1546 *
1547 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1548 * @note (VST 2.0+) Available from VST 2.0 onwards.
1549 */
1551
1552 /**
1553 *
1554 * Seen in plug-ins with @ref VST_EFFECT_CATEGORY_OFFLINE.
1555 * @note (VST 2.0+) Available from VST 2.0 onwards.
1556 */
1558
1559 /** Host wants to change the speaker arrangement.
1560 *
1561 * @note (VST 2.0+) Available from VST 2.0 onwards.
1562 * @param p_int2 Pointer to a @ref vst_speaker_arrangement_t for the input.
1563 * @param p_ptr Pointer to a @ref vst_speaker_arrangement_t for the output.
1564 * @return @ref VST_STATUS_TRUE if we accept the new arrangement, @ref VST_STATUS_FALSE if we don't in which case
1565 * the host is required to ask for the speaker arrangement via @ref VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
1566 * and may retry this op-code with different values.
1567 * @sa vst_effect_t.num_inputs
1568 * @sa vst_effect_t.num_outputs
1569 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
1570 */
1572 /** @sa VST_EFFECT_OPCODE_2A */
1574
1575 /**
1576 *
1577 *
1578 */
1580
1581 /** Enable/Disable bypassing the effect.
1582 *
1583 * See @ref VST_EFFECT_OPCODE_SUPPORTS with @ref vst_effect_supports_t.bypass for more information.
1584 *
1585 * @note (VST 2.0+) Available from VST 2.0 onwards.
1586 * @param p_int2 Zero if bypassing the effect is disabled, otherwise 1.
1587 */
1589 /** @sa VST_EFFECT_OPCODE_2C */
1591
1592 /** Retrieve the effect name into the ptr buffer.
1593 *
1594 * @note (VST 2.0+) Available from VST 2.0 onwards.
1595 * @bug Various hosts only provide a buffer that is 32 bytes long.
1596 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME.
1597 * @return Always 0, even on failure.
1598 */
1600 /** @sa VST_EFFECT_OPCODE_2D */
1602 /** @sa VST_EFFECT_OPCODE_2D */
1604 /** @sa VST_EFFECT_OPCODE_2D */
1606
1607 /** Translate an error code to a string.
1608 *
1609 * @bug Some hosts provide unexpected data in p_ptr.
1610 * @note (VST 2.0+) Available from VST 2.0 onwards.
1611 * @deprecated (VST 2.4+) Fairly sure this is deprecated in VST 2.4 and later.
1612 * @param p_ptr A zero terminated char buffer with undefined size.
1613 * @return @ref VST_STATUS_TRUE if we could translate the error, @ref VST_STATUS_FALSE if not.
1614 */
1616 /** @sa VST_EFFECT_OPCODE_2E */
1618
1619 /** Retrieve the vendor name into the ptr buffer.
1620 *
1621 * @note (VST 2.0+) Available from VST 2.0 onwards.
1622 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_VENDOR_NAME.
1623 */
1625 /** @sa VST_EFFECT_OPCODE_2F */
1627 /** @sa VST_EFFECT_OPCODE_2F */
1629
1630 /** Retrieve the product name into the ptr buffer.
1631 *
1632 * @note (VST 2.0+) Available from VST 2.0 onwards.
1633 * @param p_ptr A zero terminated char buffer of size @ref VST_BUFFER_SIZE_PRODUCT_NAME.
1634 */
1636 /** @sa VST_EFFECT_OPCODE_30 */
1638 /** @sa VST_EFFECT_OPCODE_30 */
1640
1641 /** Retrieve the vendor version in return value.
1642 *
1643 * @note (VST 2.0+) Available from VST 2.0 onwards.
1644 * @return Version.
1645 */
1647 /** @sa VST_EFFECT_OPCODE_31 */
1649 /** @sa VST_EFFECT_OPCODE_31 */
1651
1652 /** User-defined Op-Code for VST extensions.
1653 *
1654 * @note (VST 2.0+) Available from VST 2.0 onwards.
1655 * All parameters are undefined by the standard and left up to the host/plug-in. Use @ref VST_EFFECT_OPCODE_SUPPORTS
1656 * and @ref VST_EFFECT_OPCODE_VENDOR_NAME + @ref VST_EFFECT_OPCODE_VENDOR_VERSION to check if the plug-in is
1657 * compatible with your expected format.
1658 */
1660 /** @sa VST_EFFECT_OPCODE_32 */
1662
1663 /** Test for support of a specific named feature.
1664 *
1665 * @note (VST 2.0+) Available from VST 2.0 onwards.
1666 * @param p_ptr A zero terminated char buffer of undefined size containing the feature name.
1667 * @return @ref VST_STATUS_YES if the feature is supported, @ref VST_STATUS_NO if the feature is not supported,
1668 * @ref VST_STATUS_UNKNOWN in all other cases.
1669 */
1671 /** @sa VST_EFFECT_OPCODE_33 */
1673
1674 /** Number of samples that are at the tail at the end of playback.
1675 *
1676 * @note (VST 2.0+) Available from VST 2.0 onwards.
1677 * @return @ref VST_STATUS_UNKNOWN for automatic tail size, @ref VST_STATUS_TRUE for no tail, any other number above
1678 * 1 for the number of samples the tail has.
1679 */
1681 /** @sa VST_EFFECT_OPCODE_34 */
1683 /** @sa VST_EFFECT_OPCODE_34 */
1685
1686 /** Notify effect that it is idle?
1687 *
1688 * @note (VST 2.0+) Available from VST 2.0 onwards.
1689 * @deprecated (VST 2.4+) As of VST 2.4 the default behavior is @ref VST_EFFECT_OPCODE_PROCESS_BEGIN and
1690 * @ref VST_EFFECT_OPCODE_PROCESS_END which allows cleaner control flows.
1691 * @sa vst_host_supports.startStopProcess
1692 */
1694 /** @sa VST_EFFECT_OPCODE_35 */
1696
1697 /**
1698 *
1699 *
1700 * @note (VST 2.0+) Available from VST 2.0 onwards.
1701 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1702 */
1704
1705 /**
1706 *
1707 *
1708 * @note (VST 2.0+) Available from VST 2.0 onwards.
1709 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1710 */
1712
1713 /** Parameter Properties
1714 *
1715 * @note (VST 2.0+) Available from VST 2.0 onwards.
1716 * @param p_int1 Parameter index to get properties for.
1717 * @param p_ptr Pointer to @ref vst_parameter_properties_t for the given parameter.
1718 * @return @ref VST_STATUS_YES if supported, otherwise @ref VST_STATUS_NO.
1719 */
1721 /** @sa VST_EFFECT_OPCODE_38 */
1723 /** @sa VST_EFFECT_OPCODE_38 */
1725
1726 /**
1727 *
1728 * @note (VST 2.0+) Available from VST 2.0 onwards.
1729 * @deprecated (VST 2.4) Invalid in all VST 2.4 and later hosts.
1730 */
1732
1733 /** Retrieve the VST Version supported.
1734 *
1735 * @note (VST 2.0+) Available from VST 2.0 onwards.
1736 * @sa VST_VERSION
1737 * @return One of the valid enums in @ref VST_VERSION
1738 */
1740 /** @sa VST_EFFECT_OPCODE_3A */
1742
1743 //--------------------------------------------------------------------------------
1744 // VST 2.1
1745 //--------------------------------------------------------------------------------
1746
1747 /** Editor Virtual Key Down Input
1748 *
1749 * @note (VST 2.1+) Available from VST 2.1 onwards.
1750 * @param p_int1 ASCII character that represents the virtual key code.
1751 * @param p_int2 Virtual Key Code
1752 * @param p_float Modifiers being held down (bitfield)
1753 * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE
1754 */
1756 /** @sa VST_EFFECT_OPCODE_3B */
1758
1759 /** Editor Virtual Key Up Event
1760 *
1761 * @note (VST 2.1+) Available from VST 2.1 onwards.
1762 * @param p_int1 ASCII character that represents the virtual key code.
1763 * @param p_int2 Virtual Key Code
1764 * @param p_float Modifiers being held down (bitfield)
1765 * @return @ref VST_STATUS_TRUE if we used the input, otherwise @ref VST_STATUS_FALSE
1766 */
1768 /** @sa VST_EFFECT_OPCODE_3C */
1770
1771 /**
1772 *
1773 * @note (VST 2.1+) Available from VST 2.1 onwards.
1774 * @param p_int2 A value between 0 and 2.
1775 */
1777
1778 /**
1779 *
1780 * Midi related
1781 * @note (VST 2.1+) Available from VST 2.1 onwards.
1782 */
1784
1785 /**
1786 *
1787 * Midi related
1788 * @note (VST 2.1+) Available from VST 2.1 onwards.
1789 */
1791
1792 /**
1793 *
1794 * Midi related
1795 * @note (VST 2.1+) Available from VST 2.1 onwards.
1796 */
1798
1799 /**
1800 *
1801 * Midi related
1802 * @note (VST 2.1+) Available from VST 2.1 onwards.
1803 */
1805
1806 /**
1807 *
1808 * Midi related
1809 * @note (VST 2.1+) Available from VST 2.1 onwards.
1810 */
1812
1813 /** Host is starting to set up a program.
1814 * Emitted prior to the host loading a program.
1815 *
1816 * @note (VST 2.1+) Available from VST 2.1 onwards.
1817 * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
1818 */
1820 /** @sa VST_EFFECT_OPCODE_43 */
1822
1823 /** Host is done setting up a program.
1824 * Emitted after the host finished loading a program.
1825 *
1826 * @note (VST 2.1+) Available from VST 2.1 onwards.
1827 * @return @ref VST_STATUS_TRUE if we understood the notification, or @ref VST_STATUS_FALSE if not.
1828 */
1830 /** @sa VST_EFFECT_OPCODE_44 */
1832
1833 //--------------------------------------------------------------------------------
1834 // VST 2.3
1835 //--------------------------------------------------------------------------------
1836
1837 /** Host wants to know the current speaker arrangement.
1838 *
1839 * @note (VST 2.3+) Available from VST 2.3 onwards.
1840 * @param p_int2 Pointer to @ref vst_speaker_arrangement_t for the input.
1841 * @param p_ptr Pointer to @ref vst_speaker_arrangement_t for the output.
1842 * @return @ref VST_STATUS_TRUE if we were successful, otherwise @ref VST_STATUS_FALSE.
1843 */
1845 /** @sa VST_EFFECT_OPCODE_45 */
1847
1848 /** Get the next effect contained in this effect.
1849 * This returns the next effect based on an effect internal counter, the host does not provide any index.
1850 *
1851 * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
1852 *
1853 * @note (VST 2.3+) Available from VST 2.3 onwards.
1854 * @param p_ptr Pointer to a char buffer of size @ref VST_BUFFER_SIZE_EFFECT_NAME to store the name of the next effect.
1855 * @return Next effects unique_id
1856 */
1858 /** @sa VST_EFFECT_OPCODE_46 */
1860
1861 /** Begin processing of audio.
1862 *
1863 * Host is requesting that we prepare for a new section of audio separate from the previous section.
1864 * @note (VST 2.3+) Available from VST 2.3 onwards.
1865 */
1867 /** @sa VST_EFFECT_OPCODE_47 */
1869
1870 /** End processing of audio.
1871 *
1872 * Host is requesting that we stop processing audio and go into idle instead.
1873 * @note (VST 2.3+) Available from VST 2.3 onwards.
1874 */
1876 /** @sa VST_EFFECT_OPCODE_48 */
1878
1879 /**
1880 *
1881 *
1882 * @note (VST 2.3+) Available from VST 2.3 onwards.
1883 */
1885
1886 /**
1887 *
1888 * @note (VST 2.3+) Available from VST 2.3 onwards.
1889 * @sa VST_EFFECT_CATEGORY_SPATIAL
1890 * @param p_int2 Unknown meaning.
1891 * @param p_float Unknown meaning, usually 1.0
1892 */
1894
1895 /** Host wants to know if we can load the provided bank data.
1896 * Should be emitted prior to @ref VST_EFFECT_OPCODE_SET_CHUNK_DATA by the host.
1897 *
1898 * @note (VST 2.3+) Available from VST 2.3 onwards.
1899 * @param p_ptr Unknown structured data.
1900 * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
1901 * @ref VST_STATUS_UNKNOWN if this isn't supported.
1902 */
1904 /** @sa VST_EFFECT_OPCODE_4B */
1906
1907 /** Host wants to know if we can load the provided program data.
1908 * Should be emitted prior to @ref VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN by the host.
1909 *
1910 * @note (VST 2.3+) Available from VST 2.3 onwards.
1911 * @param p_ptr Unknown structured data.
1912 * @return @ref VST_STATUS_NO if we can't load the data, @ref VST_STATUS_YES if we can load the data,
1913 * @ref VST_STATUS_UNKNOWN if this isn't supported.
1914 */
1916 /** @sa VST_EFFECT_OPCODE_4C */
1918
1919 //--------------------------------------------------------------------------------
1920 // VST 2.4
1921 //--------------------------------------------------------------------------------
1922
1923 /**
1924 *
1925 *
1926 * @note (VST 2.4+) Available from VST 2.4 onwards.
1927 */
1929
1930 /**
1931 *
1932 *
1933 * @note (VST 2.4+) Available from VST 2.4 onwards.
1934 */
1936
1937 /**
1938 *
1939 *
1940 * @note (VST 2.4+) Available from VST 2.4 onwards.
1941 */
1943
1944 /** @private */
1945 VST_EFFECT_OPCODE_MAX,
1946
1947 /** @private */
1948 _VST_EFFECT_OPCODE_PAD = 0xFFFFFFFFul,
1949};
1950
1951/** Host to Plug-in support checks
1952 *
1953 * Provided as `char* p_ptr` in the VST_EFFECT_OPCODE_SUPPORTS op code.
1954 *
1955 * Harvested via strings command and just checking what plug-ins actually responded to.
1956 */
1958 /** Effect supports alternative bypass.
1959 * The alternative bypass still has the host call process/process_float/process_double and expects us to compensate
1960 * for our delay/latency, copy inputs to outputs, and do minimal work. If we don't support it the host will not call
1961 * process/process_float/process_double at all while bypass is enabled.
1962 *
1963 * @note VST 2.3 or later only.
1964 * @return VST_STATUS_TRUE if we support this, otherwise VST_STATUS_FALSE.
1965 */
1966 const char* bypass;
1967
1968 const char* sendVstEvents;
1969 const char* receiveVstEvents;
1970 const char* sendVstMidiEvent;
1972 const char* midiProgramNames; // VST 2.1 or later.
1974 const char* offline;
1975 // The following were only found in VST 2.3 plug-ins
1977 const char* conformsToWindowRules; // Mac OS only, invalid in VST 2.4. Seems related to vst_host_supports.sizeWindow
1978 const char* plugAsSend;
1979 const char* mixDryWet;
1980 const char* noRealTime;
1981 const char* multipass;
1982 const char* metapass;
1983 const char* _1in1out;
1984 const char* _1in2out;
1985 const char* _2in1out;
1986 const char* _2in2out;
1987 const char* _2in4out;
1988 const char* _4in2out;
1989 const char* _4in4out;
1990 const char* _4in8out;
1991 const char* _8in4out;
1992 const char* _8in8out;
1993} /** @private */ vst_effect_supports = {
1994 .bypass = "bypass",
1995 .sendVstEvents = "sendVstEvents",
1996 .receiveVstEvents = "receiveVstEvents",
1997 .sendVstMidiEvent = "sendVstMidiEvent",
1998 .receiveVstMidiEvent = "receiveVstMidiEvent",
1999 .midiProgramNames = "midiProgramNames",
2000 .receiveVstTimeInfo = "receiveVstTimeInfo",
2001 .offline = "offline",
2002 .plugAsChannelInsert = "plugAsChannelInsert",
2003 .conformsToWindowRules = "conformsToWindowRules",
2004 .plugAsSend = "plugAsSend",
2005 .mixDryWet = "mixDryWet",
2006 .noRealTime = "noRealTime",
2007 .multipass = "multipass",
2008 .metapass = "metapass",
2009 ._1in1out = "1in1out",
2010 ._1in2out = "1in2out",
2011 ._2in1out = "2in1out",
2012 ._2in2out = "2in2out",
2013 ._2in4out = "2in4out",
2014 ._4in2out = "4in2out",
2015 ._4in4out = "4in4out",
2016 ._4in8out = "4in8out",
2017 ._8in4out = "8in4out",
2018 ._8in8out = "8in8out",
2019};
2020
2021/** Control the VST through an opcode and up to four parameters.
2022 *
2023 * @sa VST_EFFECT_OPCODE
2024 *
2025 * @param self Pointer to the effect itself.
2026 * @param opcode The opcode to run, see @ref VST_EFFECT_OPCODE.
2027 * @param p_int1 Parameter, see @ref VST_EFFECT_OPCODE.
2028 * @param p_int2 Parameter, see @ref VST_EFFECT_OPCODE.
2029 * @param p_ptr Parameter, see @ref VST_EFFECT_OPCODE.
2030 * @param p_float Parameter, see @ref VST_EFFECT_OPCODE.
2031 */
2032typedef 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);
2033
2034/** Process the given number of samples in inputs and outputs.
2035 *
2036 * Used to handle input data and provides output data. We seem to be the ones that provide the output buffer?
2037 *
2038 * @param self Pointer to the effect itself.
2039 * @param inputs Pointer to an array of 'const float[samples]' with size @ref vst_effect_t.num_inputs.
2040 * @param outputs Pointer to an array of 'float[samples]' with size @ref vst_effect_t.num_outputs.
2041 * @param samples Number of samples per channel in inputs and outputs.
2042 */
2043typedef void (VST_FUNCTION_INTERFACE* vst_effect_process_t) (struct vst_effect_t* self, const float* const* inputs, float** outputs, int32_t samples);
2044
2045/** Updates the value for the parameter at the given index, or does nothing if out of bounds.
2046 *
2047 * @param self Pointer to the effect itself.
2048 * @param index Parameter index.
2049 * @param value New value for the parameter.
2050 */
2051typedef void(VST_FUNCTION_INTERFACE* vst_effect_set_parameter_t)(struct vst_effect_t* self, uint32_t index, float value);
2052
2053/** Retrieve the current value of the parameter at the given index, or do nothing if out of bounds.
2054 *
2055 * @param self Pointer to the effect itself.
2056 * @param index Parameter index.
2057 * @return Current value of the parameter.
2058 */
2059typedef float(VST_FUNCTION_INTERFACE* vst_effect_get_parameter_t)(struct vst_effect_t* self, uint32_t index);
2060
2061/** Process the given number of single samples in inputs and outputs.
2062 *
2063 * Process input and overwrite the output in place. Host provides output buffers.
2064 *
2065 * @important Not thread-safe on MacOS for some reason or another.
2066 *
2067 * @param self Pointer to the effect itself.
2068 * @param inputs Pointer to an array of 'const float[samples]' with size numInputs.
2069 * @param outputs Pointer to an array of 'float[samples]' with size numOutputs.
2070 * @param samples Number of samples per channel in inputs.
2071 */
2072typedef void(VST_FUNCTION_INTERFACE* vst_effect_process_float_t)(struct vst_effect_t* self, const float* const* inputs, float** outputs, int32_t samples);
2073
2074/** Process the given number of double samples in inputs and outputs.
2075 *
2076 * Process input and overwrite the output in place. Host provides output buffers.
2077 *
2078 * @note (VST 2.4+) Available from VST 2.4 and later.
2079 *
2080 * @param self Pointer to the effect itself.
2081 * @param inputs Pointer to an array of 'const double[samples]' with size numInputs.
2082 * @param outputs Pointer to an array of 'double[samples]' with size numOutputs.
2083 * @param samples Number of samples per channel in inputs.
2084 */
2085typedef void (VST_FUNCTION_INTERFACE* vst_effect_process_double_t)(struct vst_effect_t* self, const double* const* inputs, double** outputs, int32_t samples);
2086
2087/** Plug-in Effect definition
2088 */
2090 /** VST Magic Number
2091 *
2092 * Should always be VST_FOURCC('VstP')
2093 *
2094 * @sa VST_MAGICNUMBER
2095 */
2097
2098 /** Control Function
2099 * @sa vst_effect_control_t
2100 * @sa VST_EFFECT_OPCODE
2101 */
2102 vst_effect_control_t control;
2103
2104 /** Process Function
2105 * @sa vst_effect_process_t
2106 * @deprecated (VST 2.4+) Deprecated and practically unsupported in all VST 2.4 compatible hosts and may treat it
2107 * as just another @ref vst_effect_t.process_float.
2108 */
2110
2111 /** Set Parameter Function
2112 * @sa vst_effect_set_parameter_t
2113 */
2115
2116 /** Get Parameter Function
2117 * @sa vst_effect_get_parameter_t
2118 */
2120
2121 /** Number of available pre-defined programs.
2122 *
2123 * @sa VST_EFFECT_OPCODE_PROGRAM_LOAD
2124 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN
2125 * @sa VST_EFFECT_OPCODE_PROGRAM_SET
2126 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_NAME
2127 * @sa VST_EFFECT_OPCODE_PROGRAM_SET_END
2128 * @sa VST_EFFECT_OPCODE_PROGRAM_GET
2129 * @sa VST_EFFECT_OPCODE_PROGRAM_GET_NAME
2130 * @sa VST_EFFECT_FLAG_CHUNKS
2131 * @sa VST_EFFECT_OPCODE_SET_CHUNK_DATA
2132 * @sa VST_EFFECT_OPCODE_GET_CHUNK_DATA
2133 */
2135
2136 /** Number of available parameters.
2137 * All programs must have at least this many parameters.
2138 *
2139 * @sa VST_HOST_OPCODE_IO_MODIFIED
2140 */
2141 int32_t num_params;
2142
2143 /** Number of available input streams.
2144 *
2145 *
2146 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
2147 * @sa VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES
2148 * @sa VST_HOST_OPCODE_IO_MODIFIED
2149 */
2150 int32_t num_inputs;
2151
2152 /** Number of available output streams.
2153 *
2154 * @sa VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
2155 * @sa VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES
2156 * @sa VST_HOST_OPCODE_IO_MODIFIED
2157 */
2159
2160 /** Effect Flags
2161 *
2162 * @sa VST_EFFECT_FLAGS
2163 */
2164 int32_t flags;
2165
2166 void* _unknown_00; // Must be zero when created. Reserved for host?
2167 void* _unknown_01; // Must be zero when created. Reserved for host?
2168
2169 /** Initial delay before processing of samples can actually begin in Samples.
2170 *
2171 * @note The host can modify this at runtime so it is not safe.
2172 * @note Should be reinitialized when the effect is resumed.
2173 *
2174 * @sa VST_HOST_OPCODE_IO_MODIFIED
2175 */
2176 int32_t delay;
2177
2178 int32_t _unknown_02; // Unknown int32_t values.
2180
2181 /** Ratio of Input to Output production
2182 * Defines how much output data is produced relative to input data when using 'process' instead of 'processFloat'.
2183 * Example: A ratio of 2.0 means we produce twice as much output as we receive input.
2184 *
2185 * Range: >0.0 to Infinity
2186 * Default: 1.0
2187 * @note Ignored in VST 2.4 or with VST_EFFECT_FLAG_SUPPORTS_FLOAT.
2188 */
2190
2191 /** Effect Internal Pointer
2192 *
2193 * You can freely set this to point at some sort of class or similar for use in your own effect. The host must
2194 * never modify this or the data available through this.
2195 */
2197
2198 /** Host Internal Pointer
2199 *
2200 * The host may set this to point at data related to your effect instance that the host needs. The effect must
2201 * never modify this or the data available through this.
2202 */
2203 void* host_internal; // Pointer to Host internal data.
2204
2205 /** Id of the plugin.
2206 *
2207 * Due to this not being enough for uniqueness, it should not be used alone for indexing.
2208 * Ideally you want to index like this:
2209 * [unique_id][module_name][version][flags]
2210 * If any of the checks after unique_id fail, you default to the first possible choice.
2211 *
2212 * Used in combination with @ref VST_EFFECT_CATEGORY_CONTAINER.
2213 *
2214 * BUG: Some broken hosts rely on this alone to save information about VST plug-ins.
2215 */
2216 int32_t unique_id;
2217
2218 /** Plugin version
2219 *
2220 * Unrelated to the minimum VST Version, but often the same.
2221 */
2222 int32_t version;
2223
2224 //--------------------------------------------------------------------------------
2225 // VST 2.x starts here.
2226 //--------------------------------------------------------------------------------
2227
2228 /** Process function for in-place single (32-bit float) processiong.
2229 * @sa vst_effect_process_single_t
2230 * @note (VST 2.0+) Available from VST 2.0 and later.
2231 */
2233
2234 //--------------------------------------------------------------------------------
2235 // VST 2.4 starts here.
2236 //--------------------------------------------------------------------------------
2237
2238 /** Process function for in-place double (64-bit float) processiong.
2239 * @sa vst_effect_process_double_t
2240 * @note (VST 2.4+) Available from VST 2.4 and later.
2241 */
2243
2244 // Everything after this is unknown and was present in reacomp-standalone.dll.
2245 uint8_t _unknown[56]; // 56-bytes of something. Could also just be 52-bytes.
2246};
2247
2248/** VST 2.x Entry Point for all platforms
2249 *
2250 * Must be present in VST 2.x plug-ins but must not be present in VST 1.x plug-ins.
2251 *
2252 * @return A new instance of the VST 2.x effect.
2253 */
2254#define VST_ENTRYPOINT
2255 vst_effect_t* VSTPluginMain(vst_host_callback_t callback)
2256
2257/** [DEPRECATED] VST 1.x Entry Point for Windows
2258 *
2259 * Do not implement in VST 2.1 or later plug-ins!
2260 *
2261 * @return A new instance of the VST 1.x effect.
2262 */
2263#define VST_ENTRYPOINT_WINDOWS
2264 vst_effect_t* MAIN(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2265
2266/** [DEPRECATED] VST 1.x Entry Point for MacOS
2267 *
2268 * Do not implement in VST 2.1 or later plug-ins!
2269 *
2270 * @return A new instance of the VST 1.x effect.
2271 */
2272#define VST_ENTRYPOINT_MACOS
2273 vst_effect_t* main_macho(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2274
2275/** [DEPRECATED] VST 2.3 Entry Point for PowerPC
2276 *
2277 * Present in some VST 2.3 and earlier compatible plug-ins that support MacOS.
2278 *
2279 * @return A new instance of the VST 2.x effect.
2280 */
2281#define VST_ENTRYPOINT_MACOS_POWERPC
2282 vst_effect_t* main(vst_host_callback_t callback) { return VSTPluginMain(callback); }
2283
2284#ifdef __cplusplus
2285}
2286#endif
2287#pragma pack(pop)
2288#endif
Host to Plug-in support checks.
Definition vst.h:1957
const char * _2in1out
Definition vst.h:1985
const char * _4in4out
Definition vst.h:1989
const char * plugAsChannelInsert
Definition vst.h:1976
const char * _1in1out
Definition vst.h:1983
const char * _4in8out
Definition vst.h:1990
const char * _2in2out
Definition vst.h:1986
const char * _8in4out
Definition vst.h:1991
const char * _1in2out
Definition vst.h:1984
const char * _2in4out
Definition vst.h:1987
const char * sendVstEvents
Definition vst.h:1968
const char * _4in2out
Definition vst.h:1988
const char * conformsToWindowRules
Definition vst.h:1977
const char * mixDryWet
Definition vst.h:1979
const char * receiveVstEvents
Definition vst.h:1969
const char * receiveVstTimeInfo
Definition vst.h:1973
const char * noRealTime
Definition vst.h:1980
const char * bypass
Effect supports alternative bypass.
Definition vst.h:1966
const char * _8in8out
Definition vst.h:1992
const char * plugAsSend
Definition vst.h:1978
const char * multipass
Definition vst.h:1981
const char * midiProgramNames
Definition vst.h:1972
const char * receiveVstMidiEvent
Definition vst.h:1971
const char * offline
Definition vst.h:1974
const char * metapass
Definition vst.h:1982
const char * sendVstMidiEvent
Definition vst.h:1970
Plug-in Effect definition.
Definition vst.h:2089
int32_t num_outputs
Number of available output streams.
Definition vst.h:2158
int32_t magic_number
VST Magic Number.
Definition vst.h:2096
vst_effect_process_double_t process_double
Process function for in-place double (64-bit float) processiong.
Definition vst.h:2242
int32_t _unknown_02
Definition vst.h:2178
int32_t unique_id
Id of the plugin.
Definition vst.h:2216
vst_effect_process_t process
Process Function.
Definition vst.h:2109
int32_t flags
Effect Flags.
Definition vst.h:2164
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:2189
int32_t num_programs
Number of available pre-defined programs.
Definition vst.h:2134
vst_effect_process_float_t process_float
Process function for in-place single (32-bit float) processiong.
Definition vst.h:2232
int32_t version
Plugin version.
Definition vst.h:2222
void * host_internal
Host Internal Pointer.
Definition vst.h:2203
vst_effect_set_parameter_t set_parameter
Set Parameter Function.
Definition vst.h:2114
uint8_t _unknown[56]
Definition vst.h:2245
void * _unknown_01
Definition vst.h:2167
int32_t _unknown_03
Definition vst.h:2179
int32_t num_params
Number of available parameters.
Definition vst.h:2141
void * effect_internal
Effect Internal Pointer.
Definition vst.h:2196
vst_effect_get_parameter_t get_parameter
Get Parameter Function.
Definition vst.h:2119
int32_t delay
Initial delay before processing of samples can actually begin in Samples.
Definition vst.h:2176
int32_t num_inputs
Number of available input streams.
Definition vst.h:2150
void * _unknown_00
Definition vst.h:2166
vst_effect_control_t control
Control Function.
Definition vst.h:2102
Plug-in to Host support checks.
Definition vst.h:740
const char * acceptIOChanges
Does the host support modifying input/output/params/delay when programs, banks or parameters are chan...
Definition vst.h:750
const char * openFileSelector
Definition vst.h:788
const char * receiveVstMidiEvent
Definition vst.h:780
const char * offline
Definition vst.h:786
const char * sendVstEvents
Definition vst.h:776
const char * sendVstMidiEventFlagIsRealtime
Definition vst.h:781
const char * reportConnectionChanges
Definition vst.h:784
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:762
const char * sendVstMidiEvent
Definition vst.h:779
const char * sizeWindow
Definition vst.h:785
const char * receiveVstEvents
Definition vst.h:777
const char * closeFileSelector
Definition vst.h:789
const char * sendVstTimeInfo
Definition vst.h:783
const char * shellCategory
Does the host support container plug-ins?
Definition vst.h:774
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:2043
#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:2051
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
Definition vst.h:696
@ VST_HOST_OPCODE_04
Definition vst.h:578
@ VST_HOST_OPCODE_18
Definition vst.h:634
@ VST_HOST_OPCODE_EDITOR_UPDATE
Definition vst.h:705
@ VST_HOST_OPCODE_CURRENT_EFFECT_ID
Definition vst.h:568
@ VST_HOST_OPCODE_PARAM_START_EDIT
Definition vst.h:713
@ VST_HOST_OPCODE_PARAM_STOP_EDIT
Definition vst.h:721
@ 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:725
@ VST_HOST_OPCODE_IO_MODIFIED
Definition vst.h:614
@ 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
Definition vst.h:694
@ VST_HOST_OPCODE_20
Definition vst.h:650
@ VST_HOST_OPCODE_2B
Notify host that a parameter is being edited.
Definition vst.h:711
@ VST_HOST_OPCODE_16
Definition vst.h:630
@ VST_HOST_OPCODE_25
Definition vst.h:683
@ VST_HOST_OPCODE_1D
Definition vst.h:644
@ VST_HOST_OPCODE_23
Retrieve the vendor version in return value.
Definition vst.h:672
@ VST_HOST_OPCODE_15
Definition vst.h:628
@ VST_HOST_OPCODE_24
User defined OP Code, for custom interaction.
Definition vst.h:679
@ 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:698
@ 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
Check if the host supports a certain feature.
Definition vst.h:690
@ 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:719
@ VST_HOST_OPCODE_13
Definition vst.h:624
@ VST_HOST_OPCODE_0E
Notify the host that numInputs/numOutputs/delay/numParams has changed.
Definition vst.h:612
@ VST_HOST_OPCODE_2D
Definition vst.h:723
@ VST_HOST_OPCODE_0D
Definition vst.h:600
@ 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:666
@ VST_HOST_OPCODE_2A
Request an update of the editor window.
Definition vst.h:703
@ 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:674
@ VST_HOST_OPCODE_14
Definition vst.h:626
@ VST_HOST_OPCODE_VENDOR_NAME
Definition vst.h:658
@ VST_HOST_OPCODE_2E
Definition vst.h:724
@ VST_HOST_OPCODE_MAX
Definition vst.h:728
@ VST_HOST_OPCODE_22
Retrieve the product name into the ptr buffer.
Definition vst.h:664
@ _VST_HOST_OPCODE_PAD
Definition vst.h:731
@ VST_HOST_OPCODE_21
Retrieve the vendor name into the ptr buffer.
Definition vst.h:656
@ VST_HOST_OPCODE_VST_VERSION
Definition vst.h:558
@ VST_HOST_OPCODE_SUPPORTS
Definition vst.h:692
@ VST_HOST_OPCODE_CUSTOM
Definition vst.h:681
@ 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:2085
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:846
@ VST_EFFECT_CATEGORY_0A
Container Plug-in This plug-in contains multiple effects in one and requires special handling on both...
Definition vst.h:1002
@ VST_EFFECT_CATEGORY_EFFECT
Definition vst.h:856
@ VST_EFFECT_CATEGORY_02
Instruments Examples: Instruments, Synths, Samplers, ...
Definition vst.h:863
@ VST_EFFECT_CATEGORY_METERING
Definition vst.h:875
@ VST_EFFECT_CATEGORY_01
Generic Effects Examples: Distortion, Pitch Shift, ...
Definition vst.h:854
@ VST_EFFECT_CATEGORY_08
Restoration Examples: Noise Filtering, Upsamplers, ...
Definition vst.h:912
@ VST_EFFECT_CATEGORY_WAVEGENERATOR
Definition vst.h:1016
@ VST_EFFECT_CATEGORY_09
Offline Processing Examples: Nothing Supports: Nothing
Definition vst.h:920
@ VST_EFFECT_CATEGORY_SPATIAL
Definition vst.h:893
@ VST_EFFECT_CATEGORY_07
Definition vst.h:904
@ VST_EFFECT_CATEGORY_06
Delay/Echo Examples: Echo, Reverb, Room Simulation, Delay, ...
Definition vst.h:900
@ VST_EFFECT_CATEGORY_OFFLINE
Definition vst.h:922
@ VST_EFFECT_CATEGORY_0B
Waveform Generators Examples: Sine Wave Generator, ... Supports: Delay, Tail Samples
Definition vst.h:1014
@ VST_EFFECT_CATEGORY_05
Spatializers Examples: Channel Panning, Expanders, ...
Definition vst.h:891
@ VST_EFFECT_CATEGORY_MASTERING
Definition vst.h:884
@ VST_EFFECT_CATEGORY_RESTORATION
Definition vst.h:914
@ VST_EFFECT_CATEGORY_UNCATEGORIZED
Definition vst.h:847
@ VST_EFFECT_CATEGORY_03
Metering Examples: Loudness Meters, Volume Analysis, ...
Definition vst.h:873
@ VST_EFFECT_CATEGORY_INSTRUMENT
Definition vst.h:865
@ VST_EFFECT_CATEGORY_DELAY_OR_ECHO
Definition vst.h:902
@ VST_EFFECT_CATEGORY_04
Mastering Examples: Compressors, Limiters, ...
Definition vst.h:882
@ VST_EFFECT_CATEGORY_CONTAINER
Definition vst.h:1004
VST_EFFECT_FLAG
Effect Flags.
Definition vst.h:1027
@ VST_EFFECT_FLAG_SILENT_TAIL
Definition vst.h:1095
@ VST_EFFECT_FLAG_1ls9
Effect does not produce tail samples when the input is silent.
Definition vst.h:1093
@ VST_EFFECT_FLAG_CHUNKS
Definition vst.h:1073
@ VST_EFFECT_FLAG_1ls4
Effect uses process_float.
Definition vst.h:1061
@ VST_EFFECT_FLAG_1ls5
Effect supports saving/loading programs/banks from unformatted chunk data.
Definition vst.h:1071
@ VST_EFFECT_FLAG_EDITOR
Definition vst.h:1049
@ VST_EFFECT_FLAG_SUPPORTS_FLOAT
Definition vst.h:1063
@ VST_EFFECT_FLAG_1ls0
Effect provides a custom editor.
Definition vst.h:1047
@ VST_EFFECT_FLAG_INSTRUMENT
Definition vst.h:1085
@ VST_EFFECT_FLAG_1ls12
Effect supports process_double.
Definition vst.h:1107
@ VST_EFFECT_FLAG_1ls8
Effect is an Instrument/Generator.
Definition vst.h:1083
@ VST_EFFECT_FLAG_SUPPORTS_DOUBLE
Definition vst.h:1109
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:2072
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:1115
@ VST_EFFECT_OPCODE_WINDOW_MOUSE
Definition vst.h:1325
@ VST_EFFECT_OPCODE_2A
Host wants to change the speaker arrangement.
Definition vst.h:1571
@ VST_EFFECT_OPCODE_GETVENDORVERSION
Definition vst.h:1648
@ VST_EFFECT_OPCODE_20
Input disconnected.
Definition vst.h:1482
@ VST_EFFECT_OPCODE_14
Window Focus Event?
Definition vst.h:1361
@ VST_EFFECT_OPCODE_PARAM_VALUE_TO_STRING
Definition vst.h:1204
@ VST_EFFECT_OPCODE_PARAM_GETLABEL
Definition vst.h:1184
@ VST_EFFECT_OPCODE_4E
Definition vst.h:1935
@ VST_EFFECT_OPCODE_43
Host is starting to set up a program.
Definition vst.h:1819
@ VST_EFFECT_OPCODE_3E
Midi related.
Definition vst.h:1783
@ VST_EFFECT_OPCODE_32
User-defined Op-Code for VST extensions.
Definition vst.h:1659
@ VST_EFFECT_OPCODE_03
Get currently selected program number.
Definition vst.h:1150
@ VST_EFFECT_OPCODE_SET_CHUNK_DATA
Definition vst.h:1409
@ VST_EFFECT_OPCODE_21
Retrieve properties for the given input index.
Definition vst.h:1491
@ VST_EFFECT_OPCODE_PRODUCT_NAME
Definition vst.h:1639
@ VST_EFFECT_OPCODE_4B
Host wants to know if we can load the provided bank data.
Definition vst.h:1903
@ VST_EFFECT_OPCODE_PARAM_NAME
Definition vst.h:1218
@ VST_EFFECT_OPCODE_1C
Definition vst.h:1454
@ VST_EFFECT_OPCODE_41
Midi related.
Definition vst.h:1804
@ VST_EFFECT_OPCODE_SET_SAMPLE_RATE
Definition vst.h:1234
@ VST_EFFECT_OPCODE_CREATE
Definition vst.h:1122
@ VST_EFFECT_OPCODE_EDITOR_GET_RECT
Definition vst.h:1274
@ VST_EFFECT_OPCODE_SET_SPEAKER_ARRANGEMENT
Definition vst.h:1573
@ VST_EFFECT_OPCODE_PARAM_GETVALUE
Definition vst.h:1198
@ VST_EFFECT_OPCODE_PROGRAM_SET_NAME
Definition vst.h:1164
@ VST_EFFECT_OPCODE_06
Get the value? label for the parameter.
Definition vst.h:1182
@ VST_EFFECT_OPCODE_0A
Set the new sample rate for the plugin to use.
Definition vst.h:1230
@ VST_EFFECT_OPCODE_10
Window Draw Event?
Definition vst.h:1307
@ VST_EFFECT_OPCODE_2F
Retrieve the vendor name into the ptr buffer.
Definition vst.h:1624
@ VST_EFFECT_OPCODE_PROGRAM_GET
Definition vst.h:1154
@ VST_EFFECT_OPCODE_28
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1550
@ VST_EFFECT_OPCODE_4D
Definition vst.h:1928
@ VST_EFFECT_OPCODE_01
Destroy the effect (if there is any) and free its memory.
Definition vst.h:1132
@ VST_EFFECT_OPCODE_3C
Editor Virtual Key Up Event.
Definition vst.h:1767
@ VST_EFFECT_OPCODE_1B
Set Parameter value from string representation.
Definition vst.h:1443
@ VST_EFFECT_OPCODE_SET_BLOCK_SIZE
Definition vst.h:1244
@ VST_EFFECT_OPCODE_IDLE
Definition vst.h:1695
@ VST_EFFECT_OPCODE_33
Test for support of a specific named feature.
Definition vst.h:1670
@ VST_EFFECT_OPCODE_04
Set the name of the currently selected program.
Definition vst.h:1160
@ VST_EFFECT_OPCODE_09
Definition vst.h:1224
@ VST_EFFECT_OPCODE_PARAM_GET_NAME
Definition vst.h:1216
@ VST_EFFECT_OPCODE_BANK_LOAD
Definition vst.h:1905
@ VST_EFFECT_OPCODE_EDITOR_MOUSE
Definition vst.h:1327
@ VST_EFFECT_OPCODE_WINDOW_CREATE
Definition vst.h:1283
@ 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:1240
@ VST_EFFECT_OPCODE_PARAM_GET_VALUE
Definition vst.h:1200
@ VST_EFFECT_OPCODE_39
Definition vst.h:1731
@ VST_EFFECT_OPCODE_05
Get the name of the currently selected program.
Definition vst.h:1170
@ VST_EFFECT_OPCODE_1A
Can the parameter be automated?
Definition vst.h:1428
@ VST_EFFECT_OPCODE_19
Appears to be related to midi and audio events.
Definition vst.h:1420
@ VST_EFFECT_OPCODE_PROGRAM_SET_END
Definition vst.h:1831
@ VST_EFFECT_OPCODE_GET_PROGRAM
Definition vst.h:1152
@ VST_EFFECT_OPCODE_12
Window Keyboard Event?
Definition vst.h:1339
@ VST_EFFECT_OPCODE_42
Midi related.
Definition vst.h:1811
@ VST_EFFECT_OPCODE_EFFECT_CATEGORY
Definition vst.h:1513
@ VST_EFFECT_OPCODE_PARAM_IS_AUTOMATABLE
Definition vst.h:1432
@ VST_EFFECT_OPCODE_WINDOW_DRAW
Definition vst.h:1309
@ VST_EFFECT_OPCODE_DESTROY
Definition vst.h:1134
@ VST_EFFECT_OPCODE_SETBLOCKSIZE
Definition vst.h:1242
@ VST_EFFECT_OPCODE_02
Set which program number is currently select.
Definition vst.h:1140
@ VST_EFFECT_OPCODE_48
End processing of audio.
Definition vst.h:1875
@ VST_EFFECT_OPCODE_GETNAME2
Definition vst.h:1637
@ VST_EFFECT_OPCODE_CUSTOM
Definition vst.h:1661
@ VST_EFFECT_OPCODE_2E
Translate an error code to a string.
Definition vst.h:1615
@ VST_EFFECT_OPCODE_3D
Definition vst.h:1776
@ VST_EFFECT_OPCODE_EDITOR_KEEP_ALIVE
Definition vst.h:1351
@ VST_EFFECT_OPCODE_PARAM_PROPERTIES
Definition vst.h:1724
@ VST_EFFECT_OPCODE_TAIL_SAMPLES
Definition vst.h:1684
@ VST_EFFECT_OPCODE_30
Retrieve the product name into the ptr buffer.
Definition vst.h:1635
@ VST_EFFECT_OPCODE_PARAM_VALUE
Definition vst.h:1202
@ VST_EFFECT_OPCODE_35
Notify effect that it is idle?
Definition vst.h:1693
@ VST_EFFECT_OPCODE_PROGRAM_GET_NAME
Definition vst.h:1174
@ VST_EFFECT_OPCODE_0D
Retrieve the client rect size of the plugins window.
Definition vst.h:1268
@ VST_EFFECT_OPCODE_1E
Definition vst.h:1468
@ VST_EFFECT_OPCODE_PROGRAM_LOAD
Definition vst.h:1917
@ VST_EFFECT_OPCODE_23
Retrieve category of this effect.
Definition vst.h:1511
@ VST_EFFECT_OPCODE_VST_VERSION
Definition vst.h:1741
@ VST_EFFECT_OPCODE_36
Definition vst.h:1703
@ VST_EFFECT_OPCODE_CATEGORY
Definition vst.h:1515
@ VST_EFFECT_OPCODE_EDITOR_OPEN
Definition vst.h:1285
@ VST_EFFECT_OPCODE_EDITOR_VKEY_DOWN
Definition vst.h:1757
@ VST_EFFECT_OPCODE_00
Create/Initialize the effect (if it has not been created already).
Definition vst.h:1120
@ VST_EFFECT_OPCODE_2B
Definition vst.h:1579
@ VST_EFFECT_OPCODE_SUSPEND_RESUME
Definition vst.h:1258
@ VST_EFFECT_OPCODE_24
Definition vst.h:1522
@ VST_EFFECT_OPCODE_PARAM_LABEL
Definition vst.h:1188
@ VST_EFFECT_OPCODE_40
Midi related.
Definition vst.h:1797
@ VST_EFFECT_OPCODE_22
Retrieve properties for the given output index.
Definition vst.h:1502
@ VST_EFFECT_OPCODE_4F
Definition vst.h:1942
@ VST_EFFECT_OPCODE_47
Begin processing of audio.
Definition vst.h:1866
@ VST_EFFECT_OPCODE_38
Parameter Properties.
Definition vst.h:1720
@ VST_EFFECT_OPCODE_GET_SPEAKER_ARRANGEMENT
Definition vst.h:1846
@ VST_EFFECT_OPCODE_0E
Create the window for the plugin.
Definition vst.h:1281
@ VST_EFFECT_OPCODE_3B
Editor Virtual Key Down Input.
Definition vst.h:1755
@ VST_EFFECT_OPCODE_BYPASS
Definition vst.h:1590
@ VST_EFFECT_OPCODE_EDITOR_KEYBOARD
Definition vst.h:1343
@ VST_EFFECT_OPCODE_INPUT_GET_PROPERTIES
Definition vst.h:1493
@ VST_EFFECT_OPCODE_VENDOR_NAME
Definition vst.h:1628
@ VST_EFFECT_OPCODE_PARAM_ISAUTOMATABLE
Definition vst.h:1430
@ VST_EFFECT_OPCODE_WINDOW_KEYBOARD
Definition vst.h:1341
@ VST_EFFECT_OPCODE_GET_PROGRAM_NAME
Definition vst.h:1172
@ VST_EFFECT_OPCODE_17
Get Chunk Data.
Definition vst.h:1393
@ VST_EFFECT_OPCODE_31
Retrieve the vendor version in return value.
Definition vst.h:1646
@ VST_EFFECT_OPCODE_2D
Retrieve the effect name into the ptr buffer.
Definition vst.h:1599
@ VST_EFFECT_OPCODE_07
Get the string representing the value for the parameter.
Definition vst.h:1196
@ VST_EFFECT_OPCODE_PROCESS_END
Definition vst.h:1877
@ VST_EFFECT_OPCODE_SET_PROGRAM
Definition vst.h:1142
@ VST_EFFECT_OPCODE_27
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1543
@ VST_EFFECT_OPCODE_EDITOR_DRAW
Definition vst.h:1311
@ VST_EFFECT_OPCODE_15
Window Unfocus Event?
Definition vst.h:1371
@ VST_EFFECT_OPCODE_49
Definition vst.h:1884
@ VST_EFFECT_OPCODE_NAME
Definition vst.h:1605
@ VST_EFFECT_OPCODE_EDITOR_CLOSE
Definition vst.h:1295
@ VST_EFFECT_OPCODE_29
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1557
@ VST_EFFECT_OPCODE_3A
Retrieve the VST Version supported.
Definition vst.h:1739
@ VST_EFFECT_OPCODE_11
Window Mouse Event?
Definition vst.h:1323
@ VST_EFFECT_OPCODE_PARAM_GET_LABEL
Definition vst.h:1186
@ VST_EFFECT_OPCODE_SETSAMPLERATE
Definition vst.h:1232
@ VST_EFFECT_OPCODE_0F
Destroy the plugins window.
Definition vst.h:1291
@ VST_EFFECT_OPCODE_GET_CHUNK_DATA
Definition vst.h:1395
@ VST_EFFECT_OPCODE_INITIALIZE
Definition vst.h:1124
@ VST_EFFECT_OPCODE_GETTAILSAMPLES
Definition vst.h:1682
@ VST_EFFECT_OPCODE_18
Set Chunk Data.
Definition vst.h:1407
@ VST_EFFECT_OPCODE_EFFECT_NAME
Definition vst.h:1603
@ VST_EFFECT_OPCODE_GET_PARAMETER_PROPERTIES
Definition vst.h:1722
@ VST_EFFECT_OPCODE_PARAM_AUTOMATABLE
Definition vst.h:1434
@ VST_EFFECT_OPCODE_PARAM_GETNAME
Definition vst.h:1214
@ VST_EFFECT_OPCODE_4A
Definition vst.h:1893
@ VST_EFFECT_OPCODE_08
Get the name for the parameter.
Definition vst.h:1212
@ VST_EFFECT_OPCODE_13
Window/Editor Idle/Keep-Alive Callback?
Definition vst.h:1349
@ VST_EFFECT_OPCODE_45
Host wants to know the current speaker arrangement.
Definition vst.h:1844
@ VST_EFFECT_OPCODE_WINDOW_GETRECT
Definition vst.h:1270
@ VST_EFFECT_OPCODE_OUTPUT_GET_PROPERTIES
Definition vst.h:1504
@ VST_EFFECT_OPCODE_PARAM_VALUE_FROM_STRING
Definition vst.h:1447
@ VST_EFFECT_OPCODE_GETVENDOR
Definition vst.h:1626
@ VST_EFFECT_OPCODE_PROCESS_BEGIN
Definition vst.h:1868
@ VST_EFFECT_OPCODE_1D
Definition vst.h:1461
@ VST_EFFECT_OPCODE_PAUSE_UNPAUSE
Definition vst.h:1256
@ VST_EFFECT_OPCODE_4C
Host wants to know if we can load the provided program data.
Definition vst.h:1915
@ VST_EFFECT_OPCODE_26
Seen in plug-ins with VST_EFFECT_CATEGORY_OFFLINE.
Definition vst.h:1536
@ VST_EFFECT_OPCODE_CONTAINER_NEXT_EFFECT_ID
Definition vst.h:1859
@ VST_EFFECT_OPCODE_GETNAME
Definition vst.h:1601
@ VST_EFFECT_OPCODE_VENDOR_VERSION
Definition vst.h:1650
@ VST_EFFECT_OPCODE_46
Get the next effect contained in this effect.
Definition vst.h:1857
@ VST_EFFECT_OPCODE_SET_PROGRAM_NAME
Definition vst.h:1162
@ VST_EFFECT_OPCODE_FOURCC
Definition vst.h:1381
@ VST_EFFECT_OPCODE_37
Definition vst.h:1711
@ VST_EFFECT_OPCODE_44
Host is done setting up a program.
Definition vst.h:1829
@ VST_EFFECT_OPCODE_3F
Midi related.
Definition vst.h:1790
@ VST_EFFECT_OPCODE_WINDOW_DESTROY
Definition vst.h:1293
@ VST_EFFECT_OPCODE_EDITOR_VKEY_UP
Definition vst.h:1769
@ VST_EFFECT_OPCODE_1F
Input connected.
Definition vst.h:1475
@ VST_EFFECT_OPCODE_34
Number of samples that are at the tail at the end of playback.
Definition vst.h:1680
@ VST_EFFECT_OPCODE_2C
Enable/Disable bypassing the effect.
Definition vst.h:1588
@ VST_EFFECT_OPCODE_PROGRAM_SET
Definition vst.h:1144
@ VST_EFFECT_OPCODE_SUPPORTS
Definition vst.h:1672
@ VST_EFFECT_OPCODE_PROGRAM_SET_BEGIN
Definition vst.h:1821
@ VST_EFFECT_OPCODE_16
Definition vst.h:1379
@ VST_EFFECT_OPCODE_TRANSLATE_ERROR
Definition vst.h:1617
@ VST_EFFECT_OPCODE_EDITOR_RECT
Definition vst.h:1272
@ VST_EFFECT_OPCODE_25
Definition vst.h:1529
@ VST_EFFECT_OPCODE_PARAM_SET_VALUE
Definition vst.h:1445
@ VST_EFFECT_OPCODE_SUSPEND
Definition vst.h:1260
@ VST_EFFECT_OPCODE_0C
Effect processing should be suspended/paused or resumed/unpaused.
Definition vst.h:1254
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:2059