I was trying to build a simple one octave piano when I realized I still had pins left to add more funtions to it so I went for it.
It has 12 push buttons acting as the piano keys (i suggest painting them black n white accordingly for visual effect). 2 slide buttons that actívate an octave up and an octave up note for each button pushed and two potentiometers, one of them controls the note length (te piano will loop the note as long as its button is pushed) and the othe pot controls a pitch bend (which actually adds the analog input value to the notes' frequency)
I actually recycled most of the components used in this proyect from broken electronic apparatus. All push buttons, and both slide buttons were taken from an old cd player, pots were taken from a broken radio I found on the Street and the speaker is actually a buzzer from an old tube phone.
I´ve had a lot of fun with this Little proyect (i am quite new to the programming and Arduino universo) and hope you will too, any feedback or criticism you have on my wiring or coding is more tan welcome!
EXPANDED TECHNICAL DETAILS
Digital Musical Instrument Hub
This project transforms an Arduino into a versatile monophonic musical synthesizer, ideal for learning about wave synthesis and frequency mapping.
- PWM Frequency Oscillator: The Arduino uses the
tone()function to generate square waves corresponding to Western musical notes (C4, D4, E4, etc.). The firmware includes a chromatic lookup table, ensuring every key press produces the correct pitch. - Multi-Waveform Synthesis: (Advanced version) Explores the use of a resistor-ladder DAC or a high-speed PWM filter to create complex waveforms beyond simple square waves, such as Sawtooth or Triangle waves for a richer "Analog" sound.
Performance Interface
- Capacitive Touch Keys: Instead of mechanical buttons, the Arduino uses aluminum foil sensors and the
CapacitiveSensorlibrary, allowing for a modern, touch-sensitive musical experience.