 About String Section

String Section is a program to maintain the text strings contained in any standard Midi file.  It can create any kind of string supported by the Midi standard, and insert them in any existing track (including track 1).  It can alter any existing string to be of any length, or delete the string entirely from the file.  The original file is never overwritten, making it impossible to lose important Midi data.

Contents:	Text Strings

Opening a File

The Screen Display

Editing Existing Strings

Adding New Strings

Deleting Strings

Saving the Edited File

File Information

Registering String Section

Order Form

Next: Opening a file


Opening a file

Choose the File top-level menu item and Open from its menu.  A standard file chooser dialog box will come up, allowing you to choose file for String Section to use.  Midi files usually have .MID extensions, but others are possible, such as .MFF, or .SMF.  If the file is opened successfully, then the screen will show each track, and all of the strings contained in them, with their type.  If the file does not contain Midi data, then an error message will say so.

Next: The screen display


The screen display

When a Midi file is opened the strings contained in the file are displayed in the main window, which is scrollable if there are more strings than will fit on one screen.  Track headers are shown, and within a track, each string is preceded by its track time and its type label.  Note that a track may have no strings.  The string is shown in an edit box which is almost the full width of the window.  The box automatically resizes itself if the window is resized.  If the string is longer than the length of the box, the right-hand portion may be viewed by clicking on the edit box, and using the cursor keys to move the string to the left.  In particular, the End key will take the cursor to the end of the string. Below is a part of a typical screen, showing two track headers, with Seq/Trk Name and Copyright edit boxes.  Note the cursor in the Copyright edit box for track 1.  To help attaching times to text "events", changes in time signature are also shown.  In Type 1 Midi files (see the Standard Midi File), these are usually confined to the first track, which should not contain any note data.

The times attached to events in the file are shown to the left of the text type label.  New text strings must have an attached time.  This is shown by the three spin controls in the control bar at the top of the screen.  Each of the three controls may be adjusted independently.  They represent the measure number, the beat number and the click number of the event.  The minimum values are 1, 1, and 0 respectively.  The maximum value of the beats is given by the numerator of the current time signature (which may vary throughout the file).  The maximum value of the clicks control is the number of clicks per quarter note, adjusted for the denominator of the time signature.  If the time signature is 6/8, and the resolution is 192 clicks per quarter note, then the maximum value of clicks per beat is 96 (for 1/8th notes).

There is no theoretical maximum of the measure number, but an internal maximum of 32,767 is imposed by the program.  The spin controls prevent an invalid M/B/C triple from being "dialed up".

Next: Editing Existing Strings


Editing existing strings

A string that is displayed in the window may be edited by first clicking anywhere in the edit box.  A flashing cursor will appear, and this is the insertion point.  Characters may be inserted by just typing them, on the keyboard, and deleted by using the Delete and/or ← (backspace) keys. Home takes the cursor to the start of the string, and End to the end.  There is no Undo, so care should be taken to preserve characters if necessary.

Next: Adding new strings


Adding new strings

The Insert option from the Edit top-level menu item allows you to add new strings.  First, either a string must be selected, by clicking anywhere on it, or a track may be selected by clicking on its button.  If a string is selected, a new string is created after the selected one, in the track of the that string, at a time given in the M/B/C spin controls.  If a track is selected, then the string is placed in the track at a time given in the M/B/C spin controls.  In either case, if the time shown in the M/B/C spin controls is invalid, the new string will not be created.  This can occur if the number of beats shown is too many for the time signature of that measure, or if the time shown does not lie between the times of the selected string and the next one.

Insert gives a further menu of string types.  These are (see Text Strings for more detail):

1.	Text: Any text may be used here.  Typically used for comments or notes.

2.	Copyright: Used for the all-important copyright notice.

3.	Seq/Trk Name: Used for a sequence or track name, rather than just relying on the track number.

4.	Instrument: Used for the instrument, or patch name.

5.	Lyric: Used for lyrics.

6.	Marker: Used for rehearsal marks or other annotations.

7.	Cue Point: Used for synchronization with other musical or video sources.

8.	Other... Any other types can be added with a number between 8 and 15. A dialog box comes up for the number of string type to use.

Although these are the intended uses of text strings in Midi files, there is actually no requirement to keep to these uses.  A sequencer program will typically only use Seq/Trk Name or Instrument, and will ignore the others.

Next: Deleting strings


Deleting strings

The Delete option from the Edit top-level menu item allows you to remove strings from the file.  First, a string must be selected by clicking anywhere on it.  Selecting Delete from Edit will then remove the selected string from the file. You cannot delete a track by selecting it, and then selecting Delete.  If neither a string nor a track is selected, no action is allowed.  Confirmation is requested in a Yes/No dialog before actually deleting the string.  There is no Undo, so care should be taken when deleting strings.

Next: Saving the edited file


Saving the edited file

When all the strings in the file have been edited satisfactorily, the file may be saved by choosing the Save as... option from the File top-level menu item.  Note that you will have to choose another file name than the file being edited.  This prevents accidental destruction of the original file.  Of course you can type in the same file name as the original, and choose to overwrite it if you wish.

A check box in the control bar allows you to save the file with or without running status.  When checked, running status will be used; when not checked, running status will not be used.

Next: File Information


File Information

Information about the currently displayed file can be obtained by selecting File Info from the File top-level menu item.  The information displayed is obtained from the file header:

•  File name

•  File format (0, 1 or 2)

•  Resolution in clicks per quarter note

•  Number of tracks in file

•  Number of measures

Although the data presented here are usually accurate, some Midi files may be badly behaved.  In particular, the number of measures is taken from the time attached to the end-of-file meta-event, and can contain garbage.  In this case the field might show a number higher than the actual number of measures as given by the note events in the file.

Back: About String Section


Registering String Section

Please read the Disclaimer and Copyright notices before continuing.

String Section is distributed as shareware only. The marketing concept known as 'shareware' allows you to evaluate a working program to determine what it is worth to you, and then buy it if you are going to use it.  String Section is not a free program.  If you still use it after thirty days, please register  String Section by sending me $19 US. Upon registering, you will receive your personal Registration Information.  You are strictly prohibited from giving this Registration Information to anyone in any format whatsoever.  Distributing this information would immediately void your license.

Registering the shareware version entitles you to free consultation on String Section.  You may also download free updates to future shareware versions.

Please help me distribute String Section  (shareware version only) as widely as possible by making sure all of your favorite bulletin boards have a current copy of the STRSECT.ZIP archive file. You may freely distribute String Section as long as you include only the unmodified STRSECT.ZIP (i.e., the unregistered shareware version) and you charge no money except for a maximum copying fee of $5 US. You may print a copy of the order form by using the Print option when displaying the topic Order Form.

If you wish you may register String Section on-line on Compuserve (GO SWREG). The registration ID is 4406.  Just follow the directions provided in the SWREG forum to complete the registration process.

Next: Order Form


Order form

Print It!

PO Box 4017, University Park

Las Cruces, NM 88003

Tel: (505) 527-1036

Order form for String Section

Name:

Address:

City:

State:    	           Zip:

Date:

Dear Makin' Tracks:

Please send me registration information for String Section.  I understand that this entitles me to free consultation on the use of the program, and free future updates to the shareware version.  Please also send me information on other Makin' Tracks software for MIDI applications.

I enclose a personal check or money order for $19 US.  Please send the information to the above mailing address.

Sincerely,


Disclaimer

String Section is provided as shareware with the following limitations:

This program is shareware and is not to be resold or distributed for sale with other programs which are for sale.  There is no warranty or claim of fitness or reliability. The programs are distributed as is, and as such neither the author nor Makin' Tracks shall be held liable for any loss of data, down time, loss of revenue or any other direct or indirect damage or claims caused by this program.


Copyright

This program is Copyright (C) 1991-1994 by Roger T. Hartley, Makin' Tracks.  All Rights Reserved.


The Midi Standard

A standard for the interchange of musical performance data between Midi-compliant devices.  These include synthesizers, keyboards, wind (and other musical input) controllers, drum machines, sequencers, and computers.  Midi data is a byte level protocol for serial transmission, and contains commands for note-on and note-off events, as well as alteration of performance data such as instrument type, tempo, velocity and volume control.  The standard is published by the International Midi Association as The official MIDI 1.0 specification, which also contains the definition of standard midi files.  It is available from:

IMA

the International MIDI Association

11857 Hartsook St.

North Holllywoood, CA  91607

(818) 505-8964

Bob McQueer has also written a commentary on the specification, as well as a primer, both of which are available online.  A good place to start is the midi archive at ftp.ucsd.edu, available for anonymous login.  I can also provide copies of these documents upon registration of String Section.


Standard Midi File

The standard MIDI file format describes  MIDI files that contain one or more MIDI streams, with time information for each event.  Song,  sequence, and track structures, tempo and time signature information, are all supported.  Track names and other descriptive information may be stored with the MIDI data as text strings.  This format supports multiple tracks and multiple sequences so that if the user of a program which supports multiple tracks intends to move a file to another one, this format can allow that to happen.

Standard Midi files can be either type 0, type 1, or type 2.  Type 0 files consist of a single track that contains all the note data for a single performance.  Typically demonstration pieces are packaged as type 0 files.  More common, however, is the type 1 file that consists of a single performance that is split into any number of tracks, the first of which (track 1) is reserved conventionally for tempo, meter and key changes.  It contains no note data.  Again, conventionally, the subsequent tracks (from 2 onwards) each contain data for a single instrument, probably playing on a single Midi channel.  Type 2 files are like type 1, except that they contain any number of separate performances.

Apart from the official specification (see The Midi Standard), an in-depth description of the specification can also be found  in the article "Introducing Standard MIDI Files", published in Electronic Musician magazine, April, 1989.


Event

An event is a specification of some action to be carried out by a sound module.  Every event is tagged in the file with a value interpreted as the time difference in clicks from the previous event.  Most events are either note-on, telling a particular pitch to start sounding with a particular strength, or note-off, telling the pitch to stop sounding.  Other common events are various types of controller, which are the digital counterparts of volume pedals, pitch-bend wheels, breath strength, and many others.  See the Midi standard for more detail.


Text Strings

In standard Midi files, all text strings are meta-events that are like performance events (such as note-on) in that they are attached to a particular time in the sequence.  They are unlike performance events in that they do not have a real-time performance counterpart.  i.e. they cannot be 'played'.

The types of text meta-event are:

1. Text Event

2. Copyright Notice

3. Sequence or Track Name

4. Instrument Name

5. Lyric

6. Marker

7. Cue Point

In addition types 8 through 15 (unnamed) can be used for arbitrary purposes.

Next: Opening a file


Text event

Any amount of text describing anything.  It is a good idea to put a text event right at the beginning of a track, with the name of the track, a description of its intended orchestration, and any other information which the user wants to put there.  The text in this event should be printable ASCII characters for maximum interchange.


Copyright Notice

Contains a copyright notice as printable ASCII text.  The notice should contain the characters (C), the year of the copyright, and the owner of the copyright.  If several pieces of music are in the same MIDI file, all of the copyright notices should be placed together in this event so that it will be at the beginning of the file.  This event should be the first event in the first track chunk, at time 0.


Sequence or Track Name

If in a format 0 track, or the first track in a format 1 file, this should be the name of the sequence.  Otherwise, it should be the name of the track.


Instrument Name

A description of the type of instrumentation to be used in that track. Typically this is a patch name (e.g. one of the General Midi names) or a patch number on a specified sound module. It may be used with the MIDI Prefix meta-event to specify which MIDI channel the description applies to, or the channel may be specified as text in the event itself.


Lyric

A lyric to be sung.  Generally, each syllable will be a separate lyric event which begins at the event's time.


Marker

Normally in a format 0 track, or the first track in a format 1 file, this is the name of that point in the sequence, such as a rehearsal letter or section name ("First Verse", etc.).


Cue Point

A description of something happening on a film or video screen or stage at that point in the musical score ("Car crashes into house", "curtain opens", "she slaps his face", etc.)  This can be used by programs that synchronize video and music, since the time of the event can be translated into SMPTE or Midi Time Code.


Clicks

Midi events are timed with a quantum called a click.  The length of a click can be varied, but is actually specified as a fraction of a quarter note.  The tempo of the piece, in quarter notes per minute, then determines how long a click is.  Different software programs, and hence the standard Midi files they produce, can utilize different click resolutions, from 24 (very low) to 1024 or more (very high).  A typical value is 192.  At a tempo of 120 beats (quarter notes) per minute, a click has the length 60 / 192 / 120 * 1000000, or approximately 2604 microseconds.


Spin Controls

A Spin Control is a type of non-standard interface control used for choosing a number to be used by the program.  It is a normal edit box, with the addition of two small buttons on its side for incrementing or decrementing the number.  In String Section, the spin controls operate as follows:

•  the number shown may be incremented by a single click on the up-arrow with the left mouse button.

•  the number shown may be decremented by a single click on the down-arrow with the left mouse button.

•  the number shown may be continuously incremented or decremented by clicking on the appropriate arrow with the left mouse button and holding it down.  When the desired number is reached, the button may be released.

•  the number may be altered by highlighting it in the edit box, and typing a new number, and pressing Enter.  Incorrect characters (e.g. alphabetic) will not be accepted, and the edit box will remain unchanged.


Running Status

The number of bytes recorded for a sequence of similar events in a Midi file may be minimized by omitting the event codes (one byte each) for all events except the first one in the sequence.  No data is lost; the size of the file is just smaller by the number of event code bytes saved.