User Tools

Site Tools


2014:fpga_guitar_pedalboard

Abstract

For our final project in Computer Architecture we decided to build an FPGA Guitar PedalBoard. Pedalboards are boards that connect to electric guitars and house several different effects pedals. Effect pedals are used to modify the sound of electric guitars and there are several different types of effects. For instance there are octave pedals that raise or lower the octave played, and distortion pedals that distort the sound produced by the guitar.

For our pedalboard we used the switches on the FPGA to act as different pedals. When a switch is raised a certain effect is applied to the song that we play through a speaker attached to the FPGA. We choose to implement two effects, octave changes and vibrato.

Reasoning

This project allowed us to explore an interesting application of the FPGA. Amanda is an avid musician and enjoyed being able to connect Computer Architecture back to her hobbies. This particular project was great because it could be easily scaled up or down depending on the amount of work that we were handling.

Our System

The system we created is similar to the system in the image below. There was a clock that was used to drive a square wave. The wave was used to create the notes that our FPGA played. When first getting started we used FPGA Music Box.

Sound

In order to produce notes our system manipulates a clock. A variable commonly referred to as a clock divider is used to split the clock cycle. Depending on the value of the clock divider the wave reaches a different frequency creating different notes.

In our code the divider is compared against a counter that counts the number of clock cycles. Once it has reached the requisite number of cycles it switches the value of the output.

Octave Changes

There is a simple formula for calculating octave jumps. 2^(number of octaves) * Original frequency.

The code takes in the input from a switch, and allows users to switch between different effects. When implementing octave changes we would calculate the new value for the frequency and change the setting of the clock divider accordingly when the switch is turned on.

Given below is a picture of an octave change as it appears in music.

Displayed below is a picture of a single note when it is modified to be an octave above where it should have been.

Vibrato

The second effect that we created was vibrato. This effect was created by rapidly switching between two tones. This created the effect of a single pulsating note.

In order to do this we shortened the counter and continuously switched the value of the clock divider between two notes that were close in pitch.

Given below is a picture of a how a single note would be changed when undergoing vibrato.

Difficulties

Getting the FPGA to play notes was straightforward and was well documented online. When creating sound effects we were exploring new territory and for that reason we had to scale back our initial goals quite a bit. Originally we wanted to create more complicated distortion effects but with the time that we had available were unable to create a realistic distortion. When looking into the sound effects we realized we knew very little about the technicalities of sound/audio. If we had done more research before hand, we probably would've been able to implement more effects. Additionally, we should've implement a digital to analog converter to make creating the sound effects much easier.

We also faced difficulty when scheduling time to work. This project was assigned towards the end of the semester when both teammates were in 3 heavily project based classes and so much of the work was done late at night after both teammates were tired and had a hard time focusing.

Moving Forward

There is a lot of room for potential work that could be done on this project.

First there are a number of sound effects that can still be created such as echo, amplification, and a 'wah wah' effect. There are plenty more effects out there and we could have even explore created new, innovative sound effects.

Second because we already have the ability to play individual notes it would be nice to give our system to take in audio input and play songs with the ability to create effects on while the song is playing. At the moment, the sound effects are only occuring on a single note because of troubles we were having with the implementation of the effects.

Work Plan Analysis

As previously stated we did have difficulty sticking to our original work plan.

This is where the project that we picked worked to our advantage. We were able to scale features based off of the amount of time we had available to us. Though moving forward it would have been better if we had front loaded more of our work.

Code Documentation
2014/fpga_guitar_pedalboard.txt · Last modified: 2014/12/25 16:51 by rmathew