Commit graph

9 commits

Author SHA1 Message Date
Simon Howard
ffb7348b8e genmidi: Strip instrument name trailing whitespace.
Some of the DMXGUS instrument names seem to have long sections of
whitespace like this, and we can clean it up while dumping.
2023-06-24 00:49:26 -04:00
Mike Swanson
6eef9be73a use python3 only for building
Python 2 is very near end-of-life, and Python3-compatible changes to a
few scripts introduced compatibility problems with 2.7 again.  It went
unnoticed for me since my system symlinks "python" to "python3", but
it broke the build on systems where that symlink is still python2.  At
this point in time, I feel it is worth targetting modern Python and
forgetting about 2.7.
2019-09-06 14:43:50 -07:00
Mike Swanson
4701d8f351 Blacken all Python files
Using the black code reformatter, pass it over all our Python files.
This allows for a consistent style across the code base.

Exception: lumps/dmxgus/stats.py, for readability.
2019-09-04 19:36:23 -07:00
Mike Swanson
8835afef5f Copyright date bump and apply SPDX tags.
The tags are shorthand for the license of each file and avoid
copying the full license text into each one (and avoids having
to manually update the dates in each one...).
2017-02-15 16:41:53 -08:00
Simon Howard
e47b69a064 genmidi: Update to support Python 3 build.
Tweak the code used to build the GENMIDI Lump so that it properly
supports Python 3 for build. Tested use cases were:
 * Normal build
 * a2i-to-sbi script to convert AdTrack2 instruments to SBI format
 * dumpgenmidi script to dump the instruments from a GENMIDI lump.
 * Running genmidi.py, sbi_file.py, a2i_file.py standalone to print the
   contents of files in their respective formats.
2014-10-28 03:55:22 +00:00
Simon Howard
b5d0a04088 Use print() for Python 3 compatibility.
This doesn't get everything working in Python 3 yet but it's a
start.
2014-02-04 02:12:50 +00:00
Simon Howard
3b14d8d1a0 genmidi: Add a2i-sbi conversion script.
Convenience script to convert a2i files to the more convenient
SBI format.
2012-01-03 00:52:12 +00:00
Simon Howard
9071466be9 genmidi: Add copyright headers to Python files. 2012-01-03 00:03:15 +00:00
Simon Howard
5ce7690612 genmidi: Add Python code for reading OPL instruments.
These files load OPL instrument data from SBI (SoundBlaster Instrument)
or A2I (AdlibTracker2 Instrument) format files.
2012-01-03 00:03:06 +00:00