rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sat Oct 12, 2019 3:20 pm

I see that a version of Sonic Pi entitled version 3.1 has been added to Raspbian Buster.
Unfortunately this is NOT the same as Raspbian 3.1 on other release platforms eg MacOS, Windows.(or built from source on linux or Raspberry Pi).
This is because it does not contain some vital elements, namely the two osmid binaries m2o and o2m and the Erlang Support.
These are all needed to support the use of Midi and OSC messaging in Sonic Pi 3.1, the major advance which was added to this release.

You can see that they are missing by inspecting the logs in

Code: Select all

~/.sonic/pi/log
and looking at the osmid_m2o.log, the osmid_o2m.log and the erlang.log

Although the package will run, it will be confusing to those used to using Sonic Pi 3.1 on other platforms, as the midi and OSC facilities will not work. I think the version number should NOT be 3.1 as this is not Sonic Pi 3.1 as defined by the source code.

It is perfectly possible for these features to be added, and Indeed I run Sonic Pi 3.2dev (the latest source code) on both Pi4 and earlier Raspberry Pi on Rasbian Buster, although it will require some adjustment to fit a debian package.

It is good that some work has been done to update the version originally shipped with Buster. It is a shame that it denies users a whole range of facilities (which are documented in the help files) but which will not work on this version.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sat Oct 12, 2019 4:01 pm

You need to talk to Sam Arron, the Sonic Pi author. He is responsible for what goes in and out of Sonic Pi. The build process is quite unpleasant, which is why we don't do it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sat Oct 12, 2019 6:43 pm

That is not the point
What I don't think is a good idea is to publish a version which can cause confusion, as it is a partial Sonic Pi 3.1, and does not include the features of that release. It contains (in the help file features which do NOT work and so should not be published as such.

I am perfectly happy to build SP myself from source. Most users can't do this.
Sam is responsible for what goes in and out of Sonic Pi, and the build is difficult because it involves several different sections coming together.

However, Sam has not been responsible for the current 3.1 version in Buster and was not consulted about it.
In his present circumstances he does not have the resources to develop a new .deb being only partially supported by Patreon supporters, and by his lecturing on Sonic Pi.

This version is to be welcomed as an interim which will suit the needs of those starting out with Sonic Pi on Buster, but it should not be confused with a "full" 3.1 version (which is itself a bit out of date: 3.2dev corrects several bugs and introduces new features, and some restructuring).

Over half the output I produce with Sonic Pi involves using these missing features. eg. my Glockenspiel featured in The MagPi, and other projects involving producing light displays driven by Sonic Pi on a Pi, and Laser Time of Flight sensors driving a Theremin, and a touch sensitive keyboard connected to GPIO pins to mention a few depend on these missing features. and several projects driven by TouchOSC from a tablet. Sonic Pi does not just produce music. It is a powerful controller in its own right for many interesting projects interfacing with other hardware, both on the same Pi or by connecting Pis together (using OSC and midi) to produce for example orchestras of several Pi. (I have run 6 together each playing separate parts).

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sun Oct 13, 2019 8:51 am

So, you are suggesting we remove it? Or what?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sun Oct 13, 2019 1:27 pm

Not necessarily. However it needs to be differentiated as a cut down version.

There has already been one user running into problems because of this. See this thread on in-thread.sonic-pi.net to which I have added a comment https://in-thread.sonic-pi.net/t/akai-m ... di-io/2793

Perhaps you should discuss it with Sam Aaron directly, as I gather he was not consulted at all over the inclusion of this version.

User avatar
scruss
Posts: 3518
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sun Oct 13, 2019 4:02 pm

rbn wrote:
Sun Oct 13, 2019 1:27 pm
Perhaps you should discuss it with Sam Aaron directly, as I gather he was not consulted at all over the inclusion of this version.
It's open source, he doesn't need to be: https://github.com/samaaron/sonic-pi/bl ... LICENSE.md
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6259
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Sun Oct 13, 2019 5:07 pm

We just take whatever is available. As soon as there's a proper package in Debian or Ubuntu, we'll take it, but right now it seems like Sonic Pi doesn't officially support Linux unless you want to build it from source.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Mon Oct 14, 2019 1:59 pm

Perhaps you should discuss it with Sam Aaron directly, as I gather he was not consulted at all over the inclusion of this version.
It's open source, he doesn't need to be: https://github.com/samaaron/sonic-pi/bl ... LICENSE.md
True you can develop and publish your own versions of open source material without getting the original author's permission, but it is is misleading to publish something with a reference number to an existing release which does not support the features of that release, as described in the help files incorporated in the application. It causes confusion to users who expect the software to perform as described.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Mon Oct 14, 2019 2:26 pm

rbn wrote:
Mon Oct 14, 2019 1:59 pm
Perhaps you should discuss it with Sam Aaron directly, as I gather he was not consulted at all over the inclusion of this version.
It's open source, he doesn't need to be: https://github.com/samaaron/sonic-pi/bl ... LICENSE.md
True you can develop and publish your own versions of open source material without getting the original author's permission, but it is is misleading to publish something with a reference number to an existing release which does not support the features of that release, as described in the help files incorporated in the application. It causes confusion to users who expect the software to perform as described.
Not sure how we would document the difference, given there is not any real scheme for doing so. Any suggestions? Note that features often change when moving between platforms, so this isn't entirely unusual.

AIUI, the differences are all pretty obscure with regard to Raspberry Pi, MIDI and ERLANG are not really part of our target audience, which is more from an education point of view. So really from our point of view, this bump to 3.1 is more about bug fixes etc than new features (which may not even work on the Pi even if enabled as they will never have been tested). If anyone is willing to make the required changes, test and report back, that would be good. We won't be doing that, not enough resource.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
scruss
Posts: 3518
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Mon Oct 14, 2019 4:38 pm

rbn wrote:
Mon Oct 14, 2019 1:59 pm
… but it is misleading to publish something with a reference number to an existing release which does not support the features of that release
What's shipped with Raspbian is a build of the 3.1.0 release, just without the optional erlang scheduler and Osmid components. These aren't documented in the Raspberry Pi installation instructions. Without docs or an upstream 3.1 Debian package, there's not much for the Raspbian devs to go on.

I think that this comment might be at the heart of the reason why Sam no longer supports Raspberry Pi.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.
Pronouns: he/him

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Mon Oct 14, 2019 9:43 pm

Not sure how we would document the difference, given there is not any real scheme for doing so. Any suggestions? Note that features often change when moving between platforms, so this isn't entirely unusual.
It would be fairly easy to alter the splash screen which is a .png file to include information such as.
"This version does NOT support the midi or OSC features mentioned in the Tutorial and Language sections"
Or to change the message displayed at the top of each fresh buffer, with a similar message. (see line 431 of the runtime.rb file in the sonicpi lib.)
EDIT or better to alter the info.html file in <sonic-pi src>/app/gui/qt/html to new text like:
Image

AIUI, the differences are all pretty obscure with regard to Raspberry Pi, MIDI and ERLANG are not really part of our target audience, which is more from an education point of view. So really from our point of view, this bump to 3.1 is more about bug fixes etc than new features (which may not even work on the Pi even if enabled as they will never have been tested). If anyone is willing to make the required changes, test and report back, that would be good. We won't be doing that, not enough resource.
As a retired teacher of physics, electronics and computing for 36 year I find the statement that the use of OSC and midi is not useful from an educational point of view an amazing statement to make. Having used Sonic Pi from version one, I have found every new feature added welcome, and the changes in version three to include midi and OSC functionality really opened up a huge range of possibilities. Sonic Pi works extremely well as an adjunct to many electronics projects involving GPIO connected devices, from simple burglar alarms, or touch operated home made keyboards, to communications projects involving passing data between different programs on the same Pi or between separate computers, or to cooperating in visual projects with processing or p5.js or musical bots. These are of considerable interest to secondary pupils studying for GCSE or A-level, and younger pupils as well.

Also I hardly think the differences are obscure when the facilities for using midi and OSC are fully documented in the built in Tutorial and the Language section of the help files built into Sonic Pi. To have them absent, makes this documentation incorrect.

I can appreciate your problems in building Sonic Pi as the source code has not been structured for easy packaging into a .deb, and I think it is great that you have managed to get something working for use on Buster. The build documentation (is not really up to date on main github distro at the top level, which doesn't help. There are several build-scripts files in the app/gui/qt folder for various flavours of linux which can be useful..

I spent some time with the current 3.1 install on Buster and managed to add the missing osmid and erlang stuff fairly easily this afternoon, with some tweaks to the paths stored in util.rb (in the sonicpi library). It works OK, although I have one remaining problem in installing the sys-proctable-1.1.3 gem which is missing from the vendor folder and which is needed for the code in task-register.rb to function. This file controls storing the pids of the various subprocesses for osmid and erlang so that they can be killed off when sonic pi quits. At present this is not working properly, although otherwise it all works fine with midi and OSC. Hopefully I can sort this out, because it works fine on my source build from scratch.

I hope that sooner or later a fully working 3.1 (and to cope 3.2) can be incorporated in Raspbian. Sonic Pi 3.2dev works extremely well on a Pi4 where all its facilities can be fully exploited.
Last edited by rbn on Tue Oct 15, 2019 4:56 am, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 6259
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Oct 15, 2019 2:49 am

Just to stress the point - we do not patch, build or package sonic pi. It has nothing to do with us. We take the best packaging that's available.

Running a build script is one thing. Creating a proper Debian package takes a lot more time and effort. This particular software takes a disproportionate amount of it.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 10, 2020 9:07 pm

FAO jamesh

Now that Sonic Pi 3.2.0 is released for Mac and Windows PC, and since there has been no built package forthcoming for this version, I have decided to produce one, which seems to do the job.
First it is a binary package based on a built image of Sonic Pi 3.2. It is packaged similarly to the build for version 3.0.2 and like that is unique to Rasbian (in this case Buster). The Sonic Pi image is installed under /opt, installed by the .deb file. As such it is not a package for upstream or for supporting other Linux distributions but purely for Raspbian. It has been tested on Pi2, 3 ands 4 models and works on all of them (albeit slow to load on a Pi2). It has full support for all features of Sonic Pi 3.2 including OSC and Midi which is lacking in the current debian package for version 3.1
It also corrects a fair number of bugs in that version, and can work with a cheap usb audio interface giving significant improvement in latency over the built in sound output on the Pi.
If you are interested in looking at it with a view to incorporating it in Raspbian please let me know how I can get it to you.
If not then we will probably make it available on sonic-pi.net

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 10, 2020 10:19 pm

Sounds interesting, but I am not the one who does the packaging. I'll pass this on to the guy who does. Thanks for your efforts!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 404
Joined: Fri Dec 26, 2014 11:02 am

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Thu Mar 12, 2020 10:49 pm

The version of Sonic Pi 3.1 which is currently packaged and available in our repos is a proper rebuildable Debian source package rather than a binary-only version.

We did use binary-only packages for a few years - which is why the 3.0.1 package is binary-only - but they are a pain for future maintenance. (Contrary to what some people claimed, this is the actual reason we were forced to use an older version of Sonic Pi when we upgraded Raspbian to buster - we couldn't rebuild for buster from the binary-only packages we had, so had to fall back on the only source package which could be rebuilt for buster, the older version in the Debian archive.)

Given the problems which binary-only packages have caused us in the past, I'm afraid we won't be hosting any more of them now we have a proper source package which can be rebuilt for future versions of the OS. If you'd like to create a full Debian package - for which the version of 3.1 in our repo would be a good template - we would be happy to host it, but for us, moving to a binary-only package, even of a newer version, would be regarded as a step backward.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 17, 2020 12:48 pm

Thanks for your comments, and I can appreciate your viewpoint.
The main problem with the current 3.1 build is that although it is a "proper" debian package, it does not include two very significant features of Sonic Pi, namely its support for MIDI and OSC messaging. These add hugely to its capabilities, for example enabling the program to interact with devices connected to the GPIO pins both for input and output, driving led displays etc, or a theremin project (published on the Raspberrypi.org site), which no longer works with the buster deb version 3.1 (although it will work with a self build full 3.1 version)
Essentially there are two binary files m2o and o2m produced by osmid (https://github.com/llloret/osmid.git) which are required to make this work. Probably it needs osmid to be a .deb package as well which could be incorporated as a sonic-pi dependency. The only other addition is the erlang-base package and the trivial building of two .erl files to their .beam equivalents.

Hopefully it will become easier for a Sonic Pi deb to be built in the future as there is currently a lot of effort being put into making the whole build produced by CMake scripts, across several platforms. There are significant improvements and bug fixes as well in version 3.2 which allow it to run extremely well under raspbian buster.

I am very much a .deb packaging beginner and I'm not sure that I can go much beyond producing the current binary package which works well.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 17, 2020 2:36 pm

I'm not convinced MIDI and OSC are so vital for the Pi ecosystem. SonicPi has been around for years without them, and they don't do anything much for our educational target audience - they are much more useful to musicians than pupils. Pi's are primarily for computing education, not musical education, although obviously the borders are vague.

Although, should you be successful in packaging the latest version in source form, that would clearly be a good addition.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

rbn
Posts: 162
Joined: Tue Dec 27, 2011 8:32 pm
Location: Near Peterborough
Contact: Website

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 17, 2020 3:33 pm

Hm. I would beg to differ as to the educational benefits of OSC and MIDI in Sonic Pi. As a former teacher who used Raspberry Pi and Sonic Pi widely before retiring, (and advising on projects involving Sonic Pi with OSC for A-level students since then) it has a lot to offer. Also, the foundation have yet to alter published projects like the theremin one which patently wont work with the current 3.1 version on raspbian, and I have dealt with several enquires from those frustrated as to why they cant get it to work.

Be that as it may, I have been trying to look at the source code for the current Sonic Pi 3.1 on Raspbian Buster but am finding it difficult to locate and download. I have enabled the source repository deb-src httpL//raspbian.raspberrypi.org/raspbian on /etc/apt/sources.list but it still downloads the upstream debian 2.10 source rather than the one on raspbian. How can I download it?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sonic Pi 3.1 on Raspbian Buster is NOT complete.

Tue Mar 17, 2020 3:49 pm

rbn wrote:
Tue Mar 17, 2020 3:33 pm
Hm. I would beg to differ as to the educational benefits of OSC and MIDI in Sonic Pi. As a former teacher who used Raspberry Pi and Sonic Pi widely before retiring, (and advising on projects involving Sonic Pi with OSC for A-level students since then) it has a lot to offer. Also, the foundation have yet to alter published projects like the theremin one which patently wont work with the current 3.1 version on raspbian, and I have dealt with several enquires from those frustrated as to why they cant get it to work.

Be that as it may, I have been trying to look at the source code for the current Sonic Pi 3.1 on Raspbian Buster but am finding it difficult to locate and download. I have enabled the source repository deb-src httpL//raspbian.raspberrypi.org/raspbian on /etc/apt/sources.list but it still downloads the upstream debian 2.10 source rather than the one on raspbian. How can I download it?
The benefits you quote are in addition to what is already there. What's already there is the majority of the educational benefit. Of course, add those things and there will be a small amount of extra benefit. But that increase is small, and not worth ourselves putting in the time, especially since we get no help from the author, who is really the person who should be doing this packaging.

The docs issue is different.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

Return to “Graphics, sound and multimedia”