The Max 8.2 SDK: An Overview
Third-party packages and external objects created by the community have been an important part of Max since the earliest days. Max 8.2 gave us the ability to run Max natively on Apple Silicon computers. The recently updated Max 8.2 SDK extends this support to third-party externals, which must be recompiled to run in Max 8.2 natively. The Max SDK build system has also been modernized with CMake support to aid in cross-platform development. Finally, for those who wish to develop using both Max SDK and the Min API, these are now updated to share the same base headers and libraries.
Watch the video below for more details on the update and instructions to get started with the new Cmake-enabled workflow.
For more information about how to develop externals, see:
GitHub repositories:
by Cycling '74 on January 24, 2022
Thanks for this! :-)
Hi,
i typed in my terminal
git clone git@github.com:Cycling74/max-sdk.git as in the video.
It answers
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What has happened?
Thank you Thomas
I had the same problem. I had to follow some steps to create a key on my machine. You need a github account.
Gooogle "git@github.com: Permission denied (publickey)" or use docs at github. If you can't get it done, you could always download manually from github (don't forget the max-sdk-base). More important is to have homebrew / cmake accessible in your terminal.
Hi Thomas,
Looks like the difference between cloning via SSH vs HTTPS is causing the error. The quick solution would be to instead use git clone https://github.com/Cycling74/max-sdk.git --recursive
(That --recursive flag will pull in the max-sdk-base submodule you'll need as well in one go.)
For more info:
With git clone git@github.com:Cycling74/max-sdk.git
, git will use ssh to pull in the repository to your local machine. This means you'll need to have SSH keys added to your GitHub account. Instructions here: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
if you are having trouble cloning from github, you can simply download the latest release here - https://github.com/Cycling74/max-sdk/releases/latest
Thanks a lot! Now it works...
Can anyone comment on whether you need an apple-silicon machine in order to make an apple-silicon-native external?
Or can it be created on an older Intel machine, but still work natively on an AS machine?
Thank you!
You don't need an Apple Silicon machine to make an M1 native external as long as you have a recent version of Xcode.
Requirements, to be precise, are: Xcode >=12 and MacOS >= 10.15 (Catalina)
Do the changes in the 8.2 SDK also explain why externals compiled in previous versions don't work in Max 8.2 onwards? I have an external that was working fine in 8.1 and the moment I updated to 8.2 it stopped working.
I'm trying to determine whether I need to re-compile this external with the 8.2 SDK in order to continue using it in Max 8.2 (even if I'm still on Catalina or Big Sur) ?
For context, it's the old Fingerpinger external for use with the Apple trackpad and it makes use of the Apple MultitouchSupport.framework (/System/Library/PrivateFrameworks/MultitouchSupport.framework/)
https://www.anyma.ch/2009/research/multitouch-external-for-maxmsp/
latest source (not linked on site): http://www.anyma.ch/software/fingerpinger2017_08_17_source.zip
a (very) basic raw question: can we play with Live API through 8.2 SDK for externals running in M4L devices ??
Trying to follow the video letter by letter. I get stuck @ cmake --help:
zsh: command not found: cmake
searched, but brew install cmake does not work... (homebrew-core is a shallow clone.)
Then I downloaded cmake.dmg, and followed the PATH instruction which leads to this error:
CMake Error: The source directory "/Users/st/max-sdk/build/help" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
This is 100% confusing. Those error messages are helpful for those who know what it means, but they most likely don't run into errors anyway...
I would love to help somebody to make tutorials for those who know nothing. My experience is always, that it looks so nice in the video, and fails on my system. And nobody anticipated what could go wrong...
I would also prefer always methods without the command line. Nothing against it in general, but for me I know better what is going on if I just copy folders and files instead of doing such things in the terminal with about 1000 keystrokes more and not really knowing what is going on...
There should be either droplets or little apps to just do all these commands. Why typing all those letters, if a program could type it for everybody? Sometimes I think professional programmers are not lazy enough...
+1, even with CMake installed via homebrew, i then attempt the 'cmake -G Xcode ..' part and get this:
sorry for being so stupid and incapable of 'modernization', Cycling74 (wasted 4 hours this morning googling everything i could with no luck #FML 😔🔫)
@RAJA TRA I remember seeing the same error. Iirc I could solve it with the xcode -select command at the bottom of this thread
@11OLSEN oooof! can't thank you enough!! THANK YOU THANK YOU THANK YOU!!!! It works now! 😭
i've never been more relieved that Cycling74 won't be able to leave me behind in their fast moving dust
(i would like to add, tho, they should show more 'empathy' for their user-base when creating documentation and tutorials, 'empathy' is required for proper 'modernization' of the human spirit 🥸)
ok, i'm happier now. i'll leave it at that. Thanks again, @11OLSEN 🙏
@Tj Shredder It is not easy to make a failsafe tutorials, but i totally understand you as I also had to solve multiple problems before it finally worked. I documented everything in a comment on Isabels yt vid but for some reason the comment was deleted. You should focus on a proper homebrew (+cmake) installation first.
I've gotten as far as installing CMake and the 8.2 SDK and working through the steps in the video posted above. I can see that for each external there's a folder such as /max-sdk/source/audio/simplemsp~ which has a single C source file (simplemsp~.c) and the file CMakeLists.txt. I want to make a new audio external, to be built in addition to the other externals built by this CMake system. So what exactly do I need to do? Can I simply copy the directory (e.g. /max-sdk/source/audio/simplemsp~) and rename it with the name of my new external (and also rename the C file it contains)?
Can I simply copy the directory (e.g. /max-sdk/source/audio/simplemsp~) and rename it with the name of my new external (and also rename the C file it contains)?
ya exactly, then rebuild as instructed in the video (around 3:30)... as long as you have the "CMakeLists.txt" file in the subfolder with your c-code, the outer cmakelists.txt will find it and build it accordingly based on the new names you give.
[additionally, at the end of my specific external's "CMakeLists.txt" file i added:
"set(CMAKE_OSX_ARCHITECTURES x86_64;arm64)" ...i'm not sure if we still need that, but it doesn't hurt, if you're on OSX and want builds automatically set for arm64(at least i think that's what it means, i'm no expert, just works nicely for me on my M1 Mac this way)]
hope it helps 🍵
Yes, I've now got my external building and more-or-less working with SDK 8.2. However, I'm up against a pretty big problem in that my external needs the Max asyncfile rather than the normal sysfile API. Previously I contacted some C-74 folks who kindly gave me the header ext_asyncfile.h so I could use that API with SDK 6.1.1. However, some things with t_asyncfile_params must have changed because I'm getting some weird behavior when I try to build using the old header. It sort-of-works ;-). Any chance I could get an updated version of ext_asyncfile.h so that my external will work as expected? I've got some users who really want it to be updated. Thanks!