Figure 1: MelvinTerrorMouse - A MIDI SynthesizerRon [email protected] [email protected] [email protected] 11, 20041ContentsI Project Proposal 31 Introduction 42 Implementation Challenges 4II Project Design 43 Overall Architecture 44 MIDI to RS-232 Adapter 64.1 The MIDI Receiver . . . . . . . . . . . . . . . . . . . . . . . . 64.2 The MAX232 Leve l Shifter . . . . . . . . . . . . . . . . . . . 74.3 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 MIDI UART 95.1 Examples of RS-232 Converted MIDI Signals . . . . . . . . . 96 Computer Software 117 Integration with the Microblaze CPU 128 Digital Waveguide Sound Synthesis 148.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148.3 MATLAB Code . . . . . . . . . . . . . . . . . . . . . . . . . . 148.4 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 159 FM Synthesis 169.1 Mathematical Basis . . . . . . . . . . . . . . . . . . . . . . . . 179.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 179.3 Computational Complexity and Polyphony . . . . . . . . . . 1710 Audio Output Module 1810.1 General Description . . . . . . . . . . . . . . . . . . . . . . . 1810.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . 1811 Example Instrument Waveforms 19III Conclusions 23212 Who Did What? 2313 Lessons Learned 2313.1 Scott . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2313.2 Gabe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2313.3 Ron . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2414 Future Work 24IV Code Listings 2515 Configuration Files 2515.1 system.mss . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2515.2 system.mhs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2615.3 system.ucf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2915.4 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3016 C Code 3516.1 hello.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3516.2 synth.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4016.3 fmlookup.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4116.4 wglookup.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4217 OPB Synth Peripheral 4217.1 Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . 4217.1.1 opb synth v2 0 0.pao . . . . . . . . . . . . . . . . . . . 4217.1.2 opb synth v2 0 0.mpd . . . . . . . . . . . . . . . . . . 4317.2 VHDL Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4417.2.1 opb synth.vhd . . . . . . . . . . . . . . . . . . . . . . 4417.2.2 waveguide.vhd . . . . . . . . . . . . . . . . . . . . . . 5217.2.3 delayline.vhd . . . . . . . . . . . . . . . . . . . . . . . 5717.2.4 fm synth.vhd . . . . . . . . . . . . . . . . . . . . . . . 5817.2.5 cosine of theta.vhd . . . . . . . . . . . . . . . . . . . . 7617.2.6 audio out.vhd . . . . . . . . . . . . . . . . . . . . . . . 823Part IProject Proposal1 IntroductionWe propose to build a MIDI synthesizer using the XESS XSB-300E. We willrequire an external MIDI controller1. We plan to convert MIDI signals toRS-232 via a customized MIDI to serial cable, which we will build ourse lves.We plan on synthesizing the actual sounds in hardware, which will thenbe outputted through the DAC to analog stereo output. We are currentlyexploring several ideas for sound synthesis. The two main options are 1)Simple FM synthesis, and 2) Physical modeling of a musical instrument usingdigital waveguides. The former would require research into FM synthesistechniques. The latter has already been implemented in software.2Whilephysical modeling would be more interesting than FM synthesis, we suspectit will be m ore complex, especially if we plan on implementing it in hardware.2 Implementation Challenges• Building a MIDI to RS-232 adapter – We have studied several schemat-ics available online. We expect this to be relatively simple.• Implementing the MIDI protocol• Implementing sound synthesis algorithms. Ideally we would like tobuild a rudimentary DSP supporting addition, multiplication, and …
View Full Document