coding music with sonic pi

19
Coding Music with Allen Heard

Upload: jenny-hughes

Post on 16-Apr-2017

517 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Coding Music with Sonic Pi

Coding Music with

Allen Heard

Page 2: Coding Music with Sonic Pi

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

Page 3: Coding Music with Sonic Pi
Page 4: Coding Music with Sonic Pi

PlayControls

EditorControls

Help & Info

CodeEditor

LogViewer

The Interface

Page 5: Coding Music with Sonic Pi

First Beeps

Type play 67 and click run

Page 6: Coding Music with Sonic Pi

First Beeps

Change the number to 70 and click run

Then try 60

So, low numbers make lower beeps!

Page 7: Coding Music with Sonic Pi

Chords

Multiple plays = plays the notes at the same time

Page 8: Coding Music with Sonic Pi

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

Page 9: Coding Music with Sonic Pi

Melody

Reduce the value of sleep to make it faster

Page 10: Coding Music with Sonic Pi

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

Page 11: Coding Music with Sonic Pi

Melody

Let’s add some more code to our tune

Page 12: Coding Music with Sonic Pi

Synthesisers

Sonic Pi comes with a range of synthesisers

Page 13: Coding Music with Sonic Pi

No, it's Frozen!!!

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

Page 14: Coding Music with Sonic Pi

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

Page 15: Coding Music with Sonic Pi

Looping

Simple looping forever

Page 16: Coding Music with Sonic Pi

Looping

Looping a set amount of times

Page 17: Coding Music with Sonic Pi

Functions

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

Page 18: Coding Music with Sonic Pi

Threads

We can then have multiple functions playing at once,

called threads

Page 19: Coding Music with Sonic Pi

Allen HeardYsgol Bryn Elian