sonic-pi icon indicating copy to clipboard operation
sonic-pi copied to clipboard

Apple Silicon support

Open radutzan opened this issue 4 years ago • 15 comments

Hi there! I tried running Sonic Pi 3.3 Beta 2 (from Patreon) on my M1 MacBook Air, and it launches, but it doesn't make a sound. Happy to test builds and give feedback!

radutzan avatar Nov 18 '20 06:11 radutzan

Hi @radutzan 😄 Any chance of details from the log files? Quit Sonic Pi after starting a session that displays this behaviour, then you can find the logs in ~/.sonic-pi/log. Particularly of interest I think in this case would be server-errors.log, server-output.log and scsynth.log 🙂

ethancrawford avatar Nov 18 '20 07:11 ethancrawford

I can replicate this issue on an intel Mac running the latest macOS. So this seems to be an issue with macOS Big Sur, and not the apple silicon.

scsynth.log server-errors.log server-output.log

lolleko avatar Nov 18 '20 14:11 lolleko

Hi @ethancrawford! Just saw this, here are the log files. Hope this helps!

scsynth.log server-errors.log server-output.log

radutzan avatar Nov 20 '20 00:11 radutzan

FWIW @lolleko, the same build (3.3 beta 2) runs fine on my Intel Mac, I even recently recorded a set with it. Looking at the logs, the issue seems different.

@ethancrawford, having tried many times, I can confidently say that all sessions exhibit this issue at the moment. I'll be on the lookout for any follow-ups!

radutzan avatar Nov 20 '20 00:11 radutzan

@radutzan - it may be related to this: (quoted from a post by Sam, elsewhere:)

It looks like there might be a bug in SuperCollider’s scsynth engine (which Sonic Pi uses for its audio) running under Big Sur. It could be that this means that SuperCollider thinks you want to play your sounds years into the future, so is patiently waiting for that to happen ( General support ticket for macOS 11 Big Sur · Issue #5168 · supercollider/supercollider · GitHub 2)

(See https://github.com/supercollider/supercollider/issues/5168#issuecomment-731640960 for the comments on this in the SuperCollider repo)

If it's this, then we'll be having to wait until they have a fix in order to bring an updated scsynth into Sonic Pi.

Although, you mention Sonic Pi works on a separate computer - does that one also run Big Sur?

ethancrawford avatar Nov 24 '20 04:11 ethancrawford

@ethancrawford, yep, my 16" i9 MBP is running macOS 11 and Sonic Pi 3.3-beta2 with no issues.

radutzan avatar Dec 05 '20 18:12 radutzan

Update: I tried 3.3-beta 3 on my M1 Air and it seems to work! I haven't run any complex code on it, but it definitely keeps time, makes sounds, and even the scope visualizer works. Fun stuff!

radutzan avatar Dec 24 '20 19:12 radutzan

Yes! This is very welcome news indeed!

Hopefully we can ship a native Apple Silicon release early next year, but until then it's really great that it works in any way at all :-)

samaaron avatar Dec 24 '20 20:12 samaaron

Was also able to duct tape together a build from source that works well on my m1. I don't understand the packaging / linking system, so I can't drag the app to /Applications or it stops working. Must've wound up with some absolute paths in there. Also I have to open it with open.

The tricky bit was signing the package. Had to create a signature in xcode, then codesign --force --deep --sign - Sonic\ Pi.app.

Overall really impressed with the teams dependency choices. Building on a brand new architecture and os "just works" ish.

Looking forward to an official release so I can be less janky.

briandunn avatar Jan 13 '21 01:01 briandunn

@briandunn - nice work!

I don't yet have my hands on any M1 hardware, but I've now had several reports from users that our latest Beta (available on Patreon https://patreon.com/samaaron) works just fine over there. This means that hopefully the next official release will too :-)

I have been very careful with dependency choices as pretty much the hardest part of the whole Sonic Pi project has been maintaining it across multiple platforms!

samaaron avatar Jan 13 '21 08:01 samaaron

FWIW I just tested 3.3.1 on M1 macOS 11.2.1 and it works fine. It's not native, but the app runs and makes sound.

danielhoherd avatar Feb 21 '21 15:02 danielhoherd

Any news on when Sonic Pi will be available on ARM Macs natively? This is a sticking point for me personally.

7ombie avatar Dec 11 '22 23:12 7ombie

@7ombie - not for a while, sorry. SuperCollider hasn't quite yet released an ARM native version (it's coming pretty soon though). Also, I don't yet have an ARM Mac - which is the biggest blocker.

I'm aware that Sonic Pi runs well with the intel emulation, have you tried that?

samaaron avatar Dec 12 '22 00:12 samaaron

Just a heads up that I built a v5 pre-release version of Sonic Pi for Apple Silicon. This is currently available to Patreon supporters and more information can be found here: https://in-thread.sonic-pi.net/t/sonic-pi-for-apple-silicon/7647

When the public v5 release ships (possibly late summer early autumn 2023) it will ship with an Apple Silicon specific build.

samaaron avatar Apr 10 '23 06:04 samaaron

FYI: I also succeeded to run Sonic Pi on M2 with some tweaks

ocadaruma avatar Jun 27 '23 04:06 ocadaruma