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

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

 

4.6 Staff lines, clefs, and transposition

4.6.1 Staff lines

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.

4.6.2 Numbering of staff lines

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.3 Voice parameters

Voice parameters have the general syntax "keyword=value". Those that concern us here, may occur interchangeably inside V: or K: fields, separated from the other syntax elements by space characters. The syntax [K:keyword=value] is also legal.

Every such voice parameter (except "middle=…", see below) counts as a separate "item"; regulations for scope and overriding are the same as for individual items.

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.

4.6.4 Clef parameter

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

Examples:

V:cello clef=bass [K:tenor] V:violin clef=treble middle=d % "French violin clef" sitting on the bottom line, thus the note d comes on the middle line.

A middle= parameter is only allowed in connection with an explicit clef= in the same field, unless found at the beginning of a voice, where clef=treble or clef=bass is assumed, depending on the legalness of the <middle note> (see below).

An alternate syntax is

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

the [] part being optional. Since there will be other clef keywords of this syntax, but not allowed as voice parameters (to avoid ambiguous middle=), 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 V: field. (In the K: case, it is best to imagine the I: before the K: field.)

4.6.5 General clef syntax

The syntax is:

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

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

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

[middle=<note>] 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.
  • Cannot be used with the <clef name> "auto".
  • For <clef name> "auto" or "none", an arbitrary <middle note> can be specified.
  • For the remaining clefs, only those <middle note> values are permitted that are equivalent to line number suffixes 1 through 5, regardless of the "stafflines" value, regardless of code transposition:
clef legal middle= values
treble[+/-8] C E G B d
treble+8i c e g b d'
treble-8i C, E, G, B, D
alto or tenor F, A, C E G
bass[+/-8] B,, D, F, A, C
bass+8i B, D F A c
bass-8i B,,, D,, F,, A,, C,
perc an arbitrary note
none an arbitrary note
auto - forbidden -
  • It is generally legal to anchor clefs on invisible lines. *)
  • In a transposition context, the <note name> always refers to the note that would be read from the printed score, which may be distinct from the corresponding note name in the abc code.
  • If no middle= is specified, the [<line number>] defaults apply, except for <clef name> "none", which defaults to middle=B.
  • Remark: Values differing from legal ones by one or more octaves occasionally occur in legacy code. Some software interpreted them as instructions to transpose the display by the respective numbers of octaves, adding to all other such transposition mechanisms. Sound software was and is unaffected. Before the advent of "octave=", "middle=" plus a suitable "transpose=" formed a makeshift for it. Compliant software may or may not reproduce this behaviour, but must issue an error message.

[+8 | -8] (postfix) draws '8' above or below the clef. Allowed for treble and bass only. The player must transpose the notes one octave higher or lower, adding to all other sound transposition mechanisms. Any middle= must specify the written note, not the one sounding. All other automatic operations, such as choosing a common clef for voices sharing a staff, must refer to the octave-transposed notes. Because of these complications, the postfices are deprecated in favour of [+8i | -8i].

[+8i | -8i] (postfix) draws '8' above or below the treble or bass clef, to be viewed as a different clef. No transposition is caused; middle= works as usually.

*) 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.6 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.

Of course, the concert score must represent the same sounding pitches as the transposed score. For example, a double bass, treated as a transposing instrument, usually needs "clef_concert=bass-8i", if a concert score is to be catered for.

The deprecated postfices [+8|-8] will have exactly the same effect as [+8i|-8i] here.

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.

4.6.6.1 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 example:

V:double_bass clef=bass transpose=-12 [I:clef_concert bass-8i][K:…

The default keyword, and the only possible fallback keyword, is "I:clef".

4.6.6.2 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 are considered "staff-related", i.e. they will only be effective in the master voice of a shared staff.

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".

4.6.7 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.8 Transposition

…[TODO, a topic of its own; includes "octave=" and "transpose=".]

Proposer's comments

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 for temporary purposes

July 31, 2012: Completely new proposal, unifying clef directives for various "temporary" demands. 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.

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.

  1. 4.6.4: alternate syntax I:clef
  2. 4.6.5: value "clef=auto" (following Jef)
  3. 4.6.5: middle= limited to reasonable usage
  4. 4.6.5: postfices +8i and -8i for well-behaved clefs
  5. 4.6.6: "I:concert_score" tentatively imagined to be defined elsewhere in the standard document; symbolizing the principal facility of a (temporary) concert score
  6. 4.6.6: "I:clef_concert"
  7. 4.6.6: "I:clef_shared" ("I:clef_shared_concert" being necessary if both clef mechanisms are approved)
  8. 4.6.7: "I:suppress-subsequent-clefs"

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/v2.txt · Last modified: 2012/07/31 19: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