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.
Organize .gitignore by moving all patterns into a top level sorted
.gitignore file. With this change both "git status" and
"git-ls-ignore-index" should return cleanly. The later checks if any
files in the index are ignored.
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.
This is one of the built-in variables for Make and can increase
portability on different operating systems (eg, on Windows, the
built-in $(RM) may be defined as "del" instead of "rm -f").
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...).
GitHub’s AsciiDoc parser barfs on the standard AsciiDoc syntax to
represent such characters with only ASCII… Well, everybody should
support UTF‐8 these days. Let’s just use these directly.
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.
This music sounded really horrible with Freedoom's GENMIDI lump, which
was a shame because this is a really beautiful level. So adjust a
couple of the more prominent instruments used for this music track:
* Instrument 104 (Sci-fi):
This instrument was using a frequency multiplier that put it 2
octaves and a 5th above, making it (intentionally, because it's
a "sci-fi" effect?) discordant. Rework this so that it isn't
discordant any more.
* Instrument 51 (SynthStrings #1):
This had a slow attack phase which had the effect of offsetting
the notes slightly, so that they seemed out of sync. Adjust this
and also increase the feedback so that the instrument sounds more
"stringy" (?)
Some of the instruments were using OPL3 waveforms, but GENMIDI is
for OPL2 chips and these are not necessarily supported. Adjust the
instrument settings to only use the original four OPL2 waveforms,
while trying to maintain something resembling the same sound.
With a couple of exceptions, the majority of OPL instruments sound
better when adjusted down by one octave. It seems likely that the
original BSD instruments were supposed to sound this way and we've
been playing the wrong notes all this time.
This adds the remaining changes from horncomposer's modified version
of the old GENMIDI lump. Details from his accompanying text file
follow:
2/6/11- Replaced Electric Piano 2 (patch 5) - with the high pitched attack :)
Replaced Acoustic Piano (patch 0) - Serves as model for other pianos
Replaced Bright Acoustic Piano (patch 1)
Replaced Electric Grand Piano (patch 2)
Replaced Honky-tonk piano (patch 3) - Added "out of tune"
Accidentally discovered a good Electic Piano 1 (patch 4) - with chorus
This adds a good number of the missing percussion instruments. These
come from a dump of Matt Cadirao (horncomposer)'s modified version of
the old GENMIDI lump.
Config lists the instrument files to use to build the GENMIDI lump.
Some instruments are not yet provided and are nulled out using a dummy
SBI file that doesn't play anything.
Move C code into subdirectory as it will soon be only of historical
interest. Add extra program to dump SBI instrument patches, switch
to using OPL2 instruments, and ignore "null" instruments (all-zero).