-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
vst2.h
3839 lines (3239 loc) · 83 KB
/
vst2.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
Copyright 2017 Linux Studio Plugins Project <lsp.plugin@gmail.com>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _3RDPARTY_STEINBERG_VST2_H_
#define _3RDPARTY_STEINBERG_VST2_H_
#include <string.h>
#include <stdint.h>
#include <limits.h>
//-------------------------------------------------------------------------------------------------------
// Configure compilation options
//-------------------------------------------------------------------------------------------------------
#if ((defined(__GNUC__) && (defined(__APPLE_CPP__) || defined(__APPLE_CC__))) || (defined (__MWERKS__) && defined (__MACH__)))
#ifndef TARGET_API_MAC_CARBON
#define TARGET_API_MAC_CARBON 1
#endif
#if __ppc__
#ifndef VST_FORCE_DEPRECATED
#define VST_FORCE_DEPRECATED 0
#endif
#endif
#endif
// Define __cdecl modifier
#ifdef __GNUC__
#ifndef __cdecl
#if defined(__i386__) || defined(__i386)
#define __cdecl __attribute__((__cdecl__))
#elif defined(__x86_64__) || defined(__x86_64) || defined(__amd64__) || defined(__amd64) || defined(_M_AMD64)
#define VST_64BIT_PLATFORM 1
#define __cdecl
#elif defined(__aarch64__)
#define VST_64BIT_PLATFORM 1
#define __cdecl
#elif defined(__arm__) || defined(__arm) || defined(_M_ARM) || defined(_ARM)
#define __cdecl
#elif defined(__PPC64__) || defined(__ppc64__) || defined(__ppc64) || defined(__powerpc64__) || defined(_ARCH_PPC64)
#define VST_64BIT_PLATFORM 1
#define __cdecl
#elif defined(__PPC__) || defined(__ppc__) || defined(__powerpc__) || defined(__ppc) || defined(_M_PPC) || defined(_ARCH_PPC)
#define __cdecl
#elif defined(__s390x__) || defined(__s390__) || defined(__zarch__)
#define VST_64BIT_PLATFORM 1
#define __cdecl
#elif defined(__mips__) || defined(__mips) || defined(__MIPS__)
#define __cdecl
#endif /* __cdecl */
#endif /* __cdecl */
#endif /* __GNUC__ */
#ifdef __cplusplus
#define VST_C_EXTERN extern "C"
#else
#define VST_C_EXTERN
#endif /* __cplusplus */
/** Test whether system runs in 64-bit mode */
#ifdef __GNUC__
#ifndef VST_64BIT_PLATFORM
#if defined(__WORDSIZE) && (__WORDSIZE == 64)
#define VST_64BIT_PLATFORM 1
#elif defined(__SIZE_WIDTH__) && (__SIZE_WIDTH__ == 64)
#define VST_64BIT_PLATFORM 1
#endif /* __WORDSIZE, __SIZE_WIDTH__ */
#endif
#ifndef VST_64BIT_PLATFORM
#define VST_64BIT_PLATFORM (__x86_64__) || (__aarch64__) || (__ppc64__) || (__s390x__) || (__zarch__)
#endif /* VST_64BIT_PLATFORM */
#else
#ifndef VST_64BIT_PLATFORM
#define VST_64BIT_PLATFORM _WIN64 || __LP64__
#endif /* VST_64BIT_PLATFORM */
#endif /* __GNUC__ */
#if TARGET_API_MAC_CARBON
#ifdef (__LP64__) || (__ppc64__)
#pragma options align=power
#else
#pragma options align=mac68k
#endif
#define VSTCALLBACK
#elif defined __BORLANDC__
#pragma -a8
#elif defined(__GNUC__)
#pragma pack(push, 8)
#define VSTCALLBACK __cdecl
#elif defined(WIN32) || defined(__FLAT__) || defined CBUILDER
#pragma pack(push)
#pragma pack(8)
#define VSTCALLBACK __cdecl
#else
#define VSTCALLBACK
#endif
#if defined (__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))
#define VST_EXPORT __attribute__ ((visibility ("default")))
#else
#define VST_EXPORT
#endif
#define VST_2_1_EXTENSIONS 1
#define VST_2_2_EXTENSIONS 1
#define VST_2_3_EXTENSIONS 1
#define VST_2_4_EXTENSIONS 1
#define DECLARE_VST_DEPRECATED(x) x
//-------------------------------------------------------------------------------------------------------
// Simple type definitions
//-------------------------------------------------------------------------------------------------------
/**
* Integral data types
*/
typedef int16_t VstInt16;
typedef int32_t VstInt32;
typedef int64_t VstInt64;
#if VST_64BIT_PLATFORM
typedef VstInt64 VstIntPtr;
#else
typedef VstInt32 VstIntPtr;
#endif
/**
* Magic number encoding macro
*/
#ifdef CCONST
#undef CCONST
#endif /* CCONST */
#define CCONST(a, b, c, d) \
((((VstInt32)a) << 24) | (((VstInt32)b) << 16) | (((VstInt32)c) << 8) | (((VstInt32)d) << 0))
//-------------------------------------------------------------------------------------------------------
// Constants definition
//-------------------------------------------------------------------------------------------------------
/**
* The VST interface version, current is 2.4.0
*/
#define kVstVersion 2400
/**
* Magic numbers
*/
#define kEffectMagic CCONST('V', 's', 't', 'P') /* AEffect magic number */
#define kEffectIdentify CCONST('N', 'v', 'E', 'f') /* Audio effect identification */
#define cMagic CCONST('C', 'c', 'n', 'K') /* Root chunk magic number for programs (FXP) and banks (FXB) */
#define fMagic CCONST('F', 'x', 'C', 'k') /* Regular program chunk magic number (FXP) */
#define bankMagic CCONST('F', 'x', 'B', 'k') /* Regular program bank magic number (FXB) */
#define chunkPresetMagic CCONST('F', 'P', 'C', 'h') /* Opaque chunk (preset) magic number for program chunk (FXP) */
#define chunkBankMagic CCONST('F', 'B', 'C', 'h') /* Opaque chunk (preset) magic number for bank chunk (FXB) */
enum VstAEffectFlags
{
/** Plugin provides custom user interface/editor
*
*/
effFlagsHasEditor = 1 << 0,
/** This flag is deprecated
* @deprecated since VST 2.4
*/
effFlagsHasClip = 1 << 1,
/** This flag is deprecated
* @deprecated since VST 2.4
*/
effFlagsHasVu = 1 << 2,
/** This flag is deprecated
* @deprecated since VST 2.4
*/
effFlagsCanMono = 1 << 3,
/** Supports replacing process mode, default mode for VST 2.4
*
*/
effFlagsCanReplacing = 1 << 4,
/** Program data is handled in formatless chunks
*
*/
effFlagsProgramChunks = 1 << 5,
/** Plug-in is a synthesizer/instrument (VSTi),
* host may assign mixer channels for its outputs
*
*/
effFlagsIsSynth = 1 << 8,
/** Plug-in does not produce sound when there is zero data on all inputs
*
*/
effFlagsNoSoundInStop = 1 << 9,
/** This flag is deprecated
* @deprecated since VST 2.4
*/
effFlagsExtIsAsync = 1 << 10,
/** This flag is deprecated
* @deprecated since VST 2.4
*/
effFlagsExtHasBuffer = 1 << 11,
/** Plug-in supports double precision processing
* @since VST 2.4
*/
effFlagsCanDoubleReplacing = 1 << 12
};
/** Host to plugin communication codes
* @see AEffectDispatcherProc
*
*/
enum AEffectOpcodes
{
/** The plugin initialization call
*
*/
effOpen = 0,
/** The plugin destruction call
*
*/
effClose,
/** Set the current program
* @param value - new program number
*/
effSetProgram,
/** Get the current program
* @return current program number
*/
effGetProgram,
/** Set current program name, maximum string length is kVstMaxProgNameLen
* Please be aware that the string lengths supported by the default VST interface
* are normally limited to kVstMaxProgNameLen characters. If you copy too much data
* into the buffers provided, you will break the Host application.
*
* @param ptr pointer to string with new program name
* @see kVstMaxProgNameLen
*/
effSetProgramName,
/** Get current program name, maximum string length is kVstMaxProgNameLen characters
* Please be aware that the string lengths supported by the default VST interface
* are normally limited to kVstMaxProgNameLen characters. If you copy too much data
* into the buffers provided, you will break the Host application.
*
* @param ptr pointer to buffer to store string with current program name
* @see kVstMaxProgNameLen
*/
effGetProgramName,
/** Get the label for the parameter displayed by host in the interface
* The length of the label is limited to kVstMaxParamStrLen characters
* @param ptr pointer to buffer to store label
* @see kVstMaxParamStrLen
*/
effGetParamLabel,
/** Get the parameter display string
* The length of the passed buffer is limited to kVstMaxParamStrLen characters
* @param ptr pointer to buffer to store parameter string
* @see kVstMaxParamStrLen
*/
effGetParamDisplay,
/** Get the parameter name used/displayed by host
* The length of parameter name is limited to kVstMaxParamStrLen characters
* @param ptr pointer to buffer to store parameter name string
* @see kVstMaxParamStrLen
*/
effGetParamName,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effGetVu,
/** Change the audio processing sample rate
* @param opt new sample rate value
*
*/
effSetSampleRate,
/** Set the maximum block size that host can pass to plugin while
* performing audio processing.
* @param value new maximum block size for audio processing
*/
effSetBlockSize,
/** The plugin is suspended/resumed
* @param value suspend/resume flag: 0 means "turn off", 1 means "turn on"
*
*/
effMainsChanged,
/** Get custom editor area size
* @param ptr double pointer to ERect structure (ERect **) that contains editor area parameters
*/
effEditGetRect,
/** Activate (show) the custom editor provided by the plugin
* @param ptr platform-specific Window handle (HWND for Windows, XID for X11, etc.)
*
*/
effEditOpen,
/** Deactivate (hide) the custom editor provided by the plugin
*
*/
effEditClose,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effEditDraw,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effEditMouse,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effEditKey,
/** Called by the host for the custom UI editor
* to process events from windowing subsystem
*/
effEditIdle,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effEditTop,
/** This is deprecated command
* @deprecated since VST 2.4
*
*/
effEditSleep,
/** This is deprecated command, should return kEffectIdentify ('NvEf')
* @see kEffectIdentify
* @deprecated since VST 2.4
*
*/
effIdentify,
/** Get program chunk
* If your plug-in is configured to use chunks (see AudioEffect::programsAreChunks),
* the Host will ask for a block of memory describing the current plug-in state for saving.
* To restore the state at a later stage, the same data is passed back by effSetChunk.
* Alternatively, when not using chunk, the Host will simply save all parameter values.
*
* @param ptr double pointer to void (void **) for obtaining chunk data address
* @param index type of the chunk: 0 for bank, 1 for program
*/
effGetChunk,
/** Set program chunk
* @param ptr pointer to chunk data
* @param value the size of byte
* @param index type of the chunk: 0 for bank, 1 for program
*/
effSetChunk,
/** Process events passed to the host
* @param ptr pointer to VstEvents structure
* @see VstEvents
*/
effProcessEvents,
/** Check whether parameter can be automated
* @param index parameter index
* @return 1 if parameter can be automated, 0 otherwise
*/
effCanBeAutomated,
/** Convert a string representation to a parameter value
* @param index parameter index
* @param ptr parameter string
* @return 1 if success, 0 otherwise
*/
effString2Parameter,
/**
* @deprecated since VST 2.4
*/
effGetNumProgramCategories,
/** Fill text with name of program index (category deprecated in VST 2.4)
*
* @param index program index
* @param ptr buffer for program name limited to kVstMaxProgNameLen
* @return true for success
* @see kVstMaxProgNameLen
*/
effGetProgramNameIndexed,
/**
* @deprecated since VST 2.4
*/
effCopyProgram,
/**
* @deprecated since VST 2.4
*/
effConnectInput,
/**
* @deprecated since VST 2.4
*/
effConnectOutput,
/** Return the properties of input index
* @param index input index
* @param ptr pointer to VstPinProperties structure
* @return 1 if supported
*/
effGetInputProperties,
/** Return the properties of output index
* @param index input index
* @param ptr pointer to VstPinProperties structure
* @return 1 if supported
*/
effGetOutputProperties,
/** Get plugin category
* @return plugin category (one of VstPlugCategory enum constants)
* @see VstPlugCategory
*/
effGetPlugCategory,
/**
* @deprecated since VST 2.4
*/
effGetCurrentPosition,
/**
* @deprecated since VST 2.4
*/
effGetDestinationBuffer,
/**
* @param ptr pointer to array of VstAudioFile structures
* @param value count of elements in array
* @param index start flag
*/
effOfflineNotify,
/**
* @param ptr pointer to array of VstOfflineTask structures
* @param value count of elements in array
* @see VstOfflineTask
*/
effOfflinePrepare,
/**
* @param ptr pointer to array of VstOfflineTask structures
* @param value count of elements in array
* @see VstOfflineTask
*/
effOfflineRun,
/** Used for variable I/O processing (offline processing like timestreching)
* @param ptr pointer to VstVariableIo structure
*/
effProcessVarIo,
/** Set the plug-in's speaker arrangements
* @param value pointer to VstSpeakerArrangements
* @param ptr output pointer to VstSpeakerArrangement
*/
effSetSpeakerArrangement,
/**
* @deprecated since VST 2.4
*/
effSetBlockSizeAndSampleRate,
/** For 'soft-bypass' (this could be automated (in Audio Thread)
* that why you could NOT call iochanged (if needed) in this function,
* do it in fxidle).
*
* @param value 1 = bypass, 0 = no bypass
*/
effSetBypass,
/** Get effect name
* @param ptr buffer to store effect name, maximum length is kVstMaxEffectNameLen characters
* @see kVstMaxEffectNameLen
*/
effGetEffectName,
/**
* @deprecated since VST 2.4
*/
effGetErrorText,
/** Get plugin vendor string
* @param ptr pointer to buffer to store vendor string, maximum length is kVstMaxVendorStrLen characters
* @see kVstMaxVendorStrLen
*/
effGetVendorString,
/** Get plugin product string
* @param ptr pointer to buffer to store product string, maximum length is kVstMaxProductStrLen characters
* @see kVstMaxVendorStrLen
*/
effGetProductString,
/** Get plugin vendor-specific version
* @return vendor-specific version
*/
effGetVendorVersion,
/** No special definition, vendor specific handling
*
*/
effVendorSpecific,
/** Check whether plugin supports a feature
* @param ptr the pointer to string with supported feature identifier
* @return 0: "don't know" -1: "no" 1: "yes"
*/
effCanDo,
/** Get post-processing tail size of plugin (for example the reverb time of a reverb plug-in)
* @return tail size, 0 is default, 1 if there is no tail
*/
effGetTailSize,
/**
* @deprecated since VST 2.4
*/
effIdle,
/**
* @deprecated since VST 2.4
*/
effGetIcon,
/**
* @deprecated since VST 2.4
*/
effSetViewPosition,
/** Get plugin parameter properties
* @param index parameter index
* @param ptr pointer to VstParameterProperties structure
* @return 1 if supported
*/
effGetParameterProperties,
/**
* @deprecated since VST 2.4
*/
effKeysRequired,
/** Return the VST interface version used by plugin
* @return VST interface version
* @see kVstVersion
*/
effGetVstVersion,
/** Receive key down event. Return true only if key was really used!
* @param index ASCII character
* @param value virtual key
* @param opt key modifiers
* @return 1 if key was used, 0 otherwise
* @since VST 2.1
*/
effEditKeyDown,
/** Receive key up event. Return true only if key was really used!
* @param index ASCII character
* @param value virtual key
* @param opt key modifiers
* @return 1 if key was used, 0 otherwise
* @since VST 2.1
*/
effEditKeyUp,
/** Set knob mode (if supported by Host)
* @param value knob mode: 0 = circular, 1 = circular relative, 2 = linear
* @return 1 if key was used, 0 otherwise
* @since VST 2.1
*/
effSetEditKnobMode,
/** Fill midiProgramName with information for 'thisProgramIndex'.
* @param index MIDI channel
* @param ptr pointer to MidiProgramName structure
* @return number of used programs, 0 if unsupported
* @since VST 2.1
*/
effGetMidiProgramName,
/** Fill currentProgram with information for the current MIDI program.
* @param index MIDI channel
* @param ptr pointer to MidiProgramName structure
* @return index of current program
* @since VST 2.1
*/
effGetCurrentMidiProgram,
/** Fill category with information for 'thisCategoryIndex'.
* @param index MIDI channel
* @param ptr pointer to MidiProgramCategory structure
* @return number of used categories, 0 if unsupported
* @since VST 2.1
*/
effGetMidiProgramCategory,
/** Return true if the MidiProgramNames, MidiKeyNames or MidiControllerNames had changed on this MIDI channel.
* @param index MIDI channel
* @return 1 if the at least one program name or key name has been changed
* @see MidiProgramNames
* @see MidiKeyNames
* @see MidiControllerNames
* @since VST 2.1
*/
effHasMidiProgramsChanged,
/** Fill keyName with information for 'thisProgramIndex' and 'thisKeyNumber'
* @param index MIDI channel
* @param ptr pointer to MidiKeyName structure
* @return 1 if supported, 0 if not
* @see MidiKeyName
* @since VST 2.1
*/
effGetMidiKeyName,
/** Called before a program is loaded. No arguments
* @since VST 2.1
*/
effBeginSetProgram,
/** Called after a program was loaded. No arguments
* @since VST 2.1
*/
effEndSetProgram,
/** Set the plug-in's speaker arrangements
* @param value pointer to VstSpeakerArrangement structure
* @param ptr pointer to output VstSpeakerArrangement structure
* @since VST 2.3
*/
effGetSpeakerArrangement,
/** This opcode is only called, if the plug-in is of type
* kPlugCategShell, in order to extract all included sub-plugin's names.
* @param ptr buffer for plug-in name, limited to kVstMaxProductStrLen
* @return next plugin's uniqueID
* @see kPlugCategShell
* @see kVstMaxProductStrLen
* @since VST 2.3
*/
effShellGetNextPlugin,
/** Called one time before the start of process call. This indicates that
* the process call will be interrupted (due to Host reconfiguration or
* bypass state when the plug-in doesn't support softBypass)
* No arguments
* @since VST 2.3
*/
effStartProcess,
/** Called after the stop of process call
* No arguments
* @since VST 2.3
*/
effStopProcess,
/** Called in offline mode before process() or processVariableIo ()
* @param value number of samples to process, offline mode only!
* @since VST 2.3
*/
effSetTotalSampleToProcess,
/** Set the Panning Law used by the Host.
* @param value pan law (one of the VstPanLawType enumeration constants)
* @param opt gain
* @see VstPanLawType
* @since VST 2.3
*/
effSetPanLaw,
/** Called before a Bank is loaded.
* @param ptr pointer to VstPatchChunkInfo structure
* @return -1 if ban can not be loaded, 1 if bank can be loaded, 0 if function is not supported
* @see VstPatchChunkInfo
* @since VST 2.3
*/
effBeginLoadBank,
/** Called before a Program is loaded, called before beginSetProgram.
* @param ptr pointer to VstPatchChunkInfo structure
* @return -1 if program can not be loaded, 1 if program can be loaded, 0 if not supported
* @see effBeginSetProgram
* @see VstPatchChunkInfo
* @since VST 2.3
*/
effBeginLoadProgram,
/** Set floating-point precision used for processing (32 or 64 bit)
* @value constant defined in VstProcessPrecision enumeration
* @see VstProcessPrecision
* @since VST 2.4
*/
effSetProcessPrecision,
/** Returns number of MIDI input channels used [0, 16]
* @return number of used MIDI input channels
* @since VST 2.4
*/
effGetNumMidiInputChannels,
/** Returns number of MIDI output channels used [0, 16]
* @return number of used MIDI input channels
* @since VST 2.4
*/
effGetNumMidiOutputChannels
};
/** Plugin to host communication codes
*
*/
enum AudioMasterOpcodes
{
/**
* An important thing to notice is that if the user changes a parameter in your editor, which is
* out of the Host's control if you are not using the default string based interface, you should
* issue audioMasterAutomate callback. This ensures that the Host is notified of the parameter
* change, which allows it to record these changes for automation.
* @param index parameter index
* @param opt parameter value
*
*/
audioMasterAutomate = 0,
/** Get host VST version
* @return Host VST version (for example 2400 for VST 2.4)
*/
audioMasterVersion,
/** Get unique identifier for shell plugin
* @return current uinque identifier on shell plugin
*/
audioMasterCurrentId,
/**
*
*/
audioMasterIdle,
/** Pin connection flag
* @deprecated since VST 2.4 r2
*
*/
audioMasterPinConnected,
/** Just padding
*
*/
__audioMasterPad,
/** Want MIDI flag
* @deprecated since VST 2.4
*/
audioMasterWantMidi,
/** Get time
* @param value request mask
* @return the pointer to VstTimeInfo or NULL if not supported
* @see VstTimeInfo
* @see VstTimeInfoFlags
*
*/
audioMasterGetTime,
/** Process events delivered to plugin
* @param ptr pointer to events structure
* @see VstEvents
*
*/
audioMasterProcessEvents,
/**
* @deprecated since VST 2.4
*/
audioMasterSetTime,
/**
* @deprecated since VST 2.4
*/
audioMasterTempoAt,
/**
* @deprecated since VST 2.4
*/
audioMasterGetNumAutomatableParameters,
/**
* @deprecated since VST 2.4
*/
audioMasterGetParameterQuantization,
/** Called when the IO of plugin has changed or a latency value has been updated
* @return 1 if supported
*
*/
audioMasterIOChanged,
/**
* @deprecated since VST 2.4
*/
audioMasterNeedIdle,
/** Called by plugin when it's custom UI editor window should be resized
*
* @param index new window width
* @param value new window height
* @return 1 if supported
*/
audioMasterSizeWindow,
/** Get current sample rate
* @return current sample rate
*/
audioMasterGetSampleRate,
/** Get current processing block size passed by host
* @return current block size
*/
audioMasterGetBlockSize,
/** Get input latency in audio samples
* @return input latency value
*/
audioMasterGetInputLatency,
/** Get output latency in audio samples
* @return output latency value
*/
audioMasterGetOutputLatency,
/**
* @deprecated since VST 2.4
*/
audioMasterGetPreviousPlug,
/**
* @deprecated since VST 2.4
*/
audioMasterGetNextPlug,
/**
* @deprecated since VST 2.4
*/
audioMasterWillReplaceOrAccumulate,
/** Get current process level
* @return current process level
* @see VstProcessLevels
*/
audioMasterGetCurrentProcessLevel,
/** Get current automation state
* @return current automation state
* @see VstAutomationStates
*/
audioMasterGetAutomationState,
/** Start offline processing
* @param index numBewAudioFiles
* @param value numAduioFiles
* @param ptr pointer to VstAudioFile
* @see VstAudioFile
*/
audioMasterOfflineStart,
/** Read offline
* @param index readSource (boolean)
* @param value pointer to VstOfflineOption
* @param ptr pointer to VstOfflineTask
* @see VstOfflineOption
* @see VstOfflineTask
*/
audioMasterOfflineRead,
/** Write offline
* @param index readSource (boolean)
* @param value pointer to VstOfflineOption
* @param ptr pointer to VstOfflineTask
* @see VstOfflineOption
* @see VstOfflineTask
*/
audioMasterOfflineWrite,
/** Get current pass
*
*/
audioMasterOfflineGetCurrentPass,
/** Get current meta pass
*
*/
audioMasterOfflineGetCurrentMetaPass,
/**
* @deprecated since VST 2.4
*/
audioMasterSetOutputSampleRate,
/**
* @deprecated since VST 2.4
*/
audioMasterGetOutputSpeakerArrangement,
/** Get host vendor string
* @param ptr buffer to store vendor string, maximum kVstMaxVendorStrLen characters
* @see kVstMaxVendorStrLen
*/
audioMasterGetVendorString,
/** Get host product string
* @param ptr buffer to store product string, maximum kVstMaxProductStrLen characters
* @see kVstMaxProductStrLen
*/
audioMasterGetProductString,
/** Get vendor-specific version
* @return vendor-specific version
*
*/
audioMasterGetVendorVersion,
/** No special definition, vendor-specific handling
*
*/
audioMasterVendorSpecific,
/**
* @deprecated since VST 2.4
*/
audioMasterSetIcon,
/** Check whether host supports some features
* @param ptr the pointer to string containing the feature name
* @return 1 if feature is supported, 0 otherwise
*/
audioMasterCanDo,
/** Get language code
* @see VstHostLanguage
*/
audioMasterGetLanguage,
/**
* @deprecated since VST 2.4
*/
audioMasterOpenWindow,
/**
* @deprecated since VST 2.4
*/
audioMasterCloseWindow,
/** Get directory
* @return pointer to FSSpec on MAC or pointer to character string otherwise
*
*/
audioMasterGetDirectory,