Dear Yoshi,Actually, I think the procedure is working correctly, but using the \transpose function within a \relative is causing some weird output. For example, the file
% --------
\version "2.25.18"
\relative c' {
c16 <c \transpose c f c>
c16 <c \transpose c f b>
}
% --------
does not result in the output that I was expecting. Maybe someone else
can say why this is, but I'll investigate more later.
-William On 9/13/24 10:48, Yoshiaki Onishi wrote:
Dear LilyPond Community,In the interest of learning more about Scheme as used in LilyPond (and learning LilyPond in general!), I am currently in the process of making a shortcut function that handles the artificial harmonic notation of string instruments instead of typing "<note note \harmonic >"However, something must be wrong with the way I am handling \transpose in the scheme code, and there are some instances of the artificial harmonics that don't render correctly. Code (as tiny as I could manage!) and screenshot attached. I'd be grateful in advance if anyone could enlighten me on this.(Context: I am/was a Finale user with some coding background who rediscovered the LilyPond's goodness and this is week 3 of learning it together with students at the university I work. Part of me wished there was a way to specify the interval of transposition by some kind of interval name followed by a direction, rather than "frompitch topitch"...but I know this has some intricacies with absolute vs relative pitch notation...)Thanks in advance! Yoshi ===== \version "2.24.4"% I tried to use (make-relative) macro to see if it helped with anything, but to no avail.hf = #(define-music-function (note1) (ly:music?) #{ < #note1 \transpose c f $note1 \harmonic > #} ) { \time 3/4 \relative c'{c'16 \hf b \hf bes \hf a \hf as \hf g \hf fis \hf f \hf e \hf es \hf d \hf des | \hf c \hf b }} image.png
-- William Rehwinkel (any pronouns) Juilliard School '26 - Oberlin Conservatory '24 [email protected] - https://williamrehwinkel.net PGP Public Key: https://ftp.williamrehwinkel.net/pubkey.txt
OpenPGP_signature.asc
Description: OpenPGP digital signature
