Polyphonic Microbit!

by Aaron Artrip in Circuits > Microcontrollers

1359 Views, 4 Favorites, 0 Comments

Polyphonic Microbit!

my-visual_1651.png

In the 80's, early video game systems had limited chip sets. These chip sets only had 4-6 voices on them, 2 to 3 of them being dedicated to percussion/drums, and 1 for a bass line.

With only 1-2 voices left, how are we going to play chords? This is where 'false polyphony' comes in to play. "False Polyphony" is simply multiple single notes played one right after the other, similar to an arpeggio. With the lengths of the notes being very short, we can get a auditory illusion that sounds kind of like a chord!

Here is a link to more information about "False Polyphony"

https://www.ludomusicology.org/2015/07/16/composit...

Supplies

1 - BBC Microbit, however, if you dont have one yet, you can go to the Make:code website https://makecode.microbit.org/ and you can use their virtual Microbit in your browser.

Youtube Video follow along - https://youtu.be/kCnT8xMeNeA

Use Make:Code

Screen Shot 2020-10-12 at 6.00.52 PM.png

First step is to go to https://makecode.microbit.org/ and make a new file and title it "Phony Polyphony."

'on Start' Block

Screen Shot 2020-10-12 at 5.59.51 PM.png

In your 'start' block, place a 'set tempo to (bpm)' block' inside, set to your preferred tempo. This can be found in the MUSIC block section.

120 bpm is a good place to start.

'on Button [A] Pressed'

Screen Shot 2020-10-12 at 6.03.19 PM.png

In our INPUT block section, add a 'on button [A] pressed' block. This block with run any code places inside of this block when Button A is pressed.

'play Tone (X) for (beat)'

Screen Shot 2020-10-12 at 2.53.29 PM.png
Screen Shot 2020-10-12 at 6.08.00 PM.png

For this step, we are going to make a C Major Chord, the notes are C E G.

In our MUSIC block sections, use a 'play tone (note) for (beat)' and place it inside the 'on button [A] pressed' block. Set this first one to the note C and the beat to 1/16th (16th note). Then, duplicate it (copy/paste) and set this new one to E, and do the same for the third note, G.

So now we should have three 'play tone (note) for (1/16th)' and it should look like the second picture above.

Now go over to the virtual Microbit and press the A button and you should hear a short chord!

...it only played once. How do we get it to play more than once?....

On to the next step to use LOOPS!

Using 'Loops'

Screen Shot 2020-10-12 at 2.47.44 PM.png
Screen Shot 2020-10-12 at 6.26.09 PM.png

Loops are handy because they will execute lines of code repeatedly for you.

In our LOOPS block area, grab and place a 'repeat (1) times do' block. Inside this LOOP block, place your three 'play tone (X) for (beat)' blocks, use image above if needed.

Now, change your number of times the LOOP runs to 6. Any number will work, but lets keep it simple, right?

Now go over to your virtual Microbit and press A and you should hear your beautiful C Major Chord playing before your very ears!

Now lets program another chord to play AFTER the C Major chord...

Second Chord

Screen Shot 2020-10-12 at 6.29.21 PM.png

Select your 'repeat 6 times do' block (which also contains three 'play tone (X) for (beat)' blocks) and duplicate it (copy/paste).

Now place this new group of blocks UNDERNEATH the first group of blocks. This second group will play AFTER the first group.

In this new group, lets change the notes to "D F A (D Minor)" and keep the 'repeat' to 6.

Now press A in the virtual microbit and you should hear your first chord progression using the Micro:bit Microcontoller.

Now What?!

What are some other chord progression you could program into the Micro:bit? Maybe a favorite song or a song you wrote?

Feel free to share what you've made by commenting below!