genmidi: Split off GENMIDI code into separate file.

Split out code for handling the GENMIDI format into a separate genmidi.py
file. Add routine to load the contents of a GENMIDI lump.
This commit is contained in:
Simon Howard 2012-01-04 01:20:38 +00:00
parent 85482928d5
commit 3b96d7f1de
3 changed files with 223 additions and 94 deletions

View file

@ -58,6 +58,13 @@ def check_opl2(filename, data):
data["c_waveform"])
def load_instrument(filename):
# As a hack, a literal dictionary of the values can be specified
# in place of a filename.
if isinstance(filename, dict):
return filename
filename = os.path.join("instruments", filename)
if filename.endswith(".a2i"):