Design Challenge: Using an FPGA, create a digital synthesizer that produces the audio output for a MIDI piano keyboard.

Design Process

In order to be considered fully functional, our system (shown above) needed to:

  1. Receive 3-byte binary messages from the MIDI controller keyboard (through the orange adapter on the left side) to determine which musical note to play
  2. Synthesize a digital sine wave with a frequency corresponding to the musical note being pressed
  3. Convert the digital signal to analog, and send the amplified output to an analog speaker
  4. Stop playing the note when the key is released

My project partner and I used Xilinx Vivado to create and run simulations of VHDL code for the FPGA. We also used an oscilloscope (below) to debug the outputs as we tested each new functionality being added.

Oscilloscope screen showing digital signals, which look like chopped up sine waves overlapping with each other.
Above: Debugging the output with an oscilloscope. The yellow audio signal was intended to be a sine wave, but the program was generating the wave at a faster rate than it was updating the output, causing high-frequency aliasing.

Final Working Product

Our finalized product could accurately play one keyboard note at a time and display the corresponding MIDI note number on the FPGA. The video below is a brief demonstration of this functionality.

# # # # # # #

August 20, 2022