Music Synthesizer with PS2 Keyboard Input

Overview

This music synthesizer accepts user input via a keyboard using a PS/2 interface. The user has the ability to control two parameters: waveforms and octaves. Waveforms are generated by means of the direct digital synthesis algorithm. The user may select from six waveforms: sine, square, sawtooth, triangle, EKG, and sinc. The synthesizer covers the seven octaves present on an 88-key piano in addition to the two incomplete octaves for a total of nine octaves.

Details

Connections

/media/uploads/lbaddam3/_scaled_connections.png /media/uploads/lbaddam3/pcb.png

Key Mappings

/media/uploads/lbaddam3/keyboard.png

Example Waveforms

SINE

/media/uploads/lbaddam3/sine.png

SQUARE

/media/uploads/lbaddam3/square.png

SAWTOOTH

/media/uploads/lbaddam3/sawtooth.png

TRIANGLE

/media/uploads/lbaddam3/triangle.png

EKG

/media/uploads/lbaddam3/ekg.png

SINC

/media/uploads/lbaddam3/sinc.png

Demo

Future Improvements

Volume Adjustment

Volume control can be achieved using an inverting amplifier omp-amp configuration with a potentiometer serving as a variable resistor in the feedback loop.

Sound Processing Delay

Given the real-time nature of the project, the use of mbed libraries can produce inherent delays during sound processing. While it is not critical for the user to hear the sound as it is played within microseconds, discontinuities associated with the sound processing delay are undesirable. Minimizing the delay by use of C routines avoids the abstraction layer provided by C++ eliminating the setup time associated with objects.

Code

Import programSynth

This music synthesizer accepts user input via a keyboard using a PS/2 interface. The user has the ability to control two parameters: waveforms and octaves. Waveforms are generated by means of the direct digital synthesis algorithm. The user may select from six waveforms: sine, square, sawtooth, triangle, EKG, and sinc. The synthesizer covers the seven octaves present on an 88-key piano in addition to the two incomplete octaves for a total of nine octaves.


Please log in to post comments.