Mechanical Music Digest  Archives
You Are Not Logged In Login/Get New Account
Please Log In. Accounts are free!
Logged In users are granted additional features including a more current version of the Archives and a simplified process for submitting articles.
Home Archives Calendar Gallery Store Links Info
MMD > Archives > February 2005 > 2005.02.25 > 15Prev  Next


Troubleshooting MIDI Wireline Problems
By Bob Lang

Some of the information below may be of interest to the person who was
asking, "What is MIDI?"

MIDI 1010101 -- Introduction

Do you have any of the following problems when controlling your MIDI
equipment from a computer?  Are your track volumes incorrect or
different each time you play a song?  Does you synthesizer fail to
respond properly to SysEx dumps from the computer?  Are you having
trouble switching to RAM/ROM card sounds from your computer sequencer?
If you have any of these problems or just want some MIDI basics, then
read on.

MIDI basics --

Table 1. Some Common MIDI Commands

DESCRIPTION             STATUS BYTE     DATA BYTES
Note off                        8m              nn pp
Note on                 9m              nn pp
Controller                      Bm              rr ss
Program/Patch Change    Cm              qq
Pitch Bend                      Em              ss ss
SysEx Start                     F0
SysEx End                       F7

where:  m= a MIDI channel number, 0-F hex, 0-15 decimal

nn = A MIDI note number, 0-7F hex, 0-127 decimal.  Middle C is 60
decimal.

pp = Note velocity, 0-7F hex, 0-127 decimal.  pp = 40 decimal,
ff = 90 decimal.

qq = Program or patch number to change to, 0-7F hex, 0-127 decimal.
Harpsichord = 6 decimal, violin = 40 decimal in General MIDI
standard.

rr = Controller number, 0-7F hex, 0-127 decimal.  Volume = 7 decimal,
Pan position = 10 decimal.

ss = One or two bytes of controller or pitch bend data.  High order bit
in byte is always zero.  Volume = 0-7F, Pan Position = 0-7F,
Pitch bend = 0-7F7F.

MIDI information is sent through the connecting cables serially, that
is one bit at a time.  When an instrument receives a MIDI command such
as "note on" it must receive the eight bits of information that makes
up the "note on" command, decode it and act upon it.  MIDI commands are
divided into status and data bytes.  A byte is 8 bits of information.
Status bytes always have high order bit equal 1.  Data bytes always
have the high order bit equal zero.  The following is the string of
bits that will start a middle C with a velocity of pp on MIDI channel

1.
    _________________________________
    |   |   |   |   |   |   |   |   |
    | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |  8 binary bits = 1 status byte
    |   |   |   |   |   |   |   |   |
    |       9       |       1       |  hex
    |               |               |
    |              145              |  decimal
    _________________________________
    |   |   |   |   |   |   |   |   |
    | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 |  8 binary bits = 1 data byte
    |   |   |   |   |   |   |   |   |
    |       3       |       C       |  hex
    |               |               |
    |               60              |  decimal
    _________________________________
    |   |   |   |   |   |   |   |   |
    | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |  8 binary bits = 1 data byte
    |   |   |   |   |   |   |   |   |
    |       2       |       8       |  hex
    |               |               |
    |               40              |  decimal


There are several "problems" that have to do with the serial nature of
the MIDI data link.  Two things to keep in mind are that MIDI is
processed sequentially and it stays in effect until it is counteracted
by another command.  The following are a list of "problems" that result
from not understanding the serial nature of the MIDI link.  All
examples are for an Ensoniq SQ-2.

Track volumes are not correct --

Track volume is controlled with MIDI controller #7.  When your computer
sequencer sends a MIDI volume control change, it stays in effect until
it is changed by another volume control command, the synthesizer is
powered down or the computer sequencer is restarted.  What can easily
happen is that Track X on one song is sent volume control command for
Pianissimo pp (data value 40  decimal).  If the next song that is
played does not have a specific volume control command for Track X,
then the Ensoniq will remember the Pianissimo from the previous song.
This can be quite disturbing if you were expecting the default triple
forte fff setting.  It is therefore not wise to assume anything about
MIDI volume control settings and start each track in a song with the
initial volume control command you want for the track.  That way you
can not go wrong.

Track volume is correct, but cannot hear instrument --

In addition to track volume, each individual "note on" command has
velocity information which is a measurement of playing force.  If the
track volume is set properly and the notes are not playing at the
proper volume, check the velocities in the "note on" commands.  If they
are set low, increase their values.

If the velocities are set to zero, the notes will not play at all.
Many computer sequencers have a way to set all note velocities to a
certain value or increase all velocities by a certain value.  Try
applying an adder to the existing note velocities.

Synthesizer fails to respond to SysEx dumps --

If your Ensoniq synthesizer completely ignores your attempts to dump an
Internal Sound Bank Dump or other SysEx file from your computer to your
synthesizer, check the MIDI channel number of the dump. The SysEx dump
contains the base MIDI channel number-1 that was used when it was
dumped to the computer as the fifth byte.  See Table 2.  If the base
MIDI channel setting of the Ensoniq is changed after the SysEx dump to
the computer, then the Ensoniq will ignore any attempt to load the file
onto the Ensoniq because of the MIDI channel mismatch.  The quickest
solution is to reset the Ensoniq base MIDI channel to the original base
channel.  Press EDIT/SOUNDS followed by BANK 9, SCREEN 0 to see or
change the base MIDI channel.

Table 2.  First Few Bytes of Internal Sound Bank Dump SysEx file

F0  0F  06  00  00  03 ...
                 ^
                 | Channel number - 1

Error message when transferring SysEx dumps --

If you get an error message when copying a SysEx file from the computer
to the Ensoniq, you may have sent the data too quickly for the Ensoniq
to absorb it all.  Most dump programs have an adjustable time delay
between blocks of data.  Try slowing down the data transmission by
increasing the delays between data blocks.   Some synthesizers have
trouble accepting MIDI dumps as fast as the computer can send them.  I
have not observed the problem in going in the opposite direction from
the synthesizer to the computer.

Trouble in switching to RAM/ROM card sounds --

The Ensoniq SQ-2 synthesizer allows you to access 80 instrument patches
and 20 drum patches in ROM memory and an additional 80 instrument
patches in internal RAM and an additional 160 instrument patches in
RAM/ROM cards.  Since the MIDI program change command only allows
instrument patches from 0 to 127, how are these 340 patches selected?
First, the default is to select the 80 internal RAM instrument patches
and the 20 drum patches.  If you wish to access any of the other
patches you must have your computer send two program change commands.
The first program change is shown in Table 3 and selects from one of
four sound sources  The second program change just selects the
instrument patch in the range of 0 to 79.

Table 3. First Program Change to Select Sound Source

HEX     DECIMAL ACTION
7C      124             Internal RAM sounds
7D      125             Internal ROM sounds
7E      126             Card A Sounds
7F      127             Card B Sounds

This seems straightforward.  If I am using the Sound Source Unlimited
Top 40 card and I want to select Alpine Horns (patch #36 decimal or 24
hex) I need to send C1 7E C1 24 bytes to the Ensoniq.  A problem arises
with some computer sequencers.  On some sequencers you simply assign a
patch number to a track.  But I have two patch numbers I need to send,
7E and 24.  I tried setting a patch of 24 to the track and then
manually inserting a patch change of 7E first thing in the track.  This
did not work because the sound source select (7E) must be sent before
the instrument patch select (24).

The solution is to insert both the 7E and 24 manually in the sequence
in the proper orrder and leave the track instrument select set to 0.
Also remember that like the other MIDI commands such as volume control
the sound source select stays in effect until the Ensoniq is powered
down.  So if you are using the Alpine horns on Track X in one song and
you change songs, remember you will still be getting a Sound Source
Unlimited Top40 sound for Track X unless you specifically change the
sound source by resending one of the program changes shown in Table 3.

Conclusion --

So there you have it, the "problems" described above are not really
problems, merely difficulties one may get into by not considering the
way MIDI works.

Robert B. Lang Jr.

 [ Read Bob's articles about the Mini MIDI Monitor and MIDI controlled
 [ xylophone and harpsichord at http://www2.netdoor.com/~rlang/
 [ -- Robbie


(Message sent Fri 25 Feb 2005, 20:02:26 GMT, from time zone GMT-0600.)

Key Words in Subject:  MIDI, Problems, Troubleshooting, Wireline

Home    Archives    Calendar    Gallery    Store    Links    Info   


Enter text below to search the MMD Website with Google



CONTACT FORM: Click HERE to write to the editor, or to post a message about Mechanical Musical Instruments to the MMD

Unless otherwise noted, all opinions are those of the individual authors and may not represent those of the editors. Compilation copyright 1995-2024 by Jody Kravitz.

Please read our Republication Policy before copying information from or creating links to this web site.

Click HERE to contact the webmaster regarding problems with the website.

Please support publication of the MMD by donating online

Please Support Publication of the MMD with your Generous Donation

Pay via PayPal

No PayPal account required

                                     
Translate This Page