Musical Instrument

Make a real music instrument. Actions should change notes and time. I find pre-programmed musical loops frustrating for playing. Typical Lanier’s “locked-in” designs, maybe?
Push button should change some playing “mode”.
Original assignment:

Prototype 1
I first put a potentiometer to control the notes. They are playing a C Major scale, based on the frequencies I’ve found here.

Prototype 2
I added pauses between the notes so that they can articulate and I would have a tempo.

Prototype 3
I added a photo resistor to control the note value, i.e., duration. It feels more like a change in tempo, but it works.

Prototype 4
I added a push button to switch modes:

  • In the first mode, potentiometer controls notes and photo resistor changes time;
  • In the second mode, photo resistor controls notes and potentiometer changes time.

The second mode feels more intuitive to play.

The push button may need some adjustments to change modes properly. It may not be the best solution for a switch function.

I added the bounce library and now it works perfectly!