Hi. I’ve had some success with this but have no sound.
I’m on a fresh xubuntu 18.04 LTS virtual machine. Sonic-pi seems fine, but there’s no sound. Would you have any pointers to try?
I removed pulseaudio. No change but I don’t need it. Sonic-pi is the only thing I’ll use this vm for.
Tried looking at settings in jack through qjackctl… I’m lost.
Tried a sample in supercollider. Again, no sound.
Ideas?
as an introduction to how Jack/qjackctrl can be configured, I find this introduction useful.
Before that you should make sure that you can play and hear any sound at all. Can you? Then forget about the rest of this posting and try to set up Jack. You can use Audacious to check (in case there are still or other problems with Sonic Pi).
If no sound at all: You might start with speaker-test and aplay (something like aplay -D front foo.wav at the command line).
You definitely don’t have to remove pulse-audio to use Jack; it might even be better to have it until your sound works. It will be suspended once you start Jack (I might be able to give some advice at this point allthough I am not an expert).
Thanks, that did help. It led me down a path that at least got SP 2.10 working on my real machine.
For Kubuntu 18.04 LTS : sudo apt install sonic-pi sonic-pi-server-doc supercollider pulseaudio-module-jack
In qjackctl: Setup > Options: “Execute script after Startup:” pacmd set-default-sink jack_out
To run sonic-pi:
In qjackctl: Press Start sonic-pi &
There’s probably a way to start jack directly but this works.
If I get brave, maybe I’ll have another shot at compiling SP3. Meanwhile it looks like 2.10 for me.
@DavidMc: You might have already tried this, but maybe not: I don’t start Jack via qjackctrl; this did not work for me a while ago (never found out why) and so I created a - very simple - script called jack-internal, which I run. (Additionally I have an external audio device which, if pluged in, I trigger with another audio start script.)
It looks something like that for my internal soundcard:
Hi,
Thanks for posting that. It is really helpful, and I think I almost have my DIY build sonic-pi ready to build. However I don’t want to use the script, as I already have supercollider and sc3-plugins installed (from TidalCycles usage) and erlang etc etc BUT I would like to build the rest of sonic-pi and have a play with it.
I’m having a really hard time figuring out your paths in the script. For example {OSMID_DIR}. Where should that be? If I have the sonic-pi source checked out at ~/my_dev_stuff/sonic-pi, then OSMID_DIR is where, please? Answering that should answer the same question I have about the erlang code.
Well i’m not the author of that script i have just changed some lines and sadly i do not master at all all the stuff. so i can not help.
All i know is that i use this script from the github repo last week, and it works.
I guess there will be soon a lot of changes in the way of building the app with the next version if i believe the intense activity on github.
cheers
Thanks for replying. I figured it out. Although I think in future I’d be better just to install my Tidal stuff in /opt and use the apt package for sonic-pi. Simpler!
In file included from mainwindow.cpp:50:0:
visualizer/scope.h:25:10: fatal error: kiss_fft/kiss_fft.h: No such file or directory
#include "kiss_fft/kiss_fft.h"
in the last step in the build script. But I didn’t run the whole script, I ran all the bits except building supercollider+sc3-plugins, as I have those already
There is a kiss_fft.h in sonic-pi/app/gui/qt/external/kiss_fft/
The latest installation for linux now uses cmake scripts. Still under development, but it works OK on my Pi4 under Raspbian Buster.
The cmake scripts includes the new kiss_fft/kiss_fft stuff which is used for the new scope spectrum trace
Have a look at the unix_prebuild.sh and unix_setup.sh scripts. At present MacOS is handled a little differently. On Raspbian I had also to build and install osmid binaries to app/server/native/osmid, to build the two erlang beam files from osc.elr and pi_server.erl using erlc, to add a soft link to ruby in /app/server/native/ruby/bin and to gem install aubio. Otherwise these two scripts prepared the whole build which was executed in the build folder they set up with cmake --build . --config All
You will notice that Sam Aaron has now moved many of other build scripts in Sonic Pi to an archive folder. The intention is to produce a unified scheme using cmake to build either for Windows Mac or Linux.
Things are still evolving and change fairly frequently, but looking along these lines above should get you on the way.
Thanks for that. It certainly built some stuff before errorring out this time. Which feels like progress. I’ll keep chipping away at it.
Ah, OK, so I osmid in app/gui/qt/external/, moved it to app/server/native/ as you wrote (and I skipped over!) and it has built and is working. That’s great! Thanks for the help
A bit more than that. I’ll try and put some more details together for you. Things are still a bit fluid and changing at present.
EDIT
I haven’t forgotten, but there are quite a few changes taking place at present, and I prefer to wait until the dust has settled. For example I have just added a PR to allow RPi to utilise the latest scope change, as I was getting compile errors.
Basically you have to make sure you have all the supporting packages loaded via apt-get, build osmid as before, and install the binaries m2o and o2m to native/osmid, have erlang installed (I used erlang-base on the Pi) and build the osc.erl and pi_server.erl files to their equivalent beam files in the erlang folder. As far as scsynth and the plugins go these were picked up automatically by installing supercollider-server and sc3-plugins.
for the rest, create a short cut to the ruby binary in server/native/ruby/bin
I used (from the qt folder):
ln -s `which ruby` ../../server/native/ruby/bin
to do this.
run
../../server/ruby/bin/compile-extension/is.rb
#now for some stuff using cmake
#I think I had to `gem install aubio` first on RPi too
./unix-prebuild.sh #builds the documentation
./unix-config.sh #sets up the build folder
cd build
cmake --build .
when this has finished you should have the new sonic-pi binary in the newly created build folder
You can run it from there, or from <SONIC-PI_SRC>/bin/sonic-pi
You may have problems with the prebuild script. It deletes an existing ruby-aubio-prerelease gem from the vendor folder. (subsequent runs will show an error which you ignore. However I found I needed the gem aubio install (It was version 0.3.3). You also need as part of the initial packages installed libaubio5 (on debian)
NB at time of writing the latest commit to Sonic Pi is #3e587fc. There is a bug in the earlier commit Merge pull request#2234from cmaughan/feature/threaded_analyzer
I have submitted a PR Update scope.h syntax #2237 to cure this, but you will have to carry out the changes yourself manually if you build right now.
OK. Are you building on a Pi4 or on ubuntu 18.04 LTS? If the latter, I tried this on a virtual machine today, and there are a significant number of problems there, particularly with rugged and aubio, which I haven’t solved. I think a later ubuntu version may be OK, and hope to try that.
If you are building on a Pi then it builds OK. Yes the prebuild does all the documentation stuff, and the config script builds the gui, so things are much simpler.