|home||tune search||software||learn abc||discuss||about||blog||Starbound/LOTRO||contact|
[abc standard: home | current | route-map | updating | proposals]
This page contains the fifteenth draft of a proposal to extend the transcription capabilities within abc. It involves only minor changes from the thirteenth draft (the fourteenth draft looked at another approach) plus some additional features:
instrument=<note>;abc@<note>, has been introduced for transposing instruments
V:modifiers in the same field no longer combine with each other
I:concert-scorehas been introduced - see Generating a concert pitch score
The important aspects of this proposal are the same as versions 10 - 13:
soundoperators (shortened from
shift-sound), which allow the typeset score and playback to be modified independently
instrumentmodifier (defined in terms of
sound) to give an intuitive specification for transposing instruments
shiftshorthand for combined
As most of the syntax is agreed, this is a working draft, meaning that I will make changes to it as we go along. Possible changes include:
music=, unless something better is suggested)
Chris Walshaw, August 2014
Additional text for section 4.6 Clefs and transposition
This section discusses support within abc for clefs and other features which affect the placement of the notes relative to the staff. It briefly mentions transposition, because the relevant syntax appears in the
V:voice fields, but this topic is discussed in full in section 13, Transposition.
Clef, transposing instrument and related indications appear as modifiers to the
V:voice fields; the possible modifiers are:
clef=<clef name> stafflines=<lines> octave=<number> score=<note1><note2> sound=<note1><note2> shift=<note1><note2> instrument=<note1>[;abc@<note2>] clef-concert=<clef name>
<…> denotes a value,
[…] denotes an optional parameter).
Within a given voice, the modifiers of each
V: field are inherited from the previous
V: field, unless overriden - see scope and inheritance of modifiers for more details.
… unchanged …
score=<note1><note2>transposes the typeset score according to the specified interval (the playback is not affected) - for more information see transposition operators;
sound=<note1><note2>transposes the playback according to the specified interval (the typeset score is not affected) - for more information see transposition operators;
shift=<note1><note2>is a shorthand for
score=<note1><note2> sound=<note1><note2>- for more information see transposition operators;
instrument=<note1>;abc@<note2>is a synonym for
score=<note1><note2> sound=c<note2>- for more information see writing abc code for transposing instruments;
clef-concert=<clef name>specifies the clef to be used for a concert pitch score
… unchanged …
transpose=<semitones>modifier of abc 2.1 and earlier is now deprecated (replaced by the
soundmodifier - see transposition). It may still be used, but not in conjunction with
I:concert-scoreand variants) - if it is, software should ignore the
transposesetting and issue a warning message.
middle=<pitch>modifier of abc 2.0 and earlier has been compromised in terms of what it was supposed to do and how it has actually been implemented. It is therefore deprecated.
TODO: Update deprecated list.
… unchanged …
As a fundamental rule, within each voice, each successive
K: field inherits the modifiers of the previous
K: field, unless it specifically overrides them.
Note: in other words, within a voice
V: inherits from a
K: field as well as from another
V: field (and vice-versa).
Recommendation: In single-voice tunes these modifiers will normally be applied to the
K: field. In multi-voice tunes it is recommended that they are only applied to
V: fields (an additional
V: field can even be introduced if one of the modifiers needs to change at a
K: change). If a single-voice tune contains
V: fields (for example, if it is a part extracted from a multi-voice score), then it is recommended that modifiers are applied to the
Modifiers written in each successive
V: field override modifiers inherited from previous fields. Within each
V: field, modifiers may be arranged in any order but should not be repeated (if they are, the second overrides the first).
To evaluate overriding of
instrument shorhands, expand them to their
V:1 shift=CG score=GF expands to
V:1 score=CG sound=CG score=GF and so the second
score overrides the first to result in
V:1 sound=CG score=GF (although it is recommended not to mix shorthands with direct operators - see Transposition operators).
Finally note that there are two ways to specify octave shifts and, for example,
octave=1 has the same effect as
shift=Cc. However these operators can be used independently; neither overrides the other and their effects add up.
There are two direct transposition operators,
sound, which are modifiers for
V:voice fields and act on each voice they are applied to:
score=<note1><note2>transposes the typeset score according to the specified interval (the playback is not affected)
sound=<note1><note2>transposes the playback according to the specified interval (the typeset score is not affected)
There are also two shorthand modifiers,
shift, which are defined in terms of
instrument=<note1>;abc@<note2>, for transposing instruments, is defined as
shift=<note1><note2>, for custom transpositions, is defined as
Recommendation: It is strongly recommended that shorthand modifiers are not mixed with direct modifiers, nor with each other, in the same tune. See writing abc code for transposing instruments and custom transposition for diatonic instruments for examples of typical usage.
Note for developers:
If modifiers are mixed together, resolve all modifiers to the direct operators,
sound and then use overriding to evaluate their effect.
Transpositions are applied to notes, grace notes, chords and key signatures.
shift the transposition interval is specified by two notes,
<note1> refers to the transcribed abc code and
<note2> refers to the rendered output (i.e. the typeset score in the case of
score or the playback in the case of
Example: In the following the typeset score is raised by a fifth and is rendered the same as if the abc code was transcribed as
[K:D] efga. The playback is lowered by a tone and is rendered the same as if the abc code were
K:G score=CG sound=DC ABcd
Note: The interval system is clear with regard to enharmonics so, for example, the interval
_G is distinct from
^F. However, to compute transpositions it may be helpful to use the MusicXML concept of specifying the interval as a combination of diatonic steps and semitones. Both of these can be easily calculated and make it simple to work out what the resulting note is using the diatonic steps to give the letter and the semitones to indicate whether it is flat, natural or sharp.
^F is 6 semitones in 3 diatonic steps - C to D, D to E, E to F (as opposed to
_G which is 6 semitones in 4 diatonic steps). Using this interval:
_Ein abc code) transposes to A since A is 3 steps (letters) above E (in the cycle ABCDEFG) and the A is natural, since that note is 6 semitones above Eb
^cin abc code) since C is 3 steps above G and C# is 6 semitones above G
^^Fin abc code) since F is 3 steps above C and F## is 6 semitones above C#
Notes for developers:
You should correct any transposition which goes beyond the specified abc limits to available key signatures,
K:Cb (7 flats) to
K:C# (7 sharps), and double/triple accidentals. For example, in principle
K:C# score=CG raises the key up to
K:G# (8 sharps), so to keep with the limits it should be rendered as
K:Ab (4 flats) and a warning issued to the user.
TODO (elsewhere in the standard): Limit the range of key signatures supported by abc to
K:Cb (7 flats) through to
K:C# (7 sharps). (Also limit accidentals - e.g. double sharp and double flat accidentals should be supported, but triples are entirely optional.)
To specify the same transposition for both score and sound, just use
shift=<note1><note2> as a shorthand.
Example: The following two
K:key fields are equivalent
K:G score=CG sound=CG K:G shift=CG
To transpose an entire file (or all the voices in a tune), use the instruction
I:sound <note1><note2> or, as a shorthand for both,
I:shift <note1><note2>. When placed in the file (or tune) header they have the the effect of adding the corresponding
shift= modifiers to every
V: field in the file (tune) which will then be combined with existing modifiers.
Example: The following excerpts are equivalent; in the former the
I:shift cC (downwards octave transposition) is applied to the
K: field and combines with the existing
shift modifier to give the latter.
I:shift cC K:C shift=_Bc CCCC|
K:C shift=_BC CCCC|
Transposing instruments sound notes at a different pitch to which they are written. For example, a C written on a Bb clarinet score would be sounded as a Bb (and similarly a written D would be sounded as a C).
The transposition operator for transposing instruments is
<note1> expresses the written pitch of the transposing instrument (relative to
<note2> expresses the pitch at which the abc is encoded (also relative to
c). This operator,
instrument=<note1>;abc@<note2>, is a synonym for
There are two typical ways of writing abc code for transposing instruments:
score=<note>c, if preferred).
sound=c<note>, if preferred). Since, in this case, the abc code is at the same pitch as the typeset output (and so the
<note>value is the same for both
;abc@<note>may be omitted and so the modifier shortened to
A third less common possibility occurs if the abc code is transcribed at a different pitch from both sounding and written pitches (as can happen in the case of re-transposition - see below) and in this case the full
instrument=<note1>;abc@<note2> must be used to express the written pitch of the instrument in question (in the
<note1> value) and the pitch at which the abc is encoded (in the
<note2> in the
instrument=<note1>;abc@<note2> syntax are notes and not keys (so that different octaves may be specified and so that the letter
b is not ambiguous). Therefore, for a Bb instrument you must write
instrument=_B and not
In all cases the typeset score is rendered at written pitch (unless a concert score is requested).
The extended example below (section 13.3.2) illustrates the principles of writing abc code for transposing instruments.
VOLATILE: This section is still under active discussion
Note: The term "concert pitch" is also used elsewhere in the musical lexicon to indicate "play A (above middle C) at 440Hz". However, here it refers to the pitches that transposing instruments actually sound.
If a concert pitch score is required the
I:sounding-score instructions can be applied, either in the file header (or the tune header) which will result in the file (or tune) being typeset at concert/sounding pitch.
The distinction between these two instructions is that
I:sounding-score typesets every voice at sounding pitch whereas
I:concert-score does the same but leaves octave-transposing instruments (e.g. piccolo, double bass) at written pitch.
Notes for developers:
To evaluate this formally, resolve all of the
shift= shorthands to their
sound= equivalents and then apply the
sound transposition interval to the
score modifier, so that
score=<note1><note2> sound=<note3><note4> would effectively be changed by
score=<note3><note4> sound=<note3><note4>. The same changes apply for
I:concert-score unless both
<note3> are a C (in any octave) in which case
score= is left unchanged. These changes should be made before any overall transposition set by
I:shift is applied.
Generally the clef on the concert/sounding score will be the same as on the written score, but to change it, use
Suppose a Bb clarinet player and a violinist wish to play the same piece which simply consists of the notes CDEF in the key of C.
Since the violin is not a transposing instrument, the violinist's part is written (and sounded):
V:1 name=violin K:C CDEF|
For the clarinet part, there is a choice. If, say, the composer of the piece prefers to work at concert pitch, the clarinet part can be transcribed as sounded:
V:2 name=clarinet instrument=_B;abc@c K:C CDEF|
These will be rendered by abc typesetting software according to the transposition for a Bb instrument (i.e.
[K:D] DEFG) but sounded as transcribed (i.e.
On the other hand, if the composer wants the abc code at written pitch, the same piece can be transcribed:
V:2 name=clarinet instrument=_B;abc@_B K:D DEFG|
Alternatively, since the
<note2> parts of the
instrument= are the same (i.e.
_B), this may be shortened to:
V:2 name=clarinet instrument=_B K:D DEFG|
These will be rendered by abc typesetting software as transcribed (
DEFG) but sounded according to the transposition (i.e.
Note: Written pitch voices will almost always need their own
K: field to set the key correctly (which will be different from concert pitch voices).
The whole piece could then be transcribed at concert pitch as:
K:C V:1 name=violin CDEF| V:2 name=clarinet instrument=_B;abc@c CDEF|
or at written pitch as:
K:C V:1 name=violin CDEF| V:2 name=clarinet instrument=_B K:D DEFG|
In either case the typeset score will be rendered at written pitch (and the playback at concert pitch).
To obtain a concert pitch score, add an
I:sounding-pitch instruction in the file or tune header (since there are no octave transposing instruments in this piece the result will be the same for either instruction).
Finally, suppose that the clarinet player has fallen ill and is to be replaced by an alto sax player who now needs a differently transposed part to read. Whether the abc code has been transcribed at concert pitch or at written pitch this is easy by changing the
instrument=_B part of the
instrument=_B;abc@<note> modifier to
Since this is a temporary transposition it is probably worth retaining the original clarinet information in a separate
V: field and then overriding it, so if the abc code is at concert pitch, the clarinet part then becomes:
V:2 name=clarinet instrument=_B;abc@c V:2 name="alto sax" instrument=_E;abc@c CDEF|
If the abc code is at written pitch, the modifier simply changes to
instrument=_E;abc@_B, indicating that the voice should be typeset for an Eb instrument but that the abc code is still transposed at written pitch for a Bb instrument (in this case the
instrument=<note> shorthand is insufficient as it only applies when both instrument and encoding pitches are the same.)
The resulting code is:
V:2 name=clarinet instrument=_B V:2 name="alto sax" instrument=_E;abc@_B K:D DEFG|
Finally note that all of the transposing instrument information would normally be collected up in the tune header to make it more visible (it only needs to appear in the body if something changes halfway through, such as a switch from Bb clarinet to A clarinet). So the written pitch clarinet to alto sax re-transposition excerpt could be transcribed as:
T:Duet for violin and clarinet (actually played on an alto sax) V:1 name=violin V:2 name=clarinet instrument=_B V:2 name="alto sax" instrument=_B;abc@_B K:C V:1 CDEF| V:2 K:D DEFG|
The following table lists some example transposing instruments and the modifiers they would need
|abc at concert pitch||abc at written pitch|
|Instrument|| || ||
|piccolo|| || ||
|Bb clarinet|| || ||
|soprano sax|| || ||
|A clarinet|| || ||
|alto flute|| || ||
|cor anglais|| || ||
|alto sax|| || ||
|double bass|| || ||
|tenor sax|| || ||
Non-standardised transpositions are commonly used in various folk and traditional musics and the transposition system has been deliberately designed as flexible as possible to allow for custom transpositions.
At its most straightforward custom transposition echoes the usage (if not the terminology) of transposing instruments.
For example, music for the Great Highland Bagpipes is almost always written in A mixolydian but the sounding pitch has been creeping upwards over the years and is now closer to (and sometimes even higher than) Bb. If writing solely for the pipes one way to notate this is to redefine the frequency of concert A accordingly (e.g. change it away from concert A at 440Hz).
TODO (elsewhere): Include a mechanism for setting the frequency of concert A.
However, this will not work for ensembles with other instruments and so the simplest way is to treat the pipes as a transposing instrument and to write
K:AMix sound=A_B for written pitch transcriptions (or
K:BbMix score=_BA for concert pitch transcriptions).
This could instead be written
instrument=_d;abc@c respectively) but most Highland pipers would be very surprised to hear their pipes referred to as a Db transposing instrument.
A further, more involved way that transposition is used, particularly for diatonic instruments (e.g. flutes, whistles, bagpipes, hurdy-gurdies, diatonic accordions, etc), is to transpose tunes to a preferred fingering, usually based on the range of the instrument. Furthermore, because such instruments are often available in several different keys, the instrument chosen to play the tune may be in a different "key" from the fingering.
In the example below, the two tunes are transposed to a D fingering, where the 6-finger note is always notated as
D (exactly the same as for the saxophone family of instruments). On folk woodwind this is often referred to as 6-finger D.
X:1 T:Tune 1 K:Gmin shift=GD GABc defg:| X:2 T:Tune 2 K:Amix shift=AD ABcd efga:|
However, this is not necessarily the final sounding key and so, for example, if the musician chooses to play them on an F instrument, the playback for the whole file could be adjusted accordingly with an
I:sound DF instruction at the top.
In addition, if a fellow musician happened to prefer G fingering (6-finger G) the typeset score could be easily adjusted with an
I:score DG instruction at the top.
The resulting file would look like:
I:sound DF I:score DG X:1 T:Tune 1 K:Gmin shift=GD GABc defg:| X:2 T:Tune 2 K:Amix shift=AD ABcd efga:|