Hello!
I’m fairly new to SuperCollider, especially on Linux, so please forgive me if there is some documentation on my issue already.
I’ve been having lots of issues with both starting up the SC server and volume/distortion issues that make using SC unreasonable at times.
When I first tried to boot the SC server with the IDE, it would not work, so I went down a path of understanding how jack was meant to be used.
I installed qjackctl and when I tried to start jack with default options, I got the following errors:
18:51:37.243 Statistics reset.
18:51:37.246 ALSA connection change.
18:51:37.249 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
18:51:37.283 JACK connection change.
18:51:37.299 Client activated.
18:51:37.299 Patchbay deactivated.
18:51:47.786 Client deactivated.
18:51:55.355 D-BUS: JACK server could not be started. Sorry
Fri Mar 12 18:51:55 2021: Starting jack server...
Fri Mar 12 18:51:55 2021: JACK server starting in realtime mode with priority 10
Fri Mar 12 18:51:55 2021: self-connect-mode is "Don't restrict self connect requests"
Fri Mar 12 18:51:55 2021: Acquired audio card Audio0
Fri Mar 12 18:51:55 2021: creating alsa driver ... hw:sofhdadsp|hw:sofhdadsp|1024|2|44100|0|0|nomon|swmeter|-|32bit
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Fri Mar 12 18:51:55 2021: configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
Fri Mar 12 18:51:55 2021: ALSA: final selected sample format for capture: 24bit little-endian
Fri Mar 12 18:51:55 2021: ERROR: ALSA: cannot set period size to 1024 frames for capture
Fri Mar 12 18:51:55 2021: ERROR: ALSA: cannot configure capture channel
Fri Mar 12 18:51:55 2021: Released audio card Audio0
Fri Mar 12 18:51:55 2021: ERROR: Cannot initialize driver
Fri Mar 12 18:51:55 2021: ERROR: JackServer::Open failed with -1
Fri Mar 12 18:51:55 2021: ERROR: Failed to open server
Fri Mar 12 18:51:56 2021: Saving settings to "/home/jo/.config/jack/conf.xml" ...
18:52:07.613 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Trying jack straight from the command line would produce similar errors:
(base) ➜ ~ jackd -d alsa
jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 24bit little-endian
ALSA: cannot set period size to 1024 frames for capture
ALSA: cannot configure capture channel
Released audio card Audio0
audio_reservation_finish
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
It started to look like it was something about setting the period size was the problem:
ALSA: cannot set period size to 1024 frames for capture
After some lucky Googling, I came across this post that said I had to use a period size of 1008 for my audio driver on this machine/OS (I’m on a Thinkpad Carbon X1 (7th gen) running Ubuntu 20.04.2 LTS).
That seemed to get qjackctl running which seemed like a win. Now when I boot my server in the SC IDE, I get all green. I started to generate some simple sounds, e.g.
{Pulse.ar([100, 120], 0.5, SinOsc.kr(10, 0, 0.5, 0.5))}.play;
with the volume set at 0.0 db, and it was both excruciatingly loud and also very very distorted. I ended up installing the SafetyNet quark to help with that. Now the issue of volume is solved, but the signal itself still sounds very distorted. If I had to describe it in non-technical, layman’s terms, it sounds like a warping or like an overloaded cycling. If I turned the db level down to -60 db, I can actually hear the signal without this distortion happening.
This has been a decent fix as now I can start playing and experimenting with SC, but I don’t think its a long-term viable solution, especially now when I try to record out from SC with sc.record
, the volume is so low you can barely hear anything.
Rarely, if I start jack, then boot the SC server, THEN quit jack (which stops the SC server), and THEN boot the sc server again, the sound works as expected and I can turn the volume up to 0.0 db with no distortion at all. But this doesn’t happen all the time and I’m not sure how best to reproduce it.
Does anyone have any idea what’s going on or what I can do to fix it? I hope I was able to explain my problem well, and if not I’m happy to provide more information. Thank you so much for any help you can provide!