sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.83k stars 922 forks source link

macOS Sonic Pi Boot Error #1473

Closed dislegal closed 6 years ago

dislegal commented 8 years ago

I'm having this error on macOS Sierra Version 10.12.1 (16B2555) on a MacBook Pro (Retina, 15-inch, Late 2013). How do I fix this?

Sonic Pi Boot Error

Apologies, a critical error occurred during startup:

Critical error! - Could not boot Sonic Pi Server.

Please consider reporting a bug at http://github.com/asmaaron/sonic-pi/issues

Sonic Pi Boot Error Report

System Information

GUI Log

/Users/dislegal/.sonic-pi/log/gui.log

[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Server OSC listen port 4557
[GUI] - Server OSC out port 4558
[GUI] - Server incoming OSC cues port 4559
[GUI] - Scsynth port 4556
[GUI] - Scsynth send port 4556
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - launching Sonic Pi Server:
[GUI] - Ruby server pid registered: 39396
[GUI] - waiting for Sonic Pi Server to boot...
.
[GUI] - Sonic Pi Server failed to start with this error message: 
      > Server Exception:
 Unable to boot sound synthesis engine: the input and output rates of your audio card are not the same. Got in: 8000.0, out: 44100.0.
[GUI] - UDP OSC Server no longer listening
...........................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...

Server Errors

/Users/dislegal/.sonic-pi/log/server-errors.log

Server Output

/Users/dislegal/.sonic-pi/log/server-output.log

Sonic Pi server booting...
Detecting port numbers...
Send port: 4558
Listen port: 4557
Scsynth port: 4556
Scsynth send port: 4556
OSC cues port: 4559
Using protocol: udp
booting server...

Booting Sonic Pi
----------------

Boot - Booting on OS X
Boot - Checkout audio rates on OSX:
Boot - Input audio rate: 8000.0
Boot - Output audio rate: 44100.0
Attempting to set both in and out sample rates to 44100.0...
Failed to start server: Unable to boot sound synthesis engine: the input and output rates of your audio card are not the same. Got in: 8000.0, out: 44100.0.
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:342:in `rescue in boot_server_osx'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:310:in `boot_server_osx'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:189:in `boot'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb:30:in `initialize'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/server.rb:70:in `new'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/server.rb:70:in `initialize'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/studio.rb:52:in `new'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/studio.rb:52:in `init_studio'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/studio.rb:44:in `initialize'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/lang/sound.rb:117:in `new'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/lang/sound.rb:117:in `block (2 levels) in included'
/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:123:in `new'
/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:123:in `<main>'
Server is exiting.
Shutting down GUI...
Goodbye :-)

Scsynth Output

/Users/dislegal/.sonic-pi/log/scsynth.log

Process Log

/Users/dislegal/.sonic-pi/log/processes.log


Clearing pids: ["38697"]

Clearing [38697]
  -- removing /var/folders/3n/j1hb07lj7wgb2ws4t4st_7w40000gn/T/sonic-pi-pids/38697
  -- unable to get ProcTable info for: 38697
  -- process: 38697 not running

Finished clearing pids

Started [39396] [-] sonic-pi-server.rb -u 4557 4558 4556 4556 4559 [-] /var/folders/3n/j1hb07lj7wgb2ws4t4st_7w40000gn/T/sonic-pi-pids/39396
samaaron commented 8 years ago

First up - are you using the absolute latest version of Sonic Pi - v2.11? Looks either you have a beta of v2.11 or the final v2.11 isn't reporting itself correctly in the logs.

Secondly, this is an issue with the fact that the input and output rates of your audio cards don't match. Unfortunately this is a technical limitation of the underlying audio engine SuperCollider and isn't something we can fix. The solution is to enter the Sound section of Preferences and choose audio outputs and inputs that have rates that match.

dislegal commented 8 years ago

Thanks for the quick reply @samaaron! 😄 I just downloaded and installed this version about 15 minutes ago from http://sonic-pi.net (after hearing you on TWiT's Triangulation.) This is the exact link: http://sonic-pi.net/files/releases/v2.11.0/Sonic-Pi-for-Mac-v2.11.0.dmg Is there another version I can grab from somewhere to test?

Now that you mention it's an issue with the sound preferences - I had music playing on iTunes via BT to my UE MegaBoom when I was trying to open SPi. Disconnecting the BT speaker and launching SPi worked fine. I've tried this a couple of times now and I only get the boot error when my MBP is connected to the bluetooth speaker. Good to know!

kevin-chau commented 8 years ago

Seems to be the same issue as #1471 Bluetooth audio isn't currently supported by Sonic Pi? Perhaps I'll look into that since I have a bluetooth speaker to test with.

samaaron commented 6 years ago

The issue is that SuperCollider requires the input and output audio card rates to be identical. Unfortunately most bluetooth devices have microphones which are at a much lower rate (often something like 8000 rather than 44100).

In the future I hope to include an ability to select different audio cards and rates in the app and to also disable the input if the rates don't match (which should at least allow you to make sounds!).

However, for now you need to manually ensure the rates are the same. This is possible via the app 'Audio MIDI Setup'.

Closing this for now, but please feel free to open a new issue if you're still having problems :-)