Hello,
Yesterday I ran Sonic Pi just fine on my Mac laptop, but today it just would not start. The difference was that I had my AirPods connected via Bluetooth. Disconnecting them resolved the issue. The log mentions something about mismatched sample rates. I remembered reading something about Sonic Pi having an issue with this. Of course this is nice to have fixed, but in the meantime a clear error message explaining the situation would help people who inadvertently use a mismatched input/output. (I have programming experience so could parse the log)
Log:
` '
/Users/sergebeaumont/.sonic-pi/log/gui.log
[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] - port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] - port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] - port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] - port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] - port: 4560 [OK]
[GUI] - OSC MIDI out port 4561
[GUI] - port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] - port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 30022
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
/Users/sergebeaumont/.sonic-pi/log/server-errors.log
libc++abi.dylib: terminating
/Applications/Sonic Pi.app/app/server/ruby/vendor/sys-proctable-1.1.3/lib/darwin/sys/proctable.rb:163: warning: constant ::Fixnum is deprecated
/Users/sergebeaumont/.sonic-pi/log/server-output.log
Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
- OK
Scsynth port: 4556
- OK
Scsynth send port: 4556
- OK
OSC cues port: 4559
- OK
Erlang port: 4560
- OK
OSC MIDI out port: 4561
- OK
OSC MIDI in port: 4562
- OK
Booting server...
Booting Sonic Pi
----------------
Boot - Booting on OS X
Boot - Checkout audio rates on OSX:
Boot - Input audio rate: 16000.0
Boot - Output audio rate: 44100.0
Boot - Audio input and output rates do not match.
Boot - Attempting to set the input rates to match output rate of 44100.0...
Boot - Starting the SuperCollider server...
Boot - /Applications/Sonic Pi.app/app/server/native/scsynth -u 4556 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 16 -o 16 -U /Applications/Sonic Pi.app/app/server/native/supercollider/plugins/ -b 4096 -B 127.0.0.1
/Users/sergebeaumont/.sonic-pi/log/scsynth.log
# Starting SuperCollider 2018-03-18 10:53:09
Found 0 LADSPA plugins
Number of Devices: 4
0 : "Built-in Microph"
1 : "Built-in Output"
2 : "Serge鈥檚 AirPo"
3 : "Serge鈥檚 AirPo"
ERROR: Input sample rate is 16000, but output is 44100. Mismatched sample rates are not supported. To disable input, set the number of input channels to 0.
could not initialize audio.
/Users/sergebeaumont/.sonic-pi/log/processes.log
Clearing pids: ["29782"]
Clearing [29782]
-- command /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562
-- removing /var/folders/1s/kdg651m51f74hv5mw1n0d44w0000gn/T/sonic-pi-pids/29782
-- politely killing 29782
-- killed 29782
Finished clearing pids
Started [30022] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/1s/kdg651m51f74hv5mw1n0d44w0000gn/T/sonic-pi-pids/30022
' `
Hi, this is unfortunately a limitation of the underlying synthesis engine, SuperCollider.
Please use the Audio MIDI Setup app to ensure that the input and output audio rates are the same before starting Sonic Pi.
in my case, installing jackd solved it, on ubuntu 18.04.
Hi, this is unfortunately a limitation of the underlying synthesis engine, SuperCollider.
Please use the Audio MIDI Setup app to ensure that the input and output audio rates are the same before starting Sonic Pi.
This worked for me in macOS Mojave :)
Most helpful comment
Hi, this is unfortunately a limitation of the underlying synthesis engine, SuperCollider.
Please use the Audio MIDI Setup app to ensure that the input and output audio rates are the same before starting Sonic Pi.