Closed owenstranathan closed 2 years ago
This looks like the same issue or at least the same error coming from scsynth. https://github.com/supercollider/supercollider/issues/4395 But I think the fact that I can tie it to the audio interface is novel.
@owenstranathan - you may or may not find some useful comments in https://github.com/sonic-pi-net/sonic-pi/issues/2678... Unfortunately, SuperCollider has had occasional problems with PortAudio for years now, which still has some issues with various configurations and does not provide helpful error messages.
@ethancrawford Thanks for the quick reply.
I followed that issue and then another linked within and ended up at #2528
The fellow there seems to have had success by changing the properties on his device to match the sample rate specified in the sonic pi audio-settings.toml
So I did the same. And sure enough, it works
My output device was previously defaulting to 16bit, 48000Hz.
I set it manually to 24 bit, 44100Hz, and the start-up failure is resolved.
Interestingly enough I tried it the other way and it doesn't work.
I tried to leave my device sample rate unchanged at 48000 Hz and set the sound_card_sample_rate
value in audio-settings.toml
to 48000 Hz and the crash persists.
So it doesn't seem like adjusting the configured sample rate to match the device sample rate will always fix the issue.
I'm not sure this could be resolved programmatically but if there is a way to query the audio device being used's sample rate and compare it with the configured sample rate then the issue could at least be logged I think.
I'm not familiar with how SonicPi achieves any of this but there must be some windows API for accessing that information.
If someone could point me to the area where these things happen in the code I could try tinkering around with that in my spare time.
If that's not agreeable I could update/add to documentation about this issue specifically. Let me know if I can help.
Thanks again!
Hi @owenstranathan - apologies for the delay. It's not exactly the same thing, but you will notice at https://github.com/sonic-pi-net/sonic-pi/blob/main/app/server/ruby/lib/sonicpi/scsynthexternal.rb#L322, we detect the input and output sample rates of the default sound device on MacOS, and log various messages related to this. I'm not quite sure how something similar might look for Windows, but thought it was worth pointing out the above at least 🙂
We have completely overhauled the building and booting systems in the recently released v4
of Sonic Pi:
https://github.com/sonic-pi-net/sonic-pi/releases
Please give that a try and feel free to create a new issue if you're still having problems.
Hello hard-working maintainers, First I'd like you to know just how much I appreciate Sonic-Pi. It's really freakin' sweet. Second I have an issue (no duh) I just purchased a Behringer U-PHORIA UMC202HD audio interface so I could record my analog synth and use the samples in sonic pi. (link to the interface: https://www.amazon.com/gp/product/B00QHURUBE/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1) One cool thing about the interface is I can plug headphones into it and hear my PC audio through it while I directly monitor the synth output. I'd hoped I could just run some sonic-pi code in the background over the interface and doodle on the synth, free form, but... When I have the sound output set to the audio interface sonic pi will not start. 😢
You can see the error below under Scsynth Output:
Alone you wouldn't think that was the issue but if I change my output device then the program starts and works as expected. I couldn't find any issues that seemed to relate to this (it's a pretty dang specific issue). Are there any known driver compatibility issues with Sonic Pi and this specific audio interface?
Thanks in advance!
Sonic Pi Boot Error Report
System Information
GUI Log
C:\Users\owen\.sonic-pi\log\gui.log
Server Errors
C:\Users\owen\.sonic-pi\log\server-errors.log
Server Output
C:\Users\owen\.sonic-pi\log\server-output.log
Scsynth Output
C:\Users\owen\.sonic-pi\log\scsynth.log
Process Log
C:\Users\owen\.sonic-pi\log\processes.log