W
Wojciech M. Zabolotny
Guest
Hi,
One of my students is working on musical sound synthesis in FPGA.
To allow her to test her solution before the design is ready
to be programmed into real FPGA, I needed a solution translating
the MIDI file into the stream of MIDI commands which may be read
by the VHDL simulator.
Unfortunately I was not able to find such a converter ready to use,
and therefore I have implemented it myself.
I hope that this solution may be useful for others, working with
similar problems (and probably may be fixed/improved by others),
therefore I have decided to submit it to this group.
Due to some VHDL limitations, the provided toolset first converts
the MIDI file to the text file, containing lines with the absolute
time, when the particular MIDI command is set, and then bytes
belonging to that command.
This text file is then interpreted by the provided read_midi entity,
which produces the read MIDI commands to the connected synthesizer
IP core, at the appropriate simulation time.
The output interface of the read_midi entity uses a simple asynchronous
handshake system, which allows to easily interface it with the synthesizer.
The Python part of the solution is heavily based on the wonderful
Python MIDI library written by Giles Hall, and available at:
https://github.com/vishnubob/python-midi
My sources, together with the description are available on:
https://github.com/wzab/python-midi-2-vhdl/tree/master/midi2vhdl
Additionally the sources are published on alt.sources group
(subject: Tools for feeding the simulated VHDL implemented
music synthesizer with data from MIDI file
google archive: https://groups.google.com/forum/#!topic/alt.sources/aVdyFtsho_I )
Please note, that the described solution is for simulation
only!
--
Regards,
Wojciech M. Zabolotny
wzab@ise.pw.edu.pl
My GPG/PGP keys:
standard: B191 ACF0 7909 83FA 3F9B 450C 407E 3C4B 4569 D119
confidential: 2BF3 F90F 6EA8 7D35 59FD 5080 78ED 33DE 1312 D8F8
One of my students is working on musical sound synthesis in FPGA.
To allow her to test her solution before the design is ready
to be programmed into real FPGA, I needed a solution translating
the MIDI file into the stream of MIDI commands which may be read
by the VHDL simulator.
Unfortunately I was not able to find such a converter ready to use,
and therefore I have implemented it myself.
I hope that this solution may be useful for others, working with
similar problems (and probably may be fixed/improved by others),
therefore I have decided to submit it to this group.
Due to some VHDL limitations, the provided toolset first converts
the MIDI file to the text file, containing lines with the absolute
time, when the particular MIDI command is set, and then bytes
belonging to that command.
This text file is then interpreted by the provided read_midi entity,
which produces the read MIDI commands to the connected synthesizer
IP core, at the appropriate simulation time.
The output interface of the read_midi entity uses a simple asynchronous
handshake system, which allows to easily interface it with the synthesizer.
The Python part of the solution is heavily based on the wonderful
Python MIDI library written by Giles Hall, and available at:
https://github.com/vishnubob/python-midi
My sources, together with the description are available on:
https://github.com/wzab/python-midi-2-vhdl/tree/master/midi2vhdl
Additionally the sources are published on alt.sources group
(subject: Tools for feeding the simulated VHDL implemented
music synthesizer with data from MIDI file
google archive: https://groups.google.com/forum/#!topic/alt.sources/aVdyFtsho_I )
Please note, that the described solution is for simulation
only!
--
Regards,
Wojciech M. Zabolotny
wzab@ise.pw.edu.pl
My GPG/PGP keys:
standard: B191 ACF0 7909 83FA 3F9B 450C 407E 3C4B 4569 D119
confidential: 2BF3 F90F 6EA8 7D35 59FD 5080 78ED 33DE 1312 D8F8