User Tools

Site Tools


2014:fpga_midi_synth

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2014:fpga_midi_synth [2014/12/18 23:40]
criley1 [How We Did It]
2014:fpga_midi_synth [2014/12/18 23:49] (current)
criley1
Line 49: Line 49:
 **Code:** **Code:**
  
-The commented code is provided for download in the wiki. The archive file includes helpful links about MIDI files, the Python script, the Xilinx project, the sample MIDI file used, and the generated memory file.+The commented code is provided for download in the wiki. The archive file includes helpful links about MIDI files, the Python script, the Xilinx project, the sample MIDI file used, and the generated memory file. You can download the Python MIDI library at [[https://​github.com/​vishnubob/​python-midi|github]],​ but it is also included in the archive. 
 + 
 +You can set the Python script to output every event in a MIDI file with the lines:  
 + 
 +import midi 
 + 
 +data = midi.read_midifile(FILE NAME HERE) 
 + 
 +print(data) 
 + 
 +If you want to simulate the synthTop.v file inside Modelsim, you have to make your own test bench and remove the black box DDS since the DDS is built into Xilinx only. 
 + 
 +To load the project, install Xilinx ISE Design Suite and load NoteGeneratorCopy.xise. The code should already be synthesized (unless you alter it). You can then "​configure target device"​ and load the code onto an FPGA.
  
 **Schematics:​** **Schematics:​**
Line 71: Line 83:
 **Possible To-Do’s:​** **Possible To-Do’s:​**
  
--Currently, the Python script parses tracks in order and assumes that only one note is playing at a time, meaning that, for example, the melody will play, then the bass will play sequentially. The script could be altered to parse all tracks simultaneously or combine all tracks.+-Currently, the Python script parses tracks in order and assumes that only one note is playing at a time, meaning that, for example, the melody will play, then the bass will play afterwards without overlapping. The script could be altered to parse all tracks simultaneously or combine all tracks.
  
 -The FPGA code could be altered so that multiple notes could be played at once. Additive synthesis (adding sine waves together) can produce additional tones and chords. This would accompany the above suggestion of changing the output of the Python script. -The FPGA code could be altered so that multiple notes could be played at once. Additive synthesis (adding sine waves together) can produce additional tones and chords. This would accompany the above suggestion of changing the output of the Python script.
Line 77: Line 89:
 -Since binary numbers are integers and we're shifting low pitches up to change octaves, the phase increment inputs will be slightly inaccurate for higher notes. Future work could include experimenting with different methods to produce accurate phase increment input for the entire range of notes. -Since binary numbers are integers and we're shifting low pitches up to change octaves, the phase increment inputs will be slightly inaccurate for higher notes. Future work could include experimenting with different methods to produce accurate phase increment input for the entire range of notes.
  
 +{{:​2014:​finalzip.zip|}}
2014/fpga_midi_synth.1418964041.txt.gz · Last modified: 2014/12/18 23:40 by criley1