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
Next revision Both sides next revision
abc:standard:v2.1:proposals:transposition:v11 [2014/06/16 22:31]
cwalshaw
abc:standard:v2.1:proposals:transposition:v11 [2014/06/17 10:08]
cwalshaw
Line 2: Line 2:
 This page contains the eleventh draft of a proposal to extend the transcription capabilities within abc. It involves only minor changes from the tenth draft: This page contains the eleventh draft of a proposal to extend the transcription capabilities within abc. It involves only minor changes from the tenth draft:
   * Minor change of syntax from ''​instrument=<​note>''​ / ''​written=<​note>''​ to ''​instrument=<​note>;​abc=concert''​ / ''​instrument=<​note>;​abc=written'' ​   * Minor change of syntax from ''​instrument=<​note>''​ / ''​written=<​note>''​ to ''​instrument=<​note>;​abc=concert''​ / ''​instrument=<​note>;​abc=written'' ​
-  * New ''​I:​shift*'' ​instructions ​so that transpositions can be applied to a whole file.+  * New ''​I:​shift-score''​, ''​I:​shift-sound''​ and ''​I:​shift''​ instruction fields ​so that transpositions can be applied to a whole file.
   * A new ''​+''​ parameter so that ''​shift*''​ changes can be combined.   * A new ''​+''​ parameter so that ''​shift*''​ changes can be combined.
  
-The important aspects of this proposal are:+The important aspects of this proposal are the same as version 10:
   * A single system for transposition (rather than the dual high/​low-level systems proposed previously) consisting of the well-establised ''​shift-score''​ and ''​shift-sound''​ operators which allow the typeset score and playback to be modified independently   * A single system for transposition (rather than the dual high/​low-level systems proposed previously) consisting of the well-establised ''​shift-score''​ and ''​shift-sound''​ operators 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   * transposition by interval (e.g. C to G), rather than by semitones as previously
-  * ''​instrument'' ​alternative ​for ''​shift-score''​ and ''​shift-sound'',​ to give an intuitive specification for transposing instruments+  * ''​instrument'' ​alternatives ​for ''​shift-score''​ and ''​shift-sound'',​ to give an intuitive specification for transposing instruments
   * ''​shift''​ shorthand for combined score and sound transpositions   * ''​shift''​ shorthand for combined score and sound transpositions
  
Line 23: Line 23:
  
   [clef=]<​clef name>​[<​line number>​][+8|-8] stafflines=<​lines>​ octave=<​number>​   [clef=]<​clef name>​[<​line number>​][+8|-8] stafflines=<​lines>​ octave=<​number>​
-    shift-score=<​note1><​note2>​ shift-sound=<​note1><​note2>​ +    shift-score=[+]<​note1><​note2>​ shift-sound=[+]<​note1><​note2>​ 
-    shift=<​note1><​note2>​ instrument=<​note>;​[abc=]concert|written+    shift=[+]<​note1><​note2>​ instrument=<​note>;​[abc=]concert|written
   ​   ​
 (where ''<​...>''​ denotes a value, ''​[...]''​ denotes an optional parameter, and ''​|''​ separates alternative values). (where ''<​...>''​ denotes a value, ''​[...]''​ denotes an optional parameter, and ''​|''​ separates alternative values).
Line 36: Line 36:
   * ''​shift=[+}<​note1><​note2>''​ is a shorthand for ''​shift-score=[+}<​note1><​note2>​ shift-sound=[+}<​note1><​note2>''​ - 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>;​abc=concert''​ is a alternative for ''​shift-score=<​note>​c''​ - for more information see [[#writing abc code for transposing instruments]];​   * ''​instrument=<​note>;​abc=concert''​ is a alternative for ''​shift-score=<​note>​c''​ - for more information see [[#writing abc code for transposing instruments]];​
-  * ''​instrument=<​note>;​abc=concert''​ is a alternative for ''​shift-sound=c<​note>''​ - for more information see [[#writing abc code for transposing instruments]];​+  * ''​instrument=<​note>;​abc=written''​ is a alternative for ''​shift-sound=c<​note>''​ - for more information see [[#writing abc code for transposing instruments]];​
  
 // ... unchanged ... // // ... unchanged ... //
Line 59: Line 59:
 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''​. 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''​.
  
-An exception to the overriding rule is that if ''​shift-score'',​ ''​shift-sound''​ or ''​shift''​ is written with a ''​+''​ symbol, ​i.e. as ''​shift*=+<​note1><​note2>'',​ then the transposition is //​combined//​ with preceding transposition modifiers in the same field, rather than overriding them. See [[#​transposing a file]] for an example of when this would be useful. ​+An exception to the overriding rule is that if ''​shift-score'',​ ''​shift-sound''​ or ''​shift''​ is written with a ''​+''​ symbol, e.g. as ''​shift=+<​note1><​note2>'',​ then the transposition is //​combined//​ with preceding transposition modifiers in the same field, rather than overriding them. See [[#​transposing a file]] for an example of when this would be useful. ​
  
 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. 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.
Line 68: Line 68:
  
 The fundamental transposition operators are ''​shift-sound''​ and ''​shift-score''​ which act as modifiers for ''​K:​key''​ and ''​V:​voice''​ fields: 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-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)+  * ''​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''​). 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''​).
Line 82: Line 82:
   K:G shift-score=CG shift-sound=CG   K:G shift-score=CG shift-sound=CG
   K:G shift=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. Shift operators are applied to notes, grace notes, chords and key signatures.
Line 89: Line 91:
 // Examples: // // 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: ''​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 it is 6 semitones above Eb+  * 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   * 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#   * C# transposes to F## (''​^^F''​ in abc code) since F is 3 steps above C and F## is 6 semitones above C#
Line 110: Line 112:
   - The abc code can be transcribed at written pitch with ''​shift-sound=<​note1><​note2>''​ modifiers used to transpose the playback appropriately. If preferred the ''​instrument=<​note>;​abc=written''​ modifier can be used as a alternative for ''​shift-sound=c<​note>''​. Again the ''​abc=''​ is optional so this could be written ''​instrument=<​note>;​written''​.   - The abc code can be transcribed at written pitch with ''​shift-sound=<​note1><​note2>''​ modifiers used to transpose the playback appropriately. If preferred the ''​instrument=<​note>;​abc=written''​ modifier can be used as a alternative for ''​shift-sound=c<​note>''​. Again the ''​abc=''​ is optional so this could be written ''​instrument=<​note>;​written''​.
  
-In both cases the typeset score is rendered at //written pitch//. If a concert pitch score is required the ''​I:​concert-score''​ instruction can be applied. For transcriptions at concert pitch this has the effect of cancelling all of the ''​shift-score''​ modifiers (and the ''​instrument=<​note>;​abc=concert''​ alternative). For transcriptions at written pitch it has the effect of altering ''​shift-sound''​ modifiers (and the ''​instrument=<​note>;​abc=written''​ alternative) to ''​shift''​ modifiers. ​+In both cases the typeset score is rendered at //written pitch// ​by default. 
 + 
 +If a concert pitch score is required the ''​I:​concert-score''​ instruction can be applied, either in the file header or the tune header. For transcriptions at concert pitch this has the effect of cancelling all of the ''​shift-score''​ modifiers (and the ''​instrument=<​note>;​abc=concert''​ alternative). For transcriptions at written pitch it has the effect of altering ''​shift-sound''​ modifiers (and the ''​instrument=<​note>;​abc=written''​ alternative) to ''​shift''​ modifiers
 + 
 +// Note: // The ''<​note>''​ in the ''​instrument=<​note>''​ syntax is a note and not a key (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''​.
  
 The following example illustrates the principles of writing for transposing instruments. The following example illustrates the principles of writing for transposing instruments.
Line 140: Line 146:
   DEFG|   DEFG|
  
-or:+or using ''​instrument''​ as a alternative:
   V:clarinet instrument=_B;​abc=written   V:clarinet instrument=_B;​abc=written
   K:D   K:D
Line 174: Line 180:
   CDEF|   CDEF|
  
-If the abc code has been transposed at written pitch (in this case for a Bb instrument) it is a little harder. The ''​instrument=_B;​abc=written''​ can remain, as it is adjusting the playback to concert and also will serve as a reminder that the part was originally transcribed at written pitch for a Bb instrument. 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''​ (or ''​shift-score=DA''​ if that is easier to calculate). The resulting code is+If the abc code has been transposed at written pitch (in this case for a Bb instrument) it is a little harder. 
 + 
 +The ''​instrument=_B;​abc=written''​ can remain, as it is adjusting the playback to concert and also will serve as a reminder that the part was originally transcribed at written pitch for a Bb instrument. 
 + 
 +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''​ (or ''​shift-score=DA''​ if that is easier to think about). The resulting code is
   K:C   K:C
   V:violin   V:violin
Line 225: Line 235:
  
 I welcome comments on all of the above proposal but in particular: I welcome comments on all of the above proposal but in particular:
-  * After suggestions on the tenth proposal I have made the transposing instrument modifiers much more explicit - i.e. ''​instrument=<​note>;​abc=concert''​ and ''​instrument=<​note>;​abc=written''​. A number of other suggestions have been made for the qualifier which specifies whether the abc encoded at concert or written pitch including:+  * After suggestions on the tenth proposal I have made the transposing instrument modifiers much more explicit - i.e. ''​instrument=<​note>;​abc=concert''​ and ''​instrument=<​note>;​abc=written''​. A number of other suggestions have been made for the qualifier which specifies whether the abc encoded at concert or written pitch including ​the following (I don't really mind which we end up with):
     * ''​concert-encoded''​ / ''​written-encoded''​ - a little more verbose     * ''​concert-encoded''​ / ''​written-encoded''​ - a little more verbose
     * ''​concert''​ / ''​written''​ - perhaps a little too terse and open to being misinterpreted by a user as relating to the typeset score (although this proposal does allow for these as shorthand)     * ''​concert''​ / ''​written''​ - perhaps a little too terse and open to being misinterpreted by a user as relating to the typeset score (although this proposal does allow for these as shorthand)
-    * ''​abcAsSound''​ / ''​abcAsScore''​ - personally I don't find this very intuitive (particularly because it means that ''​instrument=<​note>;​abcAsScore''​ is an alternative for ''​shift-sound=c<​note>''​ and vice-versa and because ''​abcAsScore''​ really means ''​abcAsWrittenScore'',​ since the score can either be typeset at concert or written pitch) +    * ''​abcAsSound''​ / ''​abcAsScore''​ - personally I don't find these very intuitive (particularly because it means that ''​instrument=<​note>;​abcAsScore''​ is an alternative for ''​shift-sound=c<​note>''​ and vice-versaand also because ''​abcAsScore''​ really means ''​abcAsWrittenScore'',​ since the score can either be typeset at concert or written pitch)
-  However, I don't really mind which we end up with.+
  
   * 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).
  
-I have now come to think of the crux of the question as whether the abc syntax should be active or passive.+I have now come to think of the crux of the question as whether the abc syntax should be **active** or **declarative** - active meaning that any change to the abc code (particularly in the tune body) will result in a change to the way it is interpreted (either by a program or a human).
  
-However ​now think this is better ​for two reasons: +prefer active syntax ​for two reasons: 
-  - Instructive ​syntax is generally simpler; declarative syntax means that you have different operators, potentially in very different parts of the file (e.g. some in ''​I:''​ fields and some as ''​K:''​ and ''​V:''​ modifiers) which can combine to affect the output. +  - Active ​syntax is generally simpler; declarative syntax means that you have different operators, potentially in very different parts of the file (e.g. some in ''​I:''​ fields and some as ''​K:''​ and ''​V:''​ modifiers) which can combine to affect the output. 
-  - The ''​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.+  - The ''​K:''​ and ''​V:''​ fields already have several well-established ​active ​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 the two which would be very confusing for users (who by now are used to making changes to an abc and seeing those changes reflected in the score).
  
 Chris Walshaw, June 2014 Chris Walshaw, June 2014
- 
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