Introduction:
Our ECE 476 Spring 2002 final project is a musical synthesizer that mimics the sounds produced by a piano and a clarinet. We wanted to create a device that could produce different musical signals by direct digital synthesis. Using Fourier analysis of the signals, we were able to imitate the sounds from different musical instruments. In addition, we wanted to give our keyboard users the ability to play multiple note chords to create more interesting music patterns. Working on this project gave us a lot of insight into the nature of sound and how high-end keyboard synthesizers actually operate.
The best part about our project was that once we had finished debugging and assembled our final project, we were able to play simple melodies using our Digital Music Synthesizer. Some of these songs included simple tunes like ‘Jingle Bells’ as well as more complex tunes like ‘Chop Sticks’ which requires more than one note to be played at one time (chords).
High-Level Design:
Sine Wave Generation
The range of the synthesizer covers from middle C (lowest note, C4) to an octave above middle C (highest note, C5) and includes all 11 notes in between including all the sharps and flats. This encompasses an entire octave on a musical scale. The sampling frequency of our synthesizer is 20 kHz which is many times the Nyquist frequency of our highest note (C5 523 Hz) so we avoid the possibility of aliasing. We stored the sine table values for each note into flash memory. Each value in the sine table is 6 bits in resolution. C4, at 262 Hz, has a period of 3.81 ms, so at a sampling rate of 20 kHz, we need 77 samples to represent a single C4 wave. A4, at 440 Hz, has a period of 2.27 ms, so we need 46 samples to create a single A4 wave. Since the period of each note is different and we are using a 20 kHz sample rate, each note has a sine table of a different size. Below is a picture of the piano keys (one full octave) that we implemented and a listing of their corresponding frequencies.
The range of the synthesizer covers from middle C (lowest note, C4) to an octave above middle C (highest note, C5) and includes all 11 notes in between including all the sharps and flats. This encompasses an entire octave on a musical scale. The sampling frequency of our synthesizer is 20 kHz which is many times the Nyquist frequency of our highest note (C5 523 Hz) so we avoid the possibility of aliasing. We stored the sine table values for each note into flash memory. Each value in the sine table is 6 bits in resolution. C4, at 262 Hz, has a period of 3.81 ms, so at a sampling rate of 20 kHz, we need 77 samples to represent a single C4 wave. A4, at 440 Hz, has a period of 2.27 ms, so we need 46 samples to create a single A4 wave. Since the period of each note is different and we are using a 20 kHz sample rate, each note has a sine table of a different size.
Parts List:
Parts List
|
For more detail: Digital Music Synthesizer