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
Key Mappings
Example Waveforms
SINE
SQUARE
SAWTOOTH
TRIANGLE
EKG
SINC
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.