Re: \pitchedTrill not displayed
> I don't get the musical meaning of having two simultaneous trills > *in the same voice* (as opposed to simultaneous trills in two > different voices). Irrespective of the current issue, having a trill on a chord, with all notes involved, is happening regularly in piano music. Attached is an example from Fauré op. 19 – this old edition uses accidentals above the trill, but a modern one could theoretically use secondary notes instead. Werner
Re: title in the Breitkopf fraktura font
> Le 1 sept. 2023 à 00:11, Valentin Petzel a écrit : > > To me this seems like your python does not know the := operator, which was > introduced with python 3.8. Try to check your python version. This should theoretically be irrelevant because the binaries are shipped with their own embedded Python interpreter. The question is how comes that another interpreter is being used, which is wrong.
Re: custom replace/map of one set of pitches to another
Thank you Valentin for this solution and the following explanation why it is likely safer. All responses have been much appreciated. Best, Michael Sep 1, 2023, 00:15 by valen...@petzel.at: > Hi Michael, > > some time ago I created a function for exactly that for a stackexchange > question: > https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure > > Essentially it introduces a function to map one scale to another, and it does > so by basepitch to retain alteration. One could easily adapt this function to > match by base pitch and alteration: > > transposePitchClasses = > #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?) > (let* ((scaleA (ly:music-property scaleA 'elements)) > (scaleB (ly:music-property scaleB 'elements)) > (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA)) > (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB)) > (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch- > alteration p))) scaleA))) > (map-some-music > (lambda (m) > (let ((p (ly:music-property m 'pitch))) > (if (not (null? p)) > (let* ((nn (ly:pitch-notename p)) > (oct (ly:pitch-octave p)) > (alt (ly:pitch-alteration p)) > (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) > alt))) classesA))) > (if pos > (let* ((p2 (list-ref scaleA pos)) > (oct2 (ly:pitch-octave p2)) > (p3 (list-ref scaleB pos)) > (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- > oct oct2) 0 > (ly:music-set-property! m 'pitch new-pitch))) > m) > #f))) > music) > music)) > > \transposePitchClasses {d fih g aih} {dih f gis a} > { c' cis' d' dis' f' fih' fis' g' a' aih' } > > Am Donnerstag, 31. August 2023, 12:53:26 CEST schrieb Michael Winter via > LilyPond user discussion: > >> I would like to do something (hopefully simple), which is basically a custom >> find and replace for a set of notes in an entire score. >> >> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} >> >> So basically on arbitrary list of pitches / scale to another. >> >> Is this possible without writing a custom function. If not, any hints on how >> to tackle the problem would be much appreciated. Thanks in advance. >> >> -Michael >>
Re: custom replace/map of one set of pitches to another
Hello Lukas, I don’t think this is a particularly good idea. Lilypond conceptually first creates data for the sementic meaning of the music (or the actual content) and have engravers turn this into graphical content. Mapping pitches to other pitches is not a layout option, but a musical transformation and should thus be done on the music level, not the layout level. Using an engraver will mean it is hard to combine this with other musical transformations, and it will also cause order issues as soon as you have an engraver that depends on the pitch property. Cheers, Valentin Am Donnerstag, 31. August 2023, 14:35:45 CEST schrieb Lukas-Fabian Moser: > Hi Michael, > > over time, I found that doing something like this in an engraver (as > opposed to a music function) is actually much easier and conceptually > clear, in spite of the seeming difficulty of the engraver syntax. The > advantage of using an engraver being that you see the "actual" pitches > and don't have to fight with problems of \relative, \transpose and so on. > > \version "2.24.0" > > pitch-replace-dictionary = > #(list >(cons #{ c #} #{ cis #}) >(cons #{ d #} #{ des #}) >) > > #(define (pitch-class= p q) > (and > (= (ly:pitch-notename p) (ly:pitch-notename q)) > (= (ly:pitch-alteration p) (ly:pitch-alteration q > > Pitch_replace_engraver = > #(lambda (context) > (make-engraver > (listeners > ((note-event engraver event) >(let* > ((pitch (ly:event-property event 'pitch)) > (rule (assoc pitch pitch-replace-dictionary pitch-class=))) > > (if rule > (ly:event-set-property! > event 'pitch > (ly:make-pitch (ly:pitch-octave pitch) > (ly:pitch-notename (cdr rule)) > (ly:pitch-alteration (cdr rule)) > > \layout { >\context { > \Score > \consists #Pitch_replace_engraver >} > } > > \relative { >c'4 d e c8 8 >\transpose f c \relative { > f'4 g a >} > } > > This engraver can also be added to just a single score (\layout inside > \score {}) or even a single Staff or Voice. At the moment, the > replacement dictionary is global, but this could be changed if needed. > > At the moment the mechanism I chose is too crude to do replacements that > involve changing the pitch-octave (eg from c to b,). Do you need this? > > Lukas > > Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion: > > I would like to do something (hopefully simple), which is basically a > > custom find and replace for a set of notes in an entire score. > > > > For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} > > > > So basically on arbitrary list of pitches / scale to another. > > > > Is this possible without writing a custom function. If not, any hints > > on how to tackle the problem would be much appreciated. Thanks in advance. > > > > -Michael signature.asc Description: This is a digitally signed message part.
Re: custom replace/map of one set of pitches to another
Hi Michael, some time ago I created a function for exactly that for a stackexchange question: https://music.stackexchange.com/questions/127175/lilypond-transpose-a-sequence-to-modes-with-different-intervallic-structure Essentially it introduces a function to map one scale to another, and it does so by basepitch to retain alteration. One could easily adapt this function to match by base pitch and alteration: transposePitchClasses = #(define-music-function (scaleA scaleB music) (ly:music? ly:music? ly:music?) (let* ((scaleA (ly:music-property scaleA 'elements)) (scaleB (ly:music-property scaleB 'elements)) (scaleA (map (lambda (x) (ly:music-property x 'pitch)) scaleA)) (scaleB (map (lambda (x) (ly:music-property x 'pitch)) scaleB)) (classesA (map (lambda (p) (cons (ly:pitch-notename p) (ly:pitch- alteration p))) scaleA))) (map-some-music (lambda (m) (let ((p (ly:music-property m 'pitch))) (if (not (null? p)) (let* ((nn (ly:pitch-notename p)) (oct (ly:pitch-octave p)) (alt (ly:pitch-alteration p)) (pos (list-index (lambda (x) (and (= (car x) nn) (= (cdr x) alt))) classesA))) (if pos (let* ((p2 (list-ref scaleA pos)) (oct2 (ly:pitch-octave p2)) (p3 (list-ref scaleB pos)) (new-pitch (ly:pitch-transpose p3 (ly:make-pitch (- oct oct2) 0 (ly:music-set-property! m 'pitch new-pitch))) m) #f))) music) music)) \transposePitchClasses {d fih g aih} {dih f gis a} { c' cis' d' dis' f' fih' fis' g' a' aih' } Am Donnerstag, 31. August 2023, 12:53:26 CEST schrieb Michael Winter via LilyPond user discussion: > I would like to do something (hopefully simple), which is basically a custom > find and replace for a set of notes in an entire score. > > For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} > > So basically on arbitrary list of pitches / scale to another. > > Is this possible without writing a custom function. If not, any hints on how > to tackle the problem would be much appreciated. Thanks in advance. > > -Michael signature.asc Description: This is a digitally signed message part.
Re: title in the Breitkopf fraktura font
Hello Bernhard, > Thanks a lot, that was fairly simple. I noted an error with convert-ly: > > F:\Meine Noten\EigeneNoten\Kirchenchor> C:\"Program Files > > (x86)"\LilyPond\lilypond-2.25.7\bin\convert-ly > > .\Näher-mein-Gott-zu-dir-Lowell-Mason-1792-1972-2.22.1.ly > > C:\Program Files (x86)\LilyPond\lilypond-2.25.7\bin\convert-ly : > > Traceback (most recent call last): > > In Zeile:1 Zeichen:2 > > + C:\"Program Files (x86)"\LilyPond\lilypond-2.25.7\bin\convert-ly > > .\N ... > > + > > + CategoryInfo : NotSpecified: (Traceback (most recent > > call last)::String) [], RemoteException > > + FullyQualifiedErrorId : NativeCommandError > > > > File "C:\Program Files > > (x86)\LilyPond\lilypond-2.25.7\bin\convert-ly.py", line 82, in > > import convertrules > > File "C:\Program Files > > (x86)\LilyPond\lilypond-2.25.7\share\lilypond\2.25.7\python\convertrules.p > > y", line 5202 > > if m := re.search(r"#:roman\b(?!-)", s): > > ^ > > SyntaxError: invalid syntax To me this seems like your python does not know the := operator, which was introduced with python 3.8. Try to check your python version. Cheers, Valentin signature.asc Description: This is a digitally signed message part.
Re: title in the Breitkopf fraktura font
Am 31.08.2023 um 18:51 schrieb Jean Abou Samra: Le 31 août 2023 à 18:06, bernhard kleine a écrit : I never tried different fonts, but now I would like to print the title of the music in a fraktura font. Could you please help me with that? Have you read the documentation on using different fonts in markup? It is here for the 2.24 version: https://lilypond.org/doc/v2.24/Documentation/notation/fonts#single-entry-fonts and here for the 2.25 series (which has many simplifications in this area): https://lilypond.org/doc/v2.25/Documentation/notation/changing-fonts Best, Jean Thanks a lot, that was fairly simple. I noted an error with convert-ly: F:\Meine Noten\EigeneNoten\Kirchenchor> C:\"Program Files (x86)"\LilyPond\lilypond-2.25.7\bin\convert-ly .\Näher-mein-Gott-zu-dir-Lowell-Mason-1792-1972-2.22.1.ly C:\Program Files (x86)\LilyPond\lilypond-2.25.7\bin\convert-ly : Traceback (most recent call last): In Zeile:1 Zeichen:2 + C:\"Program Files (x86)"\LilyPond\lilypond-2.25.7\bin\convert-ly .\N ... + + CategoryInfo : NotSpecified: (Traceback (most recent call last)::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError File "C:\Program Files (x86)\LilyPond\lilypond-2.25.7\bin\convert-ly.py", line 82, in import convertrules File "C:\Program Files (x86)\LilyPond\lilypond-2.25.7\share\lilypond\2.25.7\python\convertrules.py", line 5202 if m := re.search(r"#:roman\b(?!-)", s): ^ SyntaxError: invalid syntax I hope this is not permanent. My download of Lilypond for Windows is of today. -- *Steinbühlweg 1 79853 Lenzkirch* www.urseetal.net Ich mache auf mein Buch aufmerksam: 670 Falterarten im Hochschwarzwald (aktuell vergriffen) GPG Fingerabdruck: C76F A02E D525 7409
Re: custom replace/map of one set of pitches to another
That is very helpful. Thank you. I will ping again if I have any further questions. Aug 31, 2023, 14:35 by l...@gmx.de: > Hi Michael, > > over time, I found that doing something like this in an engraver (as opposed > to a music function) is actually much easier and conceptually clear, in spite > of the seeming difficulty of the engraver syntax. The advantage of using an > engraver being that you see the "actual" pitches and don't have to fight with > problems of \relative, \transpose and so on. > > \version "2.24.0" > > pitch-replace-dictionary = > #(list > (cons #{ c #} #{ cis #}) > (cons #{ d #} #{ des #}) > ) > > #(define (pitch-class= p q) > (and > (= (ly:pitch-notename p) (ly:pitch-notename q)) > (= (ly:pitch-alteration p) (ly:pitch-alteration q > > Pitch_replace_engraver = > #(lambda (context) > (make-engraver > (listeners > ((note-event engraver event) > (let* > ((pitch (ly:event-property event 'pitch)) > (rule (assoc pitch pitch-replace-dictionary pitch-class=))) > > (if rule > (ly:event-set-property! > event 'pitch > (ly:make-pitch (ly:pitch-octave pitch) > (ly:pitch-notename (cdr rule)) > (ly:pitch-alteration (cdr rule)) > > \layout { > \context { > \Score > \consists #Pitch_replace_engraver > } > } > > \relative { > c'4 d e c8 8 > \transpose f c \relative { > f'4 g a > } > } > > This engraver can also be added to just a single score (\layout inside \score > {}) or even a single Staff or Voice. At the moment, the replacement > dictionary is global, but this could be changed if needed. > > At the moment the mechanism I chose is too crude to do replacements that > involve changing the pitch-octave (eg from c to b,). Do you need this? > > Lukas > > Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion: > >> I would like to do something (hopefully simple), which is basically a custom >> find and replace for a set of notes in an entire score. >> >> For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} >> >> So basically on arbitrary list of pitches / scale to another. >> >> Is this possible without writing a custom function. If not, any hints on how >> to tackle the problem would be much appreciated. Thanks in advance. >> >> -Michael >>
Re: \pitchedTrill not displayed
> Le 31 août 2023 à 15:43, Pierre-Luc Gauthier a > écrit : > > Maybe there is an easy way around this situation ? The d'' does not > get displayed when merging the two \pitchTrill notes. What score are you trying to typeset? I don't get the musical meaning of having two simultaneous trills *in the same voice* (as opposed to simultaneous trills in two different voices).
Re: title in the Breitkopf fraktura font
> Le 31 août 2023 à 18:06, bernhard kleine a écrit : > > I never tried different fonts, but now I would like to print the title of the > music in a fraktura font. Could you please help me with that? > Have you read the documentation on using different fonts in markup? It is here for the 2.24 version: https://lilypond.org/doc/v2.24/Documentation/notation/fonts#single-entry-fonts and here for the 2.25 series (which has many simplifications in this area): https://lilypond.org/doc/v2.25/Documentation/notation/changing-fonts Best, Jean
Re: title in the Breitkopf fraktura font
Am 31.08.23 um 18:04 schrieb bernhard kleine: Hallo, I never tried different fonts, but now I would like to print the title of the music in a fraktura font. Could you please help me with that? \header{ title = \markup{\override #'(font-name . "BreitkopfFraktur") "Breitkopf Op.1234"} } If you want to change it generally (in an include file), you can do it like this: bookTitleMarkup = \markup { \override #'(baseline-skip . 3.5) \column { \fill-line { \fromproperty #'header:dedication } \override #'(baseline-skip . 3.5) \column { \huge \larger \bold \fill-line { \override #'(font-name . "Noteworthy Bold") \larger \fromproperty #'header:title } \fill-line { \large \smaller \bold \larger \fromproperty #'header:subtitle } \combine \null \vspace #0.33 \fill-line { \fromproperty #'header:poet { \large \bold \fromproperty #'header:instrument } \fromproperty #'header:composer } \fill-line { \fromproperty #'header:meter \fromproperty #'header:arranger } } } } Hraban
title in the Breitkopf fraktura font
Hallo, I never tried different fonts, but now I would like to print the title of the music in a fraktura font. Could you please help me with that? Thanks a lot Bernhard -- *Steinbühlweg 1 79853 Lenzkirch* www.urseetal.net Ich mache auf mein Buch aufmerksam: 670 Falterarten im Hochschwarzwald (aktuell vergriffen) GPG Fingerabdruck: C76F A02E D525 7409
Re: Standalone lyrics part
I will try and solve this by adding an optional NullVoice to my part generator. What I was hoping for before was : \groupBook #(groupPart `( ,(vocalPartCombinePart 'choirSA 'choirSoprano 'choirAlto choirSopranoVxSA choirAltoVxSA choirSopranoLyricsSA choirAltoLyricsSA structure '((inAGroup . #t))) ,(nullLyricsPart 'SA-TB choirCommonNullMusic choirCommonNullLyrics structure) ,(vocalPartCombinePart 'choirTB 'choirTenor 'choirBass choirTenorVxTB choirBassVxTB choirTenorLyricsTB choirBassLyricsTB structure '((inAGroup . #t))) ) 'choirSA-TB '((choirStaff . #t))) "choeur-SA-TB" choirSA-TB I could add this flag '((inAGroup . #t) (extraNullLyrics . #t)) and supply the music to the function. Thank you very much Jean, Carl, and David (& al. obviously). Your help and insights means everything to this list. -- Pierre-Luc Gauthier
\pitchedTrill not displayed
Hi there, Maybe there is an easy way around this situation ? The d'' does not get displayed when merging the two \pitchTrill notes. MnWE : \version "2.25.8" \language "english" partA = { \once \override TrillSpanner.stencil = ##f \pitchedTrill cs''16\prall \startTrillSpan d'' <>\stopTrillSpan } partB = { \once \override TrillSpanner.stencil = ##f \pitchedTrill gs'16\prall \startTrillSpan a' <>\stopTrillSpan } << \new Staff \partA \new Staff \partB \new Staff << \partA \partB >> >> -- Pierre-Luc Gauthier
Re: custom replace/map of one set of pitches to another
Hi Michael, over time, I found that doing something like this in an engraver (as opposed to a music function) is actually much easier and conceptually clear, in spite of the seeming difficulty of the engraver syntax. The advantage of using an engraver being that you see the "actual" pitches and don't have to fight with problems of \relative, \transpose and so on. \version "2.24.0" pitch-replace-dictionary = #(list (cons #{ c #} #{ cis #}) (cons #{ d #} #{ des #}) ) #(define (pitch-class= p q) (and (= (ly:pitch-notename p) (ly:pitch-notename q)) (= (ly:pitch-alteration p) (ly:pitch-alteration q Pitch_replace_engraver = #(lambda (context) (make-engraver (listeners ((note-event engraver event) (let* ((pitch (ly:event-property event 'pitch)) (rule (assoc pitch pitch-replace-dictionary pitch-class=))) (if rule (ly:event-set-property! event 'pitch (ly:make-pitch (ly:pitch-octave pitch) (ly:pitch-notename (cdr rule)) (ly:pitch-alteration (cdr rule)) \layout { \context { \Score \consists #Pitch_replace_engraver } } \relative { c'4 d e c8 8 \transpose f c \relative { f'4 g a } } This engraver can also be added to just a single score (\layout inside \score {}) or even a single Staff or Voice. At the moment, the replacement dictionary is global, but this could be changed if needed. At the moment the mechanism I chose is too crude to do replacements that involve changing the pitch-octave (eg from c to b,). Do you need this? Lukas Am 31.08.23 um 12:53 schrieb Michael Winter via LilyPond user discussion: I would like to do something (hopefully simple), which is basically a custom find and replace for a set of notes in an entire score. For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} So basically on arbitrary list of pitches / scale to another. Is this possible without writing a custom function. If not, any hints on how to tackle the problem would be much appreciated. Thanks in advance. -Michael
Re: custom replace/map of one set of pitches to another
I am now realizing that it would be useful to have this both at the level of the entire score and individually for each part. Aug 31, 2023, 12:53 by mwin...@unboundedpress.org: > I would like to do something (hopefully simple), which is basically a custom > find and replace for a set of notes in an entire score. > > For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} > > So basically on arbitrary list of pitches / scale to another. > > Is this possible without writing a custom function. If not, any hints on how > to tackle the problem would be much appreciated. Thanks in advance. > > -Michael >
custom replace/map of one set of pitches to another
I would like to do something (hopefully simple), which is basically a custom find and replace for a set of notes in an entire score. For example {c cis d dis fih g aih} -> {c cis dih dis f gis a} So basically on arbitrary list of pitches / scale to another. Is this possible without writing a custom function. If not, any hints on how to tackle the problem would be much appreciated. Thanks in advance. -Michael
Re: Standalone lyrics part
> Le 30 août 2023 à 18:27, Pierre-Luc Gauthier a > écrit : > > Exactly this with the correct ties and slurs interpretation or lyrics. > > music = \repeat unfold 50 { c'4(~ 1) d'8 e' } > > words = \repeat unfold 100 \lyricmode { a b c } > > << > \new Devnull = "2" \music > \new Lyrics \lyricsto "2" \words Truth to be told, this is not really possible simply. What is however supported is attaching your NullVoice to an existing staff (that you want to print anyway). There are examples on https://lilypond.org/doc/v2.24/Documentation/notation/techniques-specific-to-lyrics.fr.html#polyphony-with-shared-lyrics
Re: Standalone lyrics part
> Le 30 août 2023 à 04:21, David Wright a écrit : > > Internals Reference says: > > "2.1.6 Devnull > Silently discards all musical information given to this context." > > so I'm guessing all that's left is the note columns. Not even note columns. A DevNull simply creates *nothing at all*. As simple as that. However, it does, like all contexts, forward the events it receives to its parent contexts. For example, this makes it very useful for "structure" hidden parts with \time and \break commands. Those won't be interpreted on a Voice or Staff level (there will be no extra time signature displayed, for example), but they will still get interpreted on Score level. For the OP's purpose, DevNull is not the right tool. Jean