User manual
DE2 User Manual
66
Figure 5.12. The setup for the SD music player demonstration.
5.8 Music Synthesizer Demonstration
This demonstration shows how to implement a Multi-tone Electronic Keyboard using DE2 board
with a PS/2 Keyboard and a speaker.
PS/2 Keyboard is used as the piano keyboard for input. The Cyclone II FPGA on the DE2 board
serves as the Music Synthesizer SOC to generate music and tones. The VGA connected to the DE2
board is used to show which key is pressed during the playing of the music.
Figure 5.13 shows the block diagram of the design of the Music Synthesizer. There are four major
blocks in the circuit: DEMO_SOUND, PS2_KEYBOARD, STAFF, and TONE_GENERATOR. The
DEMO_SOUND block stores a demo sound for user to play; PS2_KEYBOARD handles the users’
input from PS/2 keyboard; The STAFF block draws the corresponding keyboard diagram on VGA
monitor when key(s) are pressed. The TONE_GENERATOR is the core of music synthesizer SOC.
User can switch the music source either from PS2_KEYBOAD or the DEMO_SOUND block using
SW9. To repeat the demo sound, users can press KEY1.
The TONE_GENERATOR has two tones: (1) String. (2) Brass, which can be controlled by SW0.
The audio codec used on the DE2 board has two channels, which can be turned ON/OFF using SW1
and SW2.
Figure 5.14 illustrates the setup for this demonstration.