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

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

 

Transposition proposal - summary

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:

  • a new syntax, instrument=<note>;abc@<note>, has been introduced for transposing instruments
  • K: and V: modifiers in the same field no longer combine with each other
  • the examples have been extended to include custom transposition
  • new syntax for clef-concert, I:sounding-score and I:concert-score has been introduced - see Generating a concert pitch score

The important aspects of this proposal are the same as versions 10 - 13:

  • a unified system for transposition consisting of the well-establised score and sound operators (shortened from shift-score and shift-sound), which allow the typeset score and playback to be modified independently
  • transposition by interval (e.g. C to G), rather than by semitones as previously
  • the instrument modifier (defined in terms of score and sound) to give an intuitive specification for transposing instruments
  • the shift shorthand for combined score and sound transpositions

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:

Chris Walshaw, August 2014


4.6 Clefs and key/voice parameters

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 K:key and 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 K:key and 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>

(where <…> denotes a value, […] denotes an optional parameter).

Within a given voice, the modifiers of each K: or V: field are inherited from the previous K: or 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 …

Note:

  • The transpose=<semitones> modifier of abc 2.1 and earlier is now deprecated (replaced by the sound modifier - see transposition). It may still be used, but not in conjunction with sound or score modifiers (including I:sound, I:score and I:concert-score and variants) - if it is, software should ignore the transpose setting and issue a warning message.
  • The 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 …

4.6.1 Scope and inheritance of modifiers

As a fundamental rule, within each voice, each successive V: or K: field inherits the modifiers of the previous V: or 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 V: fields.

Modifiers written in each successive K: or V: field override modifiers inherited from previous fields. Within each K: or 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 shift and instrument shorhands, expand them to their score and sound equivalents.

For example, 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.

13 Transposition

13.1 Transposition operators

There are two direct transposition operators, score and sound, which are modifiers for K:key and 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, instrument and shift, which are defined in terms of score and sound:

Finally there are a number of I: instructions which can be applied to an entire file (or tune) to transpose all voices or to generate a concert score.

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, score and sound and then use overriding to evaluate their effect.

13.1.1 Using transposition - basics

Transpositions are applied to notes, grace notes, chords and key signatures.

For score, sound and shift the transposition interval is specified by two notes, <note1><note2>. Here <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 sound).

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:F] GABc.

K:G score=CG sound=DC
ABcd

Note: The interval system is clear with regard to enharmonics so, for example, the interval C to _G is distinct from C to ^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.

Examples: C to ^F is 6 semitones in 3 diatonic steps - C to D, D to E, E to F (as opposed to C to _G which is 6 semitones in 4 diatonic steps). Using this interval:

  • Eb (_E in 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
  • G transposes to C# (^c in abc code) since C is 3 steps above G and C# is 6 semitones above G
  • C# transposes to F## (^^F in 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

13.2 Transposing a file/tune

To transpose an entire file (or all the voices in a tune), use the instruction I:score <note1><note2>, 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 score=, sound= or shift= modifiers to every K: and 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|

13.3 Writing abc code for transposing instruments

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 instrument=<note1>;abc@<note2>, where <note1> expresses the written pitch of the transposing instrument (relative to c) and <note2> expresses the pitch at which the abc is encoded (also relative to c). This operator, instrument=<note1>;abc@<note2>, is a synonym for score=<note1><note2> sound=c<note2>.

There are two typical ways of writing abc code for transposing instruments:

  1. The abc code can be transcribed at sounding pitch using instrument=<note>;abc@c (or score=<note>c, if preferred).
  2. The abc code can be transcribed at written pitch using instrument=<note>;abc@<note> (or 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 instrument= and abc@), the ;abc@<note> may be omitted and so the modifier shortened to instrument=<note>.

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> value).

NB: The <note1> and <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 instrument=Bb.

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.

13.3.1 Generating a concert pitch score

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:concert-score or 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 instrument= and shift= shorthands to their score= and 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 I:sounding-score to score=<note3><note4> sound=<note3><note4>. The same changes apply for I:concert-score unless both <note1> and <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:score, I:sound and 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 clef-concert=<clef-name>.

13.3.2 Transposing instruments - extended example

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. CDEF).

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 <note1> and <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. CDEF).

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:concert-pitch or 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).

Re-transposition: 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 instrument=_E.

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|

13.3.3 Transposing instrument examples

The following table lists some example transposing instruments and the modifiers they would need

abc at concert pitch abc at written pitch
Instrument instrument=<n>;abc@c instrument=<n>;abc@<n> instrument=<n>
piccolo instrument=c';abc@c instrument=c';abc@c' instrument=c'
Bb clarinet instrument=_B;abc@c instrument=_B;abc@_B instrument=_B
soprano sax instrument=_B;abc@c instrument=_B;abc@_B instrument=_B
A clarinet instrument=A;abc@c instrument=A;abc@A instrument=A
alto flute instrument=G;abc@c instrument=G;abc@G instrument=G
cor anglais instrument=F;abc@c instrument=F;abc@F instrument=F
alto sax instrument=_E;abc@c instrument=_E;abc@_E instrument=_E
double bass instrument=C;abc@c instrument=C;abc@C instrument=C
tenor sax instrument=_B,;abc@c instrument=_B,;abc@_B, instrument=_B,

13.4 Custom transposition for diatonic instruments

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.

13.4.1 Fixed pitch transpositions - extended example

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@_d (or instrument=_d;abc@c respectively) but most Highland pipers would be very surprised to hear their pipes referred to as a Db transposing instrument.

13.4.2 Moveable pitch transpositions - extended example

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:|
abc/standard/v2.1/proposals/transposition/v15.txt · Last modified: 2015/02/11 17:07 by cwalshaw
 
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