The Traditional Max Software Development Kit contains the API (headers, source, libraries) for building external objects (plug-ins) in C or C++ for Max. It additionally includes documentation of the API, example projects, and CMake scripts for generating Xcode and Visual Studio project files.
The repository contains one submodule, max-sdk-base, that provides the low-level bindings to the Max application and CMake scripts for creating your own projects.
git clone https://github.com/Cycling74/max-sdk.git --recursive
mkdir build
to create a folder with your various build filescd build
to put yourself into that folderRun cmake -G Xcode ..
Next run cmake --build .
or open the Xcode project from this "build" folder and use the GUI.
Note: you can add the -j4
option where "4" is the number of cores to use. This can help to speed up your builds, though sometimes the error output is interleaved in such a way as to make troubleshooting more difficult.
If you are running on a Mac M1 machine, you will likely see an error cannot be loaded due to system security policy
when loading your externals in Max. To resolve this, you can ad-hoc codesign your external with codesign --force --deep -s - myobject.mxo
.
You can run cmake --help
to get a list of the options available. Assuming some version of Visual Studio 2019, the commands to generate the projects will look like this:
cmake -G "Visual Studio 16 2019" ..
Or using Visual Studio 2017 it will look like this:
cmake -G "Visual Studio 15 2017 Win64" ..
Having generated the projects, you can now build by opening the .sln file in the build folder with the Visual Studio app (just double-click the .sln file) or you can build on the command line like this:
cmake --build . --config Release
With the 8.2 update several aspects of the Max-SDK were changed in order to support Apple silicon and CMake project generation. For details on this change and steps to get started with CMake please see the 8.2 update readme or the Max 8.2 SDK Update Overview video.
If you are interested in using Modern C++ to write external objects, please take a look at the Min DevKit.
It is highly recommended that you test your code thoroughly. One option is use the max-test package.
For support, please use the developer forums at: http://cycling74.com/forums/