← Back to Book Detail

Blue Unit: Computational Tinkering (15/19) -- A Person-Centered Guide to Demystifying ...

Browse
78%

Blue Unit: Computational Tinkering

Blue Unit: Computational Tinkering 2B: Make Music with Code Background Knowledge Probe Take a few minutes to bring up a mental picture of each musical instrument you’ve played yourself, or which you’ve watched others play. - How are they played? What similarities and differences are there across instruments? - How might they be constructed? What materials are used? How does material choice influence use of, and sound creation by, the instrument? - Of the instruments considered, which ones might make use of digital technologies? Of programming languages? So far, we’ve used the Circuit Playground Express microcontroller and MakeCode programming language to learn essential coding concepts.[1] In particular, we’ve explored: - Conditional logic - Iteration loops - Variables - Modularization Technical Introduction Piano Keys and Trumpet Valves Let’s compare a piano to a trumpet. With a piano, you have a key for every note you want to play. For instance, if we want to play the basic C major scale in ascending order, we’d need seven keys as follows: | C | D | E | F | G | A | B | In music, an octave is a series of eight notes that take you from the first note back to that note, but in which that note is now twice or half the frequency of vibration that it was before. To go down one octave, we’d need another set of seven keys to the left that cut the frequency of vibration in half. If we wanted to go up an octave, we’d need seven keys to the right that double the frequency of vibration. So to play three octaves of the C scale, we’d have something like: | C | D | E | F | G | A | B | C | D | E | F | G | A | B | C | D | E | F | G | A | B | Compare this to a trumpet. The standard trumpet has three valves. Each valve is a cylinder that, when pressed down fully, moves the airflow from one set of tubing to a different set of tubing. The airflow now takes a different path from the mouthpiece where it enters the trumpet to the bell where it exits the trumpet. In so doing, it changes the frequency of vibration slightly, changing the note being played. To play a scale, you need to press one, two, or three of those valves, or none of the valves, depending on the note you are wanting to play. To make this work, you need to add in embouchure. A person playing the trumpet uses their lips and facial muscles to adjust the frequency of vibration up and down, thereby slowly moving up or down scales and octaves in combination with the movement of the valves. In this case, we’d play a middle-C scale like so: | Note | Valve 1 | Valve 2 | Valve 3 | | C | open | open | open | | D | pressed | open | pressed | | E | pressed | pressed | open | | F | pressed | open | open | | G | open | open | open | | A | pressed | pressed | open | | B | open | pressed | open | Exercise: First Three Notes Choose Your Own Adventure In the introduction to the book, I shared about the tulip poplar, a wood which inspires me, and which I have used to craft a toolbox for my Raspberry Pi equipment. As visi
← Previous Chapter Next Chapter →