lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subject: String Concatenation, and Use of Unicode characters [sic]


From: Michael Hendry
Subject: Re: Subject: String Concatenation, and Use of Unicode characters [sic]
Date: Mon, 9 Mar 2015 22:27:09 +0000


On 9 Mar 2015, at 19:48, Flaming Hakama by Elaine <address@hidden> wrote:

> From: Michael Hendry <address@hidden>
> To: Davide Liessi <address@hidden>
> Cc: Lilypond-User Mailing List <address@hidden>
> Subject: Re: Subject: String Concatenation, and Use of Unicode characters [sic]
> > On 7 Mar 2015, at 11:22, Davide Liessi <address@hidden> wrote:
> >
> > Il 03/03/15 07.56, Michael Hendry ha scritto:
> >>> Forgive me for suggesting, but I suggest it improves mental health to
> >>> think of transpose in the form:
> >>>
> >>>    \transpose "to" "from" \musicExpression
> >
> > This is what I do, too: I usually think of transpose as `\transpose "to" "from"` when tranposing instrumental parts from concert pitch to transposed pitch, and as `\transpose "from" "to"` in all other cases.
 
Moments after writing this, I realized how ambiguous it "to" and "from" are. 
A more coherent way of thinking about using \transpose for transposing instruments might be 
 
    \transpose "sounding" "written" \musicExpression
 
The gotcha here is to keep in mind that \transpose does not use relative pitch.  Meaning, if you are used to using relative notiation, you might expect the following to produce the same transposition:
 
    \transpose c d \musicExpression

This one transposes up from c to d...

    \transpose bes c \musicExpression

…but because the scale goes up as c d e f g a b c’, this one transposes from bes (just below c’) down to c - a minor seventh DOWN.

 
But they don't--the first goes up a whole step, the second one goes up a minor seventh.  Personally, I find that the most confusing thing about \transpose.
 
Maybe that's because I haven't graduated to any other kind of music entry besides \relative?


 
> >> I used to think of the transposition in this way until I found a need to
> >> transpose the whole piece to a different key (to accommodate a singer?s
> >> range, for example), and I found the two ways of looking at
> >> transposition tied my brain in knots.
> >
> > Indeed looking at the same command in two ways might be a bit confusing, but I got used to it rather easily.
 
A corresponding way to think about transposing a piece would be 

     \transpose "current key" "new key" \musicExpression
 
(With the same gotcha about not using relative pitch)

Relative pitch (in the lilypond \relative sense) isn’t involved here, only the interval between “current key” and “new key” (which is an upward movement in the case of c to d, but downward in the case of bes to c).



> >> Ideally, I?d like to define the whole-piece transposition at the top of
> >> the file, rather than editing the per-instrument transposition at the
> >> point of book production.
> >
> > You certainly do not need to change the individual transpositions in order to transpose an entire piece: nothing stops you from transposing music that has already been transposed, instead of editing each `\transpose` command.

In a simple version, I would write \TheHead and \TheChords in the target key, and transpose them at the \book stage for the various instruments. This has to be done in eight different places, and is prone to error.

This is why I defined functions for the individual instruments that need never be changed, and did the concert key transposition using \PieceTranspose - only one character to change!

 
+1


> Here is the section of the template where various standard transpositions are defined?
> % Transpose the whole piece
> PieceTranspose =
> #(define-music-function (parser location m)
>    (ly:music?)
>    #{ \transpose c c $m #})

I'm not sure how this helps.  As written, this does nothing.  And if you need to modify your function for each file (to enter the correct transposition), how is it better than just using \transpose directly?  That is what you end up having to do anyway--understand how \transpose works in order to make the modification.

Indeed, it does do nothing as it stands, but it’s there so that all I have to do when I want to transpose the whole piece up a fifth is to change the “c c” part to “c g”. 


I could see it being helpful if it were able to take more expected input (like "up fourth", "down minor 3rd" or some other unambiguous input, and then translate that to \transpose notation.

Generally, I agree that it is useful to have a function if you are going to do the same thing multiple times.  (However, in this case I don't see the purpose--in conjunction with my other comments, below, since I don't think you should use this function more than twice per file.)

I do use the functions several times - once for each instrument.




 
> % Adjust for various transposing instruments
> GuitarTranspose =
> #(define-music-function (parser location m)
>    (ly:music?)
>    #{ \transpose e e' $m #})
> AltoTranspose =
> #(define-music-function (parser location m)
>    (ly:music?)
>    #{ \transpose ees c'  $m #})
> TrumpetTranspose =
> #(define-music-function (parser location m)
>    (ly:music?)
>    #{ \transpose bes c' $m #})

Seems very helpful!

BTW, I also tend to prepare lead sheets in F and A.  Of course, you may not need this.  But if you are preparing a template, it might be helpful to include other common transpositions.

OK. The choice there is either to compile the file three times, adjusting \PieceTranspose in the sequence c c then c f then c a, or to make two more copies of the book-generating section, with  (e.g.) \PieceTransposeFourth and \PieceTransposeSixth in between.

This would make it all a bit unwieldy, and as I want to be able to share this with novice LilyPond users, I don’t want the make the file too long or too clever!


But below, instead of using \PiceTranspose everywhere (which kind of defeats the purpose of doing something globally) I would suggest transposing \TheChords and \TheHead and then using \TransposedChords and \TransposedHead in the template:

 

This comes to the same thing, but uses two extra variables.

But I can see the advantage in doing this in terms of clarity if it comes immediately after the definition of the PieceTranspose function.

I’m trying to keep all the stuff that has to be changed for a given piece in the top part of the file, and ensure that I don’t have to fiddle with the final part - less scope for error if I don’t have to remember to fix up whole piece transactions for the four different parts.

TransposedChords = \PieceTranspose \TheChords
TransposedHead = \PieceTranspose \TheHead

#(define output-suffix "Concert")
\book {
  \score {
    <<
      \TransposedChords
      \TransposedHead
    >>
    \header {
      piece = \markup { \fontsize #-1 "Concert" }
    }
  }
}

% Guitar version - transposed up an octave

#(define output-suffix "guitar")
\book {
  \score {
    <<
      \GuitarTranspose { \TransposedChords }
      \GuitarTranspose { \TransposedHead }
    >>
    \header {
      piece = \markup { \fontsize #-1 "Guitar" }
    }
  }
}

% Trumpet version - transposed  up a tone

#(define output-suffix "trumpet-Bb")
\book {
  \score {
    <<
      \TrumpetTranspose { \TransposedChords }
      \TrumpetTranspose { \TransposedHead }
    >>
    \header {
      piece = \markup { \fontsize #-1 "Trumpet in B" \smallFlat }
    }
  }
}

% Alto Sax version - transposed up a major sixth

#(define output-suffix "alto-Eb")
\book {
  \score {
    <<
      \AltoTranspose { \TransposedChords }
      \AltoTranspose { \TransposedHead }
    >>
    \header {
      piece = \markup { \fontsize #-1 "Alto Sax in E" \smallFlat }
    }
  }
}


HTH, 

David Elaine Alt
415 . 341 .4954                                           "Confusion is highly underrated"
address@hidden
self-immolation.info
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Thanks for your help in clarifying my thoughts!

Michael


reply via email to

[Prev in Thread] Current Thread [Next in Thread]