Sonic-Pi don't start anymore [FIXED-PATCHED]

Hi to all, I can’t start Sonic-Pi anymore and I don’t understand why. I’ve try to reinstall it but nothing. Here the error message I get.

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 3.1.0
  • OS: Windows 8

GUI Log

C:\Users\Mattia\.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: 8064
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...
[GUI] - UDP OSC Server no longer listening

Server Errors

C:\Users\Mattia\.sonic-pi\log\server-errors.log


Server Output

C:\Users\Mattia\.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

Scsynth Output

C:\Users\Mattia\.sonic-pi\log\scsynth.log

# Starting SuperCollider 2019-10-08 08:21:05

Device options:
  - MME : Microsoft Sound Mapper - Input   (device #0 with 2 ins 0 outs)
  - MME : Stereo Mix (Realtek High Defini   (device #1 with 2 ins 0 outs)
  - MME : Microphone Array (Realtek High    (device #2 with 2 ins 0 outs)
  - MME : Microsoft Sound Mapper - Output   (device #3 with 0 ins 2 outs)
  - MME : Speakers (Realtek High Definiti   (device #4 with 0 ins 2 outs)
  - Windows DirectSound : Driver primario di acquisizione suoni   (device #5 with 2 ins 0 outs)
  - Windows DirectSound : Stereo Mix (Realtek High Definition Audio)   (device #6 with 2 ins 0 outs)
  - Windows DirectSound : Microphone Array (Realtek High Definition Audio)   (device #7 with 2 ins 0 outs)
  - Windows DirectSound : Driver audio principale   (device #8 with 0 ins 2 outs)
  - Windows DirectSound : Speakers (Realtek High Definition Audio)   (device #9 with 0 ins 2 outs)
  - Windows WASAPI : Speakers (Realtek High Definition Audio)   (device #10 with 0 ins 2 outs)
  - Windows WASAPI : Stereo Mix (Realtek High Definition Audio)   (device #11 with 2 ins 0 outs)
  - Windows WASAPI : Microphone Array (Realtek High Definition Audio)   (device #12 with 2 ins 0 outs)
  - Windows WDM-KS : Missaggio stereo (Realtek HD Audio Stereo input)   (device #13 with 2 ins 0 outs)
  - Windows WDM-KS : Speakers (Realtek HD Audio output)   (device #14 with 0 ins 2 outs)
  - Windows WDM-KS : Gruppo microfoni (Realtek HD Audio Mic input)   (device #15 with 2 ins 0 outs)

Booting with:
  In: MME : Stereo Mix (Realtek High Defini
  Out: MME : Speakers (Realtek High Definiti
SC_PortAudioDriver: PortAudio failed at Pa_OpenStream with error: 'Unanticipated host error'
could not initialize audio.

Process Log

C:\Users\Mattia\.sonic-pi\log\processes.log



Clearing pids: []
No pids to clear :-)
Started [8064] [-] "C:\Program Files (x86)\Sonic Pi\app\gui\qt\release\..\..\..\..\app\server\native\ruby\bin\ruby.exe"  --enable-frozen-string-literal -E utf-8 "C:\Program Files (x86)\Sonic Pi\app\gui\qt\release\..\..\..\..\app\server\ruby\bin\sonic-pi-server.rb" -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] C:/Users/Mattia/AppData/Local/Temp/sonic-pi-pids/8064



Hi @Mattia,

I may be wrong, but I suspect this is relevant:
https://github.com/samaaron/sonic-pi/issues/2065#issuecomment-504887347

1 Like

Thank you @ethancrawford!

FIXED!
Now it works.

I have follow the istructions here: https://github.com/samaaron/sonic-pi/issues/1881

  1. Install ASIO4ALL http://www.asio4all.org/
  2. Copy the file here https://github.com/samaaron/sonic-pi/blob/master/app/server/ruby/lib/sonicpi/scsynthexternal.rb#L344 in a new text file
  3. Modify it with “-H”, “ASIO4ALL”, every where in the file is needed
  4. Put it in C:\Program Files (x86)\Sonic Pi\app\server\ruby\lib\sonicpi where the old one was

If someone feels lazy and needs the file already fixed and patched, here is my one: http://www.mattiagiovanetti.com/pub/sonic-pi/scsynthexternal.rb

And now I can write music sound code again! :slight_smile:

1 Like

Fantastic news, enjoy :slightly_smiling_face: