KosBeat

Computer Science Term Project

A geometric music generator

For 15-112: Fundamentals of Programming and Computer Science, Fall 2014

A demo and explanation


About the project

KosBeat is based on the application NodeBeat. The user creates a design of circles and squares. When a circle and a square are near each other, a line forms between them. This indicates that a sound will play. The tone of the sound corresponds to the two shapes' colors, and the timing of the sound corresponds to the length of the line. Each combination of circle and square creates a unique sound. The user can change how the entire composition sounds using the settings at the bottom. They can alter the key, type of scale, and tempo of the music, as well as how many times the music will loop when they press play. They can modify their music by adding shapes, removing them, or dragging them.

I wrote the application in Python using several modules and packages. The interface was animated with Tkinter, and the sounds were played with Pygame. If I did the project again, I would implement both the animation and the sounds with Pygame to enable the two to be synchronized. Whenever a connection was made, a sound was chosen on the fly based on the connection's endpoints and the user's settings. Anytime the settings change, all the connections' sounds were recalculated. To play the music, I simply looped through the list of connection and played their given sounds. I borrowed the percussion sounds from NodeBeat, and I generated all the tones using Audacity.