The Maim build process, especially on Windows, is one that could be charitably described as "nontrivial." We figured out the steps, so you don't have to.
- CMake version >= 3.24.1 (This link actually takes you to the latest version)
- ninja
- ccache (Ensure that ccache is actually on the path:
which g++ gcc
should return/usr/lib/ccache/g++ /usr/lib/ccache/gcc
.)
- Clone the repository, making sure to use
--recurse-submodules
to clone JUCE as well.
git clone --recurse-submodules https://github.com/ArdenButterfield/Maim
- Build Lame. This project includes a quirked up version of LAME,
- so even if you have LAME installed already, you still need to do this step.
cd Maim/Source/lib/lame/
./configure CFLAGS="-fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
make
cd ../../..
Optionally, add --enable-debug
to the configure
command, to compile with -g
.
- Build the plugin. You can change
Release
toDebug
in both lines to change the build configuration to one without optimization.
cmake -B Builds -G Ninja -DLAME_LIB=Source/lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build Builds --config Release
Now, you should find Maim.vst3
inside ~/.vst3
, where it will be discoverable by any digital audio workstation.
The steps to build on Mac are very similar to building on Linux. Note that the configure command when building Lame is slightly different from in the Linux instructions.
- CMake version >= 3.24.1 (This link actually takes you to the latest version)
- ninja
- ccache (Ensure that ccache is actually on the path:
which g++ gcc
should return/usr/local/opt/ccache/libexec/g++ /usr/local/opt/ccache/libexec/gcc
, or something similar.)
- Clone the repository, making sure to use
--recurse-submodules
to clone JUCE as well.
git clone --recurse-submodules https://github.com/ArdenButterfield/Maim
- Build Lame. This project includes a quirked up version of LAME, so even if you have LAME installed already, you still need to do this step.
cd Maim/Source/lib/lame/
./configure CFLAGS="-arch x86_64 -arch arm64 -fPIC" --disable-frontend --enable-expopt=full --disable-shared --enable-static
make
cd ../../..
- Build the plugin. You can change
Release
toDebug
in both lines to change the build configuration to one without optimization.
cmake -B Builds -G Ninja -DLAME_LIB=Source/lib/lame/libmp3lame/.libs/libmp3lame.a -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build Builds --config Release
Now, you should find Maim.vst3
inside ~/Library/Audio/Plugins/VST3
and Maim.component
inside ~/Library/Audio/Plug-Ins/Components
, where it will be discoverable by any digital audio workstation.
- CMake version >= 3.24.1 (This link actually takes you to the latest version)
- JetBrains CLion IDE (Or not if you like your CMake builds raw)
- Build Tools for Visual Studio 2022 (The build tools may or may not just come with regular Visual Studio) (If you don't have this, consider being visited by the magic binary distributor fairy)
- Intel IPP (I don't have a joke for this one)
- Go through the Intel IPP installer. Or, just run the following:
curl --output oneapi.exe https://registrationcenter-download.intel.com/akdlm/irc_nas/19078/w_BaseKit_p_2023.0.0.25940_offline.exe
./oneapi.exe -s -x -f oneapi
./oneapi/bootstrapper.exe -s -c --action install --components=intel.oneapi.win.ipp.devel --eula=accept -p=NEED_VS2022_INTEGRATION=1 --log-dir=.
-
Clone the repo with
git clone --recurse-submodules https://github.com/ArdenButterfield/Maim
(Recursive to make sure git clone also hits JUCE). -
Inside your local project, navigate to
Source/lib/lame
. (This is a quirked up version of LAME included in the project, so even if you have LAME already installed, you still need to do this step.) -
Copy the file called
configMS.h
intolibmp3lame/config.h
(you would presumably copy one of the other config files if you were on a different OS). -
Launch the command window
x64 Native Tools Command Prompt for VS 2022
which you can find from the start menu if you have Build Tools for Visual Studio 2022 installed. -
Inside the command window, run
cd [Path to root directotry of local project]/Source/lib/lame
. -
Then run
nmake dll -f Makefile.MSVC comp=msvc asm=n
. -
Hopefully the build should succeed, and you can now see the built file
Source/lib/lame/output/libmp3lame-static.lib
. -
Before we open up the project in CLion, there's even more hoops we need to jump through. (Isn't that what you wanted to hear?) CLion must be run with administrator privileges to install the VST file correctly. If you installed CLion yourself, then you can probably right-click, "Run as Administrator". If you installed CLion through JetBrains Toolbox, click on the vertical dots next to CLion in the list, click "Settings" in the dropdown, the click on "Configuration". Toggle "Run as administrator".
-
Open up the project in CLion. It's gonna start trying to load the CMake project and there's going to be errors because we need to change the CMake settings first.
-
Go to
File | Settings | Build, Execution, Deployment | CMake
. In theCMake options:
field, place in-DLAME_LIB=Source\lib\lame\output\libmp3lame-static.lib
, the path to our built file. -
Now reload the CMake project.
-
CLion should detect a bunch of CMake Application Run Configurations. Select the one called
Maim_VST3
. You may have to edit the configuration and set theExecutable:
asTests
. -
Also when editing the configuration, check "Run with Administrator privileges". Otherwise we're gonna get a permissions denied build error.
-
Run
Maim_VST3
. -
After taking 12 years to build, the built plugin should be placed into
C:\Program Files\Common Files\VST3\Maim.vst3\Contents\x86_64-win\Maim.vst3
. It is now ready to be used wherever you want.
- If the build fails and you get a message like
file INSTALL cannot set permissions on "C:\Program Files\Common File/VSt3/Maim.vst3": Permission denied.
, it might be for two reasons. The first is that you didn't follow my instructions on giving the build adminsitrator privileges. The second is because your audio workstation is currently using the previously built VST file. You have to close it to rebuild.