Our final project is a programmable, self-playing xylophone with random melody generation and a pitch detection based interface.
From early mechanical devices to today’s musical greeting cards, history has seen numerous examples of automated music machines. This project represents a quick, modern take on that tradition with several additional features. We designed and implemented a microcontroller-driven system which relies on solenoid actuation to strike the keys of a xylophone. The device can store up to five melodies, programmed through a serial command-line interface, and play them back at a range of speeds. The system also incorporates a Markov chain based algorithm to generate unique random melodies.
To explore the more advanced capabilities of the Atmel Mega32 microcontroller, a pitch detection interface was designed. Playback of a stored or randomly generated melody is triggered by striking the first few notes on the xylophone.