BaWaMI (revision 111)

Posted on 2013-11-04 at 23:23 in Music, Programs by Robbi-985.

A huge update (biggest yet) that not only fixes several long-standing problems, but introduces 3 entirely new systems. There’s also experimental support for percussion on the PC speaker!

(Click it to see full-size image)

Here’s a super-brief summary of the brand new things, with full details further down:

  • Bank system (variation instruments)

Bawami FINALLY supports Bank Select messages to choose extra instruments beyond the GM set of 128 instruments. This has opened the door to supporting special GS and XG “variation” instruments, and I’ve added 24 new instruments so far, from Muted Distortion Guitar and Acid Bass to sound effects like Thunder and percussion such as Tambourine. This means that some MIDIs designed for Roland GS or Yamaha XG synths can now sound closer to how they’re meant to sound. I’ve also added another 2 instruments unique to Bawami (Hardstyle Reverse Basses). Variation instruments can be selected by simply clicking the instrument name to override it – just like ordinary GM instruments.

  • Language system

This allows people to customise or translate all text on message boxes, menus, the config window, and a couple of other places. A language is a folder of text files stored inside the “lang” folder, and can be chosen from the “Interface” tab on the config window.  There’s a simple “instructions.txt” file in the “lang” folder for full information on how to make your own (I tried to keep it easy). I’ve included an incomplete Japanese language “日本語 (不完全)”. Not everything is translated yet, and I don’t know many technical words in Japanese, so it sounds strange/amusing in places. Help from a fluent speaker would be much-appreciated.

  • Percussion mapping system

There’s a new “percmap” folder with text files that tell Bawami how to play certain “unsupported” percussive notes. They can be played as if they were a certain tone instrument (in the “inst” folder) playing a specific note – in this way, Tambourine is now supported on percussion channels, because it has its own file in the “inst” folder. Or, you can simply “remap” from an unsupported percussive note to a supported one. See “percmap info.txt” in “percmap” folder for detailed information.

Download is here (6.95 MB), and full details (including important fixes) are below!


  • New “bank” system! “Variation” instrument files with names in the form of “PPP_HHH_LLL.txt” can now be loaded, where PPP = Program Change number, HHH = high bank (MSB), LLL = low bank (LSB). To select this instrument, first send Bank Select control changes, then send Program Change. If requested variation file doesn’t exist, an alternative will automatically be used. See “BANK SELECTS” section of info.txt for details.
  • Added variation instruments:
    • [GS] Muted Distortion Guitar (028_001_002)
    • [GS] Pick Scrape (120_006_002)
    • [GS] Wind (122_003_001)
    • [GS] Thunder (122_002_001)
    • [GS] Footsteps (126_005_001)
    • [GS] Smooth Bass 2 (039_019_002)
    • [GS] Big Shot (127_005_003)
    • [GS] Car Engine (125_001_001)
    • [GS] Siren (125_005_001)
    • [GS] Door Creaking (124_002_001) and [XG] version: Door Creaking (065_064_000)
    • [GS] White Noise (122_017_003)
    • [GS] Pink Noise (122_016_003)
    • [GS] Sine Wave (080_008_001) and [XG] version: Sine Lead (080_000_066)
    • [GS] Tambourine (113_016_003)
    • [GS] Door (124_003_001) and [XG] version: Door Slam (066_064_000)
    • [GS] MC-500 Beep (124_011_003)
    • [GS] P5 Sync Lead (084_016_003)
    • [GS] OB2 Saw (081_001_001)
    • [GS] Guitar Cut Noise (120_001_001)
    • [GS] Acid Bass (038_008_002)
    • [GS] House Bass (039_022_002)
    • [GS] Castanets (115_008_001)
    • [GS] Rock Rhythm Guitar (030_024_002)
    • [GS] Funk Pop Guitar (028_008_001)
    • Non-standard instruments (exclusive to Bawami):
      • [Bawami] Hardstyle Reverse Bass 1 (038_098_098) (weak, high, fast)
      • [Bawami] Hardstyle Reverse Bass 2 (038_099_098) (strong, low, slow)
  • Slowed the attack and release of Warm Pad (089).
  • Agogo (113) now plays one octave higher, since low notes were extremely hard to hear.
  • Quietened Polysynth Pad (090), Ocarina (079) and Alto Saxophone (065).
  • Decreased the effect of modulation on frequency on Panflute (075).
  • Added Shanai (109) (shortcut to Bagpipe (111)).
  • Increased volume and decreased resonance and velocity sensitivity of Synth Bass 1 (038).
  • Increased volume and “bassiness” of Synth Bass 2 (039) by decreasing sustain cutoff frequency slightly.
  • Modified Electric Basses (033, 034) and Fretless Bass (035) to have noticably different envelopes and to subtly change muffledness based on playing note, and increased their volumes.
  • Increased volume of Synth Voice (054), Bright Piano (001), Piccolo (072), Bagpipe (109) and Kalimba (108).
  • Helicopter (125) now (always) has a subtle tremolo.
  • Reduced “velocity sensitivity” of Electric Grand (002).


  • Quietened all percussion a little (long-overdue).
  • Added support for the following percussive notes:
    • Completely new instruments:
      • MC-500 Beep 1 (note 022)
      • MC-500 Beep 2 (note 023)
      • Tambourine (note 054)
      • Castanets (note 085)
    • Instruments that used to exist only as tone instruments:
      • Woodblock High (note 076)
      • Woodblock Low (note 077)
    • By remapping to already-existing percussive instruments:
      • Remapped to Kick 1 (note 035): Electric Kick 2 (note 012), Kick Drum 1 (note 004), Standard 2 Kick 1 (note 002), Standard 1 Kick 1 (note 000).
      • Remapped to Kick 2 (note 036): Electric Kick 1 (note 013), Kick Drum 2 (note 005), Standard 2 Kick 2 (note 003), Standard 1 Kick 2 (note 001).
      • Remapped to Snare 1 (note 038): Standard 1 Kick 1 (note 097), Standard 2 Kick 1 (note 098), Electric Snare 1 (note 116), Electric Snare 2 (note 115), Slap (note 028).
      • Remapped to Snare 2 (note 040): Standard 1 Kick 2 (note 099), Standard 2 Kick 2 (note 100), Electric Snare 3 (note 117), Gated Snare (note 111).

MIDI in/out

  • Added option to send various different kinds of “Reset” messages on MIDI output when playback starts. Ensures that the external MIDI synth starts with its default settings, as expected, preventing e.g. pitch-bends or volumes being left over from a previously-played MIDI. The option (disabled by default) can be found on the “MIDI out” tab of the configuration window.
  • Added “Refresh” buttons next to lists of MIDI input and output devices to re-make the list and e.g. let you choose a MIDI device that you connected after Bawami started running.
  • Much safer listing and opening of MIDI in/out devices, particularly if a device is removed since Bawami was started (previously, Bawami would crash or open the wrong device), or if there is a device I/O error (previously, Bawami would crash). These problems have been present ever since revisions 106 and 89, when MIDI output and input, respectively, were first introduced.
  • Fixed potential crash when attempting to open MIDI output device that is no longer connected (only in revision 110). 1 or 2 bytes of memory were becoming corrupted.
  • When changing MIDI output device, “ALL NOTES OFF” is now sent on the previously-chosen MIDI device to avoid stuck notes.

PC speaker

  • Added experimental support for percussion. It takes priority over non-percussive notes. Please mute percussive channels if it sounds bad. Uses lots of CPU time when making noise (as opposed to tone) and will sound very bad if there is not enough available CPU time. In this case, try turning FPS (on “Interface” tab) down to minimum and setting sound device to “No sound output”.
  • “Lowest note allowed” now defaults to C3 if this is the first time Bawami is being run (no startup.cfg exists).
  • Fixed potential bug where the tone would very occasionally not change or not stop when it was supposed to (I never witnessed the bug, but it looked possible in the code).

MIDI Messages view and in debuglog.txt (when logging MIDI messages)

  • Fixed bug where text for CCs #76, #77 and #78 (VIBRATO RATE/DEPTH/DELAY) would contain information about a previously-received message in addition to this new message (text from old messages would build up).
  • Instrument names no longer appear with “- ” halfway through the name.
  • Corrected horizontal alignment (padding) of digits in “Set bank” text.

Crash fixes

  • No longer possible to cause crash by changing instrument by clicking instrument name on the main window before sound system has fully finished being initialised.
  • No longer possible to cause a crash by quickly loading the configuration window and changing something before program has finished starting to run (scanning for sound devices).
  • Fixed memory leak when right-clicking instrument name to override it. After changing the instrument many dozens of times, or after moving the mouse for a long time over the instrument categories on the menu that appears, the menu would turn black in places and some programs (including Bawami) would fail to start until Windows was rebooted.
  • Fixed memory (resource) leak when changing the “custom note velocity curve” on the “MIDI in” tab of the config window.
  • Fixed huge resource leak whenever loading a skin for the second (or later) time since the program started running.

Visual changes

  • Name of loaded MIDI file, or “[No file]“, is now shown in taskbar button and when selecting Bawami by Alt-Tab.
  • Attempted to fix visual glitch where a few pixels of the previous instrument’s name would be left behind on the main window when the instrument name changed. This had happened ever since the slight speed improvements made to drawing the main interface in revision 99.
  • Fixed visual glitch where lines remained drawn on the “custom MIDI channel map” box on the “MIDI in” tab even if the mouse was not positioned over a MIDI channel.
  • Fixed visual glitch where, if a MIDI file couldn’t be loaded, the duration of the previously-loaded file remained displayed next to the playback position bar even though it couldn’t be played.
  • Changed text of “Browse…” button (to load new MIDI file) to the more-intuitive “Open…”, and standard Ctrl+O keyboard shortcut now triggers it.
  • Finally hidden the non-functional “Config presets” area at the bottom-left of the configuration window for now. It has never done anything (I’ve still not got around to programming it) and was therefore confusing/misleading.
  • Slightly changed normal/overridden instrument text colours to try to make the overridden text easier to read against the background without making it hard to tell normal and overridden apart.


  • New “language” system. It allows people to customise/translate all text on message boxes, menus, the config window, and a couple of other places. A language is a folder of text files stored inside “\lang”. To make a new language, please read “lang\instructions.txt” for full information (I tried to keep it easy).
  • Added Japanese language “日本語 (不完全)” (select it from the “Interface” tab). Not everything is translated yet, and I don’t know many technical words in Japanese, so it sounds strange/amusing in places. Help from a fluent speaker would be much-appreciated.
  • “First run.bat” didn’t work on some computers, but it does now (on some computers, the default working directory for batch files is the folder of cmd.exe instead of the batch file, but the batch file now forces to switch to its own folder). Massive thanks to Charles M for helping debug this.
  • If pitch-bend sensitivity is changed on a channel currently playing notes while pitch-bend is not centred, the pitch of the playing notes will now be changed, taking the new sensitivity into account (bug present since revision 90).
  • If main program window is minimized, GUI is no longer drawn at all, to reduce CPU usage.
  • A few more subtle CPU usage reductions (using multiplications instead of divisions).
  • Changed default master volume (when run for the first time) to 88% instead of 100% to reduce likelihood of clipping.
  • Due to the huge changes needed for the language and bank systems, and the new possibilities they enable, version number has become 0.5!

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>