[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: |
Sat, 7 Mar 2015 16:44:26 +0000 |
> 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.
>
>> 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.
>
>> 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.
>
> When I need to transpose a piece I usually place `\transpose "from" "to"`
> just before the music expression inside `\score`.
> Unless I need to change the octave of an instrument, this is sufficient.
>
> E.g. if I needed to transpose this piece one tone up...
>
> \score {
> <<
> \new Staff \transpose bes, c \trumpetPartConcert
> \new PianoStaff <<
> \new Staff \pianoRight
> \new Staff \pianoLeft
> >>
> >>
> \layout { }
> }
>
> ... I would simply write
>
> \score {
> \transpose c d
> <<
> \new Staff \transpose bes, c \trumpetPartConcert
> \new PianoStaff <<
> \new Staff \pianoRight
> \new Staff \pianoLeft
> >>
> >>
> \layout { }
> }
>
> Best wishes.
> Davide
Thanks, Davide.
I’m working on a template to share with other jazz musicians, especially
students on the Jazz Course at St Andrews University, a few miles from here.
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 #})
% 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 #})
…and here is where these functions are called…
#(define output-suffix "Concert")
\book {
\score {
<<
\PieceTranspose { \TheChords }
\PieceTranspose { \TheHead }
>>
\header {
piece = \markup { \fontsize #-1 "Concert" }
}
}
}
% Guitar version - transposed up an octave
#(define output-suffix "guitar")
\book {
\score {
<<
\GuitarTranspose \PieceTranspose { \TheChords }
\GuitarTranspose \PieceTranspose { \TheHead }
>>
\header {
piece = \markup { \fontsize #-1 "Guitar" }
}
}
}
% Trumpet version - transposed up a tone
#(define output-suffix "trumpet-Bb")
\book {
\score {
<<
\TrumpetTranspose \PieceTranspose { \TheChords }
\TrumpetTranspose \PieceTranspose { \TheHead }
>>
\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 \PieceTranspose { \TheChords }
\AltoTranspose \PieceTranspose { \TheHead }
>>
\header {
piece = \markup { \fontsize #-1 "Alto Sax in E" \smallFlat }
}
}
}
…the idea being that the code is reasonably self-documenting, and the user only
has to define \TheChords and \TheHead and edit the title to get a set of parts
in the necessary keys.
Only one line needs to be edited to change the key of the piece.
I’ve picked up a number of useful chunks of code from other list users, and I’m
having to steer a middle course between heavy use of Scheme (which I struggle
to follow) and a self-flagellating insistence on pure Lilypond!
I’m going to try this template out on a number of pieces I’ve already
transcribed, and if all goes well, I’ll report back to the list with the
complete .LY file.
Regards
Michael