| 1 | <HTML> |
| 2 | <HEAD><TITLE> |
| 3 | Mup General Syntax |
| 4 | </TITLE></HEAD> |
| 5 | <BODY> |
| 6 | <P> |
| 7 | <A HREF="utilpgms.html"><-- previous page</A> |
| 8 | |
| 9 | <A HREF="index.html">Table of Contents</A> <A HREF="contexts.html">next page --></A> |
| 10 | </P> |
| 11 | |
| 12 | <H1> |
| 13 | MUP FILE STRUCTURE |
| 14 | </H1> |
| 15 | <P> |
| 16 | Mup files do not have to follow any naming convention, |
| 17 | although on systems that use file name suffixes to associate a file |
| 18 | with an application, it is traditional to use .mup for the suffix. |
| 19 | It can also be useful to put a special "magic string" |
| 20 | on the first line of Mup files. |
| 21 | This magic string is completely optional, but having it there |
| 22 | makes it easy for both people |
| 23 | and programs to identify the file as Mup input. |
| 24 | The standard recommended value for this string is: |
| 25 | <BR><PRE> |
| 26 | //!Mup-Arkkra |
| 27 | </PRE><BR> |
| 28 | with exactly that spacing and capitalization. |
| 29 | If the file uses features of newer versions of Mup, and thus would |
| 30 | not work with older versions, you can add a dash and |
| 31 | the minimim version number the file requires, as in: |
| 32 | <BR><PRE> |
| 33 | //!Mup-Arkkra-5.3 |
| 34 | </PRE><BR> |
| 35 | </P> |
| 36 | <H2> |
| 37 | Mup General Syntax |
| 38 | </H2> |
| 39 | <P> |
| 40 | Any number of spaces and tabs can be put in |
| 41 | almost anywhere except in the middle of a word. |
| 42 | Each statement goes on a separate line. |
| 43 | If for some reason you wish to split a statement onto several lines, |
| 44 | each but the last must end with a "\" (backslash) character, to |
| 45 | tell Mup to treat the next line as a continuation of the current line. |
| 46 | Blank lines can be put between statements to make things easier to read. |
| 47 | </P> |
| 48 | <P> |
| 49 | Comments begin with two slashes and continue to end of line. All comments |
| 50 | will be totally ignored by Mup, and are for your own use to remind yourself |
| 51 | of something. For example: |
| 52 | <BR><PRE> |
| 53 | // Note: in some early manuscripts, this chord had an accent |
| 54 | </PRE><BR> |
| 55 | </P> |
| 56 | <P> |
| 57 | Staffs are numbered from top to bottom, starting at staff 1. |
| 58 | </P> |
| 59 | <P> |
| 60 | Several different units are used for distances. One is inches or |
| 61 | centimeters. (There is a |
| 62 | <A HREF="param.html#units">units parameter</A> |
| 63 | that is used to select which you want to use.) Another |
| 64 | is "stepsizes." One stepsize is half the distance between two staff lines. |
| 65 | In the horizontal dimension, "counts" are sometimes used. A "count" |
| 66 | refers to the musical duration of a note with a duration of the denominator |
| 67 | (bottom number) of the time signature. |
| 68 | The actual distance on the page will vary depending |
| 69 | on how Mup determines notes should be placed. |
| 70 | When you use a |
| 71 | <A HREF="param.html#time">time signature</A> |
| 72 | with two or more fractions added together, |
| 73 | as in 3/4 + 3/8, the "count" is the largest denominator, which would be |
| 74 | 8 in the example just given. |
| 75 | </P> |
| 76 | <P> |
| 77 | Upper and lower case letters are not interchangeable. Thus, for example, |
| 78 | "SCORE" is not the same as "score." |
| 79 | </P> |
| 80 | <P> |
| 81 | Most lines of input end with a semicolon. There are some kinds of input that |
| 82 | do not require an ending semicolon, but Mup will allow semicolons on those |
| 83 | too, so that if you can't |
| 84 | remember if a given command requires a semicolon or not, you can just use one |
| 85 | anyway. For the examples in this User's Guide, semicolons are not used when |
| 86 | they are not necessary.* |
| 87 | <HR> |
| 88 | * The commands on which the ending semicolon is optional are: |
| 89 | <A HREF="bars.html">bar,</A> |
| 90 | <A HREF="multirst.html">multirest,</A> |
| 91 | <A HREF="param.html">setting of parameters,</A> |
| 92 | <A HREF="prnttext.html">print, left, right, center, title,</A> |
| 93 | <A HREF="newscore.html">newscore, newpage,</A> |
| 94 | <A HREF="linecurv.html">line, and curve.</A> |
| 95 | Semicolons are not allowed after commands that indicate entering a new |
| 96 | <A HREF="contexts.html">context (header, footer, music, staff, grids, etc.).</A> |
| 97 | A newline after those commands is optional, |
| 98 | although often a good idea for readability. |
| 99 | </P> |
| 100 | <P> |
| 101 | In |
| 102 | <A HREF="music.html">music context,</A> |
| 103 | newlines are required to separate commands: music data, bar lines, rolls, |
| 104 | commands to print strings, dynamic marks, lyrics, etc. all must each |
| 105 | end with a newline. In |
| 106 | <A HREF="textmark.html#grids">grids context</A> |
| 107 | and |
| 108 | <A HREF="shaped.html#hdshape">headshape context,</A> |
| 109 | each pair of strings must end with a newline. |
| 110 | In other contexts, there are a few cases where newlines between commands |
| 111 | are optional, although you may wish to use them anyway to improve readability. |
| 112 | </P> |
| 113 | <P> |
| 114 | Mup supports |
| 115 | <A HREF="macros.html">macros and conditionals (like 'if' and 'ifdef')</A> |
| 116 | that can be placed anywhere in input, except in the middle of words, |
| 117 | numbers, or strings; they needn't be on separate lines. |
| 118 | </P> |
| 119 | <P> |
| 120 | In a number of statements, Mup expects a text string. All strings must be |
| 121 | enclosed in double quotes. For example: |
| 122 | <BR><PRE> |
| 123 | "This is a string." |
| 124 | "Allegro" |
| 125 | </PRE><BR> |
| 126 | </P> |
| 127 | <P> |
| 128 | A string can contain any combination of letters, numbers, spaces, |
| 129 | and punctuation. |
| 130 | It can also contain various things that will cause printing of special music |
| 131 | characters, change font and size, and so forth. Those things are covered in |
| 132 | <A HREF="textstr.html">the chapter on text strings.</A> |
| 133 | </P> |
| 134 | <HR><P> |
| 135 | <A HREF="utilpgms.html"><-- previous page</A> <A HREF="index.html">Table of Contents</A> <A HREF="contexts.html">next page --></A> |
| 136 | </P> |
| 137 | </BODY></HTML> |