Hello. I am new to VST3 development.
I am trying to create a plugin with no VST GUI support. It would be controlled by the host through parameter automation sliders only.
In CMakeLists.txt I set :
option(SMTG_ADD_VSTGUI "Add VSTGUI Support" OFF)
Don’t know if it is the right thing to do.
Unfortunately, I started to code with the AGain sample as a basis, which uses a GUI and I have to guess what Interfaces to use and what required functions to override, and which i can comment out.
So i guess the main file with issues is plug_controller.h
Relevant section :
#pragma once
//#include "vstgui/plugin-bindings/vst3editor.h"
#include "public.sdk/source/vst/vsteditcontroller.h"
#include <vector>
namespace Steinberg {
namespace Vst {
//template <typename T>
class PlugController : public EditControllerEx1, public IMidiMapping
{
public:
//using UIMessageController = PlugMessageController<PlugController>;
static FUnknown* createInstance (void* /*context*/)
{
return (IEditController*)new PlugController;
}
//---from IPluginBase--------
tresult PLUGIN_API initialize (FUnknown* context) SMTG_OVERRIDE;
tresult PLUGIN_API terminate () SMTG_OVERRIDE;
tresult PLUGIN_API setComponentState (IBStream* state) SMTG_OVERRIDE;
//---from EditController-----
//IPlugView* PLUGIN_API createView (const char* name) SMTG_OVERRIDE;
//tresult PLUGIN_API setState (IBStream* state) SMTG_OVERRIDE;
//tresult PLUGIN_API getState (IBStream* state) SMTG_OVERRIDE;
tresult PLUGIN_API setParamNormalized (ParamID tag, ParamValue value) SMTG_OVERRIDE;
tresult PLUGIN_API getParamStringByValue (ParamID tag, ParamValue valueNormalized,
String128 string) SMTG_OVERRIDE;
tresult PLUGIN_API getParamValueByString (ParamID tag, TChar* string,
ParamValue& valueNormalized) SMTG_OVERRIDE;
//---from ComponentBase-----
tresult receiveText (const char* text) SMTG_OVERRIDE;
//---from IMidiMapping-----------------
tresult PLUGIN_API getMidiControllerAssignment (int32 busIndex, int16 channel,
CtrlNumber midiControllerNumber,
ParamID& tag) SMTG_OVERRIDE;
//---from VST3EditorDelegate-----------
DELEGATE_REFCOUNT (EditController)
tresult PLUGIN_API queryInterface (const char* iid, void** obj) SMTG_OVERRIDE;
};
}
}
Although everything compiles properly it fails at one unit test with a segmentation fault.
-------------------------------------------------------------
TestSuite : General Tests
-------------------------------------------------------------
[Scan Editor Classes]
Info: ===Scan Editor Classes ====================================
Info: This component does not export an edit controller class ID!!!
[Succeeded]
[Scan Buses]
Info: ===Scan Buses ====================================
Info: => Audio Buses: [1 In(s) => 1 Out(s)]
Info: In [0]: "Stereo In" (Main-Default Active)
Info: Out[0]: "Stereo Out" (Main-Default Active)
Info: => Event Buses: [1 In(s) => 0 Out(s)]
Info: In [0]: "Event In" (Main-Default Active)
[Succeeded]
[Scan Parameters]
Info: ===Scan Parameters ====================================
Info: No Edit Controller supplied!
[Succeeded]
[MIDI Mapping]
Info: ===MIDI Mapping ====================================
Info: No Edit Controller supplied!
[Succeeded]
[MIDI Learn]
Info: ===MIDI Learn ====================================
Info: No Edit Controller supplied!
[Succeeded]
[Scan Units]
Info: ===Scan Units ====================================
Info: This component has no units.
[Succeeded]
[Scan Programs]
Info: ===Scan Programs ====================================
Info: This component does not export any programs.
Segmentation fault
The best approach at this point seems to find a sample that does not make use of the VST GUI,
could you tell me which one I could use as a template ?
mda plugin sources seem quite straightforward and known to use no GUI, but I am not sure they are VST3.
Any information appreciated.
Additional environment info :
building on Debian buster (10)
cmake 3.25.1.1
qtcreator 9.0.1.2
libc+±15-dev:amd64 1:15.0.6-4b1+
CMakeLists.txt :
cmake_minimum_required(VERSION 3.15.0)
project(TEST_COMPRESSOR
VERSION 0.9.0
DESCRIPTION "test compressor"
)
add_definitions(-D_DEBUG -DDEVELOPMENT)
set(vst3sdk_SOURCE_DIR /home/rod/git/VST_SDK/vst3sdk)
add_subdirectory(${vst3sdk_SOURCE_DIR} ${PROJECT_BINARY_DIR}/vst3sdk)
smtg_enable_vst3_sdk()
# Add and use VSTGUI (enable VST 3 Plug-ins Samples using VSTGUI)
option(SMTG_ADD_VSTGUI "Add VSTGUI Support" OFF)
smtg_add_vst3plugin(test_compressor_plugin
source/version.h
source/testcomp_paramids.h
source/testcomp_processor.h
source/testcomp_processor.cpp
source/testcomp_controller.h
source/testcomp_controller.cpp
source/testcomp_entry.cpp
source/testcomp_cids.h
)
target_compile_features(test_compressor_plugin
PUBLIC
cxx_std_14
)
target_link_libraries(test_compressor_plugin
PRIVATE
sdk
)
smtg_target_configure_version_file(test_compressor_plugin)