User Tools

Site Tools


2014:fpga_pianoman

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2014:fpga_pianoman [2014/12/16 01:15]
eweiler
2014:fpga_pianoman [2014/12/16 01:33] (current)
eweiler
Line 1: Line 1:
-====== FPGA Pianoman ​======+====== FPGA Piano ======
 {{ :​2014:​1.jpg?​500 |}} {{ :​2014:​1.jpg?​500 |}}
 ===Abstract=== ===Abstract===
-Never understand why a piano has so many keys? Think a single octave is more than enough? The FPGA piano allows you to practice your favorite scales or chords and even lets you listen to some of your favorite tunes while you take a break. Our piano has two different modes Piano Mode and Song mode. In Piano Mode, the user can toggle the switches to play different tones and chords from the eight notes in an octave. In Song Mode, the user can depress the buttons on the FPGA to play four different recorded sequences: scales, a simple repeating pattern, Happy Birthday, and (FPGA)Piano Man.+Never understand why a piano has so many keys? Think a single octave is more than enough? The FPGA piano allows you to practice your favorite scales or chords and even lets you listen to some of your favorite tunes while you take a break. Our piano has two different modes Piano Mode and Song mode. In Piano Mode, the user can toggle the switches to play different tones and chords from the eight notes in an octave. In Song Mode, the user can depress the buttons on the FPGA to play four different recorded sequences: scales, a simple repeating pattern, Happy Birthday, and (FPGA)Piano Man. 
 ===Reasoning=== ===Reasoning===
-We undertook this project because it offers a synthesis of digital logic synthesized on an FPGA and the world of analog signals that show up in other classes. Additionally,​ the piano provides a fun opportunity to explore musical interactions with the FPGA and translate between the frequencies of electronics and the frequencies of hearing. ​Also we spent a lot of time this semester modulating clock frequencies and coordinating timing, so we wanted a final project that allowed us to demonstrate our understanding of these concepts. ​+We undertook this project because it offers a synthesis of digital logic synthesized on an FPGA and the world of analog signals that show up in other classes. Additionally,​ the piano provides a fun opportunity to explore musical interactions with the FPGA and translate between the frequencies of electronics and the frequencies of hearing. ​Lastly, ​we spent a lot of time this semester modulating clock frequencies and coordinating timing, so we wanted a final project that allowed us to demonstrate our understanding of these concepts. ​
 ===Implementation=== ===Implementation===
 ==Note Tones== ==Note Tones==
Line 30: Line 30:
 To test our songs, we loaded the song data onto the FPGA and played it a couple of times, ensuring that notes and timings were correct. We also had a number of our friends listen to it and try to guess the song to gauge the quality of our versions. Knowing that we could not perfectly reproduce songs using our system we judged a song to be sufficiently correct when it could reasonably recognized as the original song.  To test our songs, we loaded the song data onto the FPGA and played it a couple of times, ensuring that notes and timings were correct. We also had a number of our friends listen to it and try to guess the song to gauge the quality of our versions. Knowing that we could not perfectly reproduce songs using our system we judged a song to be sufficiently correct when it could reasonably recognized as the original song. 
  
 +===Difficulties===
 +Since no one in our team is particularly knowledgeable about music, we had to spend a bit of extra time figuring out how to encode proper octaves, notes, and frequencies for our piano. We also had to spend time figuring out how to make notes play for different amounts of time during songs so that we could play a range of eighth, quarter, and half notes. One difficulty that we did not find a particularly elegant solution to is the storage of song data. Our current solution involves hard coding a note to be played every 1/16th of a second which requires lots of space in the code and time for the implementer. ​
 +
 +===Continuing this Project===
 +If another team were interested in continuing this project in the future, the next steps would be to expand our song and note repertoire. To do this they could to find a method to execute slurs between notes and create notes for every key on the piano and expand the note encoding to support each note and common chords. Our code is available at https://​github.com/​benkahle/​fpga_piano and is comprised of piano.v which includes the piano logic, pianoTopLevel.v and piano.ucf which allow Xilinx synthesis, piano.do which runs a ModelSim simulation and shows waveforms of important signals, and songGen.py, the Python script for song data generation.
 +
 +===Reflection===
 +==System Stats==
 +As a comparison to some of the other systems we have synthesized onto an FPGA this semester, the FPGA piano required the following structure components:
 +  * 1 112x4-bit ROM (Happy Birthday song data)
 +  * 1 183x4-bit ROM (Piano Man song data)
 +  * 1 43x4-bit ROM (“Random” song data)
 +  * 1 8x4-bit ROM (Octave song data)
 +  * 1 4-bit Adder
 +  * 3 8-bit Adder
 +  * 15 24-bit Up Counters
 +  * 56 Flip-flops
 +
 +==Work Plan Reflection==
 +Because of volatile finals schedules we were unable to follow our original work plan but still managed to meet often and accomplish each task within a reasonable time frame. It was fortunate that we had scoped our green feature set to be relatively easy to quickly implement. This allowed us to be flexible about which of our yellow features we implemented.We chose to pursue switching octaves and playing chords because we were excited about the prospect of being able to play a wider variety of songs. This flexible work plan structure with green, yellow, and red features allowed us to get something simple working quickly and then have fun extending the project. ​
2014/fpga_pianoman.1418710554.txt.gz · Last modified: 2014/12/16 01:15 by eweiler