Rough Start (s.boot; error)

Hello!

I am new to the community and somewhat new to SuperCollider. I have been running SC on a Windows machine successfully over the last year. However I am now attempting to get SC to run on a Pi3 and am having some trouble getting a server to boot. See terminal output below.

Any thoughts? “No such file or directory” with regard to a socket? Is this language because *nix treats data as files?

Anyway, looking forward to spending some time on this forum and learning more about SuperCollider with you all. :slight_smile:

sc3> s.boot;
-> localhost
sc3> booting server 'localhost' on address: 127.0.0.1:57110
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
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
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
Failed to connect to session bus for device reservation Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

Audio device hw:0 cannot be acquired...
Cannot initialize driver
JackServer::Open failed with -1
Failed to open server
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
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
terminate called without an active exception
could not initialize audio.
RESULT = 0

This one is the real error: the audio device is busy and JACK couldn’t take exclusive control over it.

Linux audio is… complicated. There’s ALSA, which connects to USB or built-in soundcards. Normally you don’t have to fuss with that (but it’s good to know that it’s there, because JACK uses it to get to the soundcard).

For consumer audio, there’s PulseAudio on top of that. Most Ubuntus are set up so that PulseAudio grabs the soundcard at startup (so that web browsers and media players work out of the box).

JACK needs to take over control of the soundcard (at which point, if you add pulse-jack modules, PulseAudio can connect to the JACK server). I think (though I never understood it very well) that a “D-Bus” subsystem in Linux is supposed to tell PulseAudio to release the soundcard, but for whatever reason, this isn’t happening in your system.

How use PulseAudio and JACK? | JACK Audio Connection Kit is the usual starting resource. It’s a very common question for new users of pro audio software in Linux.

hjh

1 Like

Ok yes this is very useful! I’ll start digging in that direction and report back on what I find.

Alright! I resolved the error by setting the interface in JACK to ALSA hw0. Booting up with s.boot; now works without error! I was expecting more of a fight from JACK. I can’t complain.

Now on to the next error which is an issue with scvim installed via vim-plug

"foo.scd" [New File]
Error detected while processing FileType Auto commands for "supercollider":
E492: Not an editor command: packadd scvim
E492: Not an editor command: packadd scvim
E492: Not an editor command: packadd scvim

This is what I have added to .vimrc

call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')

Plug 'tidalcycles/vim-tidal'
Plug 'supercollider/scvim'

call plug#end()

filetype plugin on

au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd set filetype=supercollider
au Filetype supercollider packadd scvim

let g:sclangTerm = "x-terminal-emulator -e $SHELL -ic"

Also setup an symlink with:

ln -s ~/.vim/plugged/scvim/sc "/home/pi/.local/share/SuperCollider/Extensions"

Been banging on this one since last night. Any thoughts?

You might not get very precise guidance here since this is a vim plugin management issue, not a sc issue.

There’s quite a lot of conflicting info out there about installing and managing vim plugins due to the long history of the editor and the fact that native plugin management is a relatively recent addition.

IMO there aren’t many good reasons to use a third party plugin manager for vim at all these days and my advice would be that if you’re just getting started with vim, it makes sense to stick to the built in solution, read the documentation, and only pick up another plugin management tool if you have a definite need for it.

Anyway, I don’t know anything specific about vim-plug, but the packadd command is part of vim’s native plugin manager. Moreover I don’t think that you’ll find that SCVim adds enough overhead to make conditional loading worth the trouble. You may find this answer helpful.

@catniptwinz Good point. I’ll try using the native plugin manager and check out the link you shared.

Is there a way to use SuperCollider without Vim or Emacs over a terminal session? I’m using a vintage computer to access the Pi3 which is why I went the Vim route in the first place. Should I be using scide?

If you’re not requiring sclang to access any file resources on the Pi, you could also run scide on your laptop, and connect to scsynth running on the Pi via network (udp, tcp), if that helps. You could then eventually run your finished scd document headless on the Pi without any editor. Edit: I do believe to remember that scide runs on a Pi 3B, though.

Yeah, both the approach described by @sciss and the one that I understand @Albert to be trying (ssh to the pi and interact with scvim thru the ssh session) should work.

Reasons to prefer scvim over scide would be:

  • you’re already a vim user
  • you want/need to run your editor in a context where qt is not available

Otherwise, use whatever you’re comfortable with.

@Sciss I’m on a Z80 machine (EPSON PX8) running Kermit tools over RS232 to connect to the Pi3 on its GPIO pins. Ultimately I am looking for a terminal based way to get up and running.

Does scide work in terminal or is it GUI only? I’m just not sure how I should be interacting with SuperCollider out of the box from terminal. Or if it is built for that.

scide is always a GUI environment, so it cannot run headless. For that you would indeed need a text editor like vim, whether that’s local or via network (have no idea how to run scvim via ssh)

Ok, that explains the cannot connect to X server error when I try to run scide on this machine.

I’ll keep plugging away at getting Vim to work. So far sclang has worked when I use it to boot sc. And perhaps that is all I need because where I would like to end up is in TidalCycles with Vim. And there are only a few commands I need to run against the sc server like booting SuperDirt and configuring a MIDI interface.

Thanks everyone for chiming in. This forum has been very helpful. The learning curve on Linux for me has been steep but soon I will have my head wrapped around all this.

Does scide work in terminal or is it GUI only? I’m just not sure how I should be interacting with SuperCollider out of the box from terminal. Or if it is built for that.

You can also use sclang directly in the terminal, e.g.:

$ sclang
compiling class library...
[...]
sc3> s.boot
-> localhost
[...]
sc3> x = play { SinOsc.ar * 0.1 }
-> Synth('temp__0' : 1000)
sc3> x.free
-> Synth('temp__0' : 1000)
1 Like