I picked up my pisound today, after they tried to deliver when I was out yesterday, and have just set it up to work with Sonic Pi 3 on a beta build of Raspbian Stretch. I thought I would report back on how it worked, and make some comments and corrections on the Sonic Pi FAQ. Building the case was fun, but it all fitted together nicely. The only problem I had was that there was insufficient clearance between the Sound In 1/4" jack socket and my HDMI lead. This was solved by leaving off the hexagonal nut and washer on the socket.
I then installed all the software on a beta build of Rasbian Scratch and I am glad to say that it all installed OK with no problems, although the installation of cython at the end took a HUGE amount of timeā¦Donāt worry it gets there eventually but we are talking many, many minutes. I suggest taking the option to set pisound as the default sound card, when asked, and I also said yes to all the other options.
I then looked at the FAQ for getting Sonic PI working with pisound. I quickly spotted one slight error. The scsynthexteranl.rb file is given the wrong locations. It should be:
/opt/sonic-pi/app/server/sonicpi/lib/sonicpi/scsynthexternal.rb
and not
/opt/sonic-pi/app/server/sonicpi/scsynthexternal.rb
as specified in the FAQ
You should carry out the change notified there in the case statement, but also scroll to the end of the file and correct the two commands to connect inputs to scsynth
The
jack_connect SuperCollider:in_1 system_capture_1
and
jack_connect SuperCollider:in_1 system_capture_1
should be:
jack_connect SuperCollider:in_1 system:capture_1
and
jack_connect SuperCollider:in_2 system:capture_2
as shown in the screen shot.
Secondly, when you come to start jackd by using Qjackctl it didnāt appear on the menu in my beta Stretch build, but I ran it from a command line with qjackctl &
You will find that the screen layout is a little different from that shown in the FAQ diagram. The setup screen has different tabs added. you will need the Settings tab, and you adjust both the Parameters and the Advanced tabs.
The two screen shots below show the settings I used. Essentially they are similar same as for the screenshot in the existing FAQ, although I altered the Port Maximum number on the Advanced tab from 256 to 1024, as I was running a Raspberry Pi3, and Sam Aaron has recently upgraded the maximum number of ports for Sonic PI 3 on the Pi3 to 1024. Also make sure you set the midi driver to seq on the Advanced tab. I also played quite a lot with the settings for Sample_rate, Fremes/Period and Periods/Buffer. These are a trade off between low latency and Sonic Pi being able to play notes without breakup or scratching. You want to get farily near to the limit, and that may depend upon the music that you are trying to play in Sonic Pi. Currently I am using Sample_rate 88200, Frames/Period 1024 and Periods/Buffer 2, which is giving a reasonably dropout free performance, but you may find you prefer different settings. As a guide, the settings used by Sonic Pi normally are 44100,1024 and 3, but this gives a rather high latency, and was set really before midi and audio input became a realilty for Sonic Pi. You can go for a very low latency using the figures in the current FAQ picture, 96000,256 and 3. This will give exceptionally low latency, but you will get a lot of breakup in the notes. Unfortunately Sonic PI takes a long time to start up at present, and so it is quite a tedious process testing various combinations. Basically, quit Sonic Pi, press the stop button in Qjackctl, go to setup and adjust the parameters, then press the Start button in Qjackctl, wait for it to start, and the restart Sonic Pi.
To use Sonic Pi 3,start qjackctl going with the settings in the two screen shots. Then start Sonic PI3, It takes quite a time to initialise, but gets there eventually. You will find that the Volume icon on the top right of the screen is inaffective, but you can control volume output with the volume knob on the pisound. It is also affected by the mastervolume slider in Sonic Pi. I sent the audio output of the pisound card to a little Drok amplifier module I bought recently on Amazon. This was then fed to two large speakers I already had. It is rated at 50W so gives lots of oomf!
On the input side, I connected a Korg X5DR module audio output to the Sound In jack, and tried it with the new live_audio command in Sonic PI 3. It worked very well indeed. I also tried connecting a USB midi keyboard (an M-Audio Oxygen8) to the Pi3, and got that to play notes in Sonic Pi3 using the new midi commands incorporated in it. Again it worked very well with low latency.
So my initial impressions of pisound ar that it is a really excellent bit of kit. Something the Rasberry Pi and Sonic Pi have been sorely in need of for some time. If youāre at all serious about making music with Rasberrry Pi, then buy one.