coding music with sonic pi

Post on 16-Apr-2017

517 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Coding Music with

Allen Heard

Sonic Pi @sonic_pi is written and developed by Sam Aaron @samaaron and is supported by the Raspberry Pi

Foundation and Broadcom

There are also versions for Mac and Windows

The software

PlayControls

EditorControls

Help & Info

CodeEditor

LogViewer

The Interface

First Beeps

Type play 67 and click run

First Beeps

Change the number to 70 and click run

Then try 60

So, low numbers make lower beeps!

Chords

Multiple plays = plays the notes at the same time

Melody

What if we want to play one note after another?

Sleep 1 here is 1 beat but for now think of it as 1 second

Melody

Reduce the value of sleep to make it faster

Midi Values

You could even convert the midi note values to actual notes and code them like this too by adding a colon!

(s for #, number for octave)But we’ll stick to midi values for this workshop

Melody

Let’s add some more code to our tune

Synthesisers

Sonic Pi comes with a range of synthesisers

No, it's Frozen!!!

Complete this intro from the sheet, also try changing the synth

Samples

Open a new workspace and try some samples

There are lots listed in the sample section, it also shows you how to write them in your code

Looping

Simple looping forever

Looping

Looping a set amount of times

Functions

We can ‘call’ a piece of code when we need it

Threads

We can then have multiple functions playing at once,

called threads

Allen HeardYsgol Bryn Elian

top related