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

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

 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
abc:standard:v2.1:proposals:transposition:v11 [2014/06/17 09:58]
cwalshaw
abc:standard:v2.1:proposals:transposition:v11 [2014/06/18 09:54]
cwalshaw [13.1 Transposition operators]
Line 71: Line 71:
   * ''​shift-sound=[+]<​note1><​note2>''​ transposes the playback according to the specified interval (the typeset score 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''​).+Transpositions are applied to notesgrace notes, chords and key signatures. 
 + 
 +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''​. // 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   K:G shift-score=CG shift-sound=DC
   ABcd   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 
- 
-The optional ''​+''​ symbol (e.g. ''​shift=+<​note1><​note2>''​) has the effect of combining with, rather than overriding, existing transposition and is mainly intended for use with whole file transpositions - see [[#​transposing a file]]. 
- 
-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. 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.
Line 99: Line 91:
  
 // 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.) // 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 shift-score=CG shift-sound=CG
 +  K:G shift=CG
 +
 +The optional ''​+''​ symbol (e.g. ''​shift=+<​note1><​note2>''​) has the effect of combining with, rather than overriding, existing transposition and is mainly intended for use with whole file transpositions - see [[#​transposing a file]]. Combining shifts are never inherited by subsequent ''​K:''​ and ''​V:''​ fields - instead the combined shift is inherited.
 +
 +// Example: // The following two excerpts are equivalent. In the former, the ''​shift''​ modifiers for the first ''​V:''​ field combine to give ''​shift=CG''​ which is then inherited by the second ''​V:''​ field (since it is in the same voice); it is also inherited by the third ''​V:''​ field, but is overridden. The latter excerpt just includes the ''​shift''​ explicitly for comparison.
 +  V:1 shift=CD shift=+DG
 +  V:1
 +  V:1 shift=CD
 +  ​
 +  V:1 shift=CG
 +  V:1 shift=CG
 +  V:1 shift=CD
  
 ==== 13.2 Writing abc code for transposing instruments ==== ==== 13.2 Writing abc code for transposing instruments ====
Line 242: Line 251:
   * One mechanism missing from the proposal is allowing provision for clefs which change between a concert pitch score its written pitch counterpart. However, since transposing instruments are always typeset at written pitch (except when ''​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.   * One mechanism missing from the proposal is allowing provision for clefs which change between a concert pitch score its written pitch counterpart. However, since transposing instruments are always typeset at written pitch (except when ''​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.
  
-A recurring question is whether independent ''​shift-score''​ and ''​shift-sound''​ modifiers are actually necessary. I have discussed this separately in [[abc:​standard:​v2.1:​proposals:​transposition:​independent-shift-use-case|the independent shift use case]].+A recurring question is whether independent ''​shift-score''​ and ''​shift-sound''​ modifiers are actually necessary. I have discussed this separately in [[abc:​standard:​v2.1:​proposals:​transposition:​independent-shift-use-case|the independent-shift use-case]].
  
 The other question that has arisen is whether the ''​instrument''​ modifier should be instructive or declarative (i.e. instructing abc software to do something as opposed to declaring some information which the software can act on if another instruction,​ such as "​create a written pitch score",​ is present). The argument for the latter is that the English syntax is declarative (since instrument is a noun rather than a verb). The other question that has arisen is whether the ''​instrument''​ modifier should be instructive or declarative (i.e. instructing abc software to do something as opposed to declaring some information which the software can act on if another instruction,​ such as "​create a written pitch score",​ is present). The argument for the latter is that the English syntax is declarative (since instrument is a noun rather than a verb).
abc/standard/v2.1/proposals/transposition/v11.txt · Last modified: 2014/06/18 09:54 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