Method for encoding music printing information in a MIDI message

AbstractA system and method of communicating music printing information using a minor enhancement to the conventional MIDI standard. This method degrades the communication of traditional MIDI command information or parameters by a small amount, but allows the inclusion of information important to music printing. MIDI compatible equipment that does not recognize the enhanced encoding can still utilize MIDI information that includes the enhanced encoding with minimal degradation of the performance information. In particular, the system method is useful for encoding enharmonic pitch encoding in the low order bits of MIDI note-on velocity information. The general method can be utilized to encode a wide variety of printing information in one or more selected MIDI control commands.Claims

What is claimed is:

1. A method of encoding parametric musical printing information in a MIDI message where a digital message representing a MIDI parameter of a selected note is encoded with a binary code by substituting selected bits of said digital message with said binary code, said method comprising:

selecting at least one musical parameter related to music printing, said parameter capable of being described by a finite, integral number of states;

defining said binary code for each said state of said at least one musical parameter; and,

selecting said MIDI parameter from one of a note-on velocity parameter, a note-off velocity parameter, a polyphonic key pressure parameter, a channel pressure parameter or a control change parameter, said MIDI parameter not otherwise used for communicating information about said at least one musical parameter, said selected bits of said digital message being selected from one of a representation of least significant bits or a representation of undefined bits of said selected MIDI parameter for said note.

2. The method of claim 1 wherein said at least one musical parameter related to music printing is an enharmonic spelling of said note.

3. The method of claim 2 wherein said selected MIDI parameter is said note-on velocity parameter.

4. The method of claim 2 wherein said selected MIDI parameter is said note-off velocity parameter.

5. The method of claim 3 wherein said binary code is defined as a two bit code encoded in bits representing two least significant bits of said digital message representing said note-on velocity parameter for said note.

6. The method of claim 4 wherein said binary code is defined as a two bit code encoded in bits representing two bits of said digital message representing said note-off velocity parameter for said note.

7. The method of claim 1 wherein said at least one musical parameter related to music printing is selected from the group consisting of slur information, stem direction information, enharmonic spelling, dynamic marking, crescendo and decrescendo, musical text directions, transposition by octave, and direction markings.Description

FIELD OF THE INVENTION

This invention relates to a method and system of encoding one or more types of parametric information in conventional MIDI information. In particular, this invention relates to a method and system of encoding and using enharmonic pitch spelling information with a MIDI system.

BACKGROUND OF THE INVENTION

Common Musical Notation (CMN)

The modern system for notating the music of Western Civilization, referred to here as Common Musical Notation (CMN), has a long and distinguished history. The origins of the modern system can be traced as far back as the 10th Century AD with notation of early church chant. These simple melodies were made up entirely of the notes of what we today call the diatonic scale. This is the origin of the “white” keys on the modern keyboard. Early chant was not composed in what we today call the major-minor system of keys but rather in an older system call modes. All modes used the same diatonic scale tones, but each mode started at a different degree (note) of the diatonic scale. Thus, for example, the Dorian Mode started on what we today call the diatonic pitch of D and consisted of the notes, D, E, F, G, A, B, C. This mode sounds a lot like the modern key of D minor, but includes a “raised” sixth degree (the note B instead of the B-??that would be called for in modern D minor.

The system for notating pitch in chants and other early music was quite simple. A set of lines was drawn (sometimes four, sometimes five, sometimes more than five), and the degrees of the scale were represented as positions on the lines or on the spaces in between them. This is the origin of our modem five-line staff system. In the case of the Dorian mode referred to above, the notation of the scale would look as shown in FIG. 1.

The important thing to notice is that each degree (note) of the scale has a position that is one level higher than the previous degree, but that the actual size of musical interval between two consecutive degrees is not the same in all cases. For example, the size of musical interval between D and E is what we today call a whole step. In terms of sound frequency, the pitch E is on the order of 12.24 percent higher than the pitch D (the actual size will depend on the system of tuning used). The size of the musical interval between E and F is what we today call a half step. In terms of sound frequency, the pitch F is on the order of 5.94 percent higher than the pitch E. To restate the point in another way, the levels on the musical staff do not all represent the same size musical interval.

The modern system of major-minor keys, which is the basis of practically all music written and/or performed today (both classical and popular), grew out of the earlier modal system. What allowed the major-minor system to develop was the ability to alter selectively the basic pitches of the modes either by raising them with what we today call a sharp (#), or lowering them with what we today call a flat (??. The amount by which a pitch is raised or lowered by a sharp or a flat is a half-step, about 5.94 percent of the base (starting) frequency. The Dorian scale in the previous example can be made into a D-minor scale by flatting the B. In CMN the flat is put in front of the note making the scale shown in FIG. 2.

For the purpose of this discussion, it is important to note that raising the A in the example above with a sharp will produce a pitch (musical frequency) which is almost identical to the pitch (musical frequency) arrived at by lowering the next consecutive note B with a flat. In the even-tempered system of tuning, these frequencies are identical, but in a non-tempered system these frequencies are only close, not identical.

Tuning Systems and Modern Keyboard Instruments.

It is beyond the scope of this application to present a full explanation of the problem of tuning. Such a discussion would involve the theory of musical intervals and their relationship to musical harmonics. Suffice it to say that over the course of the development of Western music (principally the 14th through the end of the 17th centuries), several systems of tuning were devised and used. With the advent of the modern major-minor system of scales and keys toward the very end of the 17th century, the need developed for a tuning system in which the size of any particular musical interval would be the same (in terms of the ratio of sound frequencies) for all musical scales and keys. The system which does this is called the Even-Tempered System of tuning. In this system, all half-steps are the same size, and there are twelve of them in an octave. Since an octave is the interval between two pitches whose ratio is 2 to 1, the size of the half-step interval in the Even-Tempered System is the twelfth root of two, or approximately 1.059463 to 1.

With the acceptance of the Even-Tempered System, it became possible to standardize, once and for all, the configuration of the keyboard (piano, clavichord, harpsichord, organ). This configuration, with accidentals (i.e., modifications to the principal degrees, e.g. C#, D#, F#, G#, and A#) being represented by shorter, thinner keys (the “black” keys) placed between wider, longer keys (the “whim” keys), had already developed over the course of the previous 5 centuries as the primary layout of the musical keyboard. In this configuration, there is only one key (a “black” key) for the musical pitches notated as C-# and D-?? and in the Even-Tempered System of tuning, these musical pitches have the same frequency. Likewise with the other “black” keys of the keyboard: i.e., D-#=E-?? F-#=G-?? G-#=A-?? and A-#=B-?? This “alternate spelling” of frequency-equivalent pitches is not limited to the black keys of the keyboard. There are, in fact, an infinite number of pitch spellings for each pitch as defined by musical frequency. The note A4, which in modern American tuning is the pitch of 440 Hertz (444 in Europe), can alternatively be spelled F4-#-#-???? G4-???? A4, B4-???? C5-?????? D5-?????????? In “real-life” situations, it is rare to find more than two sharps or flats attached to a primary degree (note letter).

MIDI representation of pitch.

The Musical Instrument Digital Interface (MIDI) standard for representing musical events developed originally as a convention for communicating between electronic instruments. Since the primary (and musically most sophisticated) electronic instrument was the music (piano) keyboard, a system was devised to represent all possible (musically “likely”) keys on the keyboard. The note, middle C, normally designated C4, was assigned the number 60. Each successive key above C4 was assigned a successively higher integer, and each successively lower key was assigned a successively lower integer. This system has served its original purpose well, since each note (key) on the keyboard has one and only one number associated with it.

The Problem with MIDI and the printing of music

The MIDI Interface

The MIDI system is well known. A wide variety of instruments and MIDI-compatible devices have been patented. For a good general background on the MIDI system, see U.S. Pat. No. 5,208,421 by Lisle et al, a portion of which is reproduced here.

MIDI was established as a hardware and software specification which would make it possible to exchange information such as: musical notes, program changes, expression control, etc. between different musical instruments or other devices such as: sequencers, computers, lighting controllers, mixers, etc. This ability to transmit and receive data was originally conceived for live performances, although subsequent developments have had enormous impact in recording studios, audio and video production, and composition environments.

A standard for the MIDI interface has been prepared and published as a joint effort between the MIDI Manufacturer’s Association (MMA) and the Japan MIDI Standards Committee (JMSC). This standard is subject to change by agreement between JMSC and MMA and is currently published as the MIDI 1.0 Detailed Specification, Document Version 4.1, January 1989. Various revisions and extensions of this system have been described in the literature but the basic standard is still followed.

The hardware portion of the MIDI interface operates at 31.25 KBaud, asynchronous, with a start bit, eight data bits and a stop bit. This makes a total of ten bits for a period of 320 microseconds per serial byte. The start bit is a logical zero and the stop bit is a logical one. Bytes are transmitted by sending the least significant bit (LSB) first. Data bits are transmitted in the MIDI interface by utilizing a five milliamp current loop. A logical zero is represented by the current being turned off. Rise times and fall times for this current loop shall be less than two microseconds. A five pin DIN connector is utilized to provide a connection for this current loop with only two pins being utilized to transmit the current loop signal. Typically, an opto-isolator is utilized to provide isolation between devices which are coupled together utilizing a MIDI format.

Communication utilizing the MIDI interface is achieved through multi-byte “messages” which consist of one status byte followed by one or two data bytes. There are certain exceptions to this role. MIDI messages are sent over any one of sixteen channels which may be utilized for a variety of performance information. There are five major types of MIDI messages: Channel Voice; Channel Mode; System Common; System Real-Time; and System Exclusive. A MIDI event is transmitted as a message and consists of one or more bytes.

A channel message in the MIDI system utilizes four bits in the status byte to address the message to one of sixteen MIDI channels and four bits to define the message. Channel messages are thereby intended for the receivers in a system whose channel number matches the channel number encoded in the status byte. An instrument may receive a MIDI message on more than one channel. The channel in which it receives its main instructions, such as which program number to be on and what mode to be in, is often referred to as its “Basic Channel.” There are two basic types of channel messages, a Voice message and a Mode message. A Voice message is utilized to control an instrument’s voices and Voice messages are typically sent over voice channels. A Mode message is utilized to define the instrument’s response to Voice messages. Mode messages are generally sent over the instrument’s Basic Channel.

A variety of Channel Messages are among the most-frequently used signals in a typical MIDI system. These signals include “note on”, “now off”, pitch, and velocity (how hard a particular note is struck or plucked). These signals are utilized for transmission of almost every note of a performance. “After touch” may be used with every note in some circumstances and never used in other circumstances. Other signals may be used more or less frequently, depending on the nature of the instrumentation and performance. General loudness settings (piano, mezzoforte, etc.) and voice changes are sent as needed. Pitch bend or modulation commands may be sent occasionally, phrase-by-phrase or note-by-note as called for in a specific performance, transcription or sequence.

System messages within the MIDI system may include Common messages, Real-Time messages, and Exclusive messages. Common messages are intended for all receivers in a system regardless of the channel that receiver is associated with. Real-Time messages are utilized for synchronization and are intended for all clock based units in a system. Real-Time messages contain status bytes only, and do not include data bytes. Real-Time messages may be sent at any time, even between bytes of a message which has a different status. Exclusive messages may contain any number of data bytes and can be terminated either by an end of exclusive or any other status byte, with the exception of Real-Time messages. An end of exclusive should always be sent at the end of a system exclusive message. System exclusive messages always include a manufacturer’s identification code. If a receiver does not recognize the identification code it will ignore the following dam.

As those skilled in the art will appreciate upon reference to the foregoing, musical compositions may be encoded utilizing the MIDI standard and stored and/or transmitted utilizing substantially less than data than would otherwise be required. The MIDI standard permits the transmittal of a serial listing of program status messages and channel messages, such as “note on” and “note off” and as a consequence require substantially less digital data to encode than the straightforward digitization of an analog musical signal. Using the MIDI system provides additional advantages including the ability to transmit the MIDI signals to a variety of MIDI-compatible devices to allow simultaneous translation of a single signal for multiple purposes and also to allow mixing signals to a variety of devices on a single signalling connection.

Extensions to MIDI

The MIDI standard was originally designed for communication between electronic instruments. About the time it was being developed, however, it was also becoming clear to many people that not only could one musical instrument be used to control another, but musical instruments themselves could be controlled by computer. Put another way, a sequence of electronic (MIDI) commands that might be generated (in a performance) on a musical keyboard could also be generated by computer. The receiving instrument has no way to know what the origin of the commands is (computer vs. live performance). In a similar manner, the “sending” instrument knows nothing about the nature of the “receiving” instrument under the MIDI standard. It is therefore possible for the receiving instrument to be a computer, which is actually recording (receiving and storing) the MIDI signals from the sender. In this way, a musical performance (defined as a series of physical gestures on an electronic keyboard), can be recorded (received and stored) on a computer and later played back on (sent to) the same keyboard or some other sound generating device which “understands” MIDI commands.

With the advent of “MIDI” recordings and simulated recordings compiled by software, the need arose to find a way to pass this data from one computer to another. Also there were several descriptive aspects of the music not originally representable by the initial MIDI standard which people wanted to include in their files. Among these aspects are the key of the piece (number of sharps and flats), the mode (major or minor), the time signature, the tempo, musical lyrics, and other attributes. An extension of the original MIDI standard was developed for passing this information.

MIDI and the spelling of musical pitches

There is, however, one aspect of the music which has not been addressed by and is not included in this standard, and for a very good reason. This aspect is the spelling of the musical pitches. This information: (1) does not come from a live performance, since the configuration of the musical keyboard does not distinguish between the spelling of pitches (e.g. C-# and D-??are the same key); and (2) is irrelevant in a playback performance (e.g. an instruction to play a C-# or an instruction to play a D-??would be “routed” to the same pitch on a standard MIDI playback device).

Aside from the fact that pitch spelling is neither “representable” on an electronic keyboard nor relevant to a MIDI playback, there is a technical reason why the framers of the extended MIDI standard did not include this attribute in their specifications. This information preferably should accompany every note that is struck, and the basic MIDI standard for representing “note events” does not allow space for communicating this information. At a minimum, this information should accompany any note which might have ambiguous spelling, particularly if the spelling is inconsistent with the general harmonic structure of the current key signature.

In particular, a note event in the conventional MDI encoding consists of four parts: (1) a time interval; (2) a command; (3) a pitch; and (4) a velocity. Under certain circumstances, the second part a (command) may be omitted. All of the other parts generally are necessary to properly communicate a note event. Referring to FIG. 3, a “note-on” event includes a channel identification (9), a command (turn note on) (9), a pitch (kk), and a velocity (vv). A note event may also include certain optional parts, such as after-touch and pitch-bend.

Each of the note-event parts command, the pitch and the velocity occupy one byte. By convention, each pitch and velocity byte must have its high order (most significant) bit be zero. This limits the range of these attributes to 128 values, i.e., 0 to 127.

The spelling of musical pitches in the printing of music

Although the spelling of a musical pitch generally is irrelevant to an electronic performance, it can be quite important to music printing. A piece of music printed with incorrect spellings is difficult for a musician to read correctly, and can be virtually unreadable in some cases (at least as far as performance of the music is concerned). Under the current MIDI standard it is not possible to include the information necessary for the proper printing of the music represented. The MIDI standard has become a de-facto method of exchanging musical data; yet no practical method has been devised for communicating the proper spelling of musical pitches, and this limitation has severely limited use of MIDI as far as software for printing music is concerned. Current printing software must make a “guess” about the correct spelling. Experience with entering over 1000 movements of music from the 17th through the 19th centuries shows that while such guessing can produce the correct spelling much of the time, there is still the need for a skilled musician to proof-read the printed output, a tedious and time-consuming process, which itself can never be guaranteed to be error free.

Using MIDI data for music printing

There are several commercially available software programs for printing music which accept MIDI data as a form of input. Each program converts the MIDI data to its own internal format, making guesses in the process about what the correct spelling should be. The notes cannot be printed without making these guesses. For example, the MIDI pitch 61, one half-step above middle C (C4), can be the note C4# or the note D4?? The first of these is printed on a line and the second is printed in a space between lines, each with an independent modifier.

Each program typically produces output in three ways: as musical characters and signs (1) displayed on a CRT screen or flat-panel screen or (2) printed on a page (usually via a laser printer connected to a host computer); and (3) as a file which can be transferred to another hardware device for printing. The display and printing of music cannot be done without hardware, and indeed, the control of that hardware is an important function of the music printing software referred to above.

The Center for Computer Assisted Research in the Humanities is engaged in the compilation of full-text musical databases for general distribution. The primary means of distribution for this data will be the MIDI format. A major application for this data is music printing. The inclusion of pitch spelling information in the two low-order bits of the note-on velocity byte is outside of (has nothing to do with) the MIDI standard, and will be ignored by commercial programs which interpret this data in the standard way. Yet this “hidden” information can be of great value to software programs which know about it and whose purpose is the reconstruction, display and printing of the original music. We regard the inclusion of this information in our data files be an integral part of the process of reconstruction, display and printing of the original music.

SUMMARY OF THE INVENTION

The present invention discloses a system and method of communicating music printing information using a minor enhancement to the conventional MIDI standard. This method degrades the communication of traditional MIDI command information or parameters by a small amount, but allows the inclusion of information important to music printing. MIDI compatible equipment that does not recognize the enhanced encoding can still utilize MIDI information that includes the enhanced encoding with minimal degradation of the performance information.

In particular, the present invention is useful for encoding enharmonic pitch encoding in the low order bits of MIDI note-on velocity information. The general method can be utilized to encode a wide variety of printing information in one or more selected MIDI control commands.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a diatonic, whole note scale in Dorian mode.

FIG. 2 illustrates a diatonic, whole note D-minor scale.

FIG. 3 illustrates MIDI encoding of a typical note-on command, where n is the MIDI Channel number (0-F), kk is the key number (00-7F), and vv is the velocity (01-7F) showing the lowest significant bits which are modified according the method of the invention.

FIG. 4 illustrates pitch spellings for a C-Major scale, together with the notes one and two half-steps above and below each note of the scale.

FIG. 5 illustrates the 12 half-steps of a representative octave together with enharmonic pitch spellings based on flatting the half-step above and sharping the half-note below each reference note.

FIG. 6 illustrates the same spellings shown in FIG. 5 together with a preferred value for ?1,0 for the least significant velocity bits to encode a specific enharmonic coding for each note.

FIG. 7 illustrates the same information in FIG. 6 but underlines the notes of the diatonic scale in the key of E-Major.

FIG. 8 illustrates a table of selected binary equivalents showing how modifying the two low-order bits of the velocity parameter makes only a small change in the perceived volume of an enharmonically encoded note.

FIG. 9 illustrates the same information in FIG. 6 but underlines the notes of the diatonic scale in the key of F-Major.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Background of the Method

For most musical applications today, it is sufficient to represent pitch spellings which fall in the range of two flats to two sharps (thirty-five in all). In any particular octave, these are as shown in FIG. 4.

______________________________________ C-????C-??C C-??C-????D-????D-??D D-??D-????E-????E-??E E-??E-????F-????F-??F F-??F-????G-????G-??G G-??G-????A-????A-??A A-??A-????B-????B-??B B-??B-????______________________________________

For any note represented by a MIDI number, there are three possible pitch spellings within the range of two flats to two sharps. These are listed in FIG. 5 for octave range 60=C4 (middle C) to 71=B4:

______________________________________ 1 /D?

This entry was posted in Handicrafting. Bookmark the permalink.

Leave a Reply

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

*

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