repl-electric / sonic-pi.el

Emacs running SonicPi
89 stars 21 forks source link

run Emacs with sonic-pi.el on Raspberry Pi OS Bookworm (with pipewire) #35

Open icaruszhu opened 7 months ago

icaruszhu commented 7 months ago

Many thanks for the wonderful package, which I have been using with Emacs on my Linux desktop and Raspberry Pi OS (Bullseye) all the time!

sonic-pi.el on Emacs has worked fantastically well and it allows me to write customised elisp functions I need beyond what the official SP IDE could offer.

Recently, I have installed the (relatively) new Raspberry Pi OS (Bookworm) which uses pipewire instead of pulseaudio. (The official Sonic Pi website also has the Bookworm version ready for Raspberry Pi.) I can use this new release with sonic-pi IDE with no problem.

However, Sonic Pi's Bookworm release does not seem to work immediately with sonic-pi.el. I have configured the sonic-pi-path for Emacs to locate the spider-server.rb. (I am certain the new path is correct.) Unfortunately, the spider-server did not boot when I tried sonic-pi-jack-in in Emacs on the Bookworm version of Raspberry Pi OS.

I apologise if this might be a pipewire issue instead of sonic-pi.el strictly speaking. I have tried for many hours but with no success (but I really want to run Sonic Pi on Emacs with Raspberry Pi). Any advice regarding how to find more information about a solution would be much appreciated. Thank you!

icaruszhu commented 7 months ago

Here's the error message I got from Emacs' sonic pi message buffer after running sonic-pi-jack-in:

Welcome to Sonic Pi d[-_-]b
-=π   -=π  -=π   -=π
π> /exited-with-boot-error (Server Exception:
 exit
 ["/opt/sonic-pi/app/server/ruby/lib/sonicpi/tau_comms.rb:96:in `exit'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/tau_comms.rb:96:in `rescue in block_until_tau_ready!'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/tau_comms.rb:92:in `block_until_tau_ready!'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/tau_api.rb:69:in `block_until_tau_ready!'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/tau_api.rb:49:in `initialize'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/runtime.rb:1526:in `new'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/runtime.rb:1526:in `initialize'", "/opt/sonic-pi/app/server/ruby/lib/sonicpi/lang/sound.rb:70:in `block (2 levels) in included'", "/opt/sonic-pi/app/server/ruby/bin/spider-server.rb:243:in `new'", "/opt/sonic-pi/app/server/ruby/bin/spider-server.rb:243:in `<main>'"])

Not sure what went wrong. The spider-server.rb does not seem to run correctly.