Skip to content

Commit

Permalink
Merge pull request #54 from hotdogaaron/aaron-dev-update-examples
Browse files Browse the repository at this point in the history
Update Example Plugins
  • Loading branch information
madronalabs authored Jul 1, 2024
2 parents 327d7ef + f601cf0 commit 2683e6d
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 20 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ Madronalib can be built with the default settings as follows:
make

This will create a command-line build of all the new code.

To build and install with debug symbols enabled for use with the example plugin projects:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
# Installation may require administrator account / sudo
make install

To build an XCode project with JUCE support, run something like

mkdir build-xcode
Expand Down
7 changes: 4 additions & 3 deletions examples/effect-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(public_sdk_SOURCE_DIR ${VST3_SDK_ROOT}/public.sdk)

IF(APPLE)
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Minimum OS X deployment version")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version")
ENDIF(APPLE)

#--------------------------------------------------------------------
Expand All @@ -26,7 +26,7 @@ project(llllPluginNamellll)
set(VERSION_MAJOR "0")
set(VERSION_MINOR "1")
set(VERSION_PATCH "0")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

#--------------------------------------------------------------------
# Compiler flags
Expand Down Expand Up @@ -65,6 +65,7 @@ set(target llllpluginnamellll)

SET(SMTG_ADD_VSTGUI OFF CACHE BOOL "Add VSTGUI support")
SET(VSTGUI_TOOLS OFF CACHE BOOL "Build VSTGUI Tools")
SET(SMTG_CREATE_MODULE_INFO OFF CACHE BOOL "Disable Module Info Generation")

include(VST3_SDK.cmake)

Expand All @@ -78,7 +79,7 @@ if(SMTG_ADD_VSTGUI)
endif()

if(SMTG_MAC)
smtg_set_bundle(${target} INFOPLIST "${CMAKE_CURRENT_LIST_DIR}/mac/Info.plist" PREPROCESS)
smtg_target_set_bundle(${target} INFOPLIST "${CMAKE_CURRENT_LIST_DIR}/mac/Info.plist" PREPROCESS)
target_link_libraries(${target} PRIVATE "-framework CoreAudio" )

elseif(SMTG_WIN)
Expand Down
4 changes: 2 additions & 2 deletions examples/effect-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Example of a VST3 / Audio Units plugin made with cmake, madronalib and the VST3
to build:
---------

First, build and install madronalib as a static library using the instructions in the madronalib project.
First, build and install madronalib as a **debug** static library using the instructions in the madronalib project.

Download the VST3 SDK from Steinberg.

Expand All @@ -19,7 +19,7 @@ To make the VST and AU plugins, first create an XCode project for MacOS using cm

- mkdir build
- cd build
- cmake -DVST3_SDK_ROOT=(your VST3 SDK location) -DCMAKE_BUILD_TYPE=Debug -GXcode ..
- cmake -DVST3_SDK_ROOT=(your VST3 SDK location) -DSMTG_RUN_VST_VALIDATOR=OFF -DCMAKE_BUILD_TYPE=Debug -GXcode ..

Cmake will create a project with obvious placeholders (llllCompanyllll, llllPluginNamellll) for the company and plugin names.

Expand Down
2 changes: 1 addition & 1 deletion examples/effect-plugin/source/pluginController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void GainParameter::toString(ParamValue normValue, String128 string) const

bool GainParameter::fromString(const TChar* string, ParamValue& normValue) const
{
String wrapper((TChar*)string); // don't know buffer size here!
Steinberg::UString wrapper((TChar*)string, 128); // don't know buffer size here!
double tmp = 0.0;
if(wrapper.scanFloat(tmp))
{
Expand Down
4 changes: 0 additions & 4 deletions examples/effect-plugin/source/pluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ tresult PLUGIN_API PluginProcessor::canProcessSampleSize(int32 symbolicSampleSiz
if(symbolicSampleSize == kSample32)
return kResultTrue;

// we support double processing
if(symbolicSampleSize == kSample64)
return kResultTrue;

return kResultFalse;
}

Expand Down
7 changes: 4 additions & 3 deletions examples/synth-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set(public_sdk_SOURCE_DIR ${VST3_SDK_ROOT}/public.sdk)

IF(APPLE)
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Minimum OS X deployment version")
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment version")
ENDIF(APPLE)

#--------------------------------------------------------------------
Expand All @@ -25,7 +25,7 @@ project(llllPluginNamellll)
set(VERSION_MAJOR "0")
set(VERSION_MINOR "1")
set(VERSION_PATCH "0")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

#--------------------------------------------------------------------
# Compiler flags
Expand Down Expand Up @@ -85,6 +85,7 @@ set(target llllpluginnamellll)

SET(SMTG_ADD_VSTGUI OFF CACHE BOOL "Add VSTGUI support")
SET(VSTGUI_TOOLS OFF CACHE BOOL "Build VSTGUI Tools")
SET(SMTG_CREATE_MODULE_INFO OFF CACHE BOOL "Disable Module Info Generation")

include(VST3_SDK.cmake)

Expand All @@ -98,7 +99,7 @@ if(SMTG_ADD_VSTGUI)
endif()

if(SMTG_MAC)
smtg_set_bundle(${target} INFOPLIST "${CMAKE_CURRENT_LIST_DIR}/mac/Info.plist" PREPROCESS)
smtg_target_set_bundle(${target} INFOPLIST "${CMAKE_CURRENT_LIST_DIR}/mac/Info.plist" PREPROCESS)
target_link_libraries(${target} PRIVATE "-framework CoreAudio" )
elseif(SMTG_WIN)
target_sources(${target} PRIVATE resource/llllpluginnamellll.rc)
Expand Down
4 changes: 2 additions & 2 deletions examples/synth-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Example of a VST3 / Audio Units plugin made with cmake, madronalib and the VST3
to build:
---------

First, build and install madronalib as a static library using the instructions in the madronalib project.
First, build and install madronalib as a **debug** static library using the instructions in the madronalib project.

Download the VST3 SDK from Steinberg.

Expand All @@ -19,7 +19,7 @@ To make the VST and AU plugins, first create an XCode project for MacOS using cm

- mkdir build
- cd build
- cmake -DVST3_SDK_ROOT=(your VST3 SDK location) -DCMAKE_BUILD_TYPE=Debug -GXcode ..
- cmake -DVST3_SDK_ROOT=(your VST3 SDK location) -DSMTG_RUN_VST_VALIDATOR=OFF -DCMAKE_BUILD_TYPE=Debug -GXcode ..

Cmake will create a project with obvious placeholders (llllCompanyllll, llllPluginNamellll) for the company and plugin names.

Expand Down
6 changes: 1 addition & 5 deletions examples/synth-plugin/source/pluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ tresult PLUGIN_API PluginProcessor::setupProcessing(ProcessSetup& newSetup)
_sampleRate = newSetup.sampleRate;

// setup synth inputs
_synthInput = make_unique< EventsToSignals >(_sampleRate);
_synthInput = std::make_unique< EventsToSignals >(_sampleRate);
_synthInput->setPolyphony(kMaxVoices);

// setup glides
Expand Down Expand Up @@ -148,10 +148,6 @@ tresult PLUGIN_API PluginProcessor::canProcessSampleSize(int32 symbolicSampleSiz
if(symbolicSampleSize == kSample32)
return kResultTrue;

// we support double processing
if(symbolicSampleSize == kSample64)
return kResultTrue;

return kResultFalse;
}

Expand Down

0 comments on commit 2683e6d

Please sign in to comment.