[Music]
okay
oh
hello cyprecon how's everybody doing
tonight
i just want to say i'm so excited to be
here it's been such a fun day this is my
my first time ever at cyphercon so uh
thank you all for such a great day of
sharing knowledge and solving puzzles
and doing lots of cool stuff
um this is such an incredible community
and i'm honestly honored to be a part of
it um so give it up for yourselves for
being here and for
everything that you you do
[Music]
and i also just want to thank all of the
people who work so hard and tirelessly
to put on an incredible event like this
uh every year and um
yeah so um
first of all uh my name is amy um i'm a
milwaukee-based audio engineer musician
and uh now i'm currently a tech
apprentice at uh concurrency
and i like to make things
especially music and today we are going
to talk about one of the most exciting
music making tools i've ever come across
it is a coding platform called sonic pi
tonight we're going to explore the use
of the sonic pi live coding environment
as a means of using code to
create music as well as uh
to provide an accessible gateway into
more complex coding environments for for
people who might not have a background
in coding or programming or anything
like that
um
we'll also talk a little bit about the
community that's growing around sonic
pie um and how much creative potential
exists there and i i i ventured to guess
that a lot of people in this room and a
lot of people that have been uh involved
in cyphercon would really um
also get excited about about this
community
[Music]
so like i said
i like making things
and because i like making things
i am drawn to all things diy
um that's you know diys and do it
yourself
uh the process the mentality and the
community
um
so diy is a lot of things to me it's
both a daily
practice and a framework
for exploring the world but diy is also
a music scene
that uses social media and grassroots
organizing to put on tours and shows all
around the world spanning a probably
infinite amount of genres
diy is a community as well
it's a global community of artists
musicians audio engineers booking agents
promoters small business owners
um
visual artists crafts people filmmakers
anybody creative basically
that would rather take matters into
their own hands then relies solely on
the systems that society provides for
connection and artistic expression
diy also includes makers
i think
a lot of people here are would consider
themselves to be makers who experiment
with making uh making things using new
technology or finding new applications
for technology that's already there
um and i do consider myself to be a
maker
i make music in local bands
i also make music as a
producer and audio engineer doing
recording and mixing and
from from different local and regional
and national acts
and i also
i also make community through um
through my uh involvement in putting on
shows in the local music scene as well
as kind of in the
midwest region
um
and i i love to
contribute to community via uh workshops
with about where i can share my uh my
knowledge and my passion with other
people um
so
and lastly lastly i make technology
solutions too by day
but yeah so today
um i want to talk about sonic pi as a
fun way to make music
um
and and like i mentioned earlier an
accessible gateway to learn coding um
there's lots of uh
it's a great way and it was a great way
for me personally to learn the basics of
of different object-oriented programming
principles and logic um and uh like i
said the community is really exciting
so
uh basically my goal today is
whether you're a master programmer or
who's never even homed an original tomb
or um a brilliant musician who can
barely even log into facebook to promote
your next show that you leave this
session confident that you have all the
knowledge that you need to make your
very own music using sonic pie
so
live coded music
takes a lot of shapes and forms
but before we kind of get into the
nitty-gritty of it i want to show you a
clip of a really cool live-coded
performance
um by uh
somebody named mxs
that they um
do we have any daft punk fans in the
room yes right on yeah so this is a code
cover of aerodynamics by
uh by daft punk
i won't play the whole thing but i will
play a little bit of it and
here we go
and i won't talk through the whole thing
but this is a great chance to take a
look at what the actual ide looks like
uh
[Music]
and the way this person structured
this song
they're using the live looping
functionality that we'll talk a little
bit about as we get into it
to add and take away different
components as
indicated in
the the parameters that they're
specifying in the code here
[Music]
all right so you kind of get the idea of
uh kind of you can really maximize the
sounds that you're making with this
program um you can strip it back and
just have one one melodic layer going on
there's lots of different things uh that
you can do
um
so
but first uh before i show you how to
actually set up uh writing songs in
sonic pi
let's talk just a little bit about what
exactly it is and how it works
and where it came from
so
first of all
it's super easy to get uh started and
set up
um
so before i kind of get into this all uh
we'll
[Music]
as far as making music with sonic pie
goes um i'll show you how easy it is to
get started we'll go over some of the
basic music concepts that are helpful to
understand going into it um
we'll talk about just the the basic
computing requirements and then we'll
make some noise um
and we'll we'll do the basics and then
get into some of the fun stuff like
looping and thread sinking
um
yeah so it's a free download from
sonicpi.net
all you need is a laptop that can run it
or a computer that can run it it runs on
mac windows linux raspberry pi
um
and all you need is something to type
the code and an audio out which is a
pretty big departure from you know i i
if anyone has ever seen like a full dj
setup with with turntables or or
whatever kind of controller they're
using all i brought today was a laptop
case and it was it was awesome i've
carried a lot of amps up a lot of scary
stairs that you know people shouldn't be
carrying heavy things up and down
uh so
i like this load in and load out a lot
better um
but yeah
so let's just talk about some of the
music concepts that are helpful um the
way that playing notes works uh you can
play notes two different ways um you can
either use note numbers so that's just
based on which number key on a keyboard
it would be
or you can specify note names like c
c d e whatever
and the octave that you're playing them
in
chords and scales
are very fun to play with very cool to
play with you can do lots of different
things iterating through the the scales
um depending on how you want to sequence
your notes
and you can play chords
and chords are essentially just
groupings of notes that are in the same
key that
uh played the uh
the
we don't need to get too into music
theory here but it's usually the the
first third and fifth of of the
of the scale and the key that you're in
and then um kind of understanding bpm so
tempo how fast how slow your song is
going to be is really helpful uh
something that i love to do when i'm
writing in in sonic pi is
i'll write a whole song in one uh one
time signature not time signature but
one tempo and then i'll either speed it
way up or slow it way down just to see
what it sounds like and sometimes uh
you know you end up writing two songs at
once that way
um so let's get into making some noise
um i
will do my best to do this with one hand
um
so
when you want to play some notes
[Music]
all you do is type the word play and
then
which note you want to play and then you
run it
that's one note all i did was you know
say play 70.
you can also
like i said
specify the note name with a letter
like that
um
when you
run two notes at the same time
we'll just play both notes that i just
played
they're played at the same time so you
need to set the time between notes if
you want to play a sequence of notes and
that is just setting a sleep parameter
so it pauses the program essentially for
however much time you tell it to
um i have it set for one which is just
one second
and there you go that's how to play
simple notes
um
so
playing chords is just as easy um it's a
a theme that you'll see here is that
if if you have a background in coding
the coding part is the easy part um
and that's kind of the whole point is
that this is such a great gateway into
learning uh
harder coding things so um to play a
chord you just call it like you would
call a method
um
chord and then specify
which root of the which root note you
want the chord to be so here it's e3 so
that's in the third octave on the the
keyboard or whatever
um
and
in this particular case it's going to be
a minor seventh chord so we're going to
get a little jazzy
but if you want to play a chord
where the notes are separated so an
arpeggio chord
you can do that by just saying play
pattern chord
[Music]
and there you go so that's chords for
you
um that's uh as far as songwriting goes
those are
really good um kind of tenants of
building a rhythm section that's you can
use it for like kind of like i think of
things in terms of like
uh analog bands so i i use chords a lot
for like rhythm guitar sections i mean
it's not a rhythm guitar it's a
synthesizer sound making the sound but
it kind of translates in the same way
um
like i said you can also play scales
uh in this case
it's gonna start on c it's gonna be a
major chord
it will span five octaves
this is the sleep time so this was the
space between the notes
and the release time is set very low so
these are just the parameters that
define how it's going to sound
the release being so low this is going
to be a very staccato sounding scale so
here you go
[Music]
yeah
so you can change uh
so many different parameters
of pretty much anything just like in any
coding language
but um
one of the main things that's fun to
play with is the release time so that's
just the the length of the note that
you're playing um we just heard a super
short release time let's get a longer
one
and we'll just hold it out for four
seconds like that
so those are the basics the very basics
of playing notes
you can also
there are a ton of samples that have
been actually loaded into the program
that you can
call on from a library that's stored in
um in the program
um
and that's where you get um
like the beat making functionality so
i'll just show you
uh this is just a sample of
a basic um
backbeat i'm gonna use a different
bass sound bass drum sound so here is a
bass drum that i am using so you
basically just say sample
and then it'll give you
a list of all the different samples that
you can choose from
which is very helpful
and here you go
so obviously just playing it like that
is cool but you can't really do much
with it
which is where some of the more
interesting things uh in in how to use
the code come into play
um
[Music]
so the first
thing that i think is kind of a function
uh
that's capital f u n fun
is
looping that's kind of the core of all
of the live coding elements
you can use these looping functions to
build on each other
and create lots of different layers of
sound as you heard in the daft punk song
they were using the live looping
function that's set up slightly
different from just a normal loop a loop
will just play through and through and
through you can't really tie it to
anything else we'll talk a little bit
about the the sinking that you can do
with live looping uh in a little bit but
this is just a normal loop that you can
run through and play with it however you
want to
i will also say that uh as a
i play
uh other instruments too it's it but i
don't play drums so it's really fun to
be able to
just throw together a really quick beat
to just play along to
yeah
[Music]
so that's uh how to loop samples you can
loop anything though you can loop
notes
i'm gonna loop the same scale that i
played just a few minutes ago
[Music]
and i'll just go on and on and on
forever until the program crashes
um yeah so
sonic pi has a ton of really cool synth
voicings built into it um i
think that
is it's some of the the most interesting
stuff that you can play with on here i
mean i am the kind of person that i'll
sit in front of a keyboard and just play
every single sound to the point where
i'm like oh i could have played piano
but i was just listening the sounds i
could make um so i'll just show you a
few different uh voicings that that you
can play with uh we'll start with blade
which is one of my favorite ones
there's a lot of cool
kind of like um vintage sounding
like vintage sounding
synth sounds that you can play with
um yeah so there's lots of different
specifics that you can play with but the
core of all this uh for me at least is
how much of a springboard into other
types of coding this program is
i
started using this program about three
years ago
not long before i met michael
and when he asked me to give this
presentation and i had no previous
coding experience at all
my background was in audio visual stuff
um
and uh but i was kind of at a point in
my life where i wanted to kind of turn
into a more of a programming uh path but
i didn't know how and it was really hard
to kind of learn
just the basics and the fundamentals um
without having the background of okay
like how does
basic logic work you know stuff like
that and
since i you know had this background in
music i understood how to put together
drum loops and and build songs in the
way that you build songs in this program
um
and having that background kind of
helped me
understand
the the coding concepts more so so
some of the cool things in here that
like
it would have probably taken me months
longer to understand as i was learning
you know java and python and stuff like
that um
i being able to hear immediately what
was going on in like
iterations and
like using conditionals and defining
functions and using variables
and um kind of figuring out how how that
actually applies
um that's what
that's where the value really lies in
this program for me
um
we only have a couple of minutes left
here so i i don't want to get too into
uh the the code demonstration but
i will take a look
i think that one of the the examples
that i have kind of
um
kills a few birds with one stone
uh i mentioned that the
the thread sinking is a really cool
function um
let's see
this doesn't happen okay
um
yeah we will use this one so
[Music]
this code sample
uses thread sinking um basically you set
up a live loop this is the
the court like the
i forgot to comment out the last one
sorry
[Music]
all right
so we'll we'll just build this up and
i'll kind of explain what i'm doing as
i'm doing it for for 10 sake
so this is the back beat i usually start
with the back backbeat just because it's
easy to
think everything else to it
i already showed you a loop like this
[Music]
so this next loop when i run it
since it's synced
uh as indicated in that as line 221 um
the timing will
match up
uh rather than just going on top of it
in the way that a normal loop
now the next
loop that i'm gonna tie in here also
uses some effects there are a ton of
really cool effects that you can play it
with in here um you can use like reverb
and delays and there's a really cool fit
crusher function that makes everything
sound like an 8-bit song that i like to
play with
this this next loop uses a pan slicer
which is kind of cool so
if if this is run stereo you'll hear it
going back and forth
and then this last live loop down here
that i'm about to add in when i run it
again actually uses some variables um it
uses some logic it chooses notes from
this collection
that's the kind of melodic line going on
there
all right
so
that is it for the the code
demonstration
um but to to kind of just tie things up
here um i guess if any of this sounds
interesting to you please
uh check it out download it make some
noise you'll be if you know how to code
you'll be making music in five minutes
and it's it's really cool um like i
mentioned there's there's a really big
online community um for this program
uh there it's it's all over the place
it's it's on twitch it's they do a lot
of uh
live streams on twitch and youtube
um but the the real core of the online
community here is uh
they have a forum uh at this
inthread.sonicpi.net site and they have
so many cool different things you can
share you know your songs that you've
written with other creators you can hang
up or hang out and meet up share
thoughts
as well as communicate with the creator
of the program sam aaron directly for
like feature requests and he's he's
super active i i don't know him but he
is
uh extremely um
active on the online communities and
it's very responsive to feature requests
and stuff like that so that's very cool
and like i said the program is free it's
very accessible um
and it's a lot of fun so check it out
and if you do check it out make some
noise please feel free to share with me
my name is amy up the grove and it's
been a pleasure making music with you
guys tonight
[Music]
[Applause]
okay
[Music]
you