Template Projects for building external objects in MaxMSP
To get started, click use this template at the top of the repository
then follow the instructions for creating a repository
To make this repository a little more portable, the max-sdk-base
has been included as a submodule. If you are using the GitHub desktop app, the submodule will be cloned automatically. If you are using git from the command line, this means you will need to state --recurse-submodules
when cloning.
git clone --recurse-submodules https://github.com/Edinburgh-College-of-Art/maxmsp-external-template
You should be able to build straight away from the Xcode project or the Visual Studio solution. Other methods of cloning or downloading this repository may result in the max-sdk-base
folder being empty. In that situation either use the above git command or download the max-sdk-base
directly and copy over the contents.
Build configuration is slightly different depending on which IDE you are using. For Visual Studio you should be looking at the property sheets and for Xcode the .xcconfig
.
The build destination for each project is set to the default user Max Packages directory.
macOS:
~/Max 8/Packages/$(Project_Name)/externals
Windows:
$(USERPROFILE)\Documents\Max 8\Packages\$(ProjectName)\externals
This means you should be able to use your object in Max immediately after building, though Max will require a restart.
The maxmspsdk.xcconfig
in the xcode
directory sets a couple of global paths in the Xcode project. DSTROOT
sets the build destination.
To change the destination folder:
- make sure you have highlighted the project in the Solution Explorer
-
Press F4 or Properties by navigating the menus
View
->Properties...
-
In Configuration Properties -> General you can change the Output Directory
For Visual Studio users, there should be nothing that you need to change in the property sheets. If you would like to change them or just take a look, you can edit them directly in any text editor as VS files are essentially XML files.
To edit the property sheets in visual studio:
- make sure you have highlighted the project in the Solution Explorer
- Select the property manager by navigating the menus
View
->Other Windows
->property manager
- Select a property sheet press Alt + Enter or right click and select properties
- navigate to user macros
The Xcode and VS project have multiple targets / projects to demonstrate how to approach building a Max external .mxo
, .mxe64
file.
The vanilla C approach. There are plenty of examples in the sdk, but this target / project aims to take a more modern approach. Documentation has been added inline as well as some slightly less obtuse variable name choices which will hopefully reduce the barrier of entry.
The vanilla C approach to MSP objects.
If you have already coded a ton of DSP C++ classes for something like JUCE, you may want to start here.
Demonstrates using extern "C"
to write wrappers for pre-existing c++ classes. you need only write wrapper functions for public class methods or anything that needs to be called directly in C