CA
  
You are currently viewing the Canada version of the site.
Would you like to switch to your local site?
14 MIN READ TIME

SONIC PI

Make beautiful algorithmic music

Create royalty-free music automatically, or try your hand at producing music by coding. Mike Bedford explores both composition options…

credit: https://sonic-pi.net

OUR EXPERT

Mike Bedford never progressed beyond piano lessons as a child. Despite that, music production holds a fascination with him, and all the more so if it’s done digitally.

T osay that digital technology has revolutionised the world of music is a massive understatement. Starting with the introduction of the audio CD in 1982, and continuing through to today’s streaming services, for the vast majority of people, listening to music is a digital experience, despite the recent vinyl revival.

And the change has been no less dramatic in the realm of music composition, performance, recording and post-processing. Music notation software has largely displaced pen and paper and, let’s face it, when did you last hear of music being recorded on a multichannel analogue tape recorder? Our subject here, though, falls between these two extremes of music consumers and professional musicians. Here too, digital technology comes to the fore in the form of what we’re calling algorithmic composition. And even if you don’t need royalty-free music, you’ll still get some hands-on experience of this intriguing type of software.

A history lesson

Let’s go back to Austria in the 1790s. Attributed to Wolfgang Amadeus Mozart, Musikalisches Wuerfelspiel, which means Musical Dice Game, involves generating waltzes from the repeated rolls of two dice. Like most schemes for algorithmic composition that followed, despite the random element, the rules ensured that the laws of music were upheld. What’s more, it’s in keeping with our aim of enabling non-musicians to create music.

As Mozart says in the introduction to his creation, it enables someone, “to compose without the least knowledge of music so much German Walzer or Schleifer as one pleases, by throwing a certain number with two dice”. And just in case you’re wondering, there are 759,499,667,166,482 unique compositions.

Implementing Musikalisches Wuerfelspiel in software has commonly been used as a programming exercise so you might like to pick up the gauntlet. If so, you can download Mozart’s original rules at https://bit.ly/lxf291mozartand, fortunately, the text appears in English as well as German. Alternatively, if you don’t want to reinvent the wheel, you can get a feel for this early form of algorithmic composition using the JavaScript implementation at https://bit.ly/lxf291mozzer.

Long before digital technology gave us computer generated music, Mozart was creating random waltzes using a pair of dice.
Unlock this article and much more with
You can enjoy:
Enjoy this edition in full
Instant access to 600+ titles
Thousands of back issues
No contract or commitment
Try for $1.39
SUBSCRIBE NOW
30 day trial, then just $13.99 / month. Cancel anytime. New subscribers only.


Learn more
Pocketmags Plus
Pocketmags Plus

This article is from...


View Issues
Linux Format
August 2022
VIEW IN STORE

Other Articles in this Issue


WELCOME
First step…
It seems that Tux can safely visit Hell,
REGULARS AT A GLANCE
Ubuntu Snaps under fire
The release of Ubuntu 22.04 has prompted more people to complain about the usefulness of Snaps.
Framework Laptop receives 12th gen processor upgrade
Popular modular laptops with Linux support now available with 12th gen Intel processors.
Turkish district reaps Linux rewards
Local government saves $1m by going open source.
DECISIONS, DECISIONS
Matt Yonkovit is the head of open source
BE A GIT
Keith Edmunds is MD of Tiger Computing Ltd,
Convergence lives on with Gnome Shell
The dream of a Linux desktop for mobile devices isn’t dead in the water.
Mesa 22.1 brings better ray tracing
Open-source graphics driver stack receives a big update.
Thunderbird donations increase
Revenue of the email client rose by 21 per cent in 2021.
Distro watch
What’s down the side of the free software sofa?
SPOTLIGHT ON MESON
Xavier Claessens is a senior software engineer at
MULTIMESS
Jon Masters is a kernel hacker who’s been
Kernel Watch
Jon Masters summarises the latest happenings in the Linux kernel, so that you don’t have to.
Answers
Got a burning question about open source or the kernel? Whatever your level, email it to lxf.answers@futurenet.com
Mailserver
WRITE TO US Do you have a burning
Kooha
Version: 2.0.1 Web: https://github.com/seadve/kooha
AppImage Pool
Version: 5.0.0 Web: https://github.com/prateekmedia/appimagepool
Blanket
Version: 0.6.0 Web: https://github .com/rafaelmardojai/blanket
Universal Media Server
Version: 10.21.0.1 Web: www.universalmediaserver.com
Beaker Browser
Version: 1.1.0 Web: https://beakerbrowser.com
superProductivity
Version: 7.11.5 Web: https://super-productivity.com
Safe Eyes
Version: 2.1.3 Web: https://slgobinath . github.io/SafeEyes
Mudlet
Version: 4.16.0 Web: www.mudlet.org
StackAndConquer
Version: 0.10.0 Web: https://github.com/ElTh0r0/stackandconquer
Bottles
Version: 2022.5.14-trento-3 Web: https://usebottles.com
Filmulator
Version: 0.11.1 Web: https://filmulator.org
REVIEWS
GoDaddy
Purchase and bid on domains with the daddy of services and Stefan Ionescu.
OpenSUSE 15.4
If someone were to compile the definitive list of the mysteries of life, Mayank Sharma would ask them to include openSUSE at number 42.
Tails 5.1
This distro is one of those things that Mayank Sharma would rather have and not need, than need and not have.
OpenMediaVault 6
Old wine in a new bottle is such a cliché, but that’s exactly how Mayank Sharma likes his software to grow and evolve.
OnlyOffice 7.1
Usually Mayank Sharma will run everything that’ll fit inside a browser, but today he’ll try something he’s petrified to launch even as a native program.
The Stanley Parable: Ultra Deluxe
Management doesn’t like self-referential things. It just reminds them they’re a simple strapline-based comedy construct of Christopher Livingston.
ROUNDUP
Raspberry Pi distros
The top-end Raspberry Pis can be used to build a formidable desktop. Michael Reed finds there’s a fair bit of choice when it comes to Linux distros
Fast virtual machines
Fast Virtual Machines
Jonni Bidwell transcends meat space, ventures virtuously into the valleys of the virtual and returns laden with actual knowledge.
Pi USER
Turing 2 Pi raises $1 million in a day
The Pi-based cluster computing Kickstarter project smashes its own targets for full funding.
Waveshare CM4-NANO
Les Pounder looks at Waveshare’s Compute Module 4 carrier board that offers Raspberry Pi 4 performance in a near Zero-sized package.
Create a custom LCD menu system
Les Pounder loves to get hands-on with a good button, and if doing so can save him time and looks great, then it’s a win-win situation!
Replacing rc.local and using Systemd
Sean Conway is struggling with change – specifically, what system administration knowledge to keep and what to throw away.
IN DEPTH
World Web 3
Battle lines are being drawn up as technologies for a Web 3.0 are primed and loaded, Mats Tage Axelsson helps you prepare for a user-owned world.
IN DEPTHTUTORIALS
Multi-boot USB drives
Shashank Sharma can’t parallel park, but he knows how to just copy and paste live distributions into a USB drive to boot ‘em up.
TUTORIALS
How to take better screengrabs in Ubuntu
Nick Peers reveals how easy it is to take screengrabs and annotate them using a combination of Ubuntu’s built-in tools and third-party utilities.
Emulate the first portable computer
Rounding off our emulation series, Mike Bedfords revives the first portable computer that ran the bizarre APL language.
Back up and copy entire hard drives
Michael Reed shows you how to tame Clonezilla, a powerful piece of software that can help copy and restore hard disk partitions.
Keep your passwords secret and safe
David Rutland has learned from past mistakes, and endeavours to keep all of his logins, usernames and passwords firmly under lock and key.
Configure a crossplatform KVM system
Use Barrier to replace a physical KVM switch and enable a keyboard and mouse to be shared between multiple devices. Matt Holder explains all.
SEEING THE LIGHT
Three humble developers of Bodhi Linux enlighten Jonni Bidwell on the ways of Zen and the art of distro maintenance.
CODING ACADEMY
Controlling processes and using Unix signals
Join Mihalis Tsoukalos as he demonstrates how to use Rust to work and manage child processes, and handle Unix signals.
Updating the LXF GIT monitoring tool
John Schwartzman adds new features to an existing PyQt5 program that finds all of your git repositories and displays their status.
Chat
X
Pocketmags Support