Re: Combining percussion parts in one staff
On 5/20/20, Christopher R. Maden wrote: > ... I get rests scattered all over the place, not to mention redundant > dynamics. Is there a way to combine the different drum parts on one > staff without engraving a terrible mess? Well, I’m not gonna lie: that’s a tough one. That’s typically what \partcombine (nowadays \partCombine) is for, but as we’ve seen over the years, it’d take a substantial amount of effort to make that work with \drummode. The best and simplest way you can go, I think, is to decide with voice is the "master" one, and use all the other voices only for notes but neither rests nor dynamics: bassMusic = \drummode { bd4 \f r bd r | } snareMusic = \drummode { r4 sn \f r r | } \score { \new DrumStaff = "percussion" << \bassMusic \new minorDrumVoice \snareMusic >> } \layout { \context { \DrumVoice \name minorDrumVoice \remove Dynamic_engraver \remove Rest_engraver } \context { \DrumStaff \accepts minorDrumVoice } } % I’m not saying it’s perfect, but it may be the simplest option. Now if you need/want something more advanced, it can be done but not without some hacks and some assembly required. Have a look at the following example: #(define (dynamic? x) (let ((name (ly:music-property x 'name))) (or (eq? name 'DynamicEvent) (eq? name 'AbsoluteDynamicEvent) (eq? name 'CrescendoEvent) (eq? name 'DecrescendoEvent) (eq? name 'SpanDynamicEvent removeDynamics = #(define-music-function (parser location m) (ly:music?) (music-filter (lambda (x) (let ((tags (ly:music-property x 'tags)) (dir (ly:music-property x 'direction))) (not (and (dynamic? x) (not (memq 'keep tags)) (null? dir) m)) makeRestsInvisible = #(define-music-function (parser location m) (ly:music?) (music-map (lambda (x) (if (and (music-is-of-type? x 'rest-event) (not (memq 'keep (ly:music-property x 'tags (skip-of-length x) x)) m)) makeNiceTogether = #(define-music-function (parser location v0 v1 v2 v3) (ly:music? ly:music? ly:music? ly:music?) #{ \new DrumVoice << \removeDynamics \makeRestsInvisible $v1 \removeDynamics \makeRestsInvisible $v2 \removeDynamics \makeRestsInvisible $v3 \removeWithTag #'rm $v0 >> #}) keep = #(define-music-function (parser location m) (ly:music?) #{ \tag #'keep $m #}) rm = #(define-music-function (parser location m) (ly:music?) #{ \removeDynamics \makeRestsInvisible $m #}) bassMusic = \drummode { bd4 \f \rm r bd r | } snareMusic = \drummode { r4 sn \f r r | } \score { \new DrumStaff = "percussion" \makeNiceTogether \bassMusic \snareMusic {} %% Extra voice if you need it {} %% Extra voice if you need it } (It’s a pity you’re running 2.18, as 2.20, and 2.21 even more so, have some nifty shortcuts that could’ve made that syntax a bit more concise.) Now, every voice gets crunched together in a single voice, and the rests get removed. Again, one of the voices acts as the master voice and all its rests and dynamics are kept (except if you precede them with the \rm command); reciprocally, all other voices get filtered like in the previous example (but now the \keep command allows you to select events that will be kept). What you *could* do is insert all the definitions above in a .ly file that you can then include at the top of your master file. In another .ly file, you could write a dummy definition for rm and keep, such as rm = #(define-music-function (parser location m) (ly:music?) #{ $m #}) So when you need to compile your voices individually without changing anything, you can \include the latter (dummy) definition file, but when compiling the master file you can use the actual useful definition file. (Unfortunately, the way LilyPond works means that you can't currently use both at the same time.) Cheers, -- V.
Re: Identify included files
As an exercise in Scheme programming (and because I’m something of a perfectionist), I’m working on improving the output when using parse-only.ly by having it account for `--format` flags and the various backends when constructing the target portion of the make rule (the version I previously posted always assumes the target is pdf). To that end I’ve been exploring some of the scheme functions and have come across the ly:output-formats and ly:parser-output-name as welll as (ly:get-option 'backend). However, I have a few questions: ly:output-formats is a list whose contents are determined by the `--format` flags. However, when eps format is requested, ps, not eps is what’s added to the list. To determine that the output is eps I then also need to look at (ly:get-option 'backend), which will be eps or ps (or svg or scm, but they only produce a single file format, regardless of --format flags). I’ve also noticed that if both ps and eps files are requested with flags, then apparently only the eps file is produced, though ly:output-formats will have two ps entries. So, my question is can lilypond ever produce both ps and eps file from a single run, or does the use of the eps backend preclude the production of ps files? ly:parser-output-name stores the base name of the output file, but doesn’t contain directory information about where the output file is supposed to go (unlike the list of files in ly:source-files, which do contain the directory information about the location of the source files). This make sense because the output defaults to the current working directory when lilypond is called. However, if I use the --output option, I can force LilyPond to switch working directories before processing the file (and thus change the destination of the output). However, I cannot find where that directory information is stored. Is it stored somewhere (if so, where)? Use of the -dbackend=eps (or setting the backend to eps in the file) also causes the production of several other files (*-systems.tex, *-systems.texi, *-systems.count, and the eps and pdf files for each system) while -E (or --eps) does not. So far, however, I haven’t been to determine the difference between these two situations. Is there some variable (or scheme function) that can be used to figure out if these files are being produced (and how many systems there are)? Finally, what about midi? I have yet to find a scheme function that will tell me if the file being parsed will produce a midi file when typeset. Is there anything that would do that? ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Re: Tone cluster
On 5/20/20, Pierre Perol-Schneider wrote: > Anything better? Nothing better. I was about to suggest using a modifier Arpeggio stencil, but your solution is simpler and better. I’m not really sure why you’d need a music function at all, though: toneCluster ={ \once \override NoteHead.stem-attachment = #'(0 . 0) \once \override Stem.length = #(lambda (grob) (- (ly:stem::calc-length grob) 4.5)) \once \override Stem.thickness = #8 } %% Test: { a' \toneCluster a' \toneCluster } Now, there must be a way of doing that with \tweak, but I couldn’t find it. Cheers, -- V.
Re: Suggestion to make sharps and flats persistent
Hi guys Many thanks for taking such an interest in this. I have been thinking. I can see that using the key signature to automatically donate sharps and flats is going to be a lot of work and cause problems. Todays thoughts are: when you specify \language, then part of what you are doing is setting up the parser to understand which character sequence should indicate an f-sharp. I would like to be able to temporarily reconfigure this so that as well as mapping ‘fs’ to f-sharp you can ask it to map ‘F’ to f-sharp. I imagine that the parser is a finite state machine and that at the appropriate point it looks up a list. Normally this would say that ‘fs’ means f-sharp (or ‘fes’ means f-sharp if you were in another language). I guess it looks up a list of pitch names to check whether the current token is a pitch as expected and, if so, which one. If that list might have ‘F’ added at the beginning of the search order, then the parser would recognize the letter ‘F’ as meaning the pitch f-sharp. Later on, you could ask to remove the ‘F’ entry from that list. Removing it would automatically revert to the default behaviour because the list would still contain the entry to say that ‘fs’ means f-sharp. To avoid confusion, the request to add an item to the list would have the form (*newName, pitchNameInOriginalLanguage)*. I believe this would allow me to do what I originally wanted (to avoid having to type the accidentals when I’m working with music which is resolutely in one key) and would not raise any consequential problems. Granted one could get a headache if you mapped ‘e’ to mean f-sharp, but you’d deserve it. People who like quarter-tones might also enjoy being able to name them. This doesn’t seem to me like a big change. Gianmaria: It might possibly be doable in Frescobaldi but I don’t think it belongs there. One would end up with a source file which contained both LilyPond and Frescobaldi code. This is not an insuperable problem, but I don’t think it’s the right answer for this. Urs: I am always encoding a pitch as it is: but am asking that I get to give the pitch another name. Re the discussion about minor keys, in A minor you could set G to map to g-sharp and save keystrokes (unless you count the shift key as a keystroke in which case you might use ‘h’.) On Mon, 18 May 2020 at 18:24, Gianmaria Lari wrote: > > [...]. That being said… >> >> Are not >> >> \relative f' >> >> and >> >> \fixed c''' >> >> just "feature requests for laziness with resulting opaqueness"? ;) > > [...] > >> > > We (well… modulo me LOL) don’t get this worked up about how \relative >> makes cut-and-paste a nightmare. Why start now? ;) > > > Some lilypond users get vaccinated against \relative issues and they are > using it without any problem (it's not my case). So looks pretty clear you > can live and get profit from \relative. > > Personally I really don't like \relative: it always cause problems to me > but maybe there are also aesthetic reasons for my aversion. > > As I previously said (few months ago) \relative is another thing that in > my opinion should be handle by the editor. > > Copy and paste issues with relative is only another bad things but for me > it's not the main one. For example I consider perfectly acceptable copy > and paste issues with Python indention because the benefits largely > outweigh the drawbacks imho. > G. >
Re: Suggestion to make sharps and flats persistent
"Fr. Samuel Springuel" writes: >> On 20 May, 2020, at 9:43 AM, Paul McKay wrote: >> >> Todays thoughts are: when you specify \language, then part of what >> you are doing is setting up the parser to understand which character >> sequence should indicate an f-sharp. I would like to be able to >> temporarily reconfigure this so that as well as mapping ‘fs’ to >> f-sharp you can ask it to map ‘F’ to f-sharp. I imagine that the >> parser is a finite state machine and that at the appropriate point >> it looks up a list. Normally this would say that ‘fs’ means f-sharp >> (or ‘fes’ means f-sharp if you were in another language). I guess it >> looks up a list of pitch names to check whether the current token is >> a pitch as expected and, if so, which one. If that list might have >> ‘F’ added at the beginning of the search order, then the parser >> would recognize the letter ‘F’ as meaning the pitch f-sharp. Later >> on, you could ask to remove the ‘F’ entry from that list. Removing >> it would automatically revert to the default behaviour because the >> list would still contain the entry to say that ‘fs’ means >> f-sharp. To avoid confusion, the request to add an item to the list >> would have the form (newName, pitchNameInOriginalLanguage). > > I’ve done something like this for transcribing solfege music (while retaining > English note names for other purposes): > > myNames = #(append (assoc-get 'english language-pitch-names) > `( > (do . ,(ly:make-pitch -1 0 NATURAL)) > (re . ,(ly:make-pitch -1 1 NATURAL)) > (mi . ,(ly:make-pitch -1 2 NATURAL)) > (fa . ,(ly:make-pitch -1 3 NATURAL)) > (sol . ,(ly:make-pitch -1 4 NATURAL)) > (la . ,(ly:make-pitch -1 5 NATURAL)) > (ta . ,(ly:make-pitch -1 6 FLAT)) > (ti . ,(ly:make-pitch -1 6 NATURAL)) > )) > > solfegenglish = \myNames > #(ly:parser-set-note-names solfegenglish) You can write this as myNames = \language-pitch-names.english myNames.do = c myNames.re = d myNames.mi = e myNames.fa = f myNames.sol = g myNames.la = a myNames.ta = bes myNames.ti = b language-pitch-names.solfegenglish = \myNames \language "solfegenglish" { c' d' ta' ti' } > You should be able to adapt this for any particular set of note names you > want. One problem is that programs like Frescobaldi will stop knowing what you are talking about. -- David Kastrup
Re: Tone cluster
Here's another try: \version "2.20.0" toneCluster = #(define-music-function (note1 note2) (ly:music? ly:music?) #{ { \once\override NoteHead.stem-attachment = #'(0 . 0) \once \override Stem.length = #(lambda (grob) (- (ly:stem::calc-length grob) 4.5)) \once\override Stem.thickness = #8 < #note1 #note2 > } #}) %% Test: { a' \toneCluster a a'' a' \toneCluster a cis } Anything better? Cheers, Pierre Le mer. 20 mai 2020 à 13:38, Pierre Perol-Schneider < pierre.schneider.pa...@gmail.com> a écrit : > Hi All, > > I have this function to make a tone cluster: > > > \version "2.20.0" > > toneCluster = #(define-music-function > (note1 note2) (ly:music? ly:music?) >#{ > << > { #note1 } > { > \once\override NoteHead.stem-attachment = #'(0 . > 0) > \once\override Stem.length = #14 % <= Manually > set. > \once\override Stem.thickness = #7 > #note2 > } > >> >#}) > > % Test: > { > a' \toneCluster a a'' a' \toneCluster a cis > } > > > How could I set the stem length automagically according to the pitch > difference? > > Cheers, > Pierre >
Re: Suggestion to make sharps and flats persistent
> On 20 May, 2020, at 9:43 AM, Paul McKay wrote: > > Todays thoughts are: when you specify \language, then part of what you are > doing is setting up the parser to understand which character sequence should > indicate an f-sharp. I would like to be able to temporarily reconfigure this > so that as well as mapping ‘fs’ to f-sharp you can ask it to map ‘F’ to > f-sharp. I imagine that the parser is a finite state machine and that at the > appropriate point it looks up a list. Normally this would say that ‘fs’ means > f-sharp (or ‘fes’ means f-sharp if you were in another language). I guess it > looks up a list of pitch names to check whether the current token is a pitch > as expected and, if so, which one. If that list might have ‘F’ added at the > beginning of the search order, then the parser would recognize the letter ‘F’ > as meaning the pitch f-sharp. Later on, you could ask to remove the ‘F’ entry > from that list. Removing it would automatically revert to the default > behaviour because the list would still contain the entry to say that ‘fs’ > means f-sharp. To avoid confusion, the request to add an item to the list > would have the form (newName, pitchNameInOriginalLanguage). I’ve done something like this for transcribing solfege music (while retaining English note names for other purposes): myNames = #(append (assoc-get 'english language-pitch-names) `( (do . ,(ly:make-pitch -1 0 NATURAL)) (re . ,(ly:make-pitch -1 1 NATURAL)) (mi . ,(ly:make-pitch -1 2 NATURAL)) (fa . ,(ly:make-pitch -1 3 NATURAL)) (sol . ,(ly:make-pitch -1 4 NATURAL)) (la . ,(ly:make-pitch -1 5 NATURAL)) (ta . ,(ly:make-pitch -1 6 FLAT)) (ti . ,(ly:make-pitch -1 6 NATURAL)) )) solfegenglish = \myNames #(ly:parser-set-note-names solfegenglish) You should be able to adapt this for any particular set of note names you want. ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Position of accidentals in chords
Hello, In the example below: \relative c' { 1 1 } Notice the difference in the position of the flat symbol in the G-flat. For me, particularly, I find the first chord much more clean: after the double flat, closet to the note (and it occupies less space). Is there a way to change the position of the flat symbol? I was unable to find it in the documentation. Also, I thought that Lilypond decided to move the flat further to the left because part of the natural sing in the C note would collide with it, but changing the size of the accidentals with somethin like \override Accidental.font-size = #-3 Doesn't seem to make a difference. Caio
Re: Global colour substitution for specific characters in lyrics
Hi, On Wed, May 20, 2020 at 8:35 AM Fr. Samuel Springuel wrote: > > > On 20 May, 2020, at 2:41 AM, Witold Uchman wrote: > > > > Hello! > > > > I am looking for a way to simplify input in a book of psalms, namely to be > > able to simply put an * in lyrics and make the character in red. > > > Well, this might be monstrous overkill, but I remember something I wrote a long long time ago (2012) which could be used: https://www.mail-archive.com/lilypond-user@gnu.org/msg68357.html The initial problem was to replace many specific Unicode characters within words with colored versions. I'm not going to bother making the code more elegant, but I got it to handle your text. Note you have to put any character your text includes in the definition of "all-characters".= or that character won't appear. I put in the characters with accents that your text uses. For the fun of it, you can add other characters to the definition of "characters-to-color". For what it's worth, probably the answer given by Fr. Samuel Springuel is better for your use case :) Best, David Nalesnik \version "2.20.0" \language "deutsch" #(define all-characters ;; this contains every character that the text might use, including ones to be colored red ;; make sure there are no duplicates (they will appear doubled in the transformed text...) '(" " "!" "\"" "$" "%" "'" "(" ")" "*" "+" "," "-" "." "/" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ":" ";" "<" "=" ">" "?" "@" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" "[" "\\" "]" "^" "_" "`" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "ó" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z" "ż" "{" "|" "}" "~")) #(define characters-to-color "*") #(define (find-pos-length-pair str symb) ;; for the specified character --> '((position . length) (position . length) ...) (let ((result '()) (counter 0)) (define (helper str) (let ((pos (string-contains str symb))) (if pos (let ((dpos (+ pos (string-length symb (set! result (append result (cons (cons (+ pos counter) (string-length symb)) '( (set! counter (+ counter dpos)) (helper (string-drop str dpos)) (helper str) result)) #(define (create-pos-length-alist str) ;; join alists of character data (let ((result '())) (for-each (lambda (sym) (let ((pos-length (find-pos-length-pair str sym))) (if (pair? pos-length) (set! result (append result pos-length) all-characters) result)) #(define (sort-alist alist) ;; sort alist by keys (sort alist (lambda (p q) (< (car p) (car q) #(define convert-alist-to-markup (lambda (grob) (let* ((text (ly:grob-property grob 'text)) (char-alist (sort-alist (create-pos-length-alist text))) ; position/length data for each character in text (result '())) (for-each (lambda (x) ;; convert each substring into a markup ;; if it is in the list characters-to-color, make it red (let* ((left (car x)) (right (+ (car x) (cdr x))) (substr (substring text left right))) (if (string-contains characters-to-color substr) (set! result (append result (list (markup #:with-color red substr (set! result (append result (list (markup substr))) char-alist) (set! result (make-concat-markup result)) (set! (ly:grob-property grob 'text) result colorSymbols = #(define-music-function (parser location) () #{ \override Lyrics . LyricText #'before-line-breaking = #convert-alist-to-markup #}) %%% transpozycja = c' akordy = { \chordmode{ } } melodia = { \key d \minor f8 g[ a] a\breve b8 a g a4\bar "|" a\breve g8 f g[ a] g[( f e] d4)\bar "|." } tekst = { \lyricmode { \override LyricSpace #'minimum-distance = #1.0 \override LyricText #'font-size = #3 \colorSymbols Bo -- że, "mój Boże," szu -- kam Cie -- "bie *" "i pragnie Ciebie" mo -- ja du -- sza._* } } \score { \transpose c' \transpozycja << \chords { \akordy } \relative c' { \cadenzaOn \autoBeamOff \melodia } \addlyrics { \set stanza = "1." \tekst } >> } \layout { \context { \Lyrics \override LyricText.self-alignment-X = #-1 \override StanzaNumber.font-series = #'medium \override StanzaNumber.color = #(rgb-color 0.894 0.207 0.172) \override StanzaNumber.font-size = #+1 } \context { \ChordNames \germanChords chordNameLowercaseMinor = ##t } \context { \Lyrics \consists "Bar_engraver" \consists "Separating_line_group_engraver" \hide BarLine } }
Re: Global colour substitution for specific characters in lyrics
> On 20 May, 2020, at 2:41 AM, Witold Uchman wrote: > > Hello! > > I am looking for a way to simplify input in a book of psalms, namely to be > able to simply put an * in lyrics and make the character in red. > I define a special function for this: #(define aster #{ \set stanza = \markup \with-color #gregoriocolor * #}) Given this definition, I can put `\aster` into the lyrics exactly where I want it. `gregoriocolor` is used in several locations in my files, and has the following definition: gregoriocolor = #(rgb-color 0.898 0.208 0.172) You can, of course, change that to the color you actually want. ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Re: Tone cluster
Salut Pierre, Am 20.05.2020 um 18:00 schrieb lilypond-user-requ...@gnu.org: > toneCluster = #(define-music-function > (note1 note2) (ly:music? ly:music?) > #{ > { > \once\override NoteHead.stem-attachment = #'(0 . 0) > \once \override Stem.length = > #(lambda (grob) > (- (ly:stem::calc-length grob) 4.5)) > \once\override Stem.thickness = #8 > < #note1 #note2 > > } > #}) > > %% Test: > { > a' \toneCluster a a'' a' \toneCluster a cis > } > > Anything better? How about that: take the two pitches, calculate how many steps are between them and use that as stem length. % - \version "2.19.83" toneCluster = #(define-music-function (note1 note2) (ly:music? ly:music?) (let* ( (p1 (ly:music-property note1 'pitch)) (p2 (ly:music-property note2 'pitch)) (steps (- (+ (* 7 (ly:pitch-octave p2)) (ly:pitch-notename p2)) (+ (* 7 (ly:pitch-octave p1)) (ly:pitch-notename p1)) ) ) ) #{ { \once\override NoteHead.stem-attachment = #'(0 . 0) \once \override Stem.length = #steps \once\override Stem.thickness = #8 < #note1 #note2 > } #}) ) %% Test: { a' \toneCluster a' a'' a' \toneCluster a cis''' } % - Cheers, Klaus
Re: Identify included files
> On 20 May, 2020, at 12:05 PM, Fr. Samuel Springuel > wrote: > > Use of the -dbackend=eps (or setting the backend to eps in the file) also > causes the production of several other files (*-systems.tex, *-systems.texi, > *-systems.count, and the eps and pdf files for each system) while -E (or > --eps) does not. So far, however, I haven’t been to determine the difference > between these two situations. Is there some variable (or scheme function) > that can be used to figure out if these files are being produced (and how > many systems there are)? Okay, I found the answer to this one. The aux-files option (accessed with (ly:get-option 'aux-files)) indicates that these files are being created. It’s also occurred to me that the only way to determine the number of systems is to actually do the typesetting. Any attempt, therefore, to determine the targets and prerequisites automatically without typesetting the document cannot know exactly how many there are and has to be written from that perspective. This part of the question was akin to asking someone how many apples are in a bag while keeping the bag hidden from them. ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Re: Tone cluster
Valentin Villenave writes: > On 5/20/20, Pierre Perol-Schneider wrote: >> Anything better? > > Nothing better. I was about to suggest using a modifier Arpeggio > stencil, but your solution is simpler and better. > > I’m not really sure why you’d need a music function at all, though: > > > > toneCluster ={ > \once \override NoteHead.stem-attachment = #'(0 . 0) > \once \override Stem.length = > #(lambda (grob) > (- (ly:stem::calc-length grob) 4.5)) > \once \override Stem.thickness = #8 > } > > %% Test: > { > a' \toneCluster a' \toneCluster > } > > > > Now, there must be a way of doing that with \tweak, but I couldn’t find it. If nothing else, \single \toneCluster of course. -- David Kastrup
Re: Tone cluster
Humm, thank you Klaus, that looks pretty good! Le mer. 20 mai 2020 à 22:29, Klaus Blum a écrit : > Salut Pierre, > > Am 20.05.2020 um 18:00 schrieb lilypond-user-requ...@gnu.org: > > > toneCluster = #(define-music-function > > (note1 note2) (ly:music? ly:music?) > >#{ > > { > > \once\override NoteHead.stem-attachment = > #'(0 . 0) > > \once \override Stem.length = > > #(lambda (grob) > >(- (ly:stem::calc-length grob) > 4.5)) > > \once\override Stem.thickness = #8 > > < #note1 #note2 > > > } > >#}) > > > > %% Test: > > { > > a' \toneCluster a a'' a' \toneCluster a cis > > } > > > > Anything better? > > > How about that: > take the two pitches, calculate how many steps are between them and use > that as stem length. > > % - > \version "2.19.83" > > toneCluster = #(define-music-function > (note1 note2) (ly:music? ly:music?) > (let* > ( > (p1 (ly:music-property note1 'pitch)) > (p2 (ly:music-property note2 'pitch)) > (steps > (- > (+ (* 7 (ly:pitch-octave p2)) (ly:pitch-notename p2)) > (+ (* 7 (ly:pitch-octave p1)) (ly:pitch-notename p1)) > ) > ) > ) > #{ > { > \once\override NoteHead.stem-attachment = #'(0 . 0) > \once \override Stem.length = #steps > \once\override Stem.thickness = #8 > < #note1 #note2 > > } > #}) > ) > > %% Test: > { >a' \toneCluster a' a'' a' \toneCluster a cis''' > } > % - > > Cheers, > Klaus > >
"Dangling" ties.
Greetings, Is there a way to force LilyPond to engrave ties at the end of a snippet of music? I was hoping that \set tieWaitForNote = ##t would work, but it too had no results. Here is the snippet in question: \score { \new PianoStaff << \new Staff { \relative c' { \key es \major \time 6/8 \clef bass r4. \grace { a16[ bes c] } 4.~ %123 } } \new Staff { \relative c' { \key es \major \time 6/8 \clef bass f,,8 r r \grace { s16 s s } 4.~ %123 } } >> } Thank you so much. Hwaen Ch'uqi
Re: "Dangling" ties.
"Hwaen Ch'uqi" writes: > Greetings, > > Is there a way to force LilyPond to engrave ties at the end of a > snippet of music? I was hoping that \set tieWaitForNote = ##t would > work, but it too had no results. Here is the snippet in question: > > \score { > \new PianoStaff << > \new Staff { > \relative c' { > \key es \major \time 6/8 \clef bass > r4. \grace { a16[ bes c] } 4.~ %123 > } > } > \new Staff { > \relative c' { > \key es \major \time 6/8 \clef bass > f,,8 r r \grace { s16 s s } 4.~ %123 > } > } > >> > } > > Thank you so much. Ties have two ends. You need a half-tie instead. Those are available under the name \laissezVibrer for the ongoing half-tie (what you want here) and \repeatTie for the arriving half-tie. -- David Kastrup
Re: Suggestion to make sharps and flats persistent
"Fr. Samuel Springuel" writes: >> On 20 May, 2020, at 10:22 AM, David Kastrup wrote: >> >> myNames = \language-pitch-names.english >> myNames.do = c >> myNames.re = d >> myNames.mi = e >> myNames.fa = f >> myNames.sol = g >> myNames.la = a >> myNames.ta = bes >> myNames.ti = b >> language-pitch-names.solfegenglish = \myNames >> \language "solfegenglish" >> > > Is that a recent change to the syntax? It definitely looks much nicer > than what I had lying around. It's pulling together a few things regarding language syntax. Actually only the very first line is 2.19+ material I think: all the rest would have worked in 2.18, possibly 2.16. But it has become more natural to think of such stuff in terms of dotted lists recently. -- David Kastrup
Re: "Dangling" ties.
Hi. 2020-05-21 2:28 UTC+02:00, Hwaen Ch'uqi : > Greetings, > > Is there a way to force LilyPond to engrave ties at the end of a > snippet of music? No need to "force" ;-) http://lilypond.org/doc/v2.18/Documentation/snippets/expressive-marks#expressive-marks-laissez-vibrer-ties Regards, Gilles > I was hoping that \set tieWaitForNote = ##t would > work, but it too had no results. Here is the snippet in question: > > \score { > \new PianoStaff << > \new Staff { > \relative c' { > \key es \major \time 6/8 \clef bass > r4. \grace { a16[ bes c] } 4.~ %123 > } > } > \new Staff { > \relative c' { > \key es \major \time 6/8 \clef bass > f,,8 r r \grace { s16 s s } 4.~ %123 > } > } > >> > } > > Thank you so much. > > Hwaen Ch'uqi > >
Re: Identify included files
On Mon 18 May 2020 at 14:32:31 (-0400), Fr. Samuel Springuel wrote: > > On 18 May, 2020, at 11:30 AM, David Wright > > wrote: > > > > If you were compiling a C program foo.c into an executable, what you > > would be trying to avoid is recompiling fnbar.c into fnbar.o over > > and over again (and all of its similar companions). > > > > Can you explain which of your files are the equivalents of fnbar.o. > > (In python, for another example, they'd be your *.pyc files, and > > python looks after all this housekeeping itself.) > > As I see it, the filetype equivalencies roughly map as this: > > .ily -> .h > .ly -> .c > .pdf -> .o So the final output is constructed¹ from several PDF files, and these are what you don't want to recompile each time the constructing takes place. So what program(s) are you using to construct the final output? I don't understand your equivalence between .ily and .h files. The .ily file(s) can contain just as much code as the .ly file(s), whereas .h files don't contain any code at all (in the sense of producing executable code for the next stage. So I'm unable to see which files you avoid compiling, and in what form their compiled derivatives are stored between runs. > To this I would also add one more file type for storing dependency information > .dly -> .d ¹ I've avoided the word assemble for obvious reasons. Cheers, David.
Re: Frescobaldi 3.1.2 macOS gs error message
Dear Thomas, Il giorno dom 17 mag 2020 alle ore 17:57 Thomas Scharkowski ha scritto: > warning: g_spawn_sync failed (0): gs: Failed to execute child process > “gs” (No such file or directory) this has been reported also on GitHub, see https://github.com/frescobaldi/frescobaldi/issues/1305 I will investigate it, but since you already use MacPorts, you can install MacPorts' Frescobaldi, which is not affected by this issue (nor by several other bugs of the prebuilt application bundle). Best wishes. Davide
Re: Suggestion to make sharps and flats persistent
> On 20 May, 2020, at 10:22 AM, David Kastrup wrote: > > myNames = \language-pitch-names.english > myNames.do = c > myNames.re = d > myNames.mi = e > myNames.fa = f > myNames.sol = g > myNames.la = a > myNames.ta = bes > myNames.ti = b > language-pitch-names.solfegenglish = \myNames > \language "solfegenglish" > Is that a recent change to the syntax? It definitely looks much nicer than what I had lying around. ✝✝ Fr. Samuel, OSB (R. Padraic Springuel) St. Anselm’s Abbey 4501 South Dakota Ave, NE Washington, DC, 20017 202-269-2300 (c) 202-853-7036 PAX ☧ ΧΡΙΣΤΟΣ
Re: "Dangling" ties.
For sure your next question is how to make them longer. There are a few ways, but check LSR 715. Andrew
registering a composition
Hi all, apologies in advance for the slightly off topic question, but after doing my own research I am still unable to sort out how to publish a composition. I have written it with lilypond, but it hasn't been performed yet. I wanted to secure the copyright before performing it. Given that there is no performing artist yet, there is no recording, so I cannot register it with ASCAP. Have I got this right? What would be the standard way to "secure" the PDF when it is ready? Thank you, Francesco
Re: registering a composition
Hi Francesco, Not sure if this gives you any help but the first thing I'd do in your case is to secure the pdf with a password. Cheers, Pierre Le jeu. 21 mai 2020 à 05:51, Francesco Petrogalli < francesco.petroga...@gmail.com> a écrit : > Hi all, > > apologies in advance for the slightly off topic question, but after > doing my own research I am still unable to sort out how to publish a > composition. > > I have written it with lilypond, but it hasn't been performed yet. I > wanted to secure the copyright before performing it. Given that there > is no performing artist yet, there is no recording, so I cannot > register it with ASCAP. Have I got this right? > > What would be the standard way to "secure" the PDF when it is ready? > > Thank you, > > Francesco > >
Re: "Dangling" ties.
Wow, thank you all for your prompt responses! It was in fact the lengthening of the ties that I was searching for. Hwaen Ch'uqi On 5/20/20, Andrew Bernard wrote: > For sure your next question is how to make them longer. There are a few > ways, but check LSR 715. > > Andrew > > > >
Global colour substitution for specific characters in lyrics
Hello! I am looking for a way to simplify input in a book of psalms, namely to be able to simply put an |*| in lyrics and make the character in red. I tried with |#(add-text-replacements!|, but it only performs simple character substitution, and I am afraid I am not fluent enough in lilypond to create a function... |\language "deutsch"|| || ||transpozycja=c'|| ||akordy={\chordmode{|| ||}}|| ||melodia={|| || \key d \minor|| || f8 g[ a] a\breve b8 a g a4\bar "|"|| || a\breve g8 f g[ a] g[( f e] d4)\bar "|."|| ||}|| ||tekst={\lyricmode{|| || Bo -- że, "mój Boże," szu -- kam Cie -- \markup{\concat{"bie " \with-color #(rgb-color 0.894 0.207 0.172) *}}|| || "i pragnie Ciebie" mo -- ja du -- sza.||_* ||}}|| || ||\score { \transpose c' \transpozycja|| || <<|| || \chords { \akordy }|| || \relative c' { \cadenzaOn \autoBeamOff \melodia }|| || \addlyrics { \set stanza = "1." \tekst }|| || >>|| ||}|| || ||\layout {|| || \context { \Lyrics|| || \override LyricText.self-alignment-X = #-1|| || \override StanzaNumber.font-series = #'medium || || \override StanzaNumber.color = #(rgb-color 0.894 0.207 0.172) || || \override StanzaNumber.font-size = #+1 ||}|| || \context { \ChordNames \germanChords chordNameLowercaseMinor = ##t }|| || \context { \Lyrics \consists "Bar_engraver" || || \consists "Separating_line_group_engraver"|| || \hide BarLine }|| ||}|| | Thanks for your help! -- Witold Uchman
Tone cluster
Hi All, I have this function to make a tone cluster: \version "2.20.0" toneCluster = #(define-music-function (note1 note2) (ly:music? ly:music?) #{ << { #note1 } { \once\override NoteHead.stem-attachment = #'(0 . 0) \once\override Stem.length = #14 % <= Manually set. \once\override Stem.thickness = #7 #note2 } >> #}) % Test: { a' \toneCluster a a'' a' \toneCluster a cis } How could I set the stem length automagically according to the pitch difference? Cheers, Pierre