I’m excited to say that I found the time to complete my first chapter of Introductory Python on sound! When I first started, I was introduced to a piano roll, an interface where I can click on each individual key. The neat thing about this is that each key corresponds to a certain frequency on the Linkbot’s buzzer! My musical prowess was demonstrated by my exemplary knowledge of “Mary had a Little Lamb”. I’m obviously a talented musical genius; perhaps I should pack my things and venture off to be a famous musician rather than a bookkeeper.
I clicked “Next” and read the objective. I
clicked “Run” to see what my Linkbot would do. It beeped 10 times in consistent intervals. I looked back at the code and tried to make sense of the code pre-written in the terminal…I understood it. I can read Python.
for i in range(10): # repeat the next indented block 10 times robot.setBuzzerFrequency(4186.01) # sets the frequency of the first beep time.sleep(.5) # Wait half a second robot.setBuzzerFrequency(0) # Turn the buzzer off time.sleep(.5) # Wait another half-second
This is amazing. By having my Linkbot demonstrate the code in front of me, I was able to make inferences that helped me understand what each line of code does!
I walked myself through the rest of the lesson and played with the provided code. By the end of the lesson, I was able to play my masterful concerto without even lifting a finger.