Sonic Pi v4.0.0 Release Notes

  • 6th July, 2022 <!-- (view commits): -->

    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 with use_bpm 60.
    • ๐Ÿ›  Previously it was possible that the onset: option for sample 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.
    • The main mixer settings have been modified to reduce load on the limiter in common scenaries with the GUI volume slider set to a high position. This caused distortion and other unwanted audio issues. This change should be an improvement for most users - however if you wish to return to the old behaviour, you can run the following at the start of your session: set_mixer_control! pre_amp: 1, amp: 1.
    • The value returned by beat no longer starts at 0. Instead it is now initialised with Ableton Link's current beat value. Other than the initial value not being 0, beat's behaviour remains unchanged.

    ๐Ÿ†• 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 fn use_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 (see use_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 to load_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 inadvertently 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, Ukrainian.
    • ๐ŸŒ Introduced new translations for Basque, Gaelic.

    ๐Ÿ‘Œ Improvements

    • ๐Ÿ“š Many minor documentation fixes and improvements.
    • 0๏ธโƒฃ 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 to spread. Now just returns a ring of false values.