Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed building plugin on Linux #1

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
2877418
Some fixes so the plugin compiles as a native Linux VST plugin
autostatic Mar 9, 2021
95d687f
Added instructions on how to build the plugin
autostatic Mar 9, 2021
fbb1821
Updated README
autostatic Mar 9, 2021
39531cc
Fixed some typos
autostatic Mar 9, 2021
7b806e0
Minor clarification
autostatic Mar 9, 2021
e3c27c0
Further clarifications
autostatic Mar 9, 2021
a2c0231
Updated README
autostatic Apr 2, 2022
362dfdd
Updated README
autostatic Apr 2, 2022
5bb1391
Updated README
autostatic Apr 3, 2022
329f767
Updated README
autostatic Apr 3, 2022
51fc335
Add Github workflow
autostatic Apr 3, 2022
753fd1b
Updated README
autostatic Apr 3, 2022
7af0960
Updated workflow
autostatic Apr 3, 2022
6f21db0
Updated workflow
autostatic Apr 3, 2022
af7d200
Updated README
autostatic Apr 3, 2022
239a0e3
Improve workflow
autostatic Apr 3, 2022
49bcfef
Improve workflow
autostatic Apr 3, 2022
9e05682
Updated workflow
autostatic Apr 3, 2022
a0d2aae
Improve workflow
autostatic Apr 3, 2022
dc9768f
Improve workflow
autostatic Apr 3, 2022
fe3f9ec
Improve workflow
autostatic Apr 3, 2022
1529497
Improve workflow
autostatic Apr 3, 2022
6ae5663
Improve workflow
autostatic Apr 3, 2022
e4d4df0
Improve workflow
autostatic Apr 3, 2022
2e38faf
Improve workflow
autostatic Apr 3, 2022
f7ac247
Improve workflow
autostatic Apr 3, 2022
d1ea6dc
Improve workflow
autostatic Apr 3, 2022
8fc09b6
Improve workflow
autostatic Apr 3, 2022
08f33cb
Updated workflow
autostatic Apr 3, 2022
9485f60
Updated workflow
autostatic Apr 3, 2022
dd80c45
Updated workflow
autostatic Apr 3, 2022
8652756
Updated contexts
autostatic Apr 3, 2022
3f1cfb4
Updated installation information
autostatic Apr 3, 2022
9f04e13
Small typo
autostatic Apr 3, 2022
c7482f6
Updated license
autostatic Apr 5, 2022
3cb4f64
Updated license
autostatic Apr 5, 2022
4de4b76
Updated README
autostatic Apr 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/create_new_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: create-new-release

on:
push:
tags:
- 'v*'
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up build env
run: |
sudo apt install unzip
wget "https://web.archive.org/web/20181016150224/https://download.steinberg.net/sdk_downloads/vstsdk3610_11_06_2018_build_37.zip" -O ${{ github.workspace }}/Libraries/vstsdk/vstsdk.zip
unzip ${{ github.workspace }}/Libraries/vstsdk/vstsdk.zip -d ${{ github.workspace }}/Libraries/vstsdk/
cp ${{ github.workspace }}/Libraries/vstsdk/VST_SDK/VST2_SDK/public.sdk/source/vst2.x/* ${{ github.workspace }}/Libraries/vstsdk/
cp -a ${{ github.workspace }}/Libraries/vstsdk/VST_SDK/VST2_SDK/pluginterfaces ${{ github.workspace }}/Libraries/vstsdk/

- name: Build
run: |
cmake -B ${{ github.workspace }}/Build/CMake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
cmake --build ${{ github.workspace }}/Build/CMake --config ${{env.BUILD_TYPE}}

- name: Clean
run: rm -rf ${{ github.workspace }}/Libraries/vstsdk/

- name: Prepare release
run: tar -C ${{ github.workspace }}/Build/CMake/ -czvf ${{ github.workspace }}/Build/open303.tar.gz open303.so

- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref_name }}
draft: false
prerelease: false

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/Build/open303.tar.gz
asset_name: open303-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip
18 changes: 15 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
cmake_minimum_required(VERSION 3.6.3 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9)
project(open303)

add_library(open303
set(CMAKE_CXX_STANDARD 14)
#add_compile_options("-Wall" "-Wpedantic" "-Wextra" "-fexceptions")

add_subdirectory(Libraries/vstsdk)

add_library(open303 MODULE
Source/DSPCode/GlobalDefinitions.h
Source/DSPCode/GlobalFunctions.cpp
Source/DSPCode/GlobalFunctions.h
Expand Down Expand Up @@ -41,5 +46,12 @@ add_library(open303
Source/DSPCode/rosic_RealFunctions.cpp
Source/DSPCode/rosic_RealFunctions.h
Source/DSPCode/rosic_TeeBeeFilter.cpp
Source/DSPCode/rosic_TeeBeeFilter.h
Source/DSPCode/rosic_TeeBeeFilter.h
Source/VSTPlugIn/Open303VST.cpp
Source/VSTPlugIn/Open303VST.h
Source/VSTPlugIn/StringConversions.c
${VSTSDK_SOURCES}
)

target_include_directories(open303 PRIVATE ${VSTSDK_ROOT})
set_target_properties(open303 PROPERTIES PREFIX "")
13 changes: 6 additions & 7 deletions License.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
The Open303 source code is released under the terms of the MIT license:

The MIT License
MIT License

Copyright (c) 2009 Robin Schmidt (www.rs-met.com)
Copyright (c) 2021-2022 Jeremy Jongepier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -11,13 +10,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions Libraries/vstsdk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VSTSDK_ROOT
${CMAKE_CURRENT_SOURCE_DIR}
CACHE STRING "VST SDK dir")

set(VSTSDK_SOURCES
${VSTSDK_ROOT}/vstplugmain.cpp
${VSTSDK_ROOT}/audioeffect.cpp
${VSTSDK_ROOT}/audioeffectx.cpp
CACHE STRING "VST SDK source files")
21 changes: 21 additions & 0 deletions Libraries/vstsdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Get the Steinberg VST 2.4 SDK and extract it. Copy the files you need into `Libraries/vstsdk`. The structure of the `Libraries/vstsdk` directory needs to be as follows:

```
Libraries/vstsdk/
├── pluginterfaces
│   └── vst2.x
│   ├── aeffect.h
│   ├── aeffectx.h
│   └── vstfxstore.h
├── aeffeditor.h
├── audioeffect.cpp
├── audioeffect.h
├── audioeffectx.cpp
├── audioeffectx.h
├── CMakeLists.txt
└── vstplugmain.cpp
```

Now create a directory `CMake` in the `Build` directory in the root of the project, `cd` into that directory and run `cmake ../.. && make`. Copy the resulting `open303.so` file to a place where your DAW can find it.

Thanks to the [Airwindows repository](https://github.com/airwindows/airwindows) for these instructions!
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Open303
Open303 is a free and open source emulation of the famous Roland TB-303 bass synthesizer for the VST plugin interface (VST is a trademark of Steinberg Media Technologies GmbH).

## Build it yourself
### Linux
Get an older version of the [VST 3 Audio Plug-Ins SDK](https://web.archive.org/web/20181016150224/https://download.steinberg.net/sdk_downloads/vstsdk3610_11_06_2018_build_37.zip) that includes the complete VST 2 SDK and extract it. Copy the files from `VST_SDK/vst2sdk/public.sdk/source/vst2.x/` and `VST_SDK/VST2_SDK/pluginterfaces` into `Libraries/vstsdk`. The structure of the `Libraries/vstsdk` directory needs to be as follows:

```
Libraries/vstsdk/
├── pluginterfaces
│   └── vst2.x
│   ├── aeffect.h
│   ├── aeffectx.h
│   └── vstfxstore.h
├── aeffeditor.h
├── audioeffect.cpp
├── audioeffect.h
├── audioeffectx.cpp
├── audioeffectx.h
├── CMakeLists.txt
└── vstplugmain.cpp
```

Now create a directory `CMake` in the `Build` directory in the root of the project, `cd` into that directory and run `cmake ../.. && make`. Copy the resulting `open303.so` file to a place where your DAW can find it, generally that would be `~/.local/lib/lxvst/`.

```
git clone https://github.com/autostatic/open303.git
cd open303
wget "https://web.archive.org/web/20181016150224/https://download.steinberg.net/sdk_downloads/vstsdk3610_11_06_2018_build_37.zip" -O Libraries/vstsdk/vstsdk.zip
unzip Libraries/vstsdk/vstsdk.zip -d Libraries/vstsdk/
cp Libraries/vstsdk/VST_SDK/VST2_SDK/public.sdk/source/vst2.x/* Libraries/vstsdk/
cp -a Libraries/vstsdk/VST_SDK/VST2_SDK/pluginterfaces Libraries/vstsdk/
cmake -B Build/CMake
cmake --build Build/CMake
cp Build/CMake/open303.so ~/.local/lib/lxvst/
```

Thanks to the [Airwindows repository](https://github.com/airwindows/airwindows) for these instructions!

### The Rest
#### Microsoft Visual Studio 2008
Load the solution-file Open303.sln (in the folder 'Build/VisualStudio2008') with Microsoft Visual Studio 2008 and try to build the plugin. If it works, you will find the results of the compilation (the final .dll and some intermediate files) in the subfolder 'Debug' or 'Release' of 'Build/VisualStudio2008', depending on whether you selected a debug- or release-build.

#### CodeBlocks
Load the CodeBlocks project file Open303.cbp (in the folder 'Build/CodeBlocks') - and build away. The results will be found in the subfolder bin/Debug or bin/Release. On my setup, i get 15 compiler warnings which are all rooted in source files of the VST-SDK (not the Open303 code itself) - so i guess we may safely ignore them.
12 changes: 0 additions & 12 deletions ReadMe.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Source/VSTPlugIn/Open303VST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void Open303VST::handleEvent(VstMidiEvent midiEvent)

void Open303VST::noteOn(VstInt32 note, VstInt32 velocity, VstInt32 delta)
{
open303Core.noteOn(note, velocity, 0.0);
open303Core.noteOn(note, velocity);
}

double Open303VST::convertToPitch(unsigned char highByte,unsigned char lowByte)
Expand Down
2 changes: 1 addition & 1 deletion Source/VSTPlugIn/Open303VST.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef Open303VST_h
#define Open303VST_h

#include "public.sdk/source/vst2.x/audioeffectx.h"
#include "audioeffectx.h"
#include "../DSPCode/rosic_Open303.h"
using namespace rosic;

Expand Down