hi welcome to the music and coding
exploration in this video we will give a
quick overview of computer programming
and see how we can use black coding to
create our own musical beats let's jump
in computer programs are the way we
communicate with computers and give them
instructions with programs we can make
all kinds of things from the apps we use
to social media platforms to video games
and much more giving instructions to a
computer is kind of like the way a
pianist tells their fingers which notes
to play and when but did you know that
computer programming is also used in
many parts of music production today
you'll create your own music by making a
computer program we'll be using Java
Script which is one of today's most
widely used programming languages let's
see how we can use programming to make
our own music we're going to be using
block coding to create a beats program
so let's take a look at how the editor
works you'll see this green block titled
song in the middle of the screen
whatever we drop here will be read by
the computer and played in our output
screen shown on the right on the left
side you'll see the coding blocks
library that you can use to create your
beat maker with music visualization see
how all of the coding blocks are
color-coded in their own library
sections let's start with bringing in a
pink beats block this is how we'll let
the computer know when a sound should be
played to add my own beats block I need
to drag this block so that it snaps into
place
to my song block did you hear that click
if the block isn't snapped in the
computer will not read and load the
block we haven't yet told the computer
which instrument we want to use so we
can go to the drum sound section and
drag in this little yellow block we can
use the drop down menu to change the
sound and click the check marks to
select the beats we want that sound to
play on we can drag in as many pink
beats blocks as we want to add multiple
instruments to our beat
you can even record a sound by dragging
this little yellow you are Block in
where the instrument would go you can
record a sound by going to the more tab
and clicking upload click the microphone
button and record your sound whoop then
copy and paste the URL into the yellow
URL block it's that easy we can also set
the tempo which are the beats per minute
so you want to set it to something
relatively high the tempo block needs to
be at the top of the blocks to work
properly
whoops instead of selecting another
beats block I accidentally grabbed a
drum sounds block if you ever need to
delete a block you can either drag it to
the trash here or select the block and
press Delete on your computer if you
drag a block with other blocks that are
below it it moves the whole section of
blocks with it if you just want to
delete the top level block keyboard
shortcuts will do the trick so I can use
control X and delete just that block if
you aren't sure when you want each beat
to play click run and experiment with
your beats by clicking each box to turn
the sound on or off
[Music]
once you have something you like you can
add it to your program when you've made
a beat program you're happy with you can
alter the visualization of your beat by
dragging in these different blocks and
selecting the colors you want to show in
your beat visualizer I'm going to set an
on and off color by dragging in these
two blocks
let's test that when you have an output
you're proud of make sure to show your
friends and family by clicking the share
button
copy the URL and share it with others
through email or your favorite social
media site feel free to make more than
one so you can experiment with different
instruments and visualizations we hope
you have fun making your own
personalized beats