Lab 4
Read the documentation for the "make-tone" function. Try playing tones that are separated by 1, 2, and 4 Hz. How fast do they "beat"? Search the web to find the frequencies of the "C Major" scale from middle C up one octave. Develop a program that plays this scale. See if you can avoid redundancy where possible.
HtDP 2e, exercise 42
HtDP 2e, exercise 43
Along similar lines as the prior exercise, develop a "kick kick clap" program, that plays a sound each time a key is hit. The first key causes a kick, the second causes another kick, the third causes a clap. After this, these repeat: kick kick clap, kick kick clap, and so forth.
Hint: think first about what the state of the world should be.
HtDP 2e, exercise 58
HtDP 2e, exercise 59
HtDP 2e, exercise 63
As a warmup for project 2, develop a program that shows a set of five empty circles. Hitting the "1" key toggles the first circle from empty to blue and back again. Hitting the "2" key toggles the second circle from empty to red and back again. Continue with the third, fourth, and fifth circles mapping to the "3", "4", and "5" keys, with the colors purple, green, and black.