home *** CD-ROM | disk | FTP | other *** search
-
- The mtm program was written by a Mup user.
- It is not supported by Arkkra Enterprises.
-
-
- mtm: Midi to Mup formatter
- --------------------------
-
- NOTE: At present this program is considered to be in beta test.
- I haven't seen any major bugs in a while, and for various
- reasons I'm not likely to put a lot more work into MTM.
- (Mostly because it does about everything I need it to do.)
-
- MTM's major limitation is that it will only read a single
- input note at a time per input track. In other words, no
- chords. I've got some ideas on how to somewhat easily
- accomplish that if someone wants to take the time to do
- it. Contact me for more details if you're interested.
-
- Lastly, no attempt has been made to get mtm to compile
- anywhere but a Sun running SunOS 4.1.X. It should
- probably compile on most or all Unix systems, but few
- have been tested. As for PCs, well you're on your
- own. (Hey, I'm a Unix developer. :-)
-
-
- Compiling
- ---------
-
- First, extract the files into a directory. If you're using
- a Unix system, just type make. You may need to make some minor
- changes if you are using gcc or another compiler.
-
-
- Description
- -----------
-
- Mtm takes midi files as input and creates MUP files as output.
- It allows assigning keys individually to each track, translation of
- track numbers to different staff numbers, header creation, and
- different beamstyles for each time signature. However, despite all the
- limitations I list below, mtm has saved me tens of hours of work
- entering notes. I do a lot of complex brass quintet arrangements, and
- with mtm, it generally takes me fifteen minutes cleanup on a 350 bar
- piece as opposed to three-four (or more!) hours of note entry.
-
- Limitations
- -----------
-
- Lots of them:
-
- o mtm accepts only one note per track at a given tick.
- No chords.
-
- o Notation is sometimes awkward. For example, within a
- single measure, a dotted half is always a dotted half,
- even if it starts on an eighth note boundary.
-
- o Accidentals may be handled awkwardly. In a sharp key,
- all notes are output as sharps, in a flat key, flats.
- No double flats/sharps output, ever. And MTM doesn't
- understand enharmonic notation. No attempt is made
- to look at the context of a note.
-
- o On a similar, er, note, mtm puts in too many accidentals.
- I found at one point that it was missing accidentals, and
- so the current code guards against that. Unfortunately
- the cure presents other problems. The good news is that
- the new problems are a lot easier to find and deal with
- than a completely missing accidental.
-
- o Mtm assumes all input has the same default octave. This
- means manually resetting the bass clef defoct parameter
- to "4". (See example below.) Other clefs may also be
- affected.
-
- o No notes smaller than 32nd notes are notated.
-
- o Mtm may not be able to figure out how to notate some weird
- length note. I think that most are covered, but I know that
- some odd lengths aren't. The good news is that when you run
- MUP on the output file, MUP will give an error at the
- affected line, which can then be manually edited.
-
- o Duplets are handled only in three cases. Mtm handles
- quarter, eighth, and sixteenth note triplets, but not
- anything else.
-
- o Probably more that I haven't yet thought of.
-
-
- Usage
- -----
-
- With no arguments, mtm reads from standard in and writes to standard
- out. The following arguments are understood:
-
- -f <filename> Read from filename instead of standard in
-
- -i <filename> Use <filename> instead of ".midtomup" as the
- filename to read commands from
-
- -g Try to "fudge" the notes to a real value. This
- is *not* true quantization. Fudging simply
- checks to see if the number of ticks of note
- length is within a certain fudging factor
- (normally 10). Without the -g option, if a
- note length is 115 ticks, and a quarternote
- is 120 ticks, then you'll get an error in the
- output file. With the -g option, a note length
- of 115 will automatically be set to 120, and
- a quarter note will be output.
-
- Any errors from fudging will also produce
- errors in the mup file. The same note lengths
- are used.
-
- -a <factor> Set the fudge factor (normally 10) to <factor>.
-
- -n Normally MTM places the measure number as a
- comment in the output file before each new
- measure. This option disables that feature.
-
- -v Print version and exit.
-
- If translated file has one or more lines with the word
- "BADLEN" in them, then mtm has found notes it can't figure out
- how to notate. With this error you are given three different
- bits of information, more than enough to correctly translate the
- note yourself. The format is:
-
- BADLEN=AAA,BBB: quarters=CCC
-
- The letters "AAA" will be replaced by the length of the note from
- the MIDI file in ticks. The letters "BBB" will be replaced with
- the number of ticks that make up a quarter note, and the letters
- "CCC" will be replaced with a floating point number telling you
- how many quarternotes "AAA" ticks are. (That final number probably
- won't be anything close to an even number.) Using these numbers
- you can determine how long the note is and how to notate it.
- For example:
-
- BADLEN=255,120: quarters=2.125
-
- Well, a half note = 2*120=240, so our note is longer than a half
- note by 15 ticks. 15 is 1/8 of 120, so we have a half note tied
- to an eighth note. Or if you know the .125 = 1/8, then you can
- tell by "quarters=2.125" that you have a half note tied to an
- eighth note.
-
- As mentioned above, mtm reads a file named ".midtomup" in the current
- directory, or optionally specified by the "-i" option. In most cases,
- a comment is placed in the output file saying what action mtm has taken.
- All commands *must* begin in column one of the input file. Below is
- a description of the available commands, and following that is an
- example input file.
-
- #header
- <text>
- #headend
-
- All text between "#header" and "#headend" will be placed,
- *without* error checking, into the output file as the first
- line(s) of the file. This can be used to set up staff names,
- labels, key signatures, clefs, and any other header information
- you wish to place in the file.
-
-
- #beamstyle
- <styles>
- #beamend
-
- Text between "#beamstyle" and "#beamend" should be in the
- form "numerator/denominator=<beamstyle>". "<beamstyle>"
- is a beamstyle as described in the MUP user's manual.
- Set the beamstyle you wish for each numerator/denominator,
- and as time signatures change within the midi input file,
- the beamstyle will automatically be set.
-
-
- #translate <input_track>=<output_staff>
-
- Translate is used to translate an incoming midi track number
- to a different staff number. For example, you may use midi
- track 11 for some of your work, but wish those notes to be
- on staff five. For that output, use the command:
-
- #translate 11=5
-
-
- #key <input_track>=<key offset>
-
- Key is used to set the key signature for each track. IF NO KEY
- IS SET FOR A TRACK, THE TRACK DEFAULTS TO THE THE MIDI KEY
- SIGNATURE. Also note that "translate" does not change the
- track, so regardless of the staff output, you must set the key
- using the input track.
-
- This command sets the "key offset" for a track. For example,
- If the true key signature is three flats, and track 2 is a horn
- track, you might want to have the horn line print in two
- flats. The key offset would be equal to "-1", and would be set
- using the following command:
-
- #key 2=-1
-
- A key offset is the number of flats you would add to a key
- signature to produce the key signature you want. (A flat
- negates a sharp, so adding flats to a sharp key sig,
- makes fewer sharps. Adding negative numbers of flats
- to a sharp key sig makes *more* sharps.)
-
- //<text>
-
- This is a comment, and is placed immediately into the
- output file.
-
-
- A Sample .midtomup File
- -----------------------
-
- Below is a sample .midtomup file I use for one of my arrangements.
- The header, translations, and beamstyles are pretty standard for me
- across pieces, while the key sigs change (of course).
-
-
- #header
- header
- title (18) "Not Very Pretty"
- title (12) "" "John Composer"
- title (12) "" "arr. by Sean L. Gilley"
- header2
- title "- \% -"
- score
- staffs=5
- time=4/4
- measnum=y
- barstyle=1-5
- key=0&
- label="Trumpet 1"
- visible=y
- staff 2
- label="Trumpet 2"
- visible=y
- staff 3
- key=1&
- label="French Horn"
- visible=y
- staff 4
- key=2&
- clef=bass
- //
- // Mup gives bass and treble clefs different default octaves,
- // which is good for typing stuff in. But mtm assumes everyone
- // is in the same octave. Not good. As it turns out, setting
- // defoct=4 for bass clef parts put everyone in the same default
- // octave and solves our problem.
- //
- defoct=4
- label="Trombone"
- visible=y
- staff 5
- key=2&
- clef=bass
- defoct=4
- label="Tuba"
- visible=y
- music
- #headend
- #beamstyle
- 4/4=4,4,4,4
- 3/4=4,4,4
- #beamend
- //
- // My midi output has 1st trumpet on track one,
- // 2nd trumpet on track two, French Horn on track 11,
- // trombone on track three, and tuba on track four.
- // I want staff 1=1st trumpet, staff 2=2nd trumpet,
- // staff 3=French Horn, staff 4=trombone, and
- // staff 5=tuba. The translations below accomplish
- // this for me.
- //
- // Trombone part
- #translate 3=4
- // Tuba part
- #translate 4=5
- // French Horn part
- #translate 11=3
- //
- // Key signatures. Trumpets in key of C, FH in key of
- // F (one flat) and trombone/tuba in key of B& (two flats).
- //
- #key 3=-2
- #key 4=-2
- #key 11=-1
-
-
- Bugs
- ----
-
- Probably quite a few that I haven't seen. The only recent bug
- I've seen has to do with ties. Sometimes mtm won't recognize that
- a note is the second note of a tie, and will go ahead and place the
- accidental. MUP just flags this as a warning, so it isn't critical,
- just annoying.
-
- Credits
- -------
-
- This code is based upon "mftext" and the accompanying files
- by Tim Thompson (att!twitch!glimmer!tjt) and Michael Czeiszperger
- (czei@pan.com). Without that code, mtm probably wouldn't have
- been written. Really.
-
- Support
- -------
-
- Well, I'll try. But I'm got a job plus doing my own arrangements
- so support is, shall we say, limited. But feel free to ask, and
- feel just as free to fix the problem if you're a programmer. If you
- do modify the code so it works better, please send me a copy.
- That way I can keep this code here up to date.
-
- E-mail: slg@mycroft.cmhnet.org
-
-