Inspiration

This project is originally from Stanford's 2012 Nifty Assignments. While scanning through the list of projects, this one caught my eye because I thought it would be cool to give my computer music capabilities.

What it does

Guitar Hero is a program that turns your keyboard into a musical instrument. Each key corresponds to a different pitch, making your computer very similar to a guitar.

How I built it

Guitar Hero simulates the plucking of a guitar string by using the Karplus-Strong algorithm, which transforms any laptop into a musical instrument. The Karplus-Strong models the vibration of a guitar string. First, it maintains a buffer of displacements. Then, it repeatedly deletes the first displacement from the front of the buffer and appends the average of the first two displacements, scaled by an energy dissipation factor, to the end of the buffer. The size of the buffer determines the frequency of the guitar string.

Challenges I ran into

The hardest part was finding pitches that would sound the most pleasing to the ear.

Accomplishments that I'm proud of

I am quite proud of how I organized the keyboard layout. I spent considerable amount of time planning which keys would have certain pitches because I wanted the user to have an easier time finding the pitches they wanted for their songs.

What I learned

Through this project, I learned a lot about the importance of creating a user-friendly interface as well as programming sound functions in java.

What's next for Guitar Hero

In the future, I want to give Guitar Hero the capability to listen to any music and create a musical score that users can use to replicate the song on their computers.

Built With

Share this project:

Updates