Full Version : Guitar Demigod Synthesizer & Game (AVR)
avr >>SOUND & MUSIC PROJECTS >>Guitar Demigod Synthesizer & Game (AVR)


AVR_Admin- 05-07-2006
Introduction
Compose your own virtual guitar masterpiece or follow along with a preprogrammed classic. No experience needed!

We developed a guitar synthesizer with video component inspired by the popular video game Guitar Hero. The original game consisted of only reproducing popular rock and roll songs but we wanted to allow players to be able to create their own music. The game uses direct digital synthesis to replicate guitar tones and outputs the sound to a set of computer speakers. A black and white television is used to view a video image which is produced using NTSC non-interlacing video code. The video shows the treble staff resembling actual sheet music as well the corresponding guitar tab. The user interacts using a guitar shaped PlayStation 2 controller to play notes and select from the menu. To imitate playing a guitar as realistically as possible, notes are played when the player "strums" the guitar controller and not when "fret" buttons on the neck are pressed. Another feature of our game that any musician will appreciate is that each note displayed on the staff corresponds to the correct pitch and frequency of the actual sound.

High Level Design
When we began looking at final projects, we wanted to do something fun. Other groups were planning clever and interesting projects, but only a few of them allowed for much user interaction. One of our group members owns the game Guitar Hero for the PlayStation 2 (PS2). The controller, shaped like a guitar, inspired us to make a game that utilized its unique look and button layout. After researching the PS2 communication protocol, we decided that we could use the Mega32 to talk to the controller, and the idea for our game began to take shape. At first, we just wanted to create a synthesizer that would produce realistic electric guitar sounds. Unfortunately, the input capabilities of the controller limited the number of actual chords or notes we could play and the size and power of the Mega32 limited sound generation to DDS, meaning that full guitar chords were out of the question. We also decided that we wanted a video component for the game so that the user could have visual feedback on the generated music, as well as follow along with preprogrammed songs for practice.

Conclusion

Overall, our project was extremely successful in terms of what we had planned to do and what we were actually able to accomplish in the given time period. In our proposal, we had specified direct digital synthesis and a controller interface as the bare minimal requirement for our final project and considered additional functionalities such as video output and preprogrammed songs only if time would permit. However, we were able to include an in-depth video component as well as three preprogrammed songs in our final project. One shortcoming was our inability to mimic an electric guitar sound with direct digital synthesis, since we lack experience in generating the needed waveform. In the future, we could give a player the option of switching between the current acoustic guitar sound and a synthesized electric guitar sound. After careful examination, we decided that an acoustic guitar sound was more appropriate for the classic songs that we want to play in our game, such as London Bridge and Hot Cross Buns. Of course, there are plenty of additions that we could have made if more time was available such as more note variety and user-programmable songs. We feel that we adequately used our time and created a very polished final product.

During the course of the final project, we did not use any publicly available code except code written by Professor Land for the purposes of previous ECE 476 labs. He explicitly released this code to us in class. Any code that Professor Land provided was heavily modified and was only used as a backbone structure for our programs. For example, the video code used in Lab 4 served as the foundation for our video, and we utilized some of the smaller functions such as video_pt and video_putsmalls. However to increase the efficiency, we avoided using the video_line function and generated our own line functions that dealt only with vertical and horizontal lines. The direct digital synthesis code provided for Lab 2 was employed to generate the sound waveforms needed to produce the correct frequencies of each note. The major adjustments were including an additional three harmonics for a more accurate sound and modulating the amplitude of the waveform.

Our project relies on a number of communication standards. Most importantly, we used SPI to communicate between two Mega32s and between a PS2 controller and a Mega32. We made sure that data packets do not collide and that one pair did not monopolize the bus. Additionally, the PS2 uses a slightly nonstandard form of SPI, so our code changes how it communicates on the bus based on to whom it is talking. Another protocol that we used was NTSC. Conforming to the standard is largely taken care of in Professor Land's video code, but we did have to limit our instructions per frame so that we didn't delay the video signals. To accomplish this, we split the drawing-intensive commands into multiple frames, as well as optimized some of the video code for our specific needs.

Link: http://instruct1.cit.cornell.edu/courses/e...dzw2/index.html


Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.