home tune search software learn abc discuss about blog Starbound/LOTRO contact  

  [abc standard: home | current | route-map | updating | proposals]

Writing /home/cwalshaw/chris/wiki_docs/data/cache/2/2b72a2f7cf6094c4b0f97b1680a64264.metadata failed

4.6 Staff lines, clefs, and transposition

4.6.1 Staff lines, line numbers

Voice parameters have the general syntax "keyword=value". The ones that concern us here, may occur interchangeably inside V: or K: fields (the latter only for practical reasons), separated from the other syntax elements by space characters. The syntax [K:keyword=…] is also legal.

The order in which voice parameters occur within a single field is strictly irrelevant; any conflict among them must result in a severe error message. Different voice parameters may have different scopes.

A fundamental voice parameter keyword is stafflines=, whose value is the number of lines in the staff. Legal values are 0 to 9. The default is 5. Obviously its scope is "staff-related". If the value changes in mid-voice, the display software need not obey until its next line break.

The staff lines are numbered from a (possibly "invisible") bottom line upwards. Depending on the stafflines value, the lines with the following numbering will be visible only:

stafflines= visible lines
0 none
1 3
2 2 and 3
3 2, 3, and 4
4 and more all, starting with 1.

The reason for this is to cater for legacy usage, identifying the "middle" line with line number 3.

4.6.2 Clefs as voice parameters

Clef information is normally provided by the voice parameter keyword "clef=<clef value>", sometimes accompanied by "middle=<middle note>". The syntax "<clef-value>" (without the "clef=" prefix) is also permitted, except for the case "clef=none".

Typical examples:

V:cello clef=bass
V:violin clef=treble middle=d % "French violin clef" sitting on the bottom line, thus the note d comes on the middle line.
V:violin clef=treble1 % "French violin clef" in a shorter spelling, with <line number>
V:doublebass clef=bass-8i % meant one octave lower, but visually indistinguishable

A middle= parameter is only allowed in connection with an explicit <clef value> in the same field.

An alternate syntax, as a separate field, is

I:clef <clef value> [middle=<middle note>]

(where <…> denotes a value, […] denotes an optional part, and | separates alternative values).

Since there will be other clef keywords of this syntax, which are not allowed as voice parameters, the syntax will be explained in this alternate form. Voice parameters will be considered mapped in the obvious way, to an imaginary I: field following the existing V: or K: field.

4.6.3 General clef field syntax

The syntax of the I: fields concerned with clefs is:

I:<clef keyword> <clef name>[<line number>][+8|-8[v|i][s|n]] [middle=<note>]

(where <…> denotes a value, […] denotes an optional part, and | separates alternative values).

All these fields are (formally) of "staff-related scope".

<clef keyword>
is principally "clef". Other keywords, to be explained later, are "clef_concert", "clef_shared", and "clef_shared_concert".

<clef name>
may be treble, alto, tenor, bass, perc, none, or auto. "perc" selects the drum clef. The default value is "auto", which causes the display software to choose and switch between treble and bass clef freely, as it deems best.

[<line number>]
indicates on which staff line the base clef is anchored. Different values constitute different clefs, e.g. "bass2" is elsewhere known as the baritone clef, and "alto4" equals "tenor".

  • Values (unsigned) 0 to 9 are formally allowed, even if referring to an "invisible" line, as inevitable in the case stafflines=0. *)
  • Defaults are: treble: 2; alto: 3; tenor: 4; bass: 4, perc: 3. These defaults make the clefs behave as their name indicates.
  • Cannot be used in conjunction with middle= in a single field, except for the <clef name> "perc".
  • Cannot be used with the <clef name> "none" (use middle= in that case) or "auto".

is an alternate way to define the line number of the clef. The value indicates what note (without accidental) is to be displayed on line 3, in the sense of the above line numbering.

  • Cannot be used in conjunction with <line number> in a single field, except for the <clef name> "perc".
  • Cannot be used with the <clef name> "auto".
  • For <clef name>s "perc" or "none", an arbitrary <middle note> can be specified. Defaults are C resp. B.

[middle=<note>] for treble, alto, tenor, and bass clefs (deprecated)
For the remaining clefs, <middle note> is mechanically mapped to <line number> according to the following scheme, regardless of the "stafflines" value *), regardless of any [+8|-8[v|i][s|n]] postfices, regardless of transposition:

clef values
treble[…] C E G B d
alto or tenor F, A, C E G
bass[…] B,, D, F, A, C
resulting <line number> 5 4 3 2 1

Values differing from these by one or more octaves are permitted for legacy reasons, though strongly deprecated. The number of octaves, call it n, is then mapped to a separate directive [I:shift-score -12*n], see "Transposition" below [TODO]. For example, deprecated [K:clef=bass middle=f] is equivalent to [I:clef bass3][I:shift-score -24].

If no middle= is specified, the <line number> defaults apply.

[+8 | -8]
(postfix) is the clef with an '8' drawn above or below it, viewed as a clef of its own.

  • Can only be used with the <clef name>s "treble" or "bass".
  • The postfix [v|i] determines whether the '8' is visible ("v", the default), or invisible ("i"), with otherwise unchanged behaviour. The invisibility property is sometimes desired for double bass voices etc., as an alternative to the (often preferable) treatment as octave-"transposing instruments", see "Transposition" below; particular care is required.
  • The postfix [s|n] determines whether the clef changes the sound of the notes (so that they are displayed as if the [+8 | -8] were not there, "s", the default) or "not" (i.e. behaviour like other clefs). The "s" is a special feature of these clefs, designed to allow users to type the notes as they would with the ordinary clef, in particular when copying existing sheet music. It only affects the notes of the current voice until the next clef change there, i.e. it is a separate property that is not staff-related. It is ignored for keywords other than "clef". See "4.6.7 Further explanation" below. (Users who value cleanliness will prefer "n", possibly in conjunction with a suitable "octave=" statement.)
  • "Clef of its own" means that
    1. the meaning of the notes takes the '8' into account, no matter whether or not they come from the "s" mechanism;
    2. if this clef is imposed by some automatism onto another voice, the display of the latter must be adjusted.
  • However, the note to be specified for "middle=" with these clefs does not reflect the intended (sounding) note; see above. To avoid confusion, the <line number> syntax is highly preferable in this very rare use case.

*) Software unable to support some valid stafflines/clef/line-number/middle combination, should apply its best approximation that yields equal pitches, and issue a warning message.

4.6.4 Clefs for temporary display options

In practice, an abc score will often be used for more than one type of printed score: Full score, single voice part, concert score, condensed score …, to be varied temporarily. (Readers who do not have such desires may skip this paragraph with its subparagraphs.)

Different clef settings may be required for these verious use cases, including clef changes at different positions during the course of a voice. It would be tedious to change all clef directives whenever printing a type of score differing from the one printed previously.

It is much more convenient to switch between these use cases by simply editing the header statements "I:score" or "I:concert_score".

Therefore, new keywords are introduced to cater for the various use case in advance, to be used only when need arises. The principal "I:clef" is the default. Users who do not anticipate more than one type of printing, can use "I:clef" for it.

With each keyword we will associate

  • a use case,
  • another clef keyword as "default keyword"
  • one or more clef keywords as possible "fallback keywords".

The general mechanism for a given keyword is the following:

  1. If the use case is not effective, the fields of that keyword are ignored.
  2. If the use case is effective, but the keyword has not been encountered yet in a particular voice, the values of the "default keyword" apply.
  3. If the use case is effective, and the keyword is encountered specifying for value the name of one of the fallback keywords, the current value of that fallback keyword is used, until the given keyword occurs again; example: [I:clef_concert_shared clef_shared].
  4. All other clef keywords are ignored.
  5. If "auto" is the current value of a keyword serving as default or fallback, software must recalculate the effective clef.

All clef changes induced by these mechanisms must leave the sounding pitches unchanged, notably if some [+8|-8] clef is involved. Therefore, a [t|n] postfix does not make any difference for these keywords.

Although I:score and I:concert_score rarely occur outside of tune headers, they are "control types". If their value changes in the course of a tune, software must revaluate clefs and insert clef changes wherever necessary. Clef for a concert score

The value "true" of the field "I:concert_score" [NEW/TODO], see "Transposition" below, constitutes the use case for the keyword I:clef_concert.

Different clefs in the concert score are typically required for instruments with large transposition intervals such as used for tenor saxophones, piccolo flutes, double basses etc.

Typical examples:

V:bass_clarinet clef=treble transpose=-14
[I:clef_concert bass]

V:doublebass clef=bass transpose=-12
[I:clef_concert bass-8] % produces equal sheet music, except for a little '8' printed below the clef

The default keyword, and the only possible fallback keyword, is "clef". (Those who prefer "auto" as the default, even for viola voices etc., can simply write

I:clef_concert auto

into the tune header, which by convention applies for all voices.) Clef for temporarily condensed display

Sometimes two or more voices must share a staff temporarily, as decreed by "I:score". This is the use case for the keywords I:clef_shared resp. I:clef_shared_concert, depending on whether "I:concert_score true" applies.

These keywords will only be effective in the master voice of a staff that is shared with at least one other voice.

The default keyword of "I:clef_shared" is "I:clef", which is also its only possible fallback keyword.

The default keyword of "I:clef_shared_concert" is "I:clef_concert"; its possible fallback keywords are "I:clef", "I:clef_concert", and "I:clef_shared". The fallback/default mechanism may apply in multiple steps, the last fallback being "auto".

Typical example, a choir piece:

I:score (soprano alto) | (tenor bass) … V:tenor clef=treble-8 % or treble-8n ; both will produce the correct condensed display, due to the "law of sound conservation" [I:clef_shared bass]

4.6.5 Suppression

"I:suppress-subsequent-clefs true|false", if of value "true", causes clefs to be printed only at their installation, not at the beginning of every staff. It is a staff-related type. The default value is "false".

[TODO, somewhere else: "I:suppress-subsequent-key-signatures" does the same with key signatures, also staff-related.]

4.6.6 Ottava (8va etc.) passages

An important item of notation concerns passages written in a different octave, to save ledger lines. Such a passage is marked by a dashed line starting with something like "8va".

This is not just a decoration, but has much in common with clefs such as treble+8. Therefore, its abc syntax is a field, usually inline:

I:<ottava-keyword> <number of octaves>[s|n] ["<text>"]

These are of course "staff-related types", like the clefs.

is principally "ottava". Additional keywords are "ottava_concert", "ottava_shared", and "ottava_shared_concert", working exactly like "clef_concert" etc., but completely independently. This includes a fallback syntax [I:ottava_shared_concert ottava_shared] etc.

<number of octaves>
A signed number from -2 to +2. The value 0 ends the passage; the remaining syntax elements will be ignored for it. A positive value causes a dashed line above the staff, a negative one below the staff. Of course, 0 is the default.

(postfix), entirely analogous to the same postfix of [+|-8] clefs: "s" (the default) causes the notes of the current voice to sound in a different octave, "n" only shifts the display of the notes in opposite direction (as always done with notes on which the ottava is imposed by a different "master voice"). Either effect is added independently to all other transposition mechanisms, and ends exactly at the next ottava statement. Note that the postfix does not make any difference in cases of derived "ottava_…" keywords, since these must never change the sound of any notes. See "4.6.7 Further explanation" below.

(Again, users who value cleanliness will prefer "n".)

An arbitrary text, to be displayed at the beginning of the dotted line. Defaults are "8va" (for +/-1) and "15ma" (for +/-2). [TODO: subject to discussion; how to express a superscript?]

4.6.7 Further explanation of the "s" postfix, e.g. for programmers

This modifier occurs at clefs of [+|-8] type and at ottava statements, and is also the default if no "n" postfix is present there. To define the induced behaviour, we can imagine two additional variables "octaveC=" and "octaveO=", exactly equal to "octave=" in scope (not staff-related!) and effect, but all three administered independently and adding their effects.

Then, such a clef delaration will be mapped to the corresponding "+|-8n" statement (staff-related) plus octaveC=-|+1 ("voice-related"). Analogously, such an ottava directive will be mapped to the corresponding "+|-8n" statement plus octaveO=-|+1. Any other clef change will be considered ornated with octaveC=0, any other ottava with octaveO=0.

The values of octaveC and octaveO represent the user's wish how the voice should sound, so they must remain in force if the voice is subjected to a clef or ottava change resulting from any of the above mechanisms. Conversely, if a [+|-8] clef or ottava causes such a change, its "s" capacity is ignored.

4.6.8 Transposition

…[TODO, a topic of its own; includes "octave=" and "transpose=". These are not staff-related.]

Proposer's comments

My name is Alexander Scheutzow. Suggestions for improvements are welcome in the thread http://tech.groups.yahoo.com/group/abcusers/message/8246 - my user name there is scheutzow4cond. Thank you.

In this appendix, I would like to collect my own comments, errata, answers to questions, and announcements for the next version. It will be the only part of the text that will be edited, if possible by appending only. Any comments by readers, or separate proposals, are welcome, but will be particularly valuable if they take account of the various problems I try to solve with my proposal. So please take your time to study it/them thoroughly. Thanks.

The list items are numbered for better reference, the final version may use bullets or other forms of organization.

Clefs and ottavas for temporary purposes

The demand for an I:concert_score is taken as a hypothesis; if it does not substantiate, the corresponding clef keywords will be removed from the version to be voted on.

Aug. 5, 2012: The same applies to the ottava keywords.

Line numbering

The problem with stafflines=0 is how to establish "line numbers" for clef, middle, etc. abc2ps has a solution for the stafflines problem that I would not exactly call beautiful, but which works and is probably being used. The point is that the line numbering does not count the visible lines from 1, but includes "invisible lines".

This current version reflects the behaviour of abc2ps in the question of line numbering. If anyone knows conflicting software or usages, please shout.

List of new single features

The following items and features are newly introduced here as hypotheses, with respect to the current standard 2.1. The changes from v2 to v3 are marked.

  1. 4.6.2: the 8shift= clefs are withdrawn [CHANGED in this v3 text]
  2. 4.6.2: alternate syntax I:clef
  3. 4.6.3: value "clef=auto" (following Jef)
  4. 4.6.3: middle= limited to reasonable usage, the octave component mapped differently [CHANGED in this v3 text]
  5. 4.6.3: postfix i for [+-8] clefs with invisible '8' (following Dave) [NEW in this v3 text]
  6. 4.6.3: postfix n for well-behaved [+-8] clefs [CHANGED in this v3 text, was "i" previously]
  7. 4.6.4: "I:concert_score" tentatively imagined to be defined elsewhere in the standard document; symbolizing the principal facility of a (temporary) concert score
  8. 4.6.4: "I:clef_concert"
  9. 4.6.4: "I:clef_shared" ("I:clef_shared_concert" being necessary if both clef mechanisms are approved)
  10. 4.6.5: "I:suppress-subsequent-clefs"
  11. 4.6.6: "I:ottava" and ottava_shared etc. [CHANGED in this v3 text]

Feel free to criticize each point, preferably specifying your preferred solution, or your challenge of a particular one of my assumptions and diagnoses.

abc/standard/v2.1/proposals/clefs_voice_parameters/v4.txt · Last modified: 2012/08/08 16:35 by alexmidicond
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki