Version 4.0.0 ‘Link’
6th July, 2022
Get ready to Jam with v4 of Sonic Pi.
In this release, the internal timing algorithms have been completely refactored to enable them to link to a new global metronome. The GUI now features a new metronome panel which will let you dynamically change the BPM of your code whilst it is running. You can also use the new “Tap Tempo” button to click out a tempo and Sonic Pi will automatically shift to play in time with your taps. Additionally, you can link the metronome with other versions of Sonic Pi running on other computers connected to the same network (wifi or ethernet). This means it is now possible to gather some laptops together to form an ensemble or turn a whole classroom of computers into an orchestra of live coders - and for everyone to be in time with each other. You can even dynamically change the BPM for everyone on the network whilst code is running on everyone’s computers independently and everything maintains synchronised and in time. It’s a real jam.
Finally, you’re not limited to syncing tempo with other copies of Sonic Pi. The new global metronome is built on top of a wonderful piece of technology called Link which was developed and open sourced by Ableton who also make Live and Push, both widely used by professional musicians and also automatically sync using Link. Additionally there are also over 200 other apps or hardware products that also sync with Link. Sonic Pi can therefore now automatically jam with any of these with just a click of a button. It’s so exciting to imagine the new kinds of bands and collaborations that are going to be possible with this new timing system.
There’s also a large number of other improvements and fixes within this release that together combine to form the most powerful and exciting release of Sonic Pi yet. See below for a full breakdown of visible changes.
This release would not have been possible without the huge number of fabulous contributors that have been involved. Key contributions have been a huge refactoring of our GUI by Chris Maughan, the wrapping of Link as an Erlang NIF by Luis Lloret and the tireless and constant attention to detail by Ethan Crawford. Thanks so much to you all. Thanks also to José Valim for financially supporting development during a tricky period. José is the creator of the programming language Elixir which is now integrated into the internals of Sonic Pi. Elixir opens up a rich world of exciting opportunities within Sonic Pi which we have already started exploring with earnest. Expect exciting things for the future and consider becoming a Patreon supporter to automatically get access to all upcoming BETAs…
Finally, we would love for you all to extend a warm welcome to the latest member of the Sonic Pi Core Team: Lily Foster. She brings a huge depth of Linux knowledge to the team and we’re terrifically excited to have her on board.
Now, go and get your Live Coded Jam On!
Breaking Changes
- The default BPM is now set to the new global Link metronome. This is set to 60 by default, so on the surface the behaviour will appear identical. However, if you change the Link metronome BPM using the GUI or the new fn
set_link_bpm!
it will change the BPM for all threads dynamically. Previous behaviour (a static BPM of 60 unlinked to the global metronome) can be obtained by starting your code withuse_bpm 60
. - Previously it was possible that the
onset:
option forsample
silently ignored the last onset of a given sample. This has now been fixed. Some samples may therefore have an additional onset index which won’t affect any code using earlier indexes but will affect code which uses indexes larger than the number of onsets (and therefore relying on the index wrapping behaviour). - The Minecraft Pi Edition API has been removed (all
mc_
fns). Minecraft Pi Edition appears to no longer ship on Raspberry Pi OS and the Pi Edition API is not the same as the standard Minecraft API.
New
- Support for Ableton Link. This enables you to synchronise the tempo of Sonic Pi running on multiple computers connected on the same network. It will also enable automatic BPM synchronisation with music production tools such as Ableton Live, VJ tools such as Resolume, DJ hardware such as the MPC and many compatible iPad music apps. For a full list see: https://www.ableton.com/link/products/,,
- New
:link
option to fnuse_bpm
. This enables Link mode for the current thread which automatically syncs the BPM to the Link metronome (which also syncs it with all other Link-capable apps running on any computer connected to the local (wired or wifi) network. - New fn
link
which sets the BPM to a new:link
mode and also waits until the start of the next bar (as determined by Link) before continuing. This lets you automatically sync tempo and beat phase in one command. - New fn
link_sync
which sets the BPM to a new:link
mode, waits for the Link session to be playing and also waits until the start of the next bar (as determined by Link) before continuing. This lets you automatically “arm” Sonic Pi to sync tempo and beat phase and wait for an external “play” command from another Link device - such as Ableton Live. - New fn
set_link_bpm!
to change the BPM/tempo of the Link metronome (and simultaneously change the tempo of all connected Link-capable apps on the network). - New fn
current_random_source
which returns the current random number source kind (seeuse_random_source
). - New fn
load_synthdef
which lets you load a single synthdef file. -
load_synthdefs
now loads both directories and single files (by dispatching toload_synthdef
where necessary).
Synths & FX
- New synth
:winwood_lead
- a lead synth inspired by the Winwood songs from the early 80s. - New synth
:bass_foundation
- a soft bass synth inspired by the sounds of the 80s. - New synth
:bass_highend
- an addition to the :bass_foundation synth inspired by the sounds of the 80s.
Examples
- New Algomancer example - Blockgame coded by DJ_Dave.
- New Sorcerer example - Lorezzed.
GUI
- Preference pane is now an overlay which hovers over the main window. This means that opening and closing it does not inadvertantly modify a carefully chosen layout e.g. for a performance.
- New preference option to show and hide the pane titles such as Scope, Log, Cues, Context, Help, etc.
- New preference option to hide the menubar when in fullscreen mode (Windows and Linux only as this behaviour is standard on macOS).
- New preference option for enabling audio inputs (now disabled by default). Modifying this setting requires a reboot to take effect.
- New preference option for selecting the default language translation. Modifying this setting requires a reboot to take effect.
- Preferences now show audio hardware information such as connected input/out devices, sample rate, block size etc. The amount of information displayed varies by platform.
- New GUI controls for interacting with the new Link Metronome. You can connect/disconnect to the network (to share tempo with others), change the tempo (in BPM) and tap out a new tempo.
- Increase width of panel dividers and highlight on mouse hover.
- Highlight scrollbars and preference checkbox descriptions on mouse hover.
- Scrollbars now have rounded edges.
- Teach autocompletion about random source choices:
:white
,:light_pink
,:pink
, etc. - Improve syntax indentation.
- Improvements for Arabic, Catalan, Chinese (Simplified), Dutch, Estonian, French, German, Italian, Japanese, Korean, Persian, Polish, Portuguese (Brazil), Russian, Sinhala, Spanish, Swedish, Ukranian.
- Introduced new translations for Basque, Gaelic.
Improvements
- Many minor documentation fixes and improvements.
- When running on Raspberry Pi, Sonic Pi connects to PulseAudio by default.
- The scheduling accuracy of outgoing OSC and MIDI messages is improved on Windows.
- Optimise
midi_clock_beat
. -
note_range
can now handle both increasing and decreasing note ranges. - No longer connect to the input sound device on macOS by default - this also means audio input/output rate mismatches no longer cause boot issues on macOS by default.
- SuperCollider audio server boot issues are now immediately detected and reported as a specific issue to the user alongside the full scsynth log file.
Bugfixes
- Improve robustness of outgoing OSC messages in the case where an outgoing hostname is malformed and can’t be resolved.
- Synths
:dull_bell
and:pretty_bell
now properly free themselves when they finish playing, which now means the resources they consumed are also properly freed. - Indexing into an empty ring no longer causes a divide by zero error.
- No longer attempt to increase audio server priority on Windows which causes booting errors in some cases.
- Fixed encoding issues when saving/loading files containing non-ascii characters on Windows.
-
range
no longer loops infinitely with a step size of 0. Instead it now throws an error. - In some circumstances having the lissajous visualiser visible caused the GUI to crash on startup. This has now been addressed.
- Stop thread hanging when passing
0
as the first argument tospread
. Now just returns a ring of false values.
Releases
macOS x64 (10.15 Catalina and higher) | |
Link | Sonic-Pi-for-Mac-x64-v4.0.0.dmg |
Size | 128M |
MD5 | 5b2173ebd300df01441b19274af2723c |
SHA256 | c33327eccf940863ec35ad4c9954b4c66a91add17b7a84f259cfd936af8815c7 |
Windows | |
Link | Sonic-Pi-for-Win-x64-v4.0.0.msi |
Size | 201M |
MD5 | 2defc02210941cb89a577f3b02490714 |
SHA256 | 14b00a7b7eddca2b237de7a8eaf4241b68984a3b96ada43f8d0e3b6f8053b6e2 |