Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 339d4f3159 | |||
| ac2d40ebce | |||
| 22bb104943 | |||
| 779b6c55de | |||
| 7593071b9e | |||
| ce82058d69 | |||
| f32ac9b385 | |||
| a17e62c097 | |||
| 0c87491e6f | |||
| cb3952b5f1 | |||
| a76aa75260 | |||
| 4246e8442c | |||
| 00a9f2dc53 | |||
| 4b00c75a3f | |||
| 93bc195dea | |||
| 45194f82b9 | |||
| bc16fce699 | |||
| 6576c95a74 | |||
| de16483b55 | |||
| b5310b8922 | |||
| 098f059834 | |||
| ca9d9de24e | |||
| 596cf21b71 | |||
| 8204f06ca7 | |||
| 64ddb953db | |||
| 5cef1f300a | |||
| 9f1a61b603 | |||
| ac4572eff4 | |||
| 14688491dc | |||
| a140b58016 | |||
| 2551d06b0c | |||
| e81a1f91e2 | |||
| 0b608bec1f | |||
| e9fcf1408b | |||
| d23a117ecc | |||
| c9629ad8d3 | |||
| 87b3e2bcfc | |||
| 9dd8de817f | |||
| 41a24b0f07 | |||
| 0049af4720 | |||
| 35125a732b | |||
| 21998dbbc0 | |||
| fa02ffef09 | |||
| ce354e3824 |
@@ -0,0 +1,17 @@
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file.
|
||||
[*]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.{md,yml,yaml}]
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -7,7 +7,9 @@ on:
|
||||
- '!documentation'
|
||||
paths:
|
||||
- '.github/workflows/documentation.yml'
|
||||
- 'LICENSE'
|
||||
- 'vst.h'
|
||||
- 'vst.hpp'
|
||||
- 'Doxyfile'
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
|
||||
@@ -74,7 +74,7 @@ PROJECT_ICON =
|
||||
# entered, it will be relative to the location where Doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = build/docs
|
||||
OUTPUT_DIRECTORY = ./build/docs
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096
|
||||
# sub-directories (in 2 levels) under the output directory of each output format
|
||||
@@ -991,8 +991,8 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = vst.h \
|
||||
vst.hpp
|
||||
INPUT = include/ \
|
||||
README.md
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -1207,7 +1207,7 @@ FILTER_SOURCE_PATTERNS =
|
||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||
# and want to reuse the introduction page also for the Doxygen output.
|
||||
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
USE_MDFILE_AS_MAINPAGE = README.md
|
||||
|
||||
# If the IMPLICIT_DIR_DOCS tag is set to YES, any README.md file found in sub-
|
||||
# directories of the project's root, is used as the documentation for that sub-
|
||||
@@ -2532,7 +2532,8 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED =
|
||||
PREDEFINED = __cplusplus:=999999L \
|
||||
__STDC_VERSION__:=999999L
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
|
||||
@@ -1,9 +1,23 @@
|
||||
# About the Project
|
||||
This is a completely "clean room" untainted reverse engineered "SDK" for the VST 2.x interface. It was reverse engineered from binaries where no license restricting the reverse engineering was attached, or where the legal system explicitly allowed reverse engineering for the purpose of interoperability.
|
||||
|
||||
## At a glance
|
||||
- Full reimplementation of the VST 2.x SDK.
|
||||
- Header-only, so no code/object dependencies!
|
||||
- Written for C99 / C++20 with (optional) backwards support down to C89 / C++98.
|
||||
- Documentation available [online](https://xaymar.github.io/vst2sdk) _and_ offline with clean JavaDoc comments.
|
||||
- Liberally licensed so it is usable in commercial products.
|
||||
- Technically as clean room as it can legally get, but ask a lawyer first anyway.
|
||||
- I don't provide licenses to Steinberg VsT, their logos, or anything.
|
||||
|
||||
## As seen in
|
||||
[DISTRHO Plugin Framework](https://github.com/DISTRHO/DPF), [StompTuner](https://github.com/brummer10/StompTuner), [DF Zita Rev1](https://github.com/SpotlightKid/dfzitarev1), [TonPlugIns](https://github.com/Vhonowslend/TonPlugIns), [ToneTwistPlugs](https://github.com/brummer10/ToneTwistPlugs), [DF JPverb](https://github.com/SpotlightKid/dfjpverb), [CChorus](https://github.com/SpotlightKid/cchorus), [Dynation](https://github.com/vertver/Dynation) and likely more.
|
||||
|
||||
*(Want to be listed here? Open an Issue or Pull Request!)*
|
||||
|
||||
# Frequently Asked Questions
|
||||
## Is this legal? Can I use this in my own product?
|
||||
**Disclaimer:** I am not a lawyer. The information presented below is purely from available copyright laws that I could find about this topic. You should always consult with a lawyer first before including this in your product.
|
||||
**Disclaimer:** I am not a lawyer. Consult a real lawyer before including this in a paid product. The information presented below is purely from available copyright laws that I could find about this topic. You should always consult with a lawyer first before including this in your product.
|
||||
|
||||
As this only enables interoperability with existing VST 2.x programs and addons, it is considered to be reverse engineering in the name of interoperability. In most of the developed world, this is considered completely legal and is fine to be used by anyone, as long as it is not the only function of the product.
|
||||
|
||||
@@ -12,10 +26,13 @@ Note that this does not grant any patent licenses, nor does it grant you any rig
|
||||
## Why recreate an SDK for something officially abandoned by the creators?
|
||||
There is a ton of software that is only capable of loading VST2.x audio effects, and Steinberg has made no effort to create a VST3-to-VST2-adapter for that software. Notable software includes Audacity and OBS Studio, which both likely felt restricted by the license additions Steinberg added to the GPL license.
|
||||
|
||||
## How did you reverse engineer this?
|
||||
The reverse engineering was done with various tools (mostly disassemblers to x86 assembly code), hooking into system APIs, attempting to mimic functionality through observation and testing, and other methods. Primarily Visual Studio Code was used to write the header files, and Visual Studio 2019 Express was used to create fake VST plugins/hosts to figure out actual behavior.
|
||||
## What was used to create this clean room project?
|
||||
**Disclaimer:** I am not a lawyer. Consult a real lawyer before including this in a paid product.
|
||||
|
||||
### Which binaries were disassembled?
|
||||
* A fake VST2 host (using this header) was created to verify against existing plugins.
|
||||
* A fake VST2 plugin (using this header) was created to verify against existing hosts.
|
||||
* OBS Studio and Audacity were used to verify compatability between closed source and open source VST hosts.
|
||||
The initial version was created through the best available legal clean room reverse engineering method available. The whole process went through several rounds of the "telephone" game involving external developers and lawyers before the final document arrived on my desk. This initial version was barely functional as a lot of context ended up missing resulting in quite basic functionality.
|
||||
|
||||
This version went through several development cycles before settling on what I've now labelled as `v0.1.1`. It was stable and worked for the most part but lacked a lot of features. I've used it as a base for my own plug-ins and had quite a bit of success with it but the incompleteness of the recreated SDK was noticable. Eventually I recreated VST 3.x SDK compatible headers using the VST 3.x SDK which caused the license to upgrade from BSD 2-clause to BSD 3-clause - now known as `v0.2.0`.
|
||||
|
||||
As of late July/early August 2025, I had a found a bit of interest in this SDK again and didn't want to leave it in the incomplete state it was. I've recreated the fake plug-in and host that I used before and decided to automate behavior scanning: What do hosts or plug-ins expect us to do? What do they call? Etc. This was then let loose on several thousand available plug-ins and has resulted in the `v0.3.0` update to the SDK. As far as I can tell the SDK now has almost all functionality that VST 2.x plug-ins and hosts could want.
|
||||
|
||||
There's still a bit of work to do but it won't be easy as almost all of it involves structured data for which I can only guess. Progress is being made, but it's so much slower compared to when I had pages of telephone game documentation to work off of. Still better than nothing!
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* An attempt at an untained clean room reimplementation of the widely popular VST 2.x SDK.
|
||||
* Copyright (c) 2020 Xaymar Dirks <info@xaymar.com> (previously known as Michael Fabian Dirks)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
||||
* following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
||||
* disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
||||
* following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "vst.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
+1088
-203
File diff suppressed because it is too large
Load Diff
@@ -31,8 +31,8 @@
|
||||
// Variable size variant of vst_speaker_arrangement.
|
||||
template<size_t T>
|
||||
struct vst_speaker_arrangement_dynamic_t {
|
||||
VST_ARRANGEMENT_TYPE type; // See VST_SPEAKER_ARRANGEMENT_TYPE
|
||||
int32_t channels; // Number of channels in speakers.
|
||||
VST_SPEAKER_ARRANGEMENT_TYPE type; // See VST_SPEAKER_ARRANGEMENT_TYPE
|
||||
int32_t channels; // Number of channels in speakers.
|
||||
vst_speaker_properties_t speakers[T]; // Array of speaker properties, actual size defined by channels.
|
||||
};
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
#include "vstversion.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum AEffectOpCodes {
|
||||
audioEffectOpen, // Create/Open Effect
|
||||
audioEffectClose, // Destroy/Close Effect
|
||||
audioEffectSetProgram, // Set Program
|
||||
audioEffectGetProgram, // Get Program
|
||||
audioEffectSetProgramName, // Set Program Name
|
||||
audioEffectGetProgramName, // Get Program Name
|
||||
audioEffectGetParameterLabel, // Get Parameter Label
|
||||
audioEffectGetParameterDisplay, // Get Parameter Display
|
||||
audioEffectGetParameterName, // Get Parameter Name
|
||||
AEffectOpCode_09,
|
||||
audioEffectSetSampleRate, // Set Sample Rate
|
||||
audioEffectSetBlockSize, // Set Block Size
|
||||
audioEffectSuspendResume, // Suspend/Resume
|
||||
audioEffectEditorGetSize, // Get Editor Size
|
||||
audioEffectEditorOpen, // Create/Open Editor
|
||||
audioEffectEditorClose, // Destroy/Close Editor
|
||||
AEffectOpCode_10,
|
||||
AEffectOpCode_11,
|
||||
AEffectOpCode_12,
|
||||
audioEffectEditorDoNothing,
|
||||
AEffectOpCode_14,
|
||||
AEffectOpCode_15,
|
||||
AEffectOpCode_16, // Always FOURCC('N', 'v', 'E', 'F')? Might be different for some VST 1.x and 2.x plug-ins. Doesn't seem to be used.
|
||||
audioEffectGetChunk, // Get Chunk
|
||||
audioEffectSetChunk, // Set Chunk
|
||||
|
||||
// All OpCodes above this maximum are version 2.x
|
||||
AEffectOpCodeMax
|
||||
};
|
||||
|
||||
enum AEffectMasterOpCodes {
|
||||
AEffectMasterOpCode_00,
|
||||
audioMasterAutomate = AEffectMasterOpCode_00,
|
||||
AEffectMasterOpCode_01,
|
||||
audioMasterVersion = AEffectMasterOpCode_01,
|
||||
AEffectMasterOpCode_02,
|
||||
AEffectMasterOpCode_03,
|
||||
AEffectMasterOpCode_04,
|
||||
|
||||
// All OpCodes above this maximum are version 2.x
|
||||
AEffectMasterOpCodeMax,
|
||||
};
|
||||
|
||||
enum AEffectFlags { // Guessed name based on struct+field combination.
|
||||
AEffectFlagHasEditor = 1 << 0,
|
||||
AEffectFlagCanReplacing = 1 << 4,
|
||||
AEffectFlagProgramsAreChunks = 1 << 5, // Not sure what this means.
|
||||
AEffectFlagIsSynthesizer = 1 << 8,
|
||||
AEffectFlagIsSilentOnSilence = 1 << 9, // Does not generate tail samples?
|
||||
};
|
||||
|
||||
struct AEffect {
|
||||
VstInt32 magic; // Must be FOURCC('V', 's', 't', 'P')
|
||||
|
||||
VstIntPtr(VstFunctionAPI* control)(AEffect* self, VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value);
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2400)
|
||||
// No 2.4 host ever calls this, processReplacing and processDoubleReplacing seem to be required.
|
||||
[[deprecated]]
|
||||
#endif
|
||||
void(VstFunctionAPI* process)(AEffect* self, float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
|
||||
void(VstFunctionAPI* setParameter)(AEffect* self, VstInt32 index, float value);
|
||||
|
||||
float(VstFunctionAPI* getParameter)(AEffect* self, VstInt32 index);
|
||||
|
||||
VstInt32 numPrograms;
|
||||
VstInt32 numParams;
|
||||
VstInt32 numInputs; // Guessing names here based on the other ones. We already know what their type is anyway.
|
||||
VstInt32 numOutputs;
|
||||
VstInt32 flags; // AEffectFlags, see vst.h for more.
|
||||
|
||||
VstIntPtr __unk04;
|
||||
VstIntPtr __unk05;
|
||||
|
||||
VstInt32 delay;
|
||||
|
||||
VstInt32 __unk06;
|
||||
VstInt32 __unk07;
|
||||
float __unk08;
|
||||
|
||||
void* effect_data; // I think this is effect private data.
|
||||
void* host_data; // And this is host private data.
|
||||
|
||||
VstInt32 uniqueID; // A very collidable unique id. 32 bit is not a lot.
|
||||
VstInt32 version; // VstVersion
|
||||
|
||||
/** Process float data in-place.
|
||||
*
|
||||
* Must be present for 2.4 or later hosts. Make sure you set the proper flag.
|
||||
*
|
||||
* \param inputs Input buffers. Can have pointers used in outputs.
|
||||
* \param outputs Output buffers. Can have pointers used in inputs.
|
||||
* \param sampleFrames Number of samples in all buffers.
|
||||
*/
|
||||
void(VstFunctionAPI* processReplacing)(AEffect* self, float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2400)
|
||||
// These only appear in version >= 2.4
|
||||
|
||||
/** Process double data in-place.
|
||||
*
|
||||
* \param inputs Input buffers. Can have pointers used in outputs.
|
||||
* \param outputs Output buffers. Can have pointers used in inputs.
|
||||
* \param sampleFrames Number of samples in all buffers.
|
||||
*/
|
||||
void(VstFunctionAPI* processDoubleReplacing)(AEffect* self, double** inputs, double** outputs, VstInt32 sampleFrames);
|
||||
|
||||
char __unk12[56];
|
||||
#else
|
||||
char __unk12[60];
|
||||
#endif
|
||||
};
|
||||
|
||||
// Master callback.
|
||||
typedef VstIntPtr(VstFunctionAPI* audioMasterCallback)(AEffect*, VstInt32 opcode, VstInt32, VstInt32, void* ptr, float);
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,178 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
// File name based on "AudioEffectX" and "AudioEffect". Since we have a struct called "AEffect", logically there's a struct AEffectX right? Don't see any references to it though...
|
||||
|
||||
#pragma once
|
||||
#include "aeffect.h"
|
||||
#include "vstpin.h"
|
||||
#include "vsttime.h"
|
||||
#include "vstversion.h"
|
||||
|
||||
enum AEffectXFlags {
|
||||
AEffectFlagCanDoubleReplacing = 1 << 12, // Only available in 2.4 or later. Name based on AudioEffect::canDoubleReplacing
|
||||
};
|
||||
|
||||
enum AEffectXOpCodes {
|
||||
__AEffectXOpCode_Lowest = 0x18, // Starts at highest OpCode from AEffect.
|
||||
AEffectXOpCode_19,
|
||||
audioEffectProcessEvents, // Process Events
|
||||
audioEffectIsParameterAutomatable, // Is Parameter Automatable?
|
||||
audioEffectConvertStringToParameter, // Convert String to Parameter index
|
||||
audioEffectGetProgramNameIndexed,
|
||||
AEffectXOpCode_1E,
|
||||
AEffectXOpCode_1F,
|
||||
AEffectXOpCode_20,
|
||||
audioEffectGetInputProperties, // Get Input Properties
|
||||
audioEffectGetOutputProperties, // Get Output Properties
|
||||
audioEffectGetPlugCategory, // Get "Plug" Category
|
||||
AEffectXOpCode_24,
|
||||
AEffectXOpCode_25,
|
||||
AEffectXOpCode_26,
|
||||
AEffectXOpCode_27,
|
||||
AEffectXOpCode_28,
|
||||
AEffectXOpCode_29,
|
||||
audioEffectSetSpeakerArrangement, // Set Speaker Arrangment
|
||||
AEffectXOpCode_2B,
|
||||
audioEffectBypass, // Bypass
|
||||
audioEffectGetEffectName, // Get Effect Name
|
||||
AEffectXOpCode_2E,
|
||||
audioEffectGetVendorString, // Get Vendor Name
|
||||
audioEffectGetProductString, // Get Product Name
|
||||
audioEffectGetVendorVersion, // Get Vendor Version
|
||||
audioEffectVendorSpecific, // Seems to be used rarely to implement host-specific custom behavior.
|
||||
audioEffectCanDo, // Test for Feature support
|
||||
audioEffectGetTailSize, // Get Tail Samples
|
||||
AEffectXOpCode_35,
|
||||
AEffectXOpCode_36,
|
||||
AEffectXOpCode_37,
|
||||
audioEffectGetParameterProperties,
|
||||
AEffectXOpCode_39,
|
||||
audioEffectGetVSTVersion, // Get VST Version
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2100)
|
||||
// Only seen in version 2.1 or later
|
||||
audioEffectEditorKeyDown, // Key Down in Editor.
|
||||
audioEffectEditorKeyUp, // Key Up in Editor
|
||||
audioEffectEditorKnobMode, // Editor Knob Mode, see CKnobMode in vstgui.
|
||||
audioEffectMidiGetProgramName,
|
||||
audioEffectMidiGetCurrentProgram,
|
||||
audioEffectMidiGetProgramCategory,
|
||||
audioEffectMidiHasProgramsChanged,
|
||||
audioEffectMidiGetKeyName,
|
||||
AEffectXOpCode_43,
|
||||
AEffectXOpCode_44,
|
||||
#endif
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2300)
|
||||
// Only seen in version 2.3 or later
|
||||
audioEffectGetSpeakerArrangement, // Get Speaker Arrangement
|
||||
AEffectXOpCode_46,
|
||||
audioEffectStartProcessing, // Start processing audio.
|
||||
audioEffectStopProcessing, // Stop processing audio.
|
||||
AEffectXOpCode_49,
|
||||
AEffectXOpCode_4A,
|
||||
AEffectXOpCode_4B,
|
||||
AEffectXOpCode_4C,
|
||||
#endif
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2400)
|
||||
// Only seen in version 2.4 or later.
|
||||
audioEffectSetProcessingPrecision, // Set Processing Precision, see VstProcessPrecision
|
||||
audioEffectMidiGetNumInputChannels,
|
||||
audioEffectMidiGetNumOutputChannels,
|
||||
#endif
|
||||
|
||||
// Never seen any OpCodes at or above this maximum.
|
||||
AEffectXOpCodeMax
|
||||
};
|
||||
|
||||
enum AEffectXMasterOpCodes {
|
||||
__AEffectXMasterOpCodeLowest = 0x04,
|
||||
AEffectXMasterOpCode_05, // Appears to be unused entirely.
|
||||
AEffectXMasterOpCode_06,
|
||||
audioMasterGetTimeInfo, // Get Time Info. Name guessed based on AudioEffectX::getTimeInfo
|
||||
audioMasterProcessEvents, // Name guessed based on AudioEffectX::sendVstEventsToHost. Name is likely a mirror of audioEffectsProcessEvents.
|
||||
AEffectXMasterOpCode_09,
|
||||
AEffectXMasterOpCode_0A,
|
||||
AEffectXMasterOpCode_0B,
|
||||
AEffectXMasterOpCode_0C,
|
||||
audioMasterIOChanged, // Notify Host that our Inputs/Outputs/etc have changed. Name guessed based on AudioEffectX::ioChanged
|
||||
AEffectXMasterOpCode_0E,
|
||||
audioMasterSizeWindow, // Request a resize of the editor window. Name guessed based on AudioEffectX::sizeWindow
|
||||
AEffectXMasterOpCode_10,
|
||||
AEffectXMasterOpCode_11,
|
||||
AEffectXMasterOpCode_12,
|
||||
AEffectXMasterOpCode_13,
|
||||
AEffectXMasterOpCode_14,
|
||||
AEffectXMasterOpCode_15,
|
||||
AEffectXMasterOpCode_16,
|
||||
audioMasterGetCurrentProcessLevel, // Name guessed based on AudioEffectX::getCurrentProcessLevel
|
||||
AEffectXMasterOpCode_18,
|
||||
AEffectXMasterOpCode_19,
|
||||
AEffectXMasterOpCode_1A,
|
||||
AEffectXMasterOpCode_1B,
|
||||
AEffectXMasterOpCode_1C,
|
||||
AEffectXMasterOpCode_1D,
|
||||
AEffectXMasterOpCode_1E,
|
||||
AEffectXMasterOpCode_1F,
|
||||
audioMasterGetVendorString, // Get Vendor Name
|
||||
audioMasterGetProductString, // Get Product Name
|
||||
audioMasterGetVendorVersion, // Get Vendor Version
|
||||
audioMasterVendorSpecific, // Counterpart to AEffectXOpCode_32
|
||||
audioMasterCanDo,
|
||||
AEffectXMasterOpCode_25,
|
||||
AEffectXMasterOpCode_26,
|
||||
AEffectXMasterOpCode_27,
|
||||
AEffectXMasterOpCode_28,
|
||||
AEffectXMasterOpCode_29, // When called, returns a pointer to a string.
|
||||
audioMasterUpdateDisplay, // Request an update for the editor display? Name guessed via AudioEffectX::updateDisplay
|
||||
audioMasterBeginEdit, // Parameter Gained Focus. Likely used to help the host ignore unwanted inputs. Name guessed via AudioEffectX::beginEdit
|
||||
audioMasterEndEdit, // Parameter Lost Focus. Likely used to help the host ignore unwanted inputs. Name guessed via AudioEffectX::endEdit
|
||||
AEffectXMasterOpCode_2D,
|
||||
AEffectXMasterOpCode_2E,
|
||||
AEffectXMasterOpCode_2F,
|
||||
AEffectXMasterOpCode_30,
|
||||
AEffectXMasterOpCode_31,
|
||||
|
||||
AEffectXMasterOpCodeMax
|
||||
};
|
||||
|
||||
enum VstPlugCategory { // Based on OpCode being here only.
|
||||
// Taken from VstPlugCategory Vst2Wrapper::getPlugCategory (), then shuffled around until it made sense in most VST hosts.
|
||||
kPlugCategUnknown = 0,
|
||||
kPlugCategEffect,
|
||||
kPlugCategSynth,
|
||||
kPlugCategAnalysis,
|
||||
kPlugCategMastering,
|
||||
kPlugCategSpacializer,
|
||||
kPlugCategRoomFx,
|
||||
kPlugCateg__unk00, // Unknown use.
|
||||
kPlugCategRestoration,
|
||||
kPlugCateg__unk01, // Unknown use.
|
||||
kPlugCategContainer, // AEffectX contains multiple plugins. Not clear how this works.
|
||||
kPlugCategGenerator,
|
||||
};
|
||||
|
||||
enum VstProcessLevels {
|
||||
// No idea what the rest are.
|
||||
kVstProcessLevelRealtime = 2,
|
||||
kVstProcessLevelOffline = 4,
|
||||
};
|
||||
|
||||
enum VstProcessPrecision {
|
||||
kVstProcessPrecision32, // Single
|
||||
kVstProcessPrecision64, // Double
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "aeffeditor.hpp"
|
||||
|
||||
AEffEditor::AEffEditor(AudioEffect* effect) : effect(effect), _handle() {}
|
||||
|
||||
AEffEditor::~AEffEditor() {}
|
||||
|
||||
bool AEffEditor::open(void* ptr)
|
||||
{
|
||||
if (!_handle) {
|
||||
_handle = ptr;
|
||||
return ptr;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void AEffEditor::close()
|
||||
{
|
||||
_handle = nullptr;
|
||||
return;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "aeffeditor.hpp"
|
||||
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vstkey.h"
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
class AudioEffect;
|
||||
|
||||
class AEffEditor {
|
||||
public:
|
||||
AEffEditor(AudioEffect* effect);
|
||||
virtual ~AEffEditor();
|
||||
|
||||
virtual bool getRect(ERect** rect)
|
||||
{
|
||||
//*rect = nullptr;
|
||||
return false;
|
||||
}
|
||||
virtual bool open(void* ptr);
|
||||
virtual void close();
|
||||
virtual void do_nothing()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2100)
|
||||
virtual bool setKnobMode(VstInt32 val)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool onKeyDown(VstKeyCode& keyCode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool onKeyUp(VstKeyCode& keyCode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool onWheel(float distance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
AudioEffect* effect; // Restricted to this name by vst2wrapper.
|
||||
void* _handle;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,177 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "audioeffect.hpp"
|
||||
#include <cstring>
|
||||
#include "aeffect.h"
|
||||
|
||||
#define FOURCC(a, b, c, d) ((a << 24) | (b << 16) | (c << 8) | d)
|
||||
|
||||
AudioEffect::AudioEffect(audioMasterCallback p_audioMaster, VstInt32 __unk00, VstInt32 __unk01)
|
||||
{
|
||||
memset(&cEffect, 0, sizeof(AEffect));
|
||||
cEffect.magic = FOURCC('V', 's', 't', 'P');
|
||||
cEffect.effect_data = this;
|
||||
#if (!defined VST_VERSION_SUPPORT)
|
||||
cEffect.version = kVstVersion_2400;
|
||||
#else
|
||||
cEffect.version = VST_VERSION_SUPPORT;
|
||||
#endif
|
||||
cEffect.control = [](AEffect* self, VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value) { return reinterpret_cast<AudioEffect*>(self->effect_data)->control(opcode, param1, param2, ptr, value); };
|
||||
cEffect.process = [](AEffect* self, float** inputs, float** outputs, VstInt32 sampleFrames) { return reinterpret_cast<AudioEffect*>(self->effect_data)->process(inputs, outputs, sampleFrames); };
|
||||
cEffect.setParameter = [](AEffect* self, VstInt32 index, float value) { reinterpret_cast<AudioEffect*>(self->effect_data)->setParameter(index, value); };
|
||||
cEffect.getParameter = [](AEffect* self, VstInt32 index) { return reinterpret_cast<AudioEffect*>(self->effect_data)->getParameter(index); };
|
||||
cEffect.processReplacing = [](AEffect* self, float** inputs, float** outputs, VstInt32 sampleFrames) { return reinterpret_cast<AudioEffect*>(self->effect_data)->processReplacing(inputs, outputs, sampleFrames); };
|
||||
|
||||
audioMaster = p_audioMaster;
|
||||
numPrograms = cEffect.numPrograms;
|
||||
curProgram = 0;
|
||||
editor = nullptr;
|
||||
}
|
||||
|
||||
AudioEffect::~AudioEffect() {}
|
||||
|
||||
VstIntPtr AudioEffect::control(VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value)
|
||||
{
|
||||
switch (opcode) {
|
||||
case audioEffectOpen:
|
||||
open();
|
||||
break;
|
||||
case audioEffectClose:
|
||||
close();
|
||||
break;
|
||||
case audioEffectSetProgram:
|
||||
setProgram(param1);
|
||||
break;
|
||||
case audioEffectGetProgram:
|
||||
return getProgram();
|
||||
case audioEffectSetProgramName:
|
||||
setProgramName((char*)ptr);
|
||||
break;
|
||||
case audioEffectGetProgramName:
|
||||
getProgramName((char*)ptr);
|
||||
break;
|
||||
case audioEffectGetParameterLabel:
|
||||
getParameterLabel(param1, (char*)ptr);
|
||||
break;
|
||||
case audioEffectGetParameterDisplay:
|
||||
getParameterDisplay(param1, (char*)ptr);
|
||||
break;
|
||||
case audioEffectGetParameterName:
|
||||
getParameterName(param1, (char*)ptr);
|
||||
break;
|
||||
case audioEffectSetSampleRate:
|
||||
setSampleRate(value);
|
||||
break;
|
||||
case audioEffectSetBlockSize:
|
||||
setBlockSize(static_cast<VstInt32>(value));
|
||||
break;
|
||||
case audioEffectSuspendResume:
|
||||
if (!param2) {
|
||||
suspend();
|
||||
} else {
|
||||
resume();
|
||||
}
|
||||
break;
|
||||
case audioEffectEditorGetSize:
|
||||
if (editor) {
|
||||
return editor->getRect((ERect**)ptr) ? 1 : 0;
|
||||
}
|
||||
break;
|
||||
case audioEffectEditorOpen:
|
||||
if (editor) {
|
||||
return editor->open(ptr);
|
||||
}
|
||||
break;
|
||||
case audioEffectEditorClose:
|
||||
if (editor) {
|
||||
editor->close();
|
||||
}
|
||||
break;
|
||||
case audioEffectEditorDoNothing: // Occasionally appears. Does nothing? Only called when editor is open.
|
||||
if (editor) {
|
||||
editor->do_nothing();
|
||||
}
|
||||
break;
|
||||
case audioEffectGetChunk:
|
||||
return getChunk((void**)ptr, !!param1);
|
||||
case audioEffectSetChunk:
|
||||
return setChunk(ptr, static_cast<VstInt32>(value), !!param1);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
AEffect* AudioEffect::getAeffect()
|
||||
{
|
||||
return &cEffect;
|
||||
}
|
||||
|
||||
void AudioEffect::setEditor(AEffEditor* p_editor)
|
||||
{
|
||||
editor = p_editor;
|
||||
}
|
||||
|
||||
void AudioEffect::setUniqueID(VstInt32 uniqueID)
|
||||
{
|
||||
cEffect.uniqueID = uniqueID;
|
||||
}
|
||||
|
||||
void AudioEffect::setNumInputs(VstInt32 numInputs)
|
||||
{
|
||||
cEffect.numInputs = numInputs;
|
||||
}
|
||||
|
||||
void AudioEffect::setNumOutputs(VstInt32 numOutputs)
|
||||
{
|
||||
cEffect.numOutputs = numOutputs;
|
||||
}
|
||||
|
||||
void AudioEffect::setInitialDelay(VstInt32 delay)
|
||||
{
|
||||
cEffect.delay = delay;
|
||||
}
|
||||
|
||||
void AudioEffect::canProcessReplacing(bool value)
|
||||
{
|
||||
if (value)
|
||||
cEffect.flags |= AEffectFlagCanReplacing;
|
||||
else
|
||||
cEffect.flags &= ~AEffectFlagCanReplacing;
|
||||
}
|
||||
|
||||
void AudioEffect::isSynth(bool value)
|
||||
{
|
||||
if (value)
|
||||
cEffect.flags |= AEffectFlagIsSynthesizer;
|
||||
else
|
||||
cEffect.flags &= ~AEffectFlagIsSynthesizer;
|
||||
}
|
||||
|
||||
void AudioEffect::programsAreChunks(bool value)
|
||||
{
|
||||
if (value)
|
||||
cEffect.flags |= AEffectFlagProgramsAreChunks;
|
||||
else
|
||||
cEffect.flags &= ~AEffectFlagProgramsAreChunks;
|
||||
}
|
||||
|
||||
void AudioEffect::setParameterAutomated(VstInt32 index, float value)
|
||||
{
|
||||
setParameter(index, value);
|
||||
if (audioMaster)
|
||||
audioMaster(getAeffect(), audioMasterAutomate, index, 0, 0, value);
|
||||
}
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "aeffect.h"
|
||||
#include "aeffeditor.h"
|
||||
#include "vstevent.h"
|
||||
#include "vstkey.h"
|
||||
#include "vstparameter.h"
|
||||
#include "vstpin.h"
|
||||
#include "vstspeaker.h"
|
||||
#include "vsttypes.h"
|
||||
|
||||
// This may work. Or it may not. We don't guarantee compatibility with the original.
|
||||
class AudioEffect {
|
||||
public:
|
||||
AudioEffect(audioMasterCallback audioMaster, VstInt32 __unk00, VstInt32 __unk01);
|
||||
virtual ~AudioEffect();
|
||||
|
||||
protected:
|
||||
// Internal
|
||||
virtual VstIntPtr control(VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value);
|
||||
|
||||
public:
|
||||
// AudioEffect
|
||||
virtual AEffect* getAeffect();
|
||||
virtual void setEditor(AEffEditor* editor);
|
||||
|
||||
virtual void process(float** inputs, float** outputs, VstInt32 sampleFrames){};
|
||||
|
||||
virtual float getParameter(VstInt32 index)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void setParameter(VstInt32 index, float value){};
|
||||
|
||||
virtual void processReplacing(float** inputs, float** outputs, VstInt32 sampleFrames){};
|
||||
|
||||
// AEffect
|
||||
virtual void setUniqueID(VstInt32 uniqueID);
|
||||
virtual void setNumInputs(VstInt32 numInputs);
|
||||
virtual void setNumOutputs(VstInt32 numOutputs);
|
||||
virtual void setInitialDelay(VstInt32 delay);
|
||||
virtual void canProcessReplacing(bool value);
|
||||
virtual void isSynth(bool value);
|
||||
virtual void programsAreChunks(bool value);
|
||||
|
||||
// Audio Master (sorted by AEffectMasterOpCodes)
|
||||
virtual void setParameterAutomated(VstInt32 index, float value);
|
||||
|
||||
// Audio Plugin (sorted by AEffectOpCodes)
|
||||
virtual void open(){};
|
||||
virtual void close(){};
|
||||
virtual void setProgram(VstInt32 program){};
|
||||
virtual VstInt32 getProgram()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual void setProgramName(char* name){};
|
||||
virtual void getProgramName(char* name)
|
||||
{
|
||||
*name = 0;
|
||||
}
|
||||
virtual void getParameterLabel(VstInt32 index, char* label){};
|
||||
virtual void getParameterDisplay(VstInt32 index, char* text){};
|
||||
virtual void getParameterName(VstInt32 index, char* text){};
|
||||
virtual void setSampleRate(float newSamplerate){};
|
||||
virtual void setBlockSize(VstInt32 newBlockSize){};
|
||||
virtual void suspend(){};
|
||||
virtual void resume(){};
|
||||
virtual VstInt32 getChunk(void** data, bool isPreset = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 setChunk(void* data, VstInt32 byteSize, bool isPreset = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Defined by Implementation
|
||||
|
||||
protected: // Needs to be accessible by AudioEffectX
|
||||
AEffect cEffect; // vst2wrapper requires this.
|
||||
audioMasterCallback audioMaster; // vst2wrapper requires this.
|
||||
VstInt32 numPrograms;
|
||||
VstInt32 curProgram;
|
||||
AEffEditor* editor;
|
||||
};
|
||||
@@ -1,220 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "audioeffectx.hpp"
|
||||
#include "vstkey.h"
|
||||
|
||||
AudioEffectX::AudioEffectX(audioMasterCallback audioMaster, VstInt32 __unk00, VstInt32 __unk01) : AudioEffect(audioMaster, __unk00, __unk01)
|
||||
{
|
||||
cEffect.processDoubleReplacing = [](AEffect* self, double** inputs, double** outputs, VstInt32 sampleFrames) { return reinterpret_cast<AudioEffectX*>(self->effect_data)->processDoubleReplacing(inputs, outputs, sampleFrames); };
|
||||
}
|
||||
|
||||
AudioEffectX::~AudioEffectX() {}
|
||||
|
||||
VstIntPtr AudioEffectX::control(VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value)
|
||||
{
|
||||
switch (opcode) {
|
||||
case audioEffectProcessEvents:
|
||||
return processEvents((VstEvents*)ptr);
|
||||
case audioEffectIsParameterAutomatable:
|
||||
return canParameterBeAutomated(param1) ? 1 : 0;
|
||||
case audioEffectConvertStringToParameter:
|
||||
return string2parameter(param1, (char*)ptr) ? 1 : 0;
|
||||
case audioEffectGetProgramNameIndexed:
|
||||
return getProgramNameIndexed(static_cast<VstInt32>(value), param1, (char*)ptr) ? 1 : 0;
|
||||
case audioEffectGetInputProperties:
|
||||
return getInputProperties(param1, (VstPinProperties*)ptr);
|
||||
case audioEffectGetOutputProperties:
|
||||
return getOutputProperties(param1, (VstPinProperties*)ptr);
|
||||
case audioEffectGetPlugCategory:
|
||||
return (VstIntPtr)getPlugCategory();
|
||||
case audioEffectSetSpeakerArrangement:
|
||||
return setSpeakerArrangement((VstSpeakerArrangement*)param2, (VstSpeakerArrangement*)ptr);
|
||||
case audioEffectBypass:
|
||||
return setBypass(!!param2) ? 1 : 0;
|
||||
case audioEffectGetEffectName:
|
||||
return getEffectName((char*)ptr) ? 1 : 0;
|
||||
case audioEffectGetVendorString:
|
||||
return getVendorString((char*)ptr) ? 1 : 0;
|
||||
case audioEffectGetProductString:
|
||||
return getProductString((char*)ptr) ? 1 : 0;
|
||||
case audioEffectGetVendorVersion:
|
||||
return getVendorVersion();
|
||||
case audioEffectVendorSpecific:
|
||||
return vendorSpecific(param1, param2, ptr, value);
|
||||
case audioEffectCanDo:
|
||||
return canDo((char*)ptr);
|
||||
case audioEffectGetTailSize:
|
||||
return getGetTailSize();
|
||||
case audioEffectGetParameterProperties:
|
||||
return getParameterProperties(param1, (VstParameterProperties*)ptr) ? 1 : 0;
|
||||
case audioEffectGetVSTVersion:
|
||||
return cEffect.version;
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2100)
|
||||
case audioEffectEditorKeyDown:
|
||||
if (editor) {
|
||||
VstKeyCode keycode{.character = param1, .virt = static_cast<unsigned char>(param2), .modifier = static_cast<unsigned char>(value)};
|
||||
editor->onKeyDown(keycode);
|
||||
}
|
||||
return 0;
|
||||
case audioEffectEditorKeyUp:
|
||||
if (editor) {
|
||||
VstKeyCode keycode{.character = param1, .virt = static_cast<unsigned char>(param2), .modifier = static_cast<unsigned char>(value)};
|
||||
editor->onKeyUp(keycode);
|
||||
}
|
||||
return 0;
|
||||
case audioEffectEditorKnobMode:
|
||||
if (editor) {
|
||||
editor->setKnobMode(param2) ? 1 : 0;
|
||||
}
|
||||
return 0;
|
||||
case audioEffectMidiGetProgramName:
|
||||
return getMidiProgramName(param1, (MidiProgramName*)ptr);
|
||||
case audioEffectMidiGetCurrentProgram:
|
||||
return getCurrentMidiProgram(param1, (MidiProgramName*)ptr);
|
||||
case audioEffectMidiGetProgramCategory:
|
||||
return getMidiProgramCategory(param1, (MidiProgramCategory*)ptr);
|
||||
case audioEffectMidiHasProgramsChanged:
|
||||
return hasMidiProgramsChanged(param1) ? 1 : 0;
|
||||
case audioEffectMidiGetKeyName:
|
||||
return getMidiKeyName(param1, (MidiKeyName*)ptr) ? 1 : 0;
|
||||
#endif
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2300)
|
||||
case audioEffectGetSpeakerArrangement:
|
||||
return getSpeakerArrangement((VstSpeakerArrangement**)param2, (VstSpeakerArrangement**)ptr);
|
||||
case audioEffectStartProcessing:
|
||||
return startProcess();
|
||||
case audioEffectStopProcessing:
|
||||
return stopProcess();
|
||||
#endif
|
||||
|
||||
#if (!defined VST_VERSION_SUPPORT) || (VST_VERSION_SUPPORT >= kVstVersion_2400)
|
||||
case audioEffectSetProcessingPrecision:
|
||||
return setProcessPrecision(param1) ? 1 : 0;
|
||||
case audioEffectMidiGetNumInputChannels:
|
||||
return getNumMidiInputChannels();
|
||||
case audioEffectMidiGetNumOutputChannels:
|
||||
return getNumMidiOutputChannels();
|
||||
#endif
|
||||
default:
|
||||
return AudioEffect::control(opcode, param1, param2, ptr, value);
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 AudioEffectX::canHostDo(char* text)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterCanDo, 0, 0, text, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::beginEdit(VstInt32 paramIndex)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterBeginEdit, paramIndex, 0, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::endEdit(VstInt32 paramIndex)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterEndEdit, paramIndex, 0, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::ioChanged()
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterIOChanged, 0, 0, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::updateDisplay()
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterUpdateDisplay, 0, 0, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::sizeWindow(VstInt32 width, VstInt32 height)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterSizeWindow, width, height, 0, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
VstInt32 AudioEffectX::getCurrentProcessLevel()
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterGetCurrentProcessLevel, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioEffectX::getHostVendorString(char* text)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterGetVendorString, 0, 0, text, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AudioEffectX::getHostProductString(char* text)
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterGetProductString, 0, 0, text, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
VstInt32 AudioEffectX::getHostVendorVersion()
|
||||
{
|
||||
if (audioMaster)
|
||||
return !!audioMaster(getAeffect(), audioMasterGetVendorVersion, 0, 0, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void AudioEffectX::canDoubleReplacing(bool value)
|
||||
{
|
||||
if (value)
|
||||
cEffect.flags |= AEffectFlagCanDoubleReplacing;
|
||||
else
|
||||
cEffect.flags &= ~AEffectFlagCanDoubleReplacing;
|
||||
}
|
||||
|
||||
void AudioEffectX::noTail(bool value)
|
||||
{
|
||||
if (value)
|
||||
cEffect.flags |= AEffectFlagIsSilentOnSilence;
|
||||
else
|
||||
cEffect.flags &= ~AEffectFlagIsSilentOnSilence;
|
||||
}
|
||||
|
||||
VstTimeInfo* AudioEffectX::getTimeInfo(VstInt32 filter)
|
||||
{
|
||||
if (audioMaster) {
|
||||
auto ptr = audioMaster(getAeffect(), audioMasterGetTimeInfo, 0, filter, 0, 0);
|
||||
// Returned value should be a pointer to a VstTimeInfo.
|
||||
return reinterpret_cast<VstTimeInfo*>(ptr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool AudioEffectX::sendVstEventsToHost(VstEvents* events)
|
||||
{
|
||||
if (audioMaster) {
|
||||
audioMaster(getAeffect(), audioMasterProcessEvents, 0, 0, events, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is based on the publicly available VST 3.x SDK "vst2wrapper" files. All content is as such licensed under the BSD 3-Clause license provided in those files, and also shown above.
|
||||
*
|
||||
* Assume that everything here is guesswork. It seems to work, but is largely unconfirmed.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "audioeffectx.hpp"
|
||||
@@ -1,167 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "aeffectx.h"
|
||||
#include "audioeffect.hpp"
|
||||
#include "vstmidi.h"
|
||||
#include "vstpin.h"
|
||||
#include "vstspeaker.h"
|
||||
#include "vsttypes.h"
|
||||
|
||||
class AudioEffectX : public AudioEffect {
|
||||
public:
|
||||
AudioEffectX(audioMasterCallback audioMaster, VstInt32 __unk00, VstInt32 __unk01);
|
||||
virtual ~AudioEffectX();
|
||||
|
||||
protected:
|
||||
// Internal
|
||||
virtual VstIntPtr control(VstInt32 opcode, VstInt32 param1, VstIntPtr param2, void* ptr, float value) override;
|
||||
|
||||
public:
|
||||
// AEffect/AEffectX
|
||||
virtual void canDoubleReplacing(bool value);
|
||||
virtual void noTail(bool value);
|
||||
|
||||
virtual void processDoubleReplacing(double** inputs, double** outputs, VstInt32 sampleFrames){};
|
||||
|
||||
// Audio Master (sorted by AEffectMasterOpCodes)
|
||||
virtual VstTimeInfo* getTimeInfo(VstInt32 filter);
|
||||
virtual bool sendVstEventsToHost(VstEvents* events);
|
||||
virtual bool ioChanged();
|
||||
virtual bool sizeWindow(VstInt32 width, VstInt32 height);
|
||||
virtual VstInt32 getCurrentProcessLevel();
|
||||
virtual bool getHostVendorString(char* text);
|
||||
virtual bool getHostProductString(char* text);
|
||||
virtual VstInt32 getHostVendorVersion();
|
||||
virtual VstInt32 canHostDo(char* text);
|
||||
virtual bool beginEdit(VstInt32 paramIndex);
|
||||
virtual bool endEdit(VstInt32 paramIndex);
|
||||
virtual bool updateDisplay();
|
||||
|
||||
// Audio Plugin (sorted by AEffectOpCodes)
|
||||
virtual VstInt32 processEvents(VstEvents* events)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual bool canParameterBeAutomated(VstInt32 index)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool string2parameter(VstInt32 index, char* text)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getProgramNameIndexed(VstInt32 category, VstInt32 index, char* text)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getInputProperties(VstInt32 index, VstPinProperties* properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getOutputProperties(VstInt32 index, VstPinProperties* properties)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual VstPlugCategory getPlugCategory()
|
||||
{
|
||||
return kPlugCategUnknown;
|
||||
}
|
||||
virtual bool setSpeakerArrangement(VstSpeakerArrangement* pluginInput, VstSpeakerArrangement* pluginOutput)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool setBypass(bool onOff)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getEffectName(char* name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getVendorString(char* text)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getProductString(char* text)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual VstInt32 getVendorVersion()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstIntPtr vendorSpecific(VstInt32 lArg, VstIntPtr lArg2, void* ptrArg, float floatArg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 canDo(char* text)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 getGetTailSize()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual bool getParameterProperties(VstInt32 index, VstParameterProperties* p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual VstInt32 getMidiProgramName(VstInt32 channel, MidiProgramName* midiProgramName)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 getCurrentMidiProgram(VstInt32 channel, MidiProgramName* currentProgram)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 getMidiProgramCategory(VstInt32 channel, MidiProgramCategory* category)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual bool hasMidiProgramsChanged(VstInt32 channel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getMidiKeyName(VstInt32 channel, MidiKeyName* keyName)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual bool getSpeakerArrangement(VstSpeakerArrangement** pluginInput, VstSpeakerArrangement** pluginOutput)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual VstInt32 startProcess()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 stopProcess()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual bool setProcessPrecision(VstInt32 precision)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual VstInt32 getNumMidiInputChannels()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
virtual VstInt32 getNumMidiOutputChannels()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstEventTypes {
|
||||
kVstMidiType = 1,
|
||||
kVstSysExType = 6,
|
||||
};
|
||||
|
||||
struct VstEvent {
|
||||
VstInt32 type;
|
||||
VstInt32 byteSize;
|
||||
VstInt32 deltaFrames;
|
||||
VstInt32 flags;
|
||||
// ? bytes
|
||||
};
|
||||
|
||||
struct VstEvents {
|
||||
VstInt32 numEvents;
|
||||
VstInt32 reserved;
|
||||
VstEvent* events[2];
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,100 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
// vstgui4 has a perfect implementation of this just lying around.
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstModifierKey {
|
||||
MODIFIER_SHIFT = 1 << 0, // Shift
|
||||
MODIFIER_ALTERNATE = 1 << 1, // Alt
|
||||
MODIFIER_COMMAND = 1 << 2, // Control on Mac
|
||||
MODIFIER_CONTROL = 1 << 3 // Ctrl on PC, Apple on Mac
|
||||
};
|
||||
|
||||
enum VstVirtualKey {
|
||||
VKEY_BACK = 1,
|
||||
VKEY_TAB,
|
||||
VKEY_CLEAR,
|
||||
VKEY_RETURN,
|
||||
VKEY_PAUSE,
|
||||
VKEY_ESCAPE,
|
||||
VKEY_SPACE,
|
||||
VKEY_NEXT,
|
||||
VKEY_END,
|
||||
VKEY_HOME,
|
||||
|
||||
VKEY_LEFT,
|
||||
VKEY_UP,
|
||||
VKEY_RIGHT,
|
||||
VKEY_DOWN,
|
||||
VKEY_PAGEUP,
|
||||
VKEY_PAGEDOWN,
|
||||
|
||||
VKEY_SELECT,
|
||||
VKEY_PRINT,
|
||||
VKEY_ENTER,
|
||||
VKEY_SNAPSHOT,
|
||||
VKEY_INSERT,
|
||||
VKEY_DELETE,
|
||||
VKEY_HELP,
|
||||
VKEY_NUMPAD0,
|
||||
VKEY_NUMPAD1,
|
||||
VKEY_NUMPAD2,
|
||||
VKEY_NUMPAD3,
|
||||
VKEY_NUMPAD4,
|
||||
VKEY_NUMPAD5,
|
||||
VKEY_NUMPAD6,
|
||||
VKEY_NUMPAD7,
|
||||
VKEY_NUMPAD8,
|
||||
VKEY_NUMPAD9,
|
||||
VKEY_MULTIPLY,
|
||||
VKEY_ADD,
|
||||
VKEY_SEPARATOR,
|
||||
VKEY_SUBTRACT,
|
||||
VKEY_DECIMAL,
|
||||
VKEY_DIVIDE,
|
||||
VKEY_F1,
|
||||
VKEY_F2,
|
||||
VKEY_F3,
|
||||
VKEY_F4,
|
||||
VKEY_F5,
|
||||
VKEY_F6,
|
||||
VKEY_F7,
|
||||
VKEY_F8,
|
||||
VKEY_F9,
|
||||
VKEY_F10,
|
||||
VKEY_F11,
|
||||
VKEY_F12,
|
||||
VKEY_NUMLOCK,
|
||||
VKEY_SCROLL,
|
||||
|
||||
VKEY_SHIFT,
|
||||
VKEY_CONTROL,
|
||||
VKEY_ALT,
|
||||
|
||||
VKEY_EQUALS
|
||||
};
|
||||
|
||||
struct VstKeyCode {
|
||||
VstInt32 character;
|
||||
unsigned char virt; // see enum VstVirtualKey
|
||||
unsigned char modifier; // see enum VstModifierKey
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
#include "vstversion.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstMidiEventFlags {
|
||||
kVstMidiEventIsRealtime,
|
||||
};
|
||||
|
||||
struct VstMidiEvent : VstEvent {
|
||||
VstInt32 noteLength;
|
||||
VstInt32 noteOffset;
|
||||
char midiData[4];
|
||||
char detune;
|
||||
char noteOffVelocity;
|
||||
char __unk00;
|
||||
char __unk01;
|
||||
};
|
||||
|
||||
struct VstMidiSysexEvent : VstEvent {
|
||||
VstInt32 dumpBytes;
|
||||
VstIntPtr __unk00;
|
||||
char* sysexDump;
|
||||
VstIntPtr __unk01;
|
||||
};
|
||||
|
||||
struct MidiKeyName {
|
||||
VstInt32 thisProgramIndex;
|
||||
VstInt32 thisKeyNumber;
|
||||
char keyName[kVstMaxNameLen];
|
||||
VstInt32 __unk00;
|
||||
VstInt32 __unk01;
|
||||
};
|
||||
|
||||
struct MidiProgramName {
|
||||
VstInt32 thisProgramIndex;
|
||||
char name[kVstMaxNameLen];
|
||||
VstInt32 midiProgram; // Could be swapped with thisProgramIndex?
|
||||
VstInt32 midiBankMsb;
|
||||
VstInt32 midiBankLsb;
|
||||
VstInt32 __unk01;
|
||||
VstInt32 parentCategoryIndex; // -1 appears to mean no category.
|
||||
VstInt32 flags;
|
||||
};
|
||||
|
||||
struct MidiProgramCategory {
|
||||
VstInt32 thisCategoryIndex;
|
||||
char name[kVstMaxNameLen]; // Name guessed, but might be wrong. Doesn't seem to be used.
|
||||
VstInt32 parentCategoryIndex;
|
||||
VstInt32 flags;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstParameterFlags {
|
||||
kVstParameterIsSwitch = 1,
|
||||
kVstParameterUsesIntegerMinMax = 2,
|
||||
kVstParameterCanRamp = 7,
|
||||
};
|
||||
|
||||
struct VstParameterProperties {
|
||||
float __unk00;
|
||||
float __unk01;
|
||||
float __unk02;
|
||||
char label[64];
|
||||
VstInt32 flags;
|
||||
VstInt32 minInteger;
|
||||
VstInt32 maxInteger;
|
||||
VstInt32 __unk03;
|
||||
VstInt32 __unk04;
|
||||
char shortLabel[8];
|
||||
// There's more after this, but it's not used?
|
||||
// We know what they're for (see vst.h), but they don't appear anywhere.
|
||||
VstInt16 __unk05; // Order/Index for display. Starts at 0.
|
||||
VstInt16 __unk06; // Category Index, 0 for none, 1+ for category.
|
||||
VstInt16 __unk07; // Number of parameters in this category
|
||||
VstInt16 __unk08; // Know absolutely nothing about this one.
|
||||
char __unk09[24]; // Category Label. We know the size here, and what it is.
|
||||
char __unk10[16]; // Always exists, not sure why. May be padding.
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstPinFlags {
|
||||
kVstPinIsActive,
|
||||
kVstPinUseSpeaker,
|
||||
kVstPinIsStereo,
|
||||
|
||||
};
|
||||
|
||||
struct VstPinProperties {
|
||||
char label[kVstMaxLabelLen];
|
||||
VstInt32 flags;
|
||||
VstInt32 arrangementType;
|
||||
char shortLabel;
|
||||
// ? bytes
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstSpeakerArrangmentType { // Name adapted from vst.h
|
||||
kSpeakerArrUserDefined = -2,
|
||||
kSpeakerArr__unk01 = -1,
|
||||
// Taken from: VstInt32 Vst2Wrapper::vst3ToVst2SpeakerArr
|
||||
kSpeakerArrMono = 0,
|
||||
kSpeakerArrStereo,
|
||||
kSpeakerArrStereoSurround,
|
||||
kSpeakerArrStereoCenter,
|
||||
kSpeakerArrStereoSide,
|
||||
kSpeakerArrStereoCLfe,
|
||||
kSpeakerArr30Cine,
|
||||
kSpeakerArr30Music,
|
||||
kSpeakerArr31Cine,
|
||||
kSpeakerArr31Music,
|
||||
kSpeakerArr40Cine,
|
||||
kSpeakerArr40Music,
|
||||
kSpeakerArr41Cine,
|
||||
kSpeakerArr41Music,
|
||||
kSpeakerArr50,
|
||||
kSpeakerArr51,
|
||||
kSpeakerArr60Cine,
|
||||
kSpeakerArr60Music,
|
||||
kSpeakerArr61Cine,
|
||||
kSpeakerArr61Music,
|
||||
kSpeakerArr70Cine,
|
||||
kSpeakerArr70Music,
|
||||
kSpeakerArr71Cine,
|
||||
kSpeakerArr71Music,
|
||||
kSpeakerArr80Cine,
|
||||
kSpeakerArr80Music,
|
||||
kSpeakerArr81Cine,
|
||||
kSpeakerArr81Music,
|
||||
kSpeakerArr102,
|
||||
};
|
||||
|
||||
enum VstSpeakerType { // Name adapted from vst.h
|
||||
// Taken from VstInt32 Vst2Wrapper::vst3ToVst2Speaker (Vst::Speaker vst3Speaker)
|
||||
kSpeakerUndefined = INT32_MAX, // Weirdest one to figure out. Why not -1?
|
||||
kSpeakerM = 0,
|
||||
kSpeakerL,
|
||||
kSpeakerR,
|
||||
kSpeakerC,
|
||||
kSpeakerLfe,
|
||||
kSpeakerLs,
|
||||
kSpeakerRs,
|
||||
kSpeakerLc,
|
||||
kSpeakerRc,
|
||||
kSpeakerS,
|
||||
kSpeakerSl,
|
||||
kSpeakerSr,
|
||||
kSpeakerTm,
|
||||
kSpeakerTfl,
|
||||
kSpeakerTfc,
|
||||
kSpeakerTfr,
|
||||
kSpeakerTrl,
|
||||
kSpeakerTrc,
|
||||
kSpeakerTrr,
|
||||
kSpeakerLfe2,
|
||||
};
|
||||
|
||||
struct VstSpeakerProperties {
|
||||
float __unk00;
|
||||
float __unk01;
|
||||
float __unk02;
|
||||
float __unk03;
|
||||
char name[64];
|
||||
VstInt32 type; // VstSpeakerType, see vst.h
|
||||
char __unk04[28];
|
||||
};
|
||||
|
||||
struct VstSpeakerArrangement {
|
||||
VstInt32 type; // VstSpeakerArrangmentType, see vst.h
|
||||
VstInt32 numChannels;
|
||||
VstSpeakerProperties speakers[32]; // See vst.h. I don't know if this size is correct.
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "vsttypes.h"
|
||||
|
||||
#pragma pack(push, 8)
|
||||
|
||||
enum VstSMPTEFrameRate {
|
||||
// Taken from: void Vst2Wrapper::setupProcessTimeInfo ()
|
||||
kVstSmpte24fps = 0,
|
||||
kVstSmpte25fps = 1,
|
||||
kVstSmpte2997fps = 2,
|
||||
kVstSmpte30fps = 3,
|
||||
kVstSmpte2997dfps = 4,
|
||||
kVstSmpte30dfps = 5,
|
||||
kVstSmpteFilm16mm = 6,
|
||||
kVstSmpteFilm35mm = 7,
|
||||
kVstSmpte239fps = 9,
|
||||
kVstSmpte249fps = 10,
|
||||
kVstSmpte599fps = 11,
|
||||
kVstSmpte60fps = 12,
|
||||
};
|
||||
|
||||
struct VstTimeInfo {
|
||||
double samplePos;
|
||||
double sampleRate;
|
||||
double nanoSeconds;
|
||||
double ppqPos;
|
||||
double tempo;
|
||||
double barStartPos;
|
||||
double cycleStartPos;
|
||||
double cycleEndPos;
|
||||
VstInt32 timeSigNumerator;
|
||||
VstInt32 timeSigDenominator;
|
||||
VstInt32 smpteOffset;
|
||||
VstInt32 smpteFrameRate;
|
||||
VstInt32 samplesToNextClock;
|
||||
VstInt32 flags;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifdef __cplusplus
|
||||
#include <cinttypes>
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#define VstFunctionAPI __cdecl
|
||||
|
||||
enum VstMaxLengths { // Anything with k is an enum?
|
||||
kVstMaxNameLen = 64,
|
||||
kVstMaxLabelLen = 64,
|
||||
kVstMaxShortLabelLen = 8,
|
||||
kVstExtMaxParamStrLen = 32, // Apparently incorrect, but actually in use by many hosts.
|
||||
kVstMaxParamStrLen = 8,
|
||||
kVstMaxProgNameLen = 24,
|
||||
kVstMaxVendorStrLen = 64,
|
||||
kVstMaxEffectNameLen = 32,
|
||||
};
|
||||
|
||||
// 16-bit wide Integer
|
||||
typedef int16_t VstInt16;
|
||||
|
||||
// 32-bit wide Integer
|
||||
typedef int32_t VstInt32;
|
||||
|
||||
// Variable size Integer Pointer
|
||||
typedef intptr_t VstIntPtr;
|
||||
|
||||
// Float and double are used as-is. No custom type name here.
|
||||
|
||||
// Bus Direction. Appears to be int32_t
|
||||
typedef int32_t BusDirection;
|
||||
|
||||
// Rectangle
|
||||
struct ERect {
|
||||
VstInt16 left, top, right, bottom;
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright 2024 Michael Fabian 'Xaymar' Dirks <info@xaymar.com>
|
||||
* Copyright 2024 Steinberg Media Technologies GmbH
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
enum VstVersion {
|
||||
kVstVersion_0 = 0, // Anything before 2.0, rarely used.
|
||||
kVstVersion_1000 = 1000, // 1.0
|
||||
kVstVersion_1100 = 1100, // 1.1
|
||||
kVstVersion_2 = 2, // 2.0, rarely used.
|
||||
kVstVersion_2000 = 2000, // 2.0
|
||||
kVstVersion_2100 = 2100, // 2.1
|
||||
kVstVersion_2200 = 2200, // 2.2
|
||||
kVstVersion_2300 = 2300, // 2.3
|
||||
kVstVersion_2400 = 2400, // 2.4
|
||||
};
|
||||
Reference in New Issue
Block a user