VCV Rack running native on Apple m1

Hey everyone, Just got VCV Rack 2 compiled natively for Apple M1 chipset.

I just wanted to find out how hard it would be to port VCV Rack. Basic Rack app was pretty simple to port. SSE2 instructions needed to be rewired to use sse2neon. Makefile needed to be adjusted to detect OS correctly etc.

If someone is interested in detailed changes I made to source then I can push them to github.

To make this port I used:

  1. GitHub - VCVRack/Rack: The virtual Eurorack studio (v2 branch)
  2. GitHub - DLTcollab/sse2neon: A translator from Intel SSE intrinsics to Arm/Aarch64 NEON implementation
  3. I also did some modifications to Makefiles to support M1
  4. Disabled LuaJIT support because VCV Rack wouldn’t start with this enabled.

When I have some actual music flowing through this port I will update this thread :wink:

12 Likes

wow that’s amazing! I can safely use this build and is this already 2.10 or still 2.06? Thanks!

This is 2.06 as this seems to be newest on “v2” branch. This build was not really tested yet and in not ready for production use. Every plugin needs to be built separately for apple m1 to make this usable so lots of work to do before it is actually stable. This is just a POC to prove it is possible quite easily to compile VCV Rack 2 for M1 cpus without major code changes.

I already tested some things and:

  1. Audio works perfectly fine (Core audio is available)
  2. I compiled basic plugins from here and they load flawlessly to VCV Rack.
  3. Tested VCO, LFO, VCA, Mixer and Audio 8 - these work great.

What I will do next is to make some performance tests to find out if it is really worth porting/faster than Rosetta2 executable.

To summarize: This build is not production ready in any way. There are no external plugins compiled for M1 yet - and there won’t be any until M1 is officially supported at some point in time. If there is any interest in M1 version I’m be happy to share my progress so it can be reviewed and merged into main repository(although I doubt it will ever happen :wink: )

4 Likes

I did some performance testing and it looks like native version is quite faster than rosetta2.

Here is screenshot of my test patch with rosetta2:

And here is screenshot of the same patch in native:

Basically in rosetta2 mode

  1. Max never dropped below 20% - it was constantly at 20-35%
  2. Average never dropped below 9.5%

In native mode

  1. Max was constantly below 10%
  2. Average was stable at 8%

Moreover whole app is a lot more responsive in native mode. It is not really measureable but it just seems a lot more fluid.

I will try to compile VCV Library - Valley Plateau as this is really resource intensive and I will find out how this behaves. It might take some time because this plugin heavily uses SSE instructions only available on intel cpus. I’ll post more when I get some results.

4 Likes

Interesting! Have you also read/followed this thread:

In there is the big Dexter test patch. Worth to use for testing.

Also have you compared your port with findings from Patrick @heapdump ? He already did some research on building/porting, maybe you can combine your findings?

Exciting to see that there is a working in progress development!

1 Like

@Eurikon Thanks for pointing that out! I didn’t even know that there already is porting initiative started by someone.

@heapdump I will be happy to help with your initiative if you’re interested :slight_smile:

In the meantime I did some tests with this patch: 2020-11-20-rsmus7_36x_Dexter_001.vcv

I just had to switch mixer because the one from patch does not include source code. Here is my version. My patch it completely based on @rsmus7 just with different mixer:

2022-11-20-mmik_36x_Dexter_001.vcv (10.4 KB)

Rosetta2 looks like this:

Native looks like this:

I’m on standard M1 (not pro). Both are struggling with this patch but native wins. It is more responsive and renders a lot faster. There is a lot of cracling sounds on both versions but native works better in my opinion.

7 Likes

Pretty impressive!
I guess with further code optimisation and plugins written for or with M1 compatibility it can only get even better :slight_smile:

Thanks for the effort so far!!

1 Like

I took a step back to cleanup and push my changes to forked repo so everyone can use it. You can find my branch here: https://github.com/gerwazy102/Rack/tree/arm-compatible-rack

You can also easily compare changes I did with v2 branch here: https://github.com/VCVRack/Rack/compare/v2...gerwazy102:arm-compatible-rack

As you can see, not a lot of changes were needed to make this work somewhat correctly.

I have no experience in c++ at all. I work mostly with golang on daily basis so my apologies if something is wrong with this code :wink:

EDIT:

I started compiling all plugins I found in library repo: https://github.com/VCVRack/library/tree/v2/repos

I also created a list of compatibility issues for each plugin here: https://github.com/gerwazy102/Rack/wiki/Arm-plugin-compatibility

List is still growing as I have limited time to play with this, I hope to have all plugins listed in coming days to pinpoint problems that might occur when actual m1 release is on the horizon.

8 Likes

Just finished doing list of modules working out of the box.

List of plugins taken from here: library/repos at v2 ¡ VCVRack/library ¡ GitHub

  • Number of plugins: 200
  • Number of plugins built succesfully: 155
  • Number of plugins failed: 45

Detailed list here: Arm plugin compatibility ¡ gerwazy102/Rack Wiki ¡ GitHub

3 Likes

Not that it matters much to me, but your tests using my Meander module (PS-PurrSoftware plugin) appear to be against my V1 “master” branch, maybe. My V2 branch is “master-V2”.

Thanks for pointing that out! I will change it to “master-V2”

I created a release with plugins packed so everyone interested can test M1 version themselves :slight_smile:

Here is link to release: Release VCV Rack2 - M1 port with supported plugins ¡ gerwazy102/Rack ¡ GitHub

Release contains two files:

  1. Rack2FreeM1.zip - this contains Rack2 App
  2. plugins.zip - this contains all plugins I was able to compile

You should be aware that my release has rack directory changed from ~/Documents/Rack2 to ~Documents/Rack2M1 to avoid breaking Rosetta2 based Rack deployments. You should also be aware that you should not login to library from this release because it doesn’t contain any plugins compatible with M1 cpus.

One other thing is this release is not signed and untrusted so you won’t be able to open it right away. You will need to do sudo xattr -c PATH_TO_APP/VCV\ Rack\ 2\ Free.app in your terminal in order to open it.

Plugin installation is pretty simple. When you open Rack2 app just go to “Help->Open user folder”. Finder window will popup. You can drag and drop plugins from plugins.zip into “plugins/” directory in Rack user home folder.

Hope you enjoy it! :slight_smile:

BTW: If any plugin creator wants me to remove their plugin from plugins.zip I will do that immediately after I get any message regarding this.

3 Likes

Please remove PS-PurrSoftware Meander from plugins.zip until I understand this distribution better.

No problem, I just removed it at updated my release.

About this distribution: (I wouldn’t even call it distribution) I created it so everyone can test and use Rack2 on M1 chipset and compare with Rosetta2 emulated one. It is completely open source and everything I modified in source code of Rack2 is publicly available in my fork of Rack2.

I just fell in love with Rack2 and I admire that it is kept in free to use/opensource convention so I decided to give small contribution to the software. I hope that sometime in the future Rack2 will be officially available on M1 CPUs so I’m trying to figure out how big effort it is to make this happen.

I also know there are so many plugins that one person is not able to test all of those - that is why I created release public for everyone to use.

I do not intent to use anyone’s work for my profit. Just learning and tinkering myself as I became interested in sound programming lately and this is the most interesting way to start for me :slight_smile:

6 Likes

Thanks so much for your effort in making this Native M1. Can’t wait to test.

1 Like

I am getting a ’ this file is damaged’ error after unzipping. EDIT: I see your instructions now, will try this out.

however, for the purposes of licenses it is distribution. Most open source licenses do place restrictions on redistribution of binaries and/or source. So it would be good to verify that your aren’t unintentionally violating anyone’s license.

@Squinky - You are right, I compiled a list of licenses for plugins: Built plugins licences ¡ gerwazy102/Rack Wiki ¡ GitHub

It seems all plugins use open licenses and I’m allowed to recompile and redistribute software as long as I attach copy of license to each plugin - which is the case because vcvplugin format keeps license text along plugin binary.

Of course this doesn’t mean that I will publish plugin if author doesn’t want me to :slight_smile: One word from author and I will remove given plugin as fast as I can.

1 Like

Hi, i am still learning how to do this things on Mac.

The part in the command that needs to be edited (i guess), called “path_to_app”, what exactly is this path?

Considering that i placed the Rack app from your distribution in the default ‘Applications’ folder.

edit: i found it.

For anyone that also needs to know:
enable “Show path bar” in the Finder View menu.

Were you able to compile Plateau? :slight_smile: