home | tune search | software | learn abc | discuss | about | blog | Starbound/LOTRO | contact |
[abc standard: home | current | route-map | updating | proposals]
This page contains the tenth draft of a proposal to extend the transcription capabilities within abc (based on numerous comments, suggestions and proposals on the abcusers mailing list from 2011 to 2012). Following a near 2-year hiatus this latest proposal merges ideas from my previous proposal and Alex Scheutzow's second proposal, yet represents a significant simplification of both.
The important aspects of this proposal are:
shift-score
and shift-sound
operators which allow the typeset score and playback to be modified independentlyinstrument
, written
and shift
shorthands for shift-score
/ shift-sound
variants, allowing for transposing instruments and for combined score and sound transpositions.I have included some notes and comments at the end.
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>[<line number>][+8|-8] stafflines=<lines> octave=<number> shift-score=<note1><note2> shift-sound=<note1><note2> shift=<note1><note2> instrument=<note> written=<note>
(where <…>
denotes a value, […]
denotes an optional parameter, and |
separates alternative values).
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 …
shift-score=<note1><note2>
transposes the typeset score according to the specified interval (the playback is not affected) - for more information see transposition operators;shift-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 shift-score=<note1><note2> shift-sound=<note1><note2>
- for more information see transposition operators;instrument=<note>
is a shorthand for shift-score=<note>c
- for more information see writing abc code for transposing instruments;written=<note>
is a shorthand for shift-sound=c<note>
- for more information see writing abc code for transposing instruments;… unchanged …
Note:
transpose=<semitones>
modifier of abc 2.1 and earlier is now deprecated (replaced by the shift-sound
modifier - see transposition).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 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.
For each K:
or V:
field, modifiers may be arranged in any order but there should be no more than one of each modifier in the same field.
If there are inherited or repeated modifiers, then the second overrides the first. In the specific case of shift-score
or shift-sound
modifiers mixed together with shift
, instrument
or written
modifiers, replace the latter with their shift-score
and shift-sound
equivalents. For example, shift=CG shift-score=CD
becomes shift-score=CG shift-sound=CG shift-score=CD
and so the second shift-score
overrides the first to give shift-sound=CG shift-score=CD
.
Finally note that there are two ways to specify octave shifts and, for example, octave=1
is equivalent to shift=Cc
. However these operators can be used independently and so neither overrides the other.
The fundamental transposition operators are shift-sound
and shift-score
which act as modifiers for K:key
and V:voice
fields:
shift-score=<note1><note2>
transposes the typeset score according to the specified interval (the playback is not affected)shift-sound=<note1><note2>
transposes the playback according to the specified interval (the typeset score is not affected)
When using shift-score
and shift-sound
, 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 shift-score
or the playback in the case of shift-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 shift-score=CG shift-sound=DC ABcd
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 shift-score=CG shift-sound=CG K:G shift=CG
Shift operators are applied to notes, grace notes, chords and key signatures.
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:
_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 it is 6 semitones above Eb^c
in abc code) since C is 3 steps above G and C# is 6 semitones above G^^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# shift-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).
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.)
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).
This section uses written pitch (i.e. the pitch that is written on a transposing instrument's score) and concert pitch (i.e. the pitch that is actually sounded) to distinguish between the two.
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.
There are two ways of writing abc code for transposing instruments:
shift-score=<note1><note2>
modifiers used to transpose the typeset scores appropriately. If preferred the instrument=<note>
modifier can be used as a shorthand for shift-score=<note>c
.shift-sound=<note1><note2>
modifiers used to transpose the playback appropriately. If preferred the written=<note>
modifier can be used as a shorthand for shift-sound=c<note>
.
In both cases the typeset score is rendered at written pitch. If a concert pitch score is required the I:concert-score
directive can be applied. For transcriptions at concert pitch this has the effect of cancelling all of the shift-score
modifiers (and the instrument
shorthand). For transcriptions at written pitch it has the effect of altering shift-sound
modifiers (and the written
shorthand) to shift
modifiers.
The following example illustrates the principles of writing for transposing instruments.
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: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, either using shift-score
:
V:clarinet shift-score=_Bc K:C CDEF|
or using instrument
as a shorthand:
V:clarinet instrument=_B K:C CDEF|
This will be rendered by abc typesetting software according to the shift (i.e. [K:D] DEFG
) but sounded as transcribed (i.e. CDEF
). If a concert pitch score is required it can be typeset by adding an I:concert-score
instruction.
Alternatively, if the composer wants the abc code at written pitch, the same piece can be transcribed:
V:clarinet shift-sound=c_B K:D DEFG|
or:
V:clarinet written=_B K:D DEFG|
This will be rendered by abc typesetting software as transcribed (DEFG
) but sounded according to the shift (i.e. CDEF
). Again, if a concert pitch score is required it can be typeset by adding an I:concert-score
instruction.
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:violin CDEF| V:clarinet instrument=_B CDEF|
or at written pitch as:
K:C V:violin CDEF| V:clarinet written=_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
instruction in the file or tune header.
Finally, suppose that the clarinet player has fallen ill and is to be replaced by an alto sax player who now needs a transposed part to read. If the abc code has been transcribed at concert pitch this is extremely easy by replacing instrument=_B
with instrument=_E
.
K:C V:violin CDEF| V:alto-sax instrument=_E CDEF|
If the abc code has been transposed at written pitch (in this case for a Bb instrument) it is a little harder. The written=_B
can remain, as it is adjusting the playback to concert but, since this is no longer being used for a Bb instrument, it may be clearer to replace it with the shift-sound=c_B
alternative. To adjust the score, consider that the Bb clarinet is written a major second higher than it is sounded (so C is written D) whereas the alto sax is written a major sixth higher than it is sounded (so C is written A). Since the abc code is already transcribed a tone higher, it needs to be raised by a further fifth (i.e. a major sixth less a major second) using shift-score=CG
. The resulting code is
K:C V:violin CDEF| V:alto-sax shift-sound=c_B shift-score=CG K:D DEFG|
This final example suggests that, all other things being equal, it is rather more flexible to transcribe the abc code at concert pitch rather than at written pitch.
The following table lists some example transposing instruments and the modifiers they would need
abc code transcribed at concert pitch | abc code transcribed at written pitch | |||
---|---|---|---|---|
Instrument | shift-score | instrument | shift-sound | written |
piccolo | shift-score=c'c | instrument=c' | shift-sound=cc' | written=c' |
Bb clarinet | shift-score=_Bc | instrument=_B | shift-sound=c_B | written=_B |
soprano sax | shift-score=_Bc | instrument=_B | shift-sound=c_B | written=_B |
A clarinet | shift-score=Ac | instrument=A | shift-sound=cA | written=A |
alto flute | shift-score=Gc | instrument=G | shift-sound=cG | written=G |
cor anglais | shift-score=Fc | instrument=F | shift-sound=cF | written=F |
alto sax | shift-score=_Ec | instrument=_E | shift-sound=c_E | written=_E |
tenor sax | shift-score=_B,c | instrument=_B, | shift-sound=c_B, | written=_B, |
I welcome comments on all of the above proposal but in particular:
instrument
as a modifier, but less so with written
. Any suggestions for something to replace it?instrument=_B
for Bb instruments is particularly suggestive, and actually it wouldn't cause any ambiguity to allow instrument=Bb
(or, in principle, instrument=F#
) provided it was used alongside the octave
syntax, so that (to take an exotic example) a piccolo trumpet, which is in high Bb, would be written instrument=Bb octave=1
rather than instrument=bb
. On the other hand, perhaps this is an unnecessary complication. Any thoughts?I:concert-score
is present), that means we just need something like concert-clef=treble
(which would only apply when I:concert-score
is present) to handle this.I:shift-score
, I:shift-sound
and as a shorthand I:shift
instruction fields (which, if included at the top of a file, would apply their contents to all of the K:
and V:
fields in the file. Or we could just forget about this as an unnecessary complication. I am inclined to the latter point of view.
I am aware that perhaps the most controversial change in this proposal is that the instrument
and written
modifiers are now instructive rather than declarative (i.e. they now instruct abc software to do something rather than declaring some information which the software can act on if another instruction, such as "create a written pitch score", is present). However I now think this is better for two reasons:
I:
fields and some as K:
and V:
modifiers) which can combine to affect the output.K:
and V:
fields already have several well-established instructive modifiers (clef
, middle
and octave
) which affect the placement of the notes relative to the staff. Including new declarative modifiers alongside them will result in a mixture of declarative and instructive syntax which would be very confusing for users.Chris Walshaw, June 2014