X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mup/blobdiff_plain/cdb3c0882392596f814cf939cbfbd38adc6f2bfe..ddf6330b56bcfb657e0186b24b9b1422c51d3424:/mup/docs/uguide/basics.html?ds=sidebyside diff --git a/mup/docs/uguide/basics.html b/mup/docs/uguide/basics.html new file mode 100644 index 0000000..29981b6 --- /dev/null +++ b/mup/docs/uguide/basics.html @@ -0,0 +1,315 @@ + +
+ <-- previous page + + Table of Contents next page --> +
+ ++This section introduces the Mup language, giving some simple examples to +give you the flavor of a Mup input file. +Subsequent sections will go into greater detail. +
+
+Music is described one measure at a time. Each note is specified by its pitch
+value, "a" to "g." As an example, the first measure of "Three Blind
+Mice" can be described like this:
+
+1: 4e; 4d; 2c; +
+The first three notes of "Three Blind Mice" are E, D, and C. For Mup +input, these pitches are given in lower case to avoid having to use the shift +key. No octave information was specified in this simple example, so Mup +would use its default, which in this case would be the octave beginning +with middle C. +
++The first two notes are quarter notes, and the last note is a half +note. Time values of notes are given as shown in the example. A quarter +note is marked by a 4, a half note by 2, a sixteenth note by a 16, etc. +
++A semicolon is used to separate chords. In this simple example, each chord +has only a single note in it, but it is possible to have lots of notes in one +chord. +
+
+At the end of each measure, we have to tell Mup what kind of
+bar line
+to draw. The standard bar line is just called "bar." So a complete
+description of the first measure would be:
+
+1: 4e; 4d; 2c; +bar +
+To save typing, Mup allows a lot of shortcuts. One such shortcut is that +it assumes that unless you tell it otherwise, each note in the measure is +like the note before. You can leave out the second 4, because if you +don't specify a time value, Mup will assume the note is the same length +as the previous note. +
+
+The same sort of idea works with pitches. The third measure of "Three Blind
+Mice" could be stated like this:
+
+1: 4g;8f;;2e; +bar +
+You may have noticed that this example doesn't have spaces between chords. +There are only a few places where the Mup language requires you to put spaces. +However, you can always put some in other places to make things easier to read. +
++Printed music contains a lot more than just notes and bar lines. Among other +things, each staff normally begins with a clef, key signature, and time +signature. Mup provides default values for these, which you can then +override if you want something different. In the examples so far, we didn't +override anything, so Mup would assume its default values, which are +treble clef, a key signature with no sharps or flats, and a time signature +of 4/4. +
+
+There is a long
+list of "parameters" that can be set.
+Things like clef
+and key signature are among them. Parameters can be changed with a line of the
+form:
+
+parameter_name=value +
+score + time=6/8 + key=2# + +music + 1: 4d;8e;4f;8d; + bar +
+Note that in this example, the key was specified as two sharps.
+You can also specify the key by name:
+
+ key = d major +
+These parameters give a very different sort of information than the notes of +a measure, so they go in a separate section of the input file. +Each section of the file describes information for a specific +"context." +Information about musical notes is given in "music" context, +while things that apply in general to the whole +score are given in "score" context. +Once you start a measure in music context, you have to complete that measure +before switching to another context, but otherwise you can pretty much +change from one context to another as necessary. +Each new context section is headed by its name (e.g., +"music" or "score"). +At the beginning of input, music context is assumed. +
+
+Here is a more complicated example:
+
+score + staffs=2 + key=3& + time=2/4 + +music +1: ceg;; +2: 2c; +bar +
+Next we find the keyword "music," which indicates the end of parameters +and the beginning of the music. Data is given for both staff 1 and staff 2. +Staff 1 has two chords in the measure. The first is a C minor triad (it's +minor since the key is three flats). No time value is specified for this +chord. Since it is the very first chord of the piece, Mup cannot use the +previous chord's time value, because there is no previous chord. +In this case, Mup falls back to using the denominator (bottom number) +of the time signature, +so the chord is a quarter note. Incidentally, if Mup has to back up to +previous notes to deduce pitch and/or time values, it only goes back as far +as the beginning of the current measure. That means the default time value +for the first chord of every measure in this piece would be quarter note. +The second chord on staff 1 is the same as the first, since only a semicolon +is specified. +
++Staff 2 has only a single chord, consisting of a half note with pitch C. +Mup checks to make sure the time values on each staff add up to the time +signature--no more or less--and will print an error message if they don't. +If you have something like a "pickup" measure, which doesn't add up to the +time signature, you can specify "space" rather than a chord, +to account for the rest of the time. +
+
+Some parameters can be set on a per-staff basis as well as for the entire
+score. Mup also allows for
+up to three independent voices on each staff,
+and each voice can have parameters
+set that apply to only that voice. To get the
+value of a parameter, Mup always starts at the most specific place it could
+be defined and works toward the most general. In other words, it will first
+see if the parameter is set for the current voice. If not, it will see if
+it is set for the current staff. If not, it will use the value set for the
+entire score. Staff parameters are set in "staff" context, and voice parameters
+are set in "voice" context.
+As an example:
+
+score + staffs=3 + key=1& +staff 2 + key=2& + clef=bass +music +1: 2f;a; +2: 2c;f; +3: 1f; +bar +
+Mup allows you to specify a
+header and/or footer
+to put on the first page,
+as well as a header and/or footer to use on subsequent pages. These can
+include a page number that will be incremented automatically as pages are
+printed. The headers and footers can be customized as you like, with
+different fonts and sizes of text and items centered or left or right
+justified. There is also a shortcut
+"title" command
+that can be used to create a canned format title. For example:
+
+title "Three Blind Mice" +
+You can specify
+lyrics
+for as many verses as you like. They are specified
+somewhat like notes. As an example:
+
+1: 4e;d;2c; +lyrics 1: 4;;2; "Three blind mice,"; +bar +
+Mup provides a way to
+print arbitrary text
+(like "allegro") and
+musical symbols
+(like a fermata). It can also print
+phrase marks,
+piano pedal marks,
+etc. The placement of these items is specified in terms
+of "counts" into the measure. For example:
+
+boldital below 1: 3 "mf"; +
+Once you have an input file, you can run Mup on it to get the printed
+version of the music. Entering:
+
+mup myfile +
+If you are using Ghostscript, but without Mupmate, +two utility programs are included with Mup +for +displaying and printing music +using Ghostscript. +These are described in more detail in the next section. +
+