Basic Waveform MIDI Software-Synthesizer "Bawami-tan" by Robbi-985 aka SomethingUnreal (revision 135) __________________________________________________________________________ BASIC INFO - - - - - - Bawami is a standalone, GM-compatible software MIDI player which also supports live MIDI input. Additionally, some MIDI messages designed for Roland GS and Yamaha XG synthesizers are supported. Bawami can generate the sound in several ways; currently: - With a sound card, using subtractive synthesis (24-voice by default). Reverb, chorus and filter effects are supported. - By writing to a WAV or OGG file instead of playing on a sound card. This is possible even on computers that do not have any sound devices. - On the internal PC speaker (32/64-bit Windows 2K/XP/Vista/7/8). I recommend that you read "Known Bugs/Issues" so that you know what you may encounter. Also, see "STILL TO DO" (at the end of this text file) to see what I plan on adding or changing. The configuration window is accessed via the green spanner button at the bottom of the main window. All of Bawami's settings can be found there. For info on what any specific setting does, just wave your mouse over it. Detailed information will be displayed at the bottom of the window. __________________________________________________________________________ WHAT'S IN THIS FILE FROM HERE ON - - - - - - - - - - - - - - - - - [Prerequisites] - System Requirements - First Run [Getting used to the controls] - The Main Window - Keyboard Controls - Manual Override [Some extra features] - Creating a WAV File - PC Speaker Control - Sound Canvas LCD Emulation - Internal View: Sound + MIDI Channels [Instruments overview] - Instrument File Info - Included Instruments [Miscellaneous advanced usage and info] - Supported MIDI Messages, SysEx, etc (MIDI implementation tables) - Bank Selects / How To Select Variation Instruments - Percussion Mapping - Languages - Command Line Parameters - About Tuning - About Pitch-Bending - Sound Channel Info [Bad things] - Known Bugs/Issues - Still To Do __________________________________________________________________________ SYSTEM REQUIREMENTS - - - - - - - - - - OS 32-bit or 64-bit Windows 2K/XP/Vista/7/8. Bawami has been tested on Windows XP (32-bit), Windows 7 (32 and 64-bit) and Windows 8 (64-bit). CPU Multi-core or hyperthreaded. As the speed of CPUs can't easily be told just by their clock speed (e.g. 2 GHz), it's of little use to specify, but running it on anything less than 1.6 GHz is likely to result in glitchy sound. Bawami takes advantage of multithreading and runs significantly worse on a single-core CPU which doesn't have hyperthreading. The program may also struggle with CPUs designed for low energy consumption, such as the Intel Atom (found in low-end notebooks). GPU Anything is better than nothing. Graphic hardware acceleration helps remove a big burden from the CPU while drawing the interface on the main window, and the "MIDI Messages" internal view. On old machines with little to no graphic hardware acceleration, it can help to decrease the display's colour depth to 16-bit. RAM 2K: 160 MB, XP: 256 MB, Vista/7/8: 512 MB. While playing MIDIs, Bawami generally uses less than 20 MB of RAM. However, memory usage can spike momentarily to about 30 MB while loading a MIDI file, depending on the file. Disk Ideal: 28 MB, fast-access*, write permission** Okay: 28 MB, slow-access*, read-only** Bawami's program files use little disk space. However: * Certain tasks, such as startup, changing sound system settings and loading a new MIDI file will be slower if running from a drive with a low write speed such as a memory stick, due to the program writing to its log file. ** Bawami can't write a log file (sometimes useful for fixing problems) if it is running from a read-only drive or folder. __________________________________________________________________________ FIRST RUN - - - - - - The download (archive) of Bawami contains several OCX and DLL files which are required for the program to work. Once the archive has been extracted, all these files will be in the same folder as the main program (Bawami.exe). However, before Bawami can use them, it requires that some of them are copied to a Windows system folder and that information about them is put in the Windows registry (referred to as "sorting" the files, below). For Windows 2K/XP: Bawami can sort most of its files by itself, but there are two vital files that must be sorted before Bawami can run and sort the rest. One of these is the Microsoft Visual Basic Runtime DLL, which is required for Bawami to even start running. To sort them, simply double-click "First Run.bat" (in the same folder as Bawami.exe). If you are not logged onto Windows using an administrator account, please right-click "First Run.bat" instead and choose "Run as administrator". After the batch file has run, Bawami will automatically start and sort the rest of its files (see "For Windows Vista/7/8" below for details). For Windows Vista/7/8: Vista, 7 and 8 come with the Microsoft Visual Basic Runtime DLL (the main file required for Bawami to start running) already installed. Therefore, Bawami can run and sort all its other files by itself. The only requirement is that it is run with admin privileges for the first time only (right-click Bawami.exe and choose "Run as administrator", or log on to Windows using an administrator account and then run Bawami.exe). "Preparing for first run" will briefly be shown (while this is shown, please do not attempt to exit). Afterwards, the main window will appear and you can use Bawami as normal. NOTE: If, for some reason, Bawami doesn't run, please follow the "For Windows 2K/XP" section above to ensure that two vital files are sorted. __________________________________________________________________________ THE MAIN WINDOW - - - - - - - - Bawami's main window consists of 16 groups of 3 yellow rectangles. The rectangles contain bars which move depending on various properties, to give a quick overview of the 16 MIDI channels. The name of the instrument (by default, "Grand Piano") is shown above the rectangles, except for percussion channels (channel 10 is the only percussion channel by default). You can override the instrument by clicking it to display a menu of all possible instruments (see "MANUAL OVERRIDE" below). The top rectangle displays 2 red horizontal bars to do with pitch. The red bars rest at the centre horizontally, so they're not visible unless the pitch is being changed. The top bar shows a "bend" applied by modulation (vibrato), which will wiggle left and right along with the vibrato, while the bottom bar shows the pitch-bend. If the pitch-bend wheel is not centred, the rough number of semitones which the channel is being bent by (e.g. 6.2) will be shown next to the red pitch bar. The second yellow rectangle down is half the height as it only shows one red horizontal bar, which represents the channel panning from the left to the right speaker. It also rests at the centre by default, so it isn't visible unless the panning is off-centre. The bottom yellow rectangle is the tallest and contains 4 vertical bars related to volume. The leftmost is a thick red bar that shows the total volume of notes playing on this channel. This can be clicked to toggle whether this channel is muted or not (holding the Shift key applies this to all channels). It can also be right-clicked to display a menu. To the right of the red bar are 3 thinner, blue bars. The first 2 (channel volume and channel expression) scale down the volume of all notes playing on the channel, unless they are at maximum. Expression is usually changed regularly to fade or create other effects, while channel volume is like a master volume control. On Bawami, expression changes the volume before a distortion effect, and volume changes it after the distortion. So, a distortion guitar's distortion can be reduced by turning down the expression, or its volume can be reduced without affecting distortion by reducing the volume control. Both volume and expression bars can be clicked to overridde them (see "MANUAL OVERRIDE" below). The 3rd blue bar is channel aftertouch. The current version of Bawami does not use this in any way, but in the future, it may control tremolo. At the bottom of the window is a selection of playback controls. To the left, there is a blue playback position bar which fills from left to right as the MIDI file plays. It can be clicked to jump to a certain position. The bar indicates the time that has passed. Therefore, it will move at a constant speed. However, it only updates when a new MIDI message is played, so it may appear to freeze during a long period of silence. If Bawami is busy (e.g. loading a new MIDI file), the current status will also be shown in this blue bar. The playback position is displayed as text, both in minutes/seconds/hundredths and as a percentage of how many messages have been played, to the right of the bar. After the text are basic rewind/play/stop controls, and a "Loop" checkbox to repeat playback when it reaches the end. At the far right is an "Open" button which can be used to load a new MIDI file (this can also be done by dragging-and-dropping a MIDI file from Explorer, etc, onto the main window). The last button is a green one which shows the configuration window, where all of Bawami's settings and other functions can be found. Once a MIDI file has been loaded, its filename is shown at the very top of the window. Also near the top, spanning the whole window, is a green horizontal bar that fills up with red and orange sections according to the number of sound channels playing. For full details on this, please see "SOUND CHANNEL INFO" (below). __________________________________________________________________________ KEYBOARD CONTROLS - - - - - - - - - While on the main window, the following keys can be used to control playback. Bawami supports both multimedia hotkeys and Winamp-like controls: Rewind (and don't stop playing) = Z or "Previous" hotkey Start playing from current position = X Pause (stop and don't rewind) / Unpause = C or "Play/pause" hotkey Stop (stop and rewind) = V or "Stop" hotkey Skip forward by about 10 seconds = Ctrl + Right-arrow Skip back by about 10 seconds = Ctrl + Left-arrow Browse to open a new MIDI file = Ctrl + O __________________________________________________________________________ MANUAL OVERRIDE - - - - - - - - It is possible to override some controls by clicking them on the main window. When a control is being overridden, it is displayed in green, and it is locked - neither the MIDI file nor live MIDI input can control it. To disable override and return it to its normal value as controlled by the MIDI file or live MIDI input, simply right-click it (its colour will return to normal). Additionally, controls can simply be locked without changing their current values from a menu that is displayed by right- clicking the red note volume bar area (to the left of the 3 vertical blue bars). In the current version of Bawami, the following controls can be overridden: - Volume Click within the leftmost blue bar (volume bar) of a MIDI channel to change the volume to this value. - Expression Click within the middle blue bar (expression bar) of a MIDI channel to change the expression to this value. Use an instrument such as Distortion Guitar to hear the difference between the effects of volume and expression (low expression reduces the distortion effect; low volume only quietens the sound). - Instrument Click the instrument text that is displayed above a MIDI channel (e.g. "Grand Piano") to see a menu that lists all available instruments. - Percussion mode Click the instrument text and then "Percussion mode" to make the channel play different percussive sounds depending on the notes played, instead of a single instrument tone. Channel 10 acts this way by default. Although, channel 10 can also have its percussion mode disabled by doing the same procedure to its instrument text. It is also possible to override some additional controls that can't be displayed on the main window because of a lack of space. To show these extra controls, right-click in an empty area of the main window, or on the note volume bars, and click "Override other controls...". On the big new window which appears, controls are shown in a grid, with each MIDI channel on its own row and a different parameter in each column. Drag a slider to change this parameter of this MIDI channel. Dragging the slider automatically locks it. You can also hold Alt while clicking the slider to lock the parameter without changing it. Press the left/right keys to fine-tune the value. You can override the following parameters: - Reverb mix Drag a slider in the "Reverb" column to change the MIDI channel's reverb mix level (MIDI files set this using CC #91) from 0 to 127. Higher values result in more spacious sound (as if the instrument is in a big hall). - Chorus mix Drag a slider in the "Chorus" column to change the MIDI channel's chorus mix level (MIDI files set this using CC #93) from 0 to 127. Higher values result in a richer sound (as if there are several of the instrument, all tuned slightly differently). Whenever you enable/disable overriding or change a control, you can hold the Shift key while clicking to apply this to all MIDI channels instead of only the one whose control you're clicking. For example, shift-click the volume bar of MIDI channel 4 and you'll override the volume of all MIDI channels. Then, you could shift-right-click MIDI channel 5's volume bar and you'd stop overriding the volume of all MIDI channels. This works for all controls that you can possibly override. By default, overrides are disabled when a new MIDI file is loaded, to allow the MIDI file to set up the controls correctly. If you like, you can keep the controls permanently locked (even when loading a new MIDI file) by unticking the appropriate checkbox on the right-hand side of the "Interface" tab of the configuration window. __________________________________________________________________________ CREATING A WAV OR OGG FILE - - - - - - - - - - - - - - Bawami normally plays MIDI files on a sound card/device, for you to listen to in realtime (at actual speed) as it plays. However, instead, it can create a WAV file (or an OGG file) out of the MIDI file. This WAV file will sound exactly the same as if Bawami played on the soundcard in realtime (actually, with slow CPUs, playing on the soundcard can sound worse than a created WAV file). However, because you're not listening to the sound while a WAV file is being created, Bawami isn't limited to creating it at actual speed. Instead, the speed is limited only by your CPU's speed. For example, this means that it might take only 30 seconds to turn a 1-minute-long MIDI file into a WAV file. Bawami can even create a WAV or OGG file on a computer that has no sound card or device at all. To create a WAV or OGG file out of the currently-loaded MIDI file, simply right-click in an empty area on the main window and choose "Convert this MIDI file to WAV...", or "Convert this MIDI file to OGG...". Then, you will be asked to choose where to save the WAV or OGG file and give the file a name. In this version of Bawami, the maximum number of playing notes possible while creating such a file is locked at 128 (even if you have set a lower or higher number on the configuration window). While creating the WAV file, the only available control is the Stop button at the bottom of the main window. Clicking this will stop creation of the WAV or OGG file, and leave the the file incomplete (but still usable). Although Bawami's sound can be affected (e.g. freeze) while it plays on a sound card (e.g. by maxing out your CPU somehow), this is not the case when writing an audio file. The sound data written to the WAV or OGG file won't be messed up even if you somehow manage to freeze Bawami for hours or put your computer to sleep. Manual overrides can be used while creating a WAV or OGG file, but can't be changed. Therefore, they must be prepared before starting to create the WAV or OGG (you can play the MIDI file in the normal way to preview how they will sound). It is possible to run Bawami from the command line, have it generate a WAV file, and then exit automatically, using the /writewavonly parameter. It's also possible to directly create an OGG file using /writeoggonly. It's recommended to use /console mode when doing this. See "COMMAND LINE PARAMETERS" section for usage information. __________________________________________________________________________ PC SPEAKER CONTROL - - - - - - - - - - COMPATIBILITY NOTE: This feature is designed to work with 32-bit or 64-bit versions of Windows 2000, XP, Vista, 7 or 8. I haven't tested it with any other Windows OSes, so I can't say for certain whether it will work on anything other than the OSes mentioned above. NOTE FOR PEOPLE FAMILIAR WITH "BLEEPER MUSIC MAKER": This is similar to using the "Play a MIDI file" mod on BMM, with the following improvements: Pitch-bending / modulation / portamento support, Windows Vista / 7 / 8 and 64-bit support, tone doesn't sound rough when playing only one note, experimental support for basic percussion, program doesn't freeze while a tone is playing, instruments' volume envelopes are taken into consideration, more accurate timing of note starts and switches, options for more control over how notes are switched between. The PC speaker is a small speaker which is sometimes found inside the case of a computer. On modern-day computers, it is usually a cheap piezo transducer which sits on the motherboard, although it is disappearing entirely from modern motherboards. It can normally only play a single, square-wave tone at a time. It's most famous for making the "beep" sound when you first turn on your computer (if you don't hear one, then your computer most likely doesn't have a PC speaker). The following settings for controlling exactly how the PC speaker plays can be found on the "PC speaker" tab of the configuration window. - Minimum note frequency (Lowest note allowed) Since the PC speaker makes square-wave tones, very low frequencies sound messy. To avoid this, we can tell Bawami to never play any notes below a certain frequency. We set this frequency by choosing a note (e.g. "C#4"). Then, if any note lower than this tries to play, Bawami will shift it up by an octave (or several, if necessary) to make its frequency higher. Pitch-bending is also taken into account (if a bend would take the frequency down too far, the note will play an octave higher). - Cutoff volume The PC speaker is only either on or off (its volume doesn't change). To avoid it continuing to loudly play (for example) a piano note that has faded away and is barely audible anymore, we tell Bawami to only play a note on the PC speaker if its volume is above a certain percentage. The "volume" it looks at is actually the volume envelope (the red bars on the main window) which is unique to each instrument, rather than the total volume of the sound channel (after MIDI channel volume and MIDI channel expression may have further quietened it). Otherwise, notes on a quiet channel would never play on the PC speaker. Arpeggio: The PC speaker is only designed to play a single tone at a time. So, for it to sound like several notes play at the same time, Bawami plays one tone at a time but switches between the notes quickly. This section controls the speed at which we switch between each of the playing notes. We cycle through each of the sound channels and, for each one, we play the same tone that it's playing (as long as another channel isn't playing the same note). - Cycle duration (A full cycle of notes should ideally last: __ mS) If many channels are playing, we want to switch quickly; slowly cycling through a lot of notes sounds silly. However, we can get away with switching more slowly if only 2 notes are playing (in that case, switching quickly sounds needlessly "rough"). To get the best of both worlds, we tell Bawami how long we want it to take to fully cycle through all notes, and it divides the time up evenly between each note. - Minimum note duration (Each note must be played for at least: __ mS) Switching too quickly can sound messy. This setting puts a limit on how quickly Bawami can switch between notes - once the number of playing notes goes high enough, notes will stop getting shorter and, instead, the cycles will get longer. That is, this setting overrides "cycle duration" when there are many playing notes. - Minimum waveform cycles (The waveform of a (low) note must complete: __ cycles) This setting also limits how quickly Bawami can switch notes. Low-pitched notes present a new problem; since the tones made by the PC speaker are square-wave and actually just a series of clicks, the human ear needs to hear a low note for longer (needs to hear so many clicks) before it can recognise the frequency. As a result, low notes will sound like a mess when Bawami switches quickly. Here, we tell Bawami that at least so many clicks must play before moving to the next note. Rather than making the length of all notes longer, this only affects low notes that would otherwise sound messy. This value is the number of up/down cycles that the PC speaker must play (2 clicks per cycle). __________________________________________________________________________ SOUND CANVAS LCD EMULATION - - - - - - - - - - - - - - The Roland Sound Canvas features an LCD screen with a text area at the top and 16 vertical bars underneath, each made up of 16 segments. Some MIDIs contain SysEx messages to display custom text and graphics on the Sound Canvas's LCD. Bawami is able to display this custom text, and also store and display 10 pages of custom graphics (as drawn using the Sound Canvas's FrameDraw function). Usually, MIDIs will command the synth to store several pages of graphics at the start, before the music begins (to avoid slowing down the music with long SysEx messages). Then, while the music is playing, much shorter messages can tell the synth to display text or an already-stored graphic page. Bawami supports SysEx messages to display text on the LCD, store a graphic page, display a graphic page, and set the duration of displayed pages (the pause before they disappear). A rectangle will appear in the top-right of the main window to show the message or graphic page. If the text is longer than 16 characters, it will scroll, just like on the real Sound Canvas. As the SysEx messages to store graphic pages are quite difficult to create by hand, it is beter to use an actual Sound Canvas synth to create and transmit the message while recording it on a computer. In the future, I may release a separate program that can turn 16x16-pixel drawings into SysEx messages to store a graphic page, which can simply be copy-and- pasted into a MIDI file editor. Nonetheless, I have included technical details of these messages in the "Supported System-Exclusive Messages" section for those who are curious. __________________________________________________________________________ INTERNAL VIEW: SOUND + MIDI CHANNELS - - - - - - - - - - - - - - - - - - - To display this view, choose it from the "Internal info to show" drop-down menu, on the "Interface" tab of the configuration window. This view consists of 2 tables of text. One shows info about each MIDI channel and the other shows info about each sound channel. Coloured lines appear between rows in the two colums to show which sound channel is playing a note for which MIDI channel. All the information visible on the main window in graphical form (apart from channel aftertouch, which currently does nothing anyway) is also shown on the internal view, but there is additional information shown on the internal view (such as pitch-bend sensitivity). Sound Channels (left-hand column): - Chan # Each sound channel's number. The first one is 0, and the last one that's displayed on this view is 23. - Note Env This is either "Att", "Sus, "Dec", "Rel" or "Off", indicating the note envelope's current stage in the Attack/Decay/Sustain/Release envelope. "Att" means that a note is currently being held on and is increasing in volume. If a note is held but its volume is decreasing, "Dec" is shown. "Sus" is displayed once the volume stops falling, and "Rel" means that the note has been released, and the volume is currently fading away. Playing percussion instruments are always treated as releasing. "Off" means that this channel is unused and is available for use. - Vol (%) The finally-calculated volume of this sound channel, as a percentage. This is with everything taken into account, i.e. the envelope, MIDI channel volume, MIDI channel expression and instrument volume boost. - Pan (%) Shows how the volume is split between the left and right speakers. "C" (for "centre") means that it's evenly split, with both speakers playing the note at the same volume. A number followed by either "L" or "R" indicates that the sound is this % close to the left or right speaker, measured from the centre. For example, 100 R means that the sound is only playing on the right speaker. 75 L means that the sound is equivalent to 75% left + 25% centre. - Oscillator: Wave The waveform that this note begun as (before any filter was applied). This affects the timbre of the sound. "Sine" is a pure tone at one frequency. "Square" sounds typically electronic, with only odd-numbered harmonics (the waveform is only ever fully up or fully down). "Noise" sounds like a hiss (the waveform jumps to random positions). "Saw" sounds like a muffled square wave (the waveform moves up and down, changing direction abruptly at the top and bottom). "Tri Up" (upwards-climbing ramp) or "Tri Dn" (downwards-falling ramp) make harsh sounds with lots of harmonics; they sound the same, but if 2 "Up"s play on top of each other, the effect will be a boost in volume, whereas if an "Up" and a "Down" play together, they will cancel each other out. - Oscillator: Freq The waveform of this note is starting off at this frequency. The pitch can then be varied by changing the sample rate. - Sample Rate A value of 44100 means that the waveform is being played at precisely 100%. Slightly random values are chosen in order to avoid notes playing at precisely the same frequency cancelling each other out. The sample rate is also changed to change the pitch with pitch-bending, and is set very low in order to make "retro-style" snare drums (a bitcrusher effect). - LPF Freq This shows the current cutoff frequency of the low-pass filter being applied to this sound channel, if one is being used. If a low-pass filter is not being used, "-" is displayed. - MIDI Note This shows the name of the note (e.g. "C#4") that was pressed to start this sound. In other words, it's the note that this channel is playing, before pitch-bending has been added. MIDI Channels (right-hand column): These numbers range from 0 to 127 (the MIDI file format's usual range), unless otherwise specified. The columns are grouped into grey and white sections by type, to make it easier to find the right column header. - Chan # Each MIDI channel's number, from 1 to 16. The text is the same colour as the line that will be drawn from that row of text. In other words, each MIDI channel has its own colour that represents it. This means it's easy to see at a glance if many sound channels are being used by a single MIDI channel because there will be many same-coloured lines between the two columns. - Poly The number of notes currently playing on this MIDI channel. There is no number for MIDI channel 10 (percussion), as percussion is handled very differently to melodic notes internally. - Prog Num The "program change" number of the instrument that this MIDI channel is set to. For example, 0 for Grand Piano, 35 for Fretless Bass, etc. In the current version of Bawami, bank numbers are not displayed on this window. - Sust Ped Displays "On" if the "sustain pedal" control is currently on for this MIDI channel (65 to 127), or "Off" otherwise (0 to 64). - Vol The volume of this MIDI channel. This affects the volume of any note that plays on this MIDI channel. 0 means notes will be inaudible. Set by MIDI message "control change #7". - Exp The current value of the "expression" control for this MIDI channel. Bawami interprets this as a second volume control, applied on top of the channel volume. In other words, if both the volume and expression are at half, the final volume will be a quarter. 0 means notes will be inaudible. Set by MIDI message "control change #11". - Pan Panning, i.e. how far to the left or right speakers notes on this MIDI channel are played. 0 means fully to the left, 64 means centre, and 127 means fully to the right. Set by MIDI message "control change #10". - Mod How much modulation is applied to notes played on this channel. Bawami applies this to the pitch and/or volume of the notes, making a "vibrato" or "tremolo" effect depending on the instrument. This is basically a half-sine waveform (by default) applied to the pitch which centres around the note's real frequency. 0 means that no vibrato will be applied (note pitch does not change), while 127 makes a strong vibrato (by default, a depth of +/- 1 semitone). By default, the speed of the vibrato is 6 Hz. - Pitch Bend The position of the pitch-bend wheel. This ranges from -8192 to 8191, centring around 0, which means that the pitch is not being changed. -8192 is the strongest downward bend possible, and 8191 is the strongest upward bend. By default, the range is +/- 2 semitones. In that case, 8191 would mean that each note is playing at 2 semitones higher than the key that has been pressed ("MIDI Note" in the "Sound Channels" column). - PB Sens Pitch-bend sensitivity, i.e. the number of semitones that the pitch will be bent by when the pitch-bend control is at the maximum upward position. For example, if this is 12.0, and the pitch-bend control is -8192 (fully down), the pitch will be bent down by one octave. - Ptm (ms) Duration of portamento (slide in pitch between each note) for this MIDI channel, in milliseconds. If the text is white, portamento is not currently being used. If red, automatic portamento is in use (next note's pitch will start playing at the previous note's and move towards the target pitch). If blue, only the next note will play with a portamento (from a specific note set by MIDI message "control change #85"). The text will rarely be blue because CC #85 is typically used immediately before a note starts playing; after the note starts, portamento on/off will return to its previous state. - Rvb How much reverb (spacial-sounding echo) is being mixed into sounds that play on this MIDI channel. If this is 1, an inaudibly small amount of reverb is being added. If this is 127, the reverb will be very obvious. - Chr How much chorus is being applied to sounds that play on this MIDI channel. Chorus can make an instrument sound "warmer", or more complex. It works by layering several copies of the same sound on top of each other and playing them back at slightly varying speeds. Exactly how audible the chorus is unintentionally depends on the timbre of the instrument that is used. - Filter: Cut Some MIDIs can request that a low-pass filter is applied to a MIDI channel. This can be used for various purposes, including muffling the sound and adding "brightness" (a boost to high frequencies). This filter is separate from the filters that are used by some instruments to determine their timbre. If this is 0, the cutoff frequency is 300 Hz (very muffled). If this is 63, the frequency is about 16000 Hz (hard to notice that a filter is being applied). 64 or higher disables the MIDI channel filter. - Filter: Res How much the MIDI channel filter resonates. If this is 0 to 64, the filter will merely quieten all frequencies above the cutoff frequency "gently" (equivalent to "LPResonance 0.5" in an instrument file). As this gets above 64, the resonance increases. If this is 127, the cutoff frequency will be boosted in volume fairly strongly while frequencies above the cutoff frequency are cut (equivalent to "LPResonance 2.5" in an instrument file). NOTE: In the current version of Bawami, the value from 0-64 is displayed as 0-127. This will be fixed in a later version. The following numbers are displayed as -64 to +63 instead of 0 to 127: - Envelope: Att How much shorter or longer than normal the "attack" portion of the volume envelope is. A shorter attack (negative numbers) makes the sound fade in quicker (if not already instant). -64 is instant. A longer attack (positive numbers) makes the sound fade in more slowly. Centre (--) means the attack time is normal for the instrument. - Envelope: Dec How much shorter or longer than normal the "decay" portion of the volume envelope is. Decay is the time during which the volume is falling to a steady level. For some instruments, this steady level may be silence. In this case, to avoid silence and to work similarly to how the Roland SC-88Pro wavetable synth handles DECAY TIME messages, there is a limit to how short the decay can be; additionally, it won't be possible to increase the decay time if it is very short by default (e.g. a Tambourine or Wood Block). Negative numbers make the sound reach a steady level quicker (-64 is instant). Positive numbers make the decay longer. Centre (--) means the decay time is normal for the instrument. - Envelope: Rel How much shorter or longer than normal the "release" portion of the volume envelope is. A shorter release (negative numbers) makes the sound fade away quicker when the note is released (-64 is instant). Positive numbers will cause the sound to continue for longer after the note is released. Centre (--) means the release time is normal for the instrument. - Vibrato: Dep The depth (intensity) of the automatic vibrato compared to what is normal for this instrument (many instruments have no automatic vibrato). This is different to modulation, which is a vibrato that can be applied manually when needed. Values below 0 reduce any automatic vibrato towards none (-64 means 0%). Centre (--) uses the normal vibrato for this instrument. Values above 0 add more to the normal vibrato up to +63, which is 3x the default modulation range (2 semitones). - Vibrato: Spd The speed of all vibrato and tremolo that will be applied to this MIDI channel. This affects automatic vibrato, as well as modulation. Centre (--) means the default (6 Hz). Negative numbers decrease the speed down to a quarter at -64, while positive numbers increase the speed up to 3x at +63. - Vibrato: Del The delay between when a note starts and when vibrato starts to automatically be added to the note, compared to what is normal for this instrument. Many instruments have no automatic vibrato, so this won't make a difference unless vibrato depth is also increased. Centre (--) means the delay is normal for the instrument. Negative numbers reduce the delay down to immediate at -64, while positive numbers add delay to the instrument's normal delay (at +63, 2.5 seconds are added). __________________________________________________________________________ INSTRUMENT FILE INFO - - - - - - - - - - - Each of the 128 General MIDI instruments is described in its own plain text file located in the "inst" folder, inside Bawami's folder. The filename must be 3 characters long, and specifies which MIDI instrument this text file is describing (e.g. 009.txt describes Glockenspiel, the 10th MIDI instrument). For any MIDI instrument for which a text file does not exist, Bawami reads "default.txt" (in the "inst" folder). Additionally, there can be text files with names containing 3 numbers (e.g. 028_001_002.txt). These are variation instruments which MIDI files can use by doing a Bank Select before setting the instrument (Program Change). The first number is the GM instrument number (same as 028.txt), the second number is the Bank MSB (high), and the third number is the Bank LSB (low). (To use 028.txt, use Bank Select messages to set bank H000.L000, the default.) See "BANK SELECTS" section for more information. On each line of the text file is a variable name (not case-sensitive), followed by 1 space, followed by a value. Currently, the text files contain variables to describe the base waveform (e.g. square), an ADSR (attack/decay/sustain/release) envelope for the volume, settings for a low-pass filter and distortion, specifics of how modulation affects frequency/volume (vibrato/tremolo), and whether modulation is automatically added. The volume envelope specifies how the volume of the note changes over time (e.g. it could fade in slowly, then drop in volume a little, and stop instantly when the note is released). The waveform affects the timbre of the sound. The low-pass filter can (muffle) the sound and add resonance effects. Automatic modulation (e.g. vibrato) can make instruments sound more realistic and less painful when holding long notes. These text files can easily be edited with Notepad. Please look at "default.txt" first, as there are explanations for each and every variable, including which values are allowed and what the values mean. For each instrument file, a text file with the same filename needs to exist in "lang\English\instname". This file holds the name of the instrument as it appears on Bawami. It will automatically be copied to any other language when the other language is selected, so you need only make a file in the English language folder. __________________________________________________________________________ INCLUDED INSTRUMENTS - - - - - - - - - - - As Bawami is still a work-in-progress, I have not explicitly created an instrument TXT file for every single MIDI instrument yet. For those without a file, the default file will be used. Furthermore, some instrument files were made before Bawami could use filters and haven't been updated since, so they don't sound as realistic as is theoretically possible with Bawami's current sound system. Here is a list of every MIDI instrument and what capabilities of Bawami the file takes advantage of. Key: E = Volume envelope (volume changes over time). F = Low-pass filter is used. L = Filter frequency is linked to volume envelope. K = Key-tracking (filter frequency depends on note frequency). V = Velocity-sensitive filter (notes played harder sound harsher). D = Distortion is used. A = Auto-modulation is used (notes automatically have vibrato). T = Modulation causes tremolo instead of, or as well as, vibrato. B = Bitcrush effect (downsampling) on lower-pitched notes. M = Multiple oscillators are used per note. If "--------" is shown, a file for that instrument is not included. Note that you can make your own file for any instrument (see "INSTRUMENT FILE INFO" section). ### - Name Capabilities Extra (see above) info EFLKVDATBM ------------------------------------------------------------------- 000 - Grand Piano EFLKV 001 - Bright Acoustic EFLK 002 - Electric Grand EFLKV 003 - Honkey-Tonk EFLKV M (Same as 000) 004 - Electric Piano 1 EF K 005 - Electric Piano 2 EF K - Detuned Electric Piano 2 EF K M BANK: H008.L001 006 - Harpsichord EFLK 007 - Clavichord EF K 008 - Celesta E 009 - Glockenspiel EF K 010 - Music Box EF K 011 - Vibraphone EFLKV 012 - Marimba E 013 - Xylophone E 014 - Tubular Bells EF K 015 - Dulcimer EFLK M Main harmonics for organs (excluding 1.0 = root): 016 - Drawbar Organ EF K M 0.5, 2, 4 017 - Percussive Organ EF K M 0.5, 1.5, 3 018 - Rock Organ EF K AT M 0.5, 2 019 - Church Organ EF K M 0.5, 2, 2.5, 4, 5, 16, 20 - Church Organ 2 EF K M BANK: H008.L001 0.25,1.25,4, 5, 6, 24, 30 020 - Reed Organ EF K 8 021 - Accordian EF K 022 - Harmonica EF K T 5 023 - Tango Accordian EF K T 024 - Acoustic Guitar (Nylon) EFLKV 025 - Acoustic Guitar (Steel) EFLKV - 12-string Guitar EFLKV M 026 - Electric Guitar (Jazz) EFLK 027 - Electric Guitar (Clean) EFLK 028 - Electric Guitar (Muted) EF - Muted Distortion Guitar EF K D BANK: H001.L002 - Funk Pop Guitar EF KV BANK: H008.L001 029 - Overdriven Guitar EFLK D 030 - Distortion Guitar EFLK D - Power Guitar EFLK D M BANK: H016.L002 - Power Guitar EFLK D M BANK: H017.L002 - Rock Rhythm Guitar EF K D M BANK: H024.L002 - Rock Rhythm Guitar 2 EF K D BANK: H024.L002 031 - Guitar Harmonics EF K D - Guitar Feedback 1 EFLK D BANK: H008.L001 - Guitar Feedback 2 EFLK D BANK: H009.L002 032 - Acoustic Bass EF 033 - Electric Bass (Finger) EF 034 - Electric Bass (Pick) EF 035 - Fretless Bass EF 036 - Slap Bass 1 EFLKV 037 - Slap Bass 2 EFLKV (Same as 039) 038 - Synth Bass 1 EFLKV - JP-8 Bass EFLKVD BANK: H004.L003 - Acid Bass EFLKVD BANK: H008.L002 - 303 Square Bass EFLKVD BANK H017.L003 - Hardstyle Reverse Bass 1 EFLK D BANK: H098.L098 - Hardstyle Reverse Bass 2 EFL D BANK: H099.L098 039 - Synth Bass 2 EFLKV - Modular Bass EFLKV BANK: H002.L002 - Sequence Bass EFLKV BANK: H002.L002 - Mg Octave Bass 1 EFLKV M BANK: H005.L003 - MG Octave Bass 2 EFLKVD M BANK: H006.L003 - Beef FM Bass EFLKV BANK: H008.L001 - Wire String Bass EFLKVD BANK: H011.L003 - SH101 Bass 2 EFLK D BANK: H018.L002 - Smooth Bass 2 EF K BANK: H019.L002 - House Bass EFLKV BANK: H022.L002 040 - Violin EFLK A 041 - Viola EFLK A 042 - Cello EFLK A (Same as 040) 043 - Contrabassoon EFLK A (Same as 040) 044 - Tremelo Strings EFLK AT 045 - Pizzicato Strings EFLKV 046 - Orchestral Strings EFLKV 047 - Timpani EFLK 048 - String Ensemble 1 EF K M 049 - String Ensemble 2 EF K M 050 - Synth Strings 1 EF K - Stack Strings EFLKV AT M BANK: H002.L003 051 - Synth Strings 2 EF K 052 - Choir Aahs EF K M 053 - Voice Oohs EFLK 054 - Synth Voice EFLK A 055 - Orchestra Hit EFL 056 - Trumpet EF K D - Bright Trumpet EF K D BANK: H024.L002 057 - Trombone EF D 058 - Tuba EF K D 059 - Muted Trumpet EF K D 060 - French Horn EF 061 - Brass Section EF K D (Same as 056) 062 - Synth Brass 1 EF 063 - Synth Brass 2 EFL 064 - Soprano Saxophone EF K AT 065 - Alto Saxophone EF K AT - Door Creaking EFLK D BANK: H064.L000 (Same as 124_002_001) 066 - Tenor Saxophone EF K AT - Door Slam EFLK D BANK: H064.L000 (Same as 124_003_001) 067 - Baritone Saxophone EF K AT 068 - Oboe EF AT 069 - English Horn EF K 070 - Bassoon EF K T 071 - Clarinet EF K T 072 - Piccolo EF K T 073 - Flute EF K AT 074 - Recorder EF K T 075 - Pan Flute EF K AT 076 - Blown Bottle E T 077 - Shakuhachi EF K AT 078 - Whistle E 079 - Ocarina E T 080 - Lead 1 (Square) - Sine Lead [GS] E BANK: H008.L001 - 2600 Sine E BANK: H009.L003 (Same as 080_008_001) - Sine Lead [XG] E BANK: H000.L066 (Same as 080_008_001) - JP8 Pulse Lead 1 EF K D BANK: H025.L003 - JP8 Pulse Lead 2 EF K D BANK: H026.L003 081 - Lead 2 (Sawtooth) - OB2 Saw EF BANK: H001.L001 - Pulse Saw EF K D BANK: H002.L002 - Feline GR EF K D BANK: H003.L002 - Velocity Lead EFLKVD BANK: H005.L002 - D-50 Fat Saw EFLK D BANK: H011.L003 - Sequence Saw 2 EFL BANK: H041.L003 082 - Lead 3 (Calliope) EFL (Same as 083) 083 - Lead 4 (Chiff) EFL 084 - Lead 5 (Charang) EF KVD - P5 Sync Lead EFLKVD BANK: H016.L003 - Fat Sync Lead EFLK D BANK: H017.L003 085 - Lead 6 (Voice) EFLK D 086 - Lead 7 (Fifths) EF M 087 - Lead 8 (Bass + Lead) EFL - JUNO Rave EFLK M BANK: H003.L003 088 - Pad 1 (New Age) EF K 089 - Pad 2 (Warm) E - Thick Matrix EFLK BANK: H001.L002 090 - Pad 3 (Polysynth) EFLK M - Power Stack EFLK M BANK: H008.L003 091 - Pad 4 (Choir) EF K A 092 - Pad 5 (Bowed Glass) E 093 - Pad 6 (Metallic) EF K 094 - Pad 7 (Halo) EFLK A 095 - Pad 8 (Sweep) EFL V 096 - Effect 1 (Rain) -------- 097 - Effect 2 (Soundtrack) EFL V (Same as 095) 098 - Effect 3 (Crystal) EFLK Round Glock EFLK BANK: H003.L003 099 - Effect 4 (Atmosphere) E 100 - Effect 5 (Brightness) EF K 101 - Effect 6 (Goblins) EFLKV A M 102 - Effect 7 (Echoes) EFLK 103 - Effect 8 (Sci-fi) EFLK 104 - Sitar EFLKV 105 - Banjo EF K 106 - Shamisen EF K - Synth Shamisen EF K D BANK: H008.L003 107 - Koto EF K 108 - Kalimba E 109 - Bagpipe EF K 110 - Fiddle EFLK 111 - Shanai EF K (Same as 109) 112 - Tinkle Bell EF K 113 - Agogo EF K - Tambourine EF K BANK: H016.L003 114 - Steel Drums EF K 115 - Woodblock E - Castanets EF K BANK: H008.L001 116 - Taiko Drum EFLKV 117 - Melodic Tom EFL 118 - Synth Drum EFLK D 119 - Reversed cymbal E TB 120 - Guitar Fret Noise EFLK D - Guitar Cut Noise E B BANK: H001.L001 - Pick Scrape EFLK D BANK: H006.L002 121 - Breath Noise EFLK 122 - Seashore E T - Thunder EFLK D B BANK: H002.L001 - Wind EFLK T BANK: H003.L001 - Pink Noise EF K T BANK: H016.L003 - White Noise TB BANK: H017.L003 123 - Bird Tweet EFLK 124 - Telephone Ring -------- - Door Creaking EFLK D BANK: H002.L001 - Door EFLK D BANK: H003.L001 - Scratch EFLK BANK: H004.L001 - MC-500 Beep E BANK: H011.L003 125 - Helicopter E ATB - Car Engine EFLK D BANK: H001.L001 - Siren EF K A BANK: H005.L001 126 - Applause E TB - Footsteps EFLK B BANK: H005.L001 127 - Gunshot EFLK B - Eruption EFLK D B BANK: H004.L003 - Big Shot EFLK D B BANK: H005.L003 __________________________________________________________________________ SUPPORTED MESSAGES - - - - - - - - - - Byte range Event Extra Info -------------------------------------------------------------------------- 80h to 8Fh Note on If the velocity is 0, this event is interpreted to mean "NOTE OFF". Otherwise, velocity affects note volume (this can affect other things, such as note muffledness, depending on the instrument). 90h to 9Fh Note off The velocity is ignored. A0h to AFh Note aftertouch Currently has no effect. Reset to 0 by a "NOTE ON" message for the same note on the same channel. B0h to BFh Control change See one of the tables below for the supported control changes. C0h to CFh Program change Changes to instrument described by the corresponding TXT file in \inst\, or default.txt if a specific TXT file does not exist. Also see "BANK SELECTS" section. D0h to DFh Channel Currently has no effect. displayed aftertouch inverted (127 to 0) on the interface. E0h to EFh Pitch-bend The default range is +/- 2 semitones. See "ABOUT PITCH- BENDING" for more information. F0h System- For full details of exactly which exclusive messages are supported, please see message the appropriate table a little way below. SUPPORTED PERCUSSION: - - - - - - - - - - - Note # (Dec) Instrument Extra info -------------------------------------------------------------------------- 038*! Snare (lower) Filtered at 250 Hz with resonance. 040*! Snare (upper) Filtered at 300 Hz with resonance. 049* Crash cymbal 1 Not filtered. 057* Crash crash 2 Not filtered. 055 Splash Cymbal Filtered from 1350 to 10500 Hz. 042* Closed hihat Filtered at 8000 Hz. 044* Half-open hihat Filtered at 8000 Hz. 046* Open hihat Filtered at 8000 Hz. 051 Ride cymbal 1 Filtered at 3300 Hz with resonance. 059 Ride cymbal 2 Filtered at 3500 Hz with resonance. 053 Ride bell 1 Filtered at 1800 Hz with resonance. 039 Clap Filtered at 1000 Hz with resonance. 035 ! Kick 2 Downwards log sweep from 360 Hz. 036 ! Kick 1 Downwards log sweep from 280 Hz. 080* Closed triangle Downsampled 2900 Hz sine waveform. 081* Open triangle Downsampled 2900 Hz sine waveform. 082 Shaker Filtered at 9500 Hz with resonance, reversed envelope. 069 Cabasa Filtered at 9500 Hz, reversed volume envelope. 070 Maracas Filtered at 9500 Hz with resonance. 050 Tom: High Downwards log sweep from 600 Hz. 048 Tom: Mid-high Downwards log sweep from 500 Hz. 047 Tom: Mid-low Downwards log sweep from 410 Hz. 045 Tom: Low Downwards log sweep from 330 Hz. 043 Tom: High floor Downwards log sweep from 285 Hz. 041 Tom: Low floor Downwards log sweep from 250 Hz. * For note numbers marked with an asterisk, there can only be one of these types of percussive sounds playing at once. This means you can effectively silence any of these playing sounds by using a note of the same number with the velocity set to 0. A hihat of any type will silence a hihat of any type, and a triangle of either type will silence a playing triangle of any type. ! For note numbers marked with an exclamation mark, there is an option of having these percussive sounds play in a "Retro" mode, for a characteristic 8-bit-style sound. For kicks, a square waveform is used instead of a sawtooth. For snares, the white noise which is at the heart of the sound is heavily downsampled ("bitcrushed"). Bawami responds to some other percussive notes by playing them either as one of the above-listed percussive instruments, or by playing them as a certain note on a certain tone instrument. This behaviour is controlled by the files in the TXT files in the "percmap" folder. See "PERCUSSION MAPPING" section below for information. SUPPORTED CONTROL CHANGES - - - - - - - - - - - - - Controller number (Hex) (Dec) Name Extra info -------------------------------------------------------------------------- 00h #0 BANK SELECT MSB Used together with CC #32. Depending on the values used, they can put a channel into percussive mode or choose "variation" instruments (ones that aren't part of the General MIDI's basic set of 128 instruments). See the "BANK SELECTS" section for details. 01h #1 MODULATION Maximum (127) gives a full bending range of 2 semitones (by default). The speed is 6 Hz by default. 02h #2 ZUN'S GLOBAL Disabled by default due to non- LOOP START standard usage of this controller POINT which could cause some MIDIs to play incorrectly. ZUN's Touhou Project MIDI files use this CC with a value of 0 to indicate the start of the loop. See CC #111 for information. Ignored when in XG mode. 04h #4 ZUN'S GLOBAL Disabled by default due to non- LOOP END standard usage of this controller POINT which could cause some MIDIs to play incorrectly. ZUN's Touhou Project MIDI files use this CC with a value of 0 to indicate the end of the loop. See CC #119 for information. Ignored when in XG mode. 05h #5 PORTAMENTO Sets length of slide from one note TIME to another. 1 is about 16 mS, 127 is 500 mS. 0 uses no slide. Exponential curve from 1-127 values give bias to shorter slides. Portamento won't be used until turned on with CC #65. 06h #6 DATA ENTRY MSB See "SUPPORTED PARAMETER NUMBERS" table below for the supported parameters to which the data can apply. 07h #7 VOLUME Affects volume of all notes (including already-playing ones) on a certain channel. 10h #16 PAN At 0 (fully left), the left speaker is at twice the usual volume, and the right speaker is silent. Setting the pan to 0 via SysEx uses random panning position for each note on this MIDI channel (see "SYSTEM-EXCLUSIVE" section below). 11h #17 EXPRESSION Affects volume of all notes on CONTROLLER a certain channel. 20h #32 BANK SELECT LSB See CC #0 for information. 26h #38 DATA ENTRY LSB See CC #6 for information. 40h #64 SUSTAIN PEDAL Also known as "damper pedal". 0-64 = sustain off, 64-127 = sustain on. When sustain is on, note-off messages are delayed until sustain is turned off. 41h #65 PORTAMENTO Enables/disables automatic ON/OFF portamento (each new note will slide from the previous note's frequency to the new frequency). 0-63 = off, 64-127 = on. 47h #71 FILTER From 0 to 64, filter Q is 0.5 (no RESONANCE added resonance); from 64 to 127, Q ranges from 0.5 to 2.5 (obvious resonance). Default is 64. These Q numbers are the same as those used for LPResonance in instrument files. 48h #72 RELEASE TIME Adjusts release speed of envelope. 0 = instant release, 1-63 = faster than instrument specifies, 64 = as specified by instrument, 65-127 = slower than instrument specifies. Recommended range is 14-114. 49h #73 ATTACK TIME Adjusts attack speed of envelope. 0 = no attack, 1-63 = shorter than instrument specifies, 64 = as specified by instrument, 65-127 = longer than instrument specifies. Recommended range is 14-114. 4Ah #74 FILTER CUTOFF From 0 to 63, low-pass filter's FREQUENCY cutoff frequency ranges from 400 Hz to ~11,000 Hz. 64 to 127 disables the filter, which saves CPU time. Default is 64. Frequency range is scaled exponentially (more accuracy for low frequencies). 4Bh #75 DECAY TIME Adjusts decay speed of envelope. 0 = fastest, 1-63 = shorter than instrument specifies, 64 = as specified by instrument, 65-126 = longer than instrument specifies, 127 = no decay (stay at maximum until release). If sustain is 0 then, to avoid silence and be compatible with the SC-88Pro, the shortest decay time is limited, and instruments with very short default decays cannot have their decay lengthened. 4Ch #76 VIBRATO RATE See NRPN H001.L008. 4Dh #77 VIBRATO DEPTH See NRPN H001.L009. 4Eh #78 VIBRATO DELAY See NRPN H001.L010. 54h #84 PORTAMENTO Specifies that the next note (and FOR NEXT NOTE only the next note) slides from the note number given in this CC message (slide duration specified by CC #5), even if automatic portamento (CC #65) is turned off. 5Bh #91 REVERB MIX At 0, MIDI channel is not sent to reverb processor. At 127, 50% is reverbed and the remainder is either dry or chorused. Default value is 0. 5Dh #93 CHORUS MIX At 0, MIDI channel is not sent to chorus processor. At 127, 50% is sent to chorus processor and the remainder is either dry or reverbed. Default value is 0. 62h #98 NRPN LOW See CC #6 for information. 63h #99 NRPN HIGH See CC #6 for information. 64h #100 RPN LOW See CC #6 for information. 65h #101 RPN HIGH See CC #6 for information. 6Fh #111 GLOBAL LOOP Current playback position is START POINT marked as the start of the "global loop". If received from live MIDI input during MIDI file playback, actual position will be the position of the most recently- played message in the MIDI file. If "Loop" is ticked, playback will skip to here when the end of the file is reached, or when a CC #119 message is played. Ignored when in XG mode. 74h #116 SECTION LOOP Current position is marked as the START POINT start of a "section". The CC value is stored as the section's repeat count. If 0, repeat count is infinity. A CC #117 message must follow at some time to make use of this. 75h #117 SECTION LOOP If the "section" repeat count is END POINT still above 0, playback will skip to the position of the last #116 message and the repeat count will be decreased by 1 (unless it is infinity). Otherwise, this message is ignored. This allows the section to be repeated a certain number of times. 76h #118 GLOBAL LOOP Same as CC #111. START POINT 77h #119 GLOBAL LOOP If "Loop" is ticked, skips MIDI END POINT file's playback position to the position of the last CC #111 or #118 message, or the beginning of the file if there was no previous #111 or #118 message. Ignored when in XG mode. 78h #120 ALL SOUND OFF Releases any playing notes and, additionally, instantly silences all sound channels (the notes do not fade away as normal). However, reverb may continue for a moment. 79h #121 RESET ALL Resets pitch-bend & pan to centre, CONTROLLERS modulation & aftertouch to 0, expression to maximum, sustain pedal & portamento to off, and portamento time to 40 mS. 7Bh #123 ALL NOTES OFF This causes any playing notes to start being released (it doesn't instantly stop all sound). 7Eh #126 MONO MODE Value is ignored. When changing to mono mode, any playing notes will be stopped. In mono mode, a MIDI channel is limited to playing only one note at a time. A new note will cut off any already-playing note without releasing as normal. 7Fh #127 POLY MODE Value is ignored. When changing to poly mode, any playing note will be stopped. This is the default mode in which a MIDI channel can play multiple notes at once. SUPPORTED PARAMETER NUMBERS - - - - - - - - - - - - - - Type High Low Event Extra Info (Dec) (Dec) -------------------------------------------------------------------------- RPN 000 000 Pitch-bend Accepts cent-accurate values via sensitivity DATA ENTRY LSB. 1 LSB data value = +/- 1 cent (therefore LSB value 127 = MSB 1 + LSB 27). RPN 000 001 Channel DATA ENTRY MSB and LSB values fine tuning combine to give a value from -8192 to 8191, where 8192 units = 100 cents (1 semitone). The effect is in addition to any other types of tuning in use. RPN 000 002 Channel 64 = no change, 0 = -64 semitones, coarse tuning 127 = +63 semitones. As per the MIDI standard, DATA ENTRY LSB is ignored. The effect is in addition to any other types of tuning in use. RPN 000 005 Modulation Affects how much manual modulation depth (via CC #1) bends pitch by. 64 = default, 0 = 1/4 of default, 127 = 4x default. Exponential curve towards endpoints. Takes advantage of DATA ENTRY LSB for more accuracy. NRPN 001 008 Vibrato rate Affects speed of modulation cycle (both manual and automatic). 64 = default, 0 = 1/4 of default, 127 = 3x default. Exponential curve towards endpoints. Takes advantage of DATA ENTRY LSB. NRPN 001 009 Vibrato depth Affects depth of automatic modulation (defined by instrument file). 0-64 = scale from 0% to 100% of instrument file's ModAutoDepth, 64 = no change, 64-127 = add 0x to 3x default modulation depth with exponential curve towards 3x. NRPN 001 010 Vibrato delay Offsets delay of automatic modulation as defined by the instrument file. 0-64 = scale from 0% to 100% of instrument file's ModAutoDelay with exponential bias towards lower delays, 64 = no change, 64-127 = add 0 to 2.5 seconds (linear scale). NRPN 001 032 Filter cutoff Uses DATA ENTRY LSB for more frequency accuracy. See CC #74 for details. NRPN 001 033 Filter Uses DATA ENTRY LSB for more resonance accuracy. See CC #71 for details. NRPN 001 099 Attack time See CC #73 for details. NRPN 001 100 Decay time See CC #75 for details. NRPN 001 102 Release time See CC #72 for details. SUPPORTED SYSTEM-EXCLUSIVE MESSAGES - - - - - - - - - - - - - - - - - - Bytes (Hex) Meaning Extra Info -------------------------------------------------------------------------- 7Eh ??h 09h [U] GM Reset Resets all parameters and instantly stops ??h all sound. See the XG Reset message below for detailed information. 41h ??h 42h [GS] Reset Resets all parameters and instantly stops 12h 40h 00h all sound. See the XG Reset message below 7Fh ??h ??h for detailed information. 43h 1?h ??h [XG] Reset Resets all parameters (as is done when 00h 00h 7Eh starting to play a new MIDI file); 00h performs "All Sound Off" and "Reset All Controllers" on all MIDI channels, but additionally resets volume to maximum, instrument & banks to 0, chorus & reverb to their defaults, filter to disabled, all (N)RPN-based settings (e.g. bend sensitivity, vibrato depth) to their default values (see CC section above), all master settings (e.g. master coarse/fine tuning) to default, and sets only channel 10 to percussion mode. 7Fh ??h 04h [U] Master llh is the LSB and mmh is the MSB. See 03h llh mmh fine tuning RPN H000.L001 in the table above for info. (*2) The effect is in addition to any other types of tuning in use. 7Fh ??h 04h [U] Master vvh is the number of semitones + 64. See 04h 00h vvh coarse tuning RPN H000.L002 in the table above for info. (*2) The effect is in addition to any other types of tuning in use. 7Eh ??h 08h [U] Scale/ Shifts the frequencies of the notes of an 08h xxh yyh Octave Tuning octave up/down independently of each zzh tth (1 byte per other, for specific MIDI channel(s). xx, note) yy and zz are bit fields specifying (*2) channels to affect (1 = affect). Bit (MSB first) for each MIDI channel (in hex): xx: ......FE yyh .DCBA987 zz: .6543210 tt is repeated 12 times. It is the shift for each note of the octave, offset by decimal 64. The first byte is for note C. tt: 0 = -64 cents tt: 64 = no scale/octave tuning (default) tt: 127 = +63 cents 7Eh ??h 08h [U] Scale/ Shifts the frequencies of the notes of an 09h xxh yyh Octave Tuning octave up/down independently of each zzh llh mmh (2 bytes per other, for specific MIDI channel(s). xx, note) yy and zz are bit fields specifying (*2) channels to affect (1 = affect). Bit (MSB first) for each MIDI channel (in hex): xx: ......FE yyh .DCBA987 zz: .6543210 ll mm is repeated 12 times. ll mm forms a signed number (LSB first) from -8192 to 8191, where 8192 units represent 1 semitone. It is the shift for each note of the octave. The first pair is for note C. Examples (in decimal): ll: mm: Meaning: 0 0 -100 cents 0 32 - 50 cents 0 64 default scale/octave tuning 1 64 + 0.01221 cents (roughly) 127 127 + 99.98779 cents (roughly) 7Eh ??h 08h [U] Single Sets exact base frequency of one or more 02h pph nnh Note Tuning notes, for all MIDI channels. Any other kkh xxh llh (*2) forms of tuning and pitch-bends are then mmh applied on top of this, if they're used. pp is the "tuning program number" (lookup table); Bawami only has one, so this is ignored. nn is the number of notes being set (kk xx ll mm is repeated this many times). kk is a note number to modify. xx is the MIDI note whose usual frequency is heighest but <= the wanted frequency. ll and mm form an unsigned number (LSB first) from 0 to 16383, where 16384 units represent 1 semitone; this is added to kk's frequency. xxh llh mmh = 7Fh 7Fh 7Fh means "no change", useful with "[U] Bulk Tuning Dump" below. Examples (in decimal): kk: xx: ll: mm: Meaning: 81 81 0 64 A6 plays A6 + 50c 36 60 0 0 G#2 plays G#4 + 0c 120 25 72 2 C10 plays C#2 + 2c 95 127 127 127 B7 stays as it is 7Eh ??h 08h [U] Bulk Sets exact base frequency of all 128 MIDI 01h pph (name) Tuning Dump notes, for all MIDI channels. (name) is a xxh llh mmh (*2) 16-byte ASCII name for this tuning table, ??h and pp specifies the "tuning program number" (both are ignored by Bawami). xx ll mm specifies the frequency of a note, and is repeated 128 times, once for each note, starting with note 0. See "[U] Single Note Tuning" above for explanations of xx ll mm. 41h ??h 42h [GS] Part- x is a MIDI channel and vvh is 00h or 01h 12h 40h 1xh to-rhythm or 02h. If 00h, channel will play tone. If 15h vvh ??h allocation 01h or 02h, channel will play percussion. 43h 1?h ??h [XG] Set x is a MIDI channel and vvh is 00h or 01h 08h 0xh 07h part mode or 02h or 03h. If 00h, channel will play vvh tone. If 01h or 02h or 03h, channel will play percussion. 41h ??h 42h [GS] Set x is a MIDI channel and vv is the 12h 40h 1xh part parameter's value. pph specifies pph vvh ??h parameter the parameter to be changed, as follows: (*1) pph: 19h = Volume pph: 1Ch = Pan pph: 21h = Chorus mix pph: 22h = Reverb mix pph: 30h = Vibrato rate pph: 31h = Vibrato depth pph: 32h = Filter cutoff frequency pph: 33h = Filter resonance pph: 34h = Attack time pph: 35h = Decay time pph: 36h = Release time pph: 37h = Vibrato delay NOTE: Setting pan to 0 via SysEx sets MIDI channel's pan to random-per-note. 43h 1?h ??h [XG] Set x is a MIDI channel and vv is the 08h 0xh pph multipart parameter's value. pph specifies the vvh parameter parameter to be changed, as follows: (*1) pph: 01h = Bank select (MSB) pph: 02h = Bank select (LSB) pph: 03h = Program change (instrument) pph: 0Bh = Volume pph: 0Eh = Pan pph: 12h = Chorus mix pph: 13h = Reverb mix pph: 15h = Vibrato rate pph: 16h = Vibrato depth pph: 17h = Vibrato delay pph: 18h = Filer cutoff frequency pph: 19h = Filter resonance pph: 1Ah = Attack time pph: 1Bh = Decay time pph: 1Ch = Release time NOTE: Setting pan to 0 via SysEx sets MIDI channel's pan to random-per-note. 41h ??h 42h [GS] Mono/ x is a MIDI channel and v is either 0 or 12h 40h 1xh Poly Mode 1. If 0, channel is in monophonic mode; 13h 0vh ??h if 1, channel is in polyphonic mode. 43h 1?h ??h [XG] Mono/ x is a MIDI channel and v is either 0 or 08h 0xh 05h Poly Mode 1. If 0, channel is in monophonic mode; 0vh if 1, channel is in polyphonic mode. 41h ??h 42h [GS] Set x is a MIDI channel and vv is the 12h 40h 2xh pitch-bend sensitivity in semitones, offset by 10h vvh ??h sensitivity decimal 64. Although not officially supported by the GS specs, Bawami also allows negative (inverted) sensitivity. For example (decimal): vv: 66 = 2 semitones vv: 69 = 7 semitones vv: 62 = -2 semitones (inverted) 41h ??h 42h [GS] Send x is a MIDI channel and vv specifies how 12h 40h 2xh modulation to much modulation affects a note's frequency 04h vvh ??h frequency by. If vv is 10 (default), instrument file's ModToFreq value is used. From 0 to 9, ModToFreq becomes 0% to 90% of instrument's ModToFreq. Above 10, ModToFreq becomes instrument's ModToFreq plus (vv-10)/10. For example (in decimal), instrument's ModToFreq is 0.50: vv: 0 = 0.00 vv: 5 = 0.25 vv: 10 = 0.50 vv: 15 = 1.00 vv: 20 = 1.50 41h ??h 42h [GS] Send x is a MIDI channel and vv specifies how 12h 40h 2xh modulation to much modulation affects a note's volume 06h vvh ??h volume by. If vv is 0 (default), instrument file's ModToVol is used. As vv moves towards 127, ModToVol becomes closer to 2.00. Because of the GS specification, it is not possible to reduce ModToVol below the instrument file's ModToVol. For example, if instrument's ModToVol is 0.50: vv: 0 = 0.50 vv: 64 = ~1.25 vv: 127 = 2.00 41h ??h 42h [GS] Bank x is a MIDI channel, vv is the value 12h 40h 1xh select (MSB) to set the MSB of the bank to, and ii 00h vvh iih and program is the instrument to change to (program ??h change change). 41h ??h 42h [GS] Bank x is a MIDI channel and vv is the value 12h 40h 4xh select (LSB) to set the LSB of the bank to. Send this 00h vvh ??h (*1) before sending MSB and Program change. 41h ??h 42h [GS] Drumkit: Turns on or off the effect of note-off 12h 41h x7h Receive Note messages for a given percussive note. By nnh 0vh ??h Off default, note-offs are ignored for all percussive notes. x specifies which of the GS drumkits is being described, but since Bawami only has one drumkit, this is ignored. nnh is a note number and v is either 0 (ignore note-offs) or 1 (allow note-offs to instantly silence this note). 41h ??h 45h [GS] Sound Emulate the top text area of the Roland 12h 10h 00h Canvas LCD: Sound Canvas's LCD. The text will appear 00h (text) Display text at the top-right of Bawami's main window. ??h (text) represents 1 or more bytes of ASCII text. Leading bytes with values below 32 are ignored. If the text is more than 16 characters long, it will scroll. 41h ??h 45h [GS] Sound Stores a page of graphic data. Memory for 12h 10h 0ph Canvas LCD: 10 pages is available. A combination of p vvh (dots) Store Graphic and vvh determines the page to write to: ??h Page p: 1, vvh: 00h = page 1 p: 1, vvh: 40h = page 2 p: 2, vvh: 00h = page 3 p: 2, vvh: 40h = page 4 p: 3, vvh: 00h = page 5 p: 3, vvh: 40h = page 6 p: 4, vvh: 00h = page 7 p: 4, vvh: 40h = page 8 p: 5, vvh: 00h = page 9 p: 5, vvh: 40h = page 10 (dots) represents 64 bytes of dot data defining 16x16 dots. Data is sent in 3 16-dot-high columns of single bytes each describing 5 dots horizontally, plus a final column of bytes for the last 1 dot. The lowest 5 bits of a byte represent a row of 5 dots from left to right (LSB is the rightmost dot). Only bit #5 in the last column of bytes is used. If page is 1, it will be displayed immediately. 41h ??h 45h [GS] Sound Displays a page of graphic data that has 12h 10h 20h Canvas LCD: already been stored. ph is the page 00h 0ph ??h Display number, from 1 to A (page 1 to page 10). Graphic Page If 0, any page currently being displayed will stop being displayed (be hidden). 41h ??h 45h [GS] Sound Sets the number of seconds that a graphic 12h 10h 20h Canvas LCD: page will be displayed for when the 10h vvh ??h Set Graphic "Display Graphic Page" message (above) is Display received. Takes effect from when that Duration message is next received. vv is 0 to 15, where 0 means 0 seconds and 15 means 7.2 seconds. The default is 6 (2.88 seconds). (*1) These parameters can be changed via standard control changes. For details on what vvh means for any parameter, see that parameter in the "CONTROL CHANGES" section. Some can also be changed via NRPNs. (*2) These messages are slow for Bawami to process, so there might be a slight timing inaccuracy if used in the middle of music. NOTES: - Above, "?" represents any hex digit. "??h" represents any single byte of value 7Fh or below. The values at these positions are ignored by Bawami, so they don't matter. - Bawami does not care whether a universal SysEx messages ("[U]" above) begins with 7Eh (marked as "non-realtime") or 7Fh (marked as "realtime"). It makes no difference. - The longest acceptable SysEx message is 1042 bytes. SUPPORTED META DATA - - - - - - - - - - Byte (Hex) Event -------------------------------------------------------------------------- 00h INFO: SEQUENCE NUMBER 01h INFO: MISCELLANEOUS TEXT 02h INFO: COPYRIGHT 03h INFO: TRACK NAME 04h INFO: INSTRUMENT NAME 05h INFO: LYRICS 06h INFO: MARKER 07h INFO: CUE POINT 20h INFO: CHANNEL PREFIX 27h INFO: END OF TRACK* 51h SET TEMPO "INFO" messages are merely displayed on the "MIDI Messages" view, and do not affect anything else internally. * This message is not shown on the "MIDI Messages" view. In older versions of Bawami, it was shown, but often massively spammed up the view due to many of this message occurrring at the same time. __________________________________________________________________________ BANK SELECTS / HOW TO SELECT VARIATION INSTRUMENTS - - - - - - - - - - - - - - - - - - - - - - - - - - "Bank" numbers complement "Program Change" numbers, to specify what the MIDI channel plays. They are comprised of 2 numbers, and referred to in the form of "Hxxx.Lyyy", where xxx is the high byte and yyy is the low byte. E.g. To select bank H032.L003, transmit a Bank Select MSB (high) with value 032, and a Bank Select LSB (low) with value 3; it doesn't matter which you send first. Afterwards, send the Program Change to cause the instrument to be changed. Bank Select messages can be used to do 2 different things: - Put a MIDI channel into percussion mode (XG MIDIs do this). - Select a "variation" instrument (an instrument outside the set of 128). Sending a Bank Select of H127.L000 or H127.L064 will make the channel play pecussion. Otherwise, the channel will play a tone (unless forced into percussion mode by a System-Exclusive message). By using Program Change messages alone, it is possible to choose from the General MIDI set of 128 instruments (with filenames in the "inst" folder such as "PPP.txt", where PPP is a Program Change number). However, if you use the Bank Select control changes, you can select from various variations of that instrument (with filenames such as "PPP_HHH_LLL.txt", where PPP is a Program Change number, HHH is high bank number and LLL is low bank number). To select such a file, send the Bank Select messages before sending a Program Change. For example, to select "032_004_003.txt": Bank Select MSB (value 4) Bank Select LSB (value 3) Program Change (value 32) The current version of Bawami supports a maximum of 16 instrument files for each program (bank 0 plus up to 15 variations). REQUESTS TO SELECT NON-EXISTENT VARIATION INSTRUMENTS - - - - - - - - - - - - - - - - - - - - - - - - - - - Both Roland GS MIDIs and Yamaha XG MIDIs use Bank Selects to select from among their two different lists of variation instruments. If you try to select a variation instrument that doesn't exist (i.e. no file exists), and the chosen bank LSB is 4 or less, Bawami assumes that it is a Roland GS variation and will select an alternative variation in a way that mimics how the Roland Sound Canvas synths deal with bank selects. On the SC-8850, the LSB represents the synth model like so: ------------------------------------------------------------------ | Bank LSB: | Roland SC synth model: | |-----------|------------------------------------------------------| | 0 | SC-8850 by default (depends on front panel buttons) | | 1 | SC-55 (oldest) | | 2 | SC-88 | | 3 | SC-88Pro | | 4 | SC-8850 (newest) | ------------------------------------------------------------------ So, if a variation exists for the SC-55, Bawami assumes that it exists for all newer synths, up to the SC-8850 (newest), too. This means that a chosen bank LSB of 4 will only match an instrument variation whose LSB is 4 (or 0), whereas a chosen bank LSB of 1 will match any variation whose LSB is 0, 4, 3, 2 or 1 (higher bank numbers are given priority, because they might boast an improved sound over old (lower bank) versions). In other words... - If the chosen variation (MSB and LSB combination) does not exist: - If the chosen bank LSB is 1 to 4: - If a variation with the chosen bank MSB exists: The variation with the next-highest (lower) LSB will be used. - If no variation with the chosen bank MSB exists: The plain "PPP.txt" file (i.e. bank H000.L000) will be used. - If the chosen bank LSB is 0: - If a variation with the chosen bank MSB exists: - If a variation with LSB of 1 to 4 exists: The variation with the highest LSB will be used. - If the chosen bank LSB is 5 or higher (doesn't appear to be GS): The plain "PPP.txt" file (i.e. bank H000.L000) will be used. E.g. If the following instrument files exist... 032_006_001, 032_006_002, 032_008_001, 032_012_003, 032_012_048 --------------------------------------------------------------------- | Chosen variation: | Existing variation that will actually be used: | | PPP_HHH_LLL | PPP_HHH_LLL | |-------------------|-------------------------------------------------| | 032_006_001 | 032_006_001 (chosen variation exists) | | 032_006_003 | 032_006_002 (same MSB, next-lower LSB) | | 032_006_000 | 032_006_002 (same MSB, highest LSB of 1 to 3) | | 032_012_002 | 032 (a lower LSB doesn't exist) | | 032_008_029 | 032 (LSB 29 doesn't appear to be GS) | | 032_012_048 | 032_012_048 (exact match, assumedly XG) | --------------------------------------------------------------------- For this reason, when creating instrument files of GS variations, you should always use the lowest LSB possible (representing the earliest synth model that contained this variation) in the filename. This is how the variations included with Bawami are named. The instrument list in the SC-88Pro or SC-8850 manual is the best source of this info, but you can safely use an LSB of 001 if you are unsure (this variation will always be allowed no matter whether the chosen LSB is 0, 1, 2 or 3). __________________________________________________________________________ PERCUSSION MAPPING - - - - - - - - - - For each percussive note that tries to play, one of three things may happen: 1. Bawami knows how to play this percussive note (e.g. 035 = Kick 1), and will play it (no percmap file is needed). 2. Bawami doesn't know how to play this percussive note, but it will act as if it is a different (supported) percussive note and play that other percussive note instead (e.g. play percussive note 016 as if it is 035 = Kick 1). 3. Bawami doesn't know how to play this percussive note, and will act as if it is an ordinary tone instrument playing a specific note (e.g. play percussive note 085 as if it is instrument 123 (Bird Tweet) playing musical note G#1). The files in the "percmap" folder specify how certain unsupported percussive notes will be played (the filename specifies the percussive note number, and must be padded to 3 digits). They let you either simply "remap" from an unsupported percussive note to a supported one, or specify that an unsupported percussive note should play as a certain tone note on a certain tone instrument. See "percmap info.txt" (in the "percmap" folder) for full information. The default files allow the following percussive notes to play as shown below. They are some of the Roland GS default drumkit's percussive instruments. Note # (Dec) Instrument name Plays as -------------------------------------------------------------------------- 000 Standard 1 Kick 1 Perc 035 (Kick 1) 001 Standard 1 Kick 2 Perc 036 (Kick 2) 002 Standard 2 Kick 1 Perc 035 (Kick 1) 003 Standard 2 Kick 2 Perc 036 (Kick 2) 004 Kick Drum 1 Perc 035 (Kick 1) 005 Kick Drum 2 Perc 036 (Kick 2) 008 Room Kick 1 Perc 035 (Kick 1) 009 Room Kick 2 Perc 036 (Kick 2) 012 Electric Kick 2 Perc 035 (Kick 1) 013 Electric Kick 1 Perc 036 (Kick 2) 022 MC-500 Beep 1 Note C 7 on inst 124_011_003 023 MC-500 Beep 2 Note C 8 on inst 124_011_003 028 Slap Perc 038 (Snare 2) 033 Square Click Perc 035 (Kick 1) 037 Side Stick Note C 0 on inst 115_008_001 054 Tambourine Note A#5 on inst 113_016_003 075 Claves Note C#8 on inst 115 (Woodblock) 076 Woodblock High Note G#6 on inst 115 (Woodblock) 077 Woodblock Low Note C 6 on inst 115 (Woodblock) 083 Jingle Bell Note G#1 on inst 113_016_003 085 Castanets Note A#5 on inst 115_008_001 097 Standard 1 Snare 1 Perc 038 (Snare 1) 098 Standard 1 Snare 2 Perc 040 (Snare 2) 099 Standard 2 Snare 1 Perc 038 (Snare 1) 100 Standard 2 Snare 2 Perc 040 (Snare 2) 111 Gated Snare Perc 040 (Snare 2) 115 Electric Snare 2 Perc 038 (Snare 1) 116 Electric Snare 1 Perc 038 (Snare 1) 117 Electric Snare 3 Perc 040 (Snare 2) __________________________________________________________________________ LANGUAGES - - - - - There is an option on the "Interface" tab of the configuration window to choose a language for text within Bawami to appear in. A language allows people to customise/translate all text on the configuration window (including the "info" text that appears at the bottom), menus, every message box that can appear, and in a few other places. A language is a folder of text files stored inside the "lang" folder. Please read "instructions.txt" (inside the "lang" folder) for full information, including how to make your own language for Bawami. The command line parameter "/translator" is designed to make it easier to find and edit language files. Please see the info for the "/translator" option in the "COMMAND LINE PARAMETERS" section below information. __________________________________________________________________________ COMMAND LINE PARAMETERS - - - - - - - - - - - - Bawami accepts command line parameters in the following form: bawami [options] ["MIDIFile.mid"] For example, to load a new instance of Bawami and play a MIDI file on only the PC speaker, without looping: bawami /loop 0 /new /pcspk 1 /nosound "C:\test.mid" "MIDIFile.mid" represents the full path to a MIDI file. Speech marks must be included. If this is given, and an instance of Bawami is already running (in visible mode), then the command line will be passed to the already-running instance, which will open the MIDI file instead, and no new instance will remain running. This is to avoid accidentally having many instances of Bawami running at once. To force a new instance to run while specifying a MIDI file to open, use the /new option (see below). There are two common ways to pass command line parameters to a program on Windows: - Via the console (command prompt): Run the Windows command prompt (cmd.exe) from the Start menu. Change to Bawami's directory. Example: cd c:\my programs\bawami_118 Run Bawami, with any command line parameters. Example: bawami /pcspk Bawami can also run in console mode, with no GUI. This is achieved using the option "/console" and, optionally, other options beginning with "/std" (see below for all options). - Via a shortcut: If you are likely to run Bawami with a certain command line parameter many times, it will be more convenient to make a shortcut that you can simply double-click to run with the parameter in the future. Right-click BaWaMI.exe and choose "Create shortcut". Right-click the new shortcut and choose "Properties". At the end of the "Target" text, add a space followed by any command line parameters. For example, the Target text may become: "C:\My Programs\bawami_118.exe" /pcspk Click "OK" to save the shortcut. Now, you can double-click the shortcut to run Bawami with those parameters every time. ONE-TIME OPTIONS - - - - - - - - - The following options only affect this one launch of Bawami, and will not be saved in the startup.cfg config file. /new Forces a new instance of Bawami to start running, instead of potentially re-using an already-running instance (this would happen if a MIDI file to open was given). Note that an already- running instance that's in console or invisible mode will never be re-used, to avoid problems if the MIDI could not be loaded. /playnow (0|1|2) Force the MIDI file that is also being given on the command line to play (1 or 2) or to not play (0) automatically. The option to start playback automatically (on the "Interface" tab of the config window) will be ignored and will not be changed. A value of 2 additionally skips to the first "NOTE ON" message to avoid a long period of silence, processing all preceding setup messages as quickly as possible. /seek (MM:SS.CC|MessagePercent%|Ums) Make playback start from first MIDI message that happens at (or before) the specified position in the MIDI file. Position can be a time in MM:SS.CC format, where MM = minutes, SS = seconds and CC = hundredths, all padded to exactly 2 digits (note that you cannot specify hours); or as a percentage of the total number of MIDI messages followed by "%"; or as a number of milliseconds (no need to pad the digits) followed by "ms". All preceding messages will be processed as quickly as possible. If "/playnow 2" is also given, silence from specified time until first "NOTE ON" messages will be skipped. Example: bawami /playnow 2 /seek 65200ms "C:\test.mid" (Start playing from the first "NOTE ON" after 65.2 seconds.) /nosound Use the "(No sound output)" sound device so as not to output sound to any sound card/device. This is only really useful if using the /pcspk option to output sound from the PC speaker. Implies /nosave. /writewavonly [WAVFile.wav] Immediately create a WAV file of the MIDI file that is also being given on the command line. Square brackets MUST BE INCLUDED around the filename instead of quotes! /playnow and /seek are ignored. Implies /new. If WAV file already exists, it will be overwritten. After creating the WAV file, Bawami will exit. In this way, Bawami can be used in an automated batch file to render MIDI files. If in a batch file, you'll probably also want to use /console. Example: bawami /console /writewavonly [C:\out.wav] "C:\test.mid" /writeoggonly q [OGGFile.ogg] Immediately create an OGG file of the MIDI file that is also being given on the command line. q is the quality for the OGG encoder to use (0~10) - lower numbers produce smaller files, higher numbers give higher quality. Square brackets MUST BE INCLUDED around the filename instead of quotes! /playnow and /seek are ignored. Implies /new. If OGG file already exists, it will be overwritten. After creating the OGG file, Bawami will exit. In this way, Bawami can be used in an automated batch file to render MIDI files. If in a batch file, you'll probably also want to use /console. Example: bawami /console /writeoggonly 6 [C:\out.ogg] "C:\test.mid" /invisible Do not show the main interface or any windows (apart from errors and message boxes); play the file invisibly in the background. Implies: /new, /loop 0, /playnow 2, /nosave. If a MIDI file is not also given on the command line, /invisible is ignored. These conditions are to avoid a MIDI file playing forever, or Bawami continuing to run in the background forever. Instead, the MIDI file will be played once, and then Bawami will exit. Note that there will be a delay while resources are loaded before playback begins. This option is designed for running Bawami from a shortcut; /console, shown below, is more useful for running from the command prompt or a batch file. /console Similar to /invisible, but even message boxes (e.g. errors) won't be displayed. Instead, they will be sent to the "standard error" handle so that they will be visible in the console (command prompt) that you launch Bawami from. This avoids message boxes stealing focus from the console. Bawami waits for you to type number keys on the command prompt to answer questions. You should use /console instead of /invisible when possible, because it makes it safe to crash Bawami (no resources will be leaked if you kill its process). /infolevel (0|1|2) Determines how much information is sent to "standard output" (when also using /console). /infolevel 0 is assumed by default. Note that message box text (e.g. errors) is always sent to "standard error" (which will also appear in the console). 0: MINIMAL Typically only two lines of information (once when MIDI file is loading, once when playback/rendering begins). 1: INFO Like "0", but also sends any text that would normally appear on top of the blue playback position bar. 2: DEBUG Like "1", but also sends realtime log file text, letting you see much more detail. This option causes a little slowdown. /stdmidi separator Send each MIDI message, in hexadecimal, to "standard output" handle as it is played, so that it appears on the console that Bawami is launched from. separator specifies the ASCII code (in hexadecimal) of the character(s) to separate each MIDI message with. For example, use 20 for a space, 2C20 for comma-space, or 0D0A for a new line. This option can cause slow-down, and only has an effect if /console is also used. /translator Causes most controls to display the name of their language TXT file, instead of the text stored in that file. This allows translators creating their own languages for Bawami to easily see which TXT file is used where. Choose the language that you're editing on the "Interface" tab. Then, with the mouse pointer over any control or text label on the configuration window, you can use keyboard shortcuts to edit the caption or tooltip (info) text files - see the info which appears at the bottom of the window. On other windows, hold the mouse over a control to see info in a tooltip. A button in the bottom-left of the configuration lets you switch between filenames and file contents (and reloads the language files). Translator mode doesn't affect instrument names, menus or messages (dialogues). As such, controls whose text is based on files in the "message" folder won't be changed. /pitdump m d llhh This is an advanced option for programmers who want to capture the commands that Bawami sends to the PIT (programmable interrupt timer, responsible for playing tones on the PC speaker) for convenient use in e.g. their own oldschool demo programs. The option instructs Bawami to check the last two "interval" bytes that it sent to the PIT (which determine the tone's frequency) every few milliseconds and write them to "pitdump.bin" in the same folder as BaWaMI.exe. As a programmer, you then only need to read pairs of bytes from pitdump.bin every m milliseconds and feed them to the 8254-compatible PIT (typically port h42) in mode 3 in order to play back the music. Because writing to a file every few milliseconds would cause slowdowns, Bawami records the bytes in memory and then writes them to the file when you exit. m (1~65535) is the number of milliseconds between each pair of recorded bytes (values below 4 will not help much), and must be an integer. d is the maximum duration (in seconds) to prepare memory for recording for. After this many seconds of playback pass, a message will be displayed and recording will stop until Bawami is restarted. WARNING: Required RAM is (1000/m)*d*2 bytes! Bawami normally creates silence by disconnecting the PC speaker from the PIT, but the most convenient way to record "silence" is to record bytes for a PIT interval that generates a frequency too high to hear. llhh is the 2 bytes (low byte and high byte) in hexadecimal, padded to 4 characters (e.g. 1d00) that will be written during silent parts. Using 1d00 will make a (clock speed = 1193180) / (1d00 = decimal 29) = ~41144 Hz tone. NOTE: /pitdump does not capture noise-based percussion, because that is generated by switching the PC speaker directly rather than using the PIT. Example: bawami /pitdump 4 600 1d00 (Record a pair of bytes every 4 ms for 10 minutes = ~300 KB.) MIDI CHANNEL MANUAL OVERRIDE OPTIONS - - - - - - - - - - - - - - - - - - - You can use the following options to manually override a MIDI channel's volume, expression or instrument, or easily mute many MIDI channels at once. These options will not be saved in the startup.cfg config file. A running instance of Bawami can also create manual override text automatically, based on the currently-overridden controls, and copy the text to the clipboard. Right-click in an empty area, choose "All overrides", and then "Copy parameters to clipboard". You can also use "Load parameters from clipboard" to apply a bunch of overrides at once. Note that loading parameters will also recognise some options other than the overrides shown below (e.g. /translator), but it is recommended that you only include options in this section (below). /ocv n x Override the volume of channel n (1~16), setting it to x (0~127). The volume will become locked and cannot be changed by the MIDI file. /oce n x Override the expression of channel n (1~16), setting it to x (0~127). The expression will become locked and cannot be changed by the MIDI file. /oci n ppp[_hhh_lll] Override the instrument of channel n (1~16). The instrument will become locked and cannot be changed by the MIDI file. You can specify the instrument simply by a "program change" number (000~127), or you can also specify the high and low bank numbers (ppp_hhh_lll). Numbers must be paddded to 3 digits. Example: bawami /oci 2 028_008_001 (Set channel 2's instrument to Funk Pop Guitar.) /ocr n x Override the reverb mix of channel n (1~16), setting it to x (0~127). It will become locked and cannot be changed by the MIDI file. /occ n x Override the chorus mix of channel n (1~16), setting it to x (0~127). It will become locked and cannot be changed by the MIDI file. /ocp n (0|1) Force percussion mode of channel n (1~16) to on (1) or off (0). Also locks the channel's instrument. /multimute [0][1][2][3][4][5][6][7][8][9][a][b][c][d][e][f] Mute all of the specified MIDI channels. The channel numbers are given in hexadecimal. Be careful, as the channels are numbered here from 0 to f instead of 1 to 16. Example: bawami /multimute 49ef (Mute MIDI channels 5, 10, 15 and 16.) PERSISTENT OPTIONS - - - - - - - - - - The following options will be saved in startup.cfg when Bawami exits, by default. To prevent Bawami from saving a config when it exits, use the /nosave option below. If any of the following options are not given, then the values already saved in startup.cfg will be loaded. /nosave Do not save settings in startup.cfg when exitting. This will prevent any options listed below from being saved for the next time Bawami is run. /loop (0|1) Enable (1) or disable (0) looping of playback. Default when run for the first time: 1 (enabled) /scanwinmm (0|1) Enable (1) or disable (0) scanning for sound devices that are compatible with the WinMM driver on startup. If disabled, Bawami will only check for DSound- and ASIO-compatible devices. Bawami (FMOD) can freeze when trying to get information about devices using WinMM with some bad USB3 drivers when the device is connected via USB3, and maybe under other circumstances. /mastervol x Set master volume to x (0~100; a percentage). Default when run for the first time: 88 /stereowidth x Set stereo width to x (0~100; a percentage). If 0, all sound will begin in mono. Note that this changes the effect of MIDI channel panning, but any chorus/reverb will still be in stereo. Also, any WAV/OGG file written will still contain 2 channels. Default when run for the first time: 100 /maxdetune x Set maximum random detune of notes to +/- x cents (0~50). Default when run for the first time: 4 /maxnumoscs x Set maximum number of playing notes to x (1~256; values above 128 are not recommended). If writing a WAV file, 128 will always be used. Default when run for the first time: 24 /8bitmix (0|1) Force sound to be mixed in 8-bit (1) or 16-bit (0). Even if sound is mixed in 8-bit, any WAV file written will still be in 16-bit format (the lower 8 bits of every sample won't be used). Default when run for the first time: 0 (16-bit) /usefilters (0|1) Enable (1) or disable (0) per-MIDI-channel filters that are controlled by CC or data entry MIDI messages. Default when run for the first time: 1 (enabled) /useeffects (0|1) Enable (1) or disable (0) chorus and reverb processors. If enabled, a little more CPU time is used even if a MIDI file does not use chorus or reverb. Default when run for the first time: 1 (enabled) /useretro (0|1) Enable (1) or disable (0) retro-style (downsampled) kicks and snares. Default when run for the first time: 0 (disabled) /useglitches (0|1) Enable (1) or disable (0) downsampling of tone instruments for a lo-fi sound. Default when run for the first time: 0 (disabled) /guifps (1|2|3|4|5|6) Set GUI's frame rate to the given value multiplied by 10 (value must be 1~6; FPS is therefore 10~60). Default when run for the first time: 3 (30 FPS) /guiskin [SkinFolder] Switch to the skin whose folder is named "SkinFolder". Square brackets must be included around the folder name. If skin doesn't exist, Bawami will fall back to the default skin. Example: bawami /guiskin [default] Default when run for the first time: [default] /guilang [LangFolder] Switch to the language whose folder is named "LangFolder". Square brackets must be included around the folder name. If language folder doesn't exist, Bawami will ignore this option. Example: bawami /guilang [nihongo partial] Default when run for the first time: [english] /pcspk (0|1) Enable (1) or disable (0) output via the internal PC speaker (1-bit). You might want to use /nosound, too. __________________________________________________________________________ ABOUT TUNING - - - - - - - Bawami supports 4 different types of tuning MIDI messages. These cause notes to play at pitches different to their usual ones, even if pitch- bends or portamento aren't being used. Tuning messages can be used to bring Bawami into tune with a real-life instrument that is difficult to retune, so that both Bawami and the real-life instrument sound good together. They can also be used to tweak the pitch of individual MIDI note numbers so that just specific notes will always play a bit lower or higher than the default (equal temperament), so that you can easily play e.g. a "just intonation" or Arabic scale. Finally, for ultimate control, they can even redefine the frequencies of specific notes to be any arbitrary values. Some tuning types affect all MIDI channels, while some affect one or more individual MIDI channels independently. In any case, the 4 different types of tuning all add up and combine together to give the finally- audible pitch when any given channel wants to play any specific note. To explain this, here is a diagram showing the steps Bawami takes to arrive at the final pitch, using an example note-on message for the note C4 on MIDI channel 3. START 1. 2. ------ -------------- --------- | NOTE | | Get default | | Shift | --> Channel 1 --> [...] | ON | | frequency of | | up/down | --> Channel 2 --> [...] | (C4, | --> | note C4 | --> | | --> Channel 3 -->----->-- | chan | | (SINGLE NOTE | | (MASTER | --> Channel 4 --> [...] | | 3) | | TUNING) | | TUNING) | --> (etc) | ------ -------------- --------- | v -------------- ---------- -------------- | | This is | | Shift | | Shift | | | the final | | up/down | | up/down for | | | frequency | <-- | | <-- | all note Cs | <-----<-----<-- | for note C4 | | (CHANNEL | | (SCALE/OCTAVE | | on channel 3 | | TUNING) | | TUNING) | -------------- ---------- -------------- FINISH 4. 3. Here is a more in-depth description of the 4 types of tuning: ------------------------------------------------------------------------ |Type| Description |Affects| Name and type of | | | | chans | MIDI message(s) | |----|-------------------------------------------------------------------| | | Sets the default frequency | | - SINGLE NOTE TUNING (SysEx) | | 1 | of one (or more) notes to | All | - BULK TUNING DUMP (SysEx) | | | absolute value(s). | | | |----|----------------------------|-------|------------------------------| | 2 | Shifts the pitch of all | All | MASTER COARSE TUNING plus | | | notes up/down together. | | MASTER FINE TUNING (SysEx) | |----|----------------------------|-------|------------------------------| | | Shifts the pitch of a note | | - S/O TUNING (1-byte) (SysEx)| | 3 | up/down according to which | One | - S/O TUNING (2-byte) (SysEx)| | | note of the octave it is. | | (*) | |----|----------------------------|-------|------------------------------| | 4 | Shifts the pitch of all | One | CHANNEL COARSE TUNING plus | | | notes up/down together. | | CHANNEL FINE TUNING (RPN) | ------------------------------------------------------------------------ (*) S/O TUNING = SCALE/OCTAVE TUNING Using the diagram and table above, it should be easier to understand what effect the tuning messages will have if you use multiple ones. For example, a BULK TUNING DUMP will adjust the default frequency of all MIDI notes, for all channels. Sending a CHANNEL FINE TUNING on channel 3 will then result in channel 3's notes playing slightly higher or lower than the same notes on all other MIDI channels. You can also see that both the SINGLE NOTE TUNING and BULK TUNING DUMP affect the same "default note frequency" table inside Bawami by setting absolute values (not shifting). Therefore, if a BULK TUNING DUMP is sent, followed by a SINGLE NOTE TUNING message to tweak note G3, all notes will end up with the frequencies given by the BULK TUNING DUMP, except for note G3, which will have had its value most recently set by SINGLE NOTE TUNING. Tuning affects the tones played by the PC speaker, but the "Lowest note allowed" setting on the configuration window assumes the default (equal temperament) tuning. For technical details about the format of a specific tuning message, see that message in either the "SUPPORTED PARAMETER NUMBERS" section or "SUPPORTED SYSTEM-EXCLUSIVE MESSAGES" section. __________________________________________________________________________ ABOUT PITCH-BENDING - - - - - - - - - - There is an option (on the "MIDI CC" tab of the configuration window) to have bends of less than 1 semitone up/down be played on an exponential curve. This means that the bend will have to get further away from 0 to have an audible effect. Linear bends from +/- 1 semitone to 0 can sometimes be added by MIDI sequencers to simulate a human voice reaching the correct note, but a human voice moves quickly before slowing down. Therefore, such bends sound unnatural when linear. This option stops tiny bends from being linear. Note that if a bend is used to drastically change the pitch of a note (by a full semitone or more), the bend will be played linearly (as normal). However, this option is disabled by default because it's not the standard way to interpret pitch-bend messages. Notes being released do not have their pitch-bend updated, to avoid a "pinging" artifact if the pitch-bend is reset to 0 while the note is still fading away. Pitch-bending on percussion only affects some instruments (most noticeably hihats and cymbals), and will only have an effect at the start of the note (it won't change throughout the duration of the note). The strongest pitch-bend or modulation capable of being reproduced is about +57.1 semitones (~4.75 octaves). There is no lower limit. Requests to bend outside of the supported range will be capped to that maximum value. Requests to set the pitch-bend sensitivity or modulation depth outside of the supported range will be obeyed, since that doesn't necessarily mean that there will be requests to bend to that maximum value. __________________________________________________________________________ SOUND CHANNEL INFO - - - - - - - - - - Bawami uses 24 sound channels (by default). This means it's possible for a maximum of 24 notes (by default) to be playing at once. You can increase this value, but doing so will increase the CPU usage. When a new note needs to play, Bawami chooses which channel to play the note on like so: Firstly, it looks for a completely unused (silent) channel. If there is one, then it uses that channel. If not, then it looks to see if there are any channels playing a note which has been released (and is still fading away) (note: all channels playing percussion are treated this way, meaning that percussion is always treated as being less important than a tone). If there are some, then it uses the quietest one. If there are none, then it simply uses the channel which started playing the longest ago (causing whatever note is currently playing on that channel to be cut). An overview of the sound channels is shown at the top of the window, during playback, as a rectangle split into sections of various colours. The green section represents free channels. A red section represents channels that are currently playing a note that's still being held on (not yet being released). A dark-orange section represents channels playing a "releasing" note (fading away), and a light-orange section (which will be on the right) represents channels playing percussion. If the red section is very big, you're likely to hear notes being cut as channels playing an audible note are re-used to play a new note instead. Much more detailed info can be shown by enabling the internal view "Sound + MIDI channels" (on the "Interface" tab of the configuration window). See "INTERNAL VIEW: SOUND + MIDI CHANNELS" section for more information. __________________________________________________________________________ KNOWN BUGS/ISSUES - - - - - - - - - Messages received during live MIDI input may be lost if an extremely high density of MIDI messages is received (more than 1042 messages per second, i.e. data exceeding the MIDI standard's 31.25 kbps bandwidth) for several seconds, which is only possible with a virtual MIDI device such as MIDI Yoke. If your soundcard's ASIO sample rate is not set to 44100 Hz, then notes will play at the wrong pitch when using the ASIO sound driver. Playback sometimes freezes while browsing for a new MIDI file on single- threaded (not hyperthreaded or multi-core) CPUs. The starts of notes can be affected by sounds that have recently played, causing them to glitch with a "pop" or fade slightly when they shouldn't. A notable example is when a triangle (percussion) plays after a retro snare has played. On slow CPUs (notably Intel Atoms, found in some notebooks), Bawami is severely affected by even the slightest CPU usage by other programs, or when you drag Bawami's window around. It will cause any currently-playing notes (both tone and percussion) to not "animate" smoothly (e.g. kicks will stay high-pitched for too long, and the modulation of any notes using modulation will jump about abruptly rather than cycle smoothly). It is recommended that you set its priority to Realtime to try to minimize the effects. This should not noticeably slow down any other programs you're running in the background, unless Bawami is actually maxing out your CPU. The problem's just that it's too leniant with other programs, offering them CPU time when Bawami needs it more. Similarly, but not to such an extent, power-saving features that lower the clock speed of the CPU (Windows 7 does this by default for laptops running on batteries) can make playback a little less smooth on slow CPUs. NOTE: This list of problems is not intended to be complete. You use Bawami at your own risk. I won't be held responsible no matter what happens as a result of using my program, including, but not limited to, damage occuring to your sound system, the program shouting offensive words at you, your computer becoming infected with viruses, NSFW images being displayed while you're at work, or your computer melting into a pile of fail. If you're not happy about this, I'm not stopping you from finding another program to use (in fact, I recommend GASHISOFT's GXSCC, which was the inspiration for this program). Or, you could make your own program instead. (Seriously, try it - it's fun!) __________________________________________________________________________ STILL TO DO - - - - - - Roughly in the order in which I intend to do them: - Add the ability to load my Bleeper Music Maker-format files. - Add support for more percussive instruments, and an entire percussion instrument file format. __________________________________________________________________________ CREDIT - - - - - Programmed by Robbi-985. - Inspired by GASHISOFT's GXSCC. - Mabry Software's MIDI libraries are used for reading MIDI files. - Firelight Technologies's FMOD Sound System is used for producing sound. - Code by Andrew Novick is used for setting priority of processing thread. - Logix4U & Highresolution Enterprises's InpOut32 and ported InpOutx64 are used for direct PC speaker control. - Steve McMahon's subclassing code is used for some controls. - vbAccelerator's high-resolution timer is used as playback timing system. - Code by Unicontsoft is used while preparing DLL/OCX files on first run. - Kliu's FontReg is used for installing fonts during first run. - Code by VB OffBeat is used for custom menus. - Code by BobRodes is used for overriding charset, etc, on message boxes. - Charles M helped test/debug many parts. - Tails07 provided a huge number of MIDI files for testing. - Code by Karl E. Peterson is used to find an old instance of Bawami. - For OGG files, libogg is used; Copyright (c) 2002, Xiph.Org Foundation. - Carles P.V.'s slider is used on "Override Other Controls" window. - Uses chorus plugin by TAL - Patrick Kunz (http://kunz.corrupt.ch/). __________________________________________________________________________ If you have questions, suggestions, bug reports, etc, please email: robbi985@gmail.com For updates or to re-download, please check: http://somethingunreal.homeip.net/hosted_programs/update/bawami