Re: How should I convert an existing ".ly" file to a MIDI file containing audible arpeggios?
H. S. Teoh wrote: > For example: > > \midiArpeggio 24 4 > > divides a quarter note into 24 units, and plays the first c on-beat, the > e 1/24th of a quarter note past the beat, g 2/24th of a quarter note > past the beat, and the last c 3/24th of a quarter note past the beat. Thanks for sharing. Unfortunately, if I wanted to convert an existing ".ly" file either from one that uses \arpeggio to one that uses \midiArpeggio or vice versa, I still couldn't do it with a tool like some sort of "Find and replace". Unlike \arpeggio which is given after the notes of the chord, \midiArpeggio needs to be used before them. So I'm afraid I would still have to rewrite it manually for each single chord. And if I wanted to avoid doing it all manually, I would have to know how to write code that would do it for me (which I have no idea which programming language would be the most appropriate for doing something of that sort). Petr -- Tento e-mail byl zkontrolován na viry programem AVG. http://www.avg.cz
Re: How should I convert an existing ".ly" file to a MIDI file containing audible arpeggios?
Am Sa., 5. Dez. 2020 um 13:17 Uhr schrieb Petr Pařízek : > > H. S. Teoh wrote: > > > For example: > > > > \midiArpeggio 24 4 > > > > divides a quarter note into 24 units, and plays the first c on-beat, the > > e 1/24th of a quarter note past the beat, g 2/24th of a quarter note > > past the beat, and the last c 3/24th of a quarter note past the beat. > > Thanks for sharing. > Unfortunately, if I wanted to convert an existing ".ly" file either from > one that uses \arpeggio to one that uses \midiArpeggio or vice versa, I > still couldn't do it with a tool like some sort of "Find and replace". > Unlike \arpeggio which is given after the notes of the chord, > \midiArpeggio needs to be used before them. So I'm afraid I would still > have to rewrite it manually for each single chord. And if I wanted to > avoid doing it all manually, I would have to know how to write code that > would do it for me (which I have no idea which programming language > would be the most appropriate for doing something of that sort). > > Petr > > > > -- > Tento e-mail byl zkontrolován na viry programem AVG. > http://www.avg.cz > > Amending the shared code, you could probably do getMidiArpeggios = #(define-music-function (val mus) (number? ly:music?) (map-some-music (lambda (m) (and (music-is-of-type? m 'event-chord) (any (lambda (elt) (eq? (ly:music-property elt 'name) 'ArpeggioEvent)) (ly:music-property m 'elements)) (midiArpeggio val m))) mus)) \getMidiArpeggios 24 \new Staff \relative c' { 4\arpeggio r2. | 2 \arpeggio } HTH, Harm
Re: Control of score visibility based on variables
Hello Lukas, Many thanks for the clarification. My apologies for the belated reply since my week got quite busy. I understand your explanation: You can also use the question mark in the variable name, which confused me for a moment. I think I was mixing information I read previously about predicates in LilyPond, and thought myself restricted to the list here: http://lilypond.org/doc/v2.20/Documentation/notation/predefined-type-predicates I could also modify your to use a boolean explicitly: scoreIf = #(define-void-function (some-condition score) (boolean? ly:score?) (if some-condition (add-score score))) But I'm really no Scheme expert. Still hacking my way through. Many thanks, mattfong On Thu, Dec 3, 2020 at 8:45 AM Lukas-Fabian Moser wrote: > Hi Matthew, > > Am 03.12.20 um 01:50 schrieb Matthew Fong: > > ... and I will have use of question? Didn't know about that! > > In fact, that's just an arbitrary name for a variable! (And, to be > honest, I wasn't completely happy with my choice.) > > So, the following would work just the same: > > scoreIf = #(define-void-function (some-condition score) (scheme? ly:score?) > (if some-condition (add-score score))) > > I would have liked to use "condition" or "cond", but these are reserved > words in Guile, if I'm not mistaken. Maybe "print-it" would be a nice > name: "if print-it (add-score score)" seems to be quite self-explanatory. > > As for the ? in "question?": By convention, names ending in "?" are used > for "predicates", that is, functions returning only #t or #f as values. > I seem to remember that some people extend this convention and use the ? > also for variables that should contain boolean values (#t/#f), and > that's what I did here. > > Lukas > >
Controlling bar to note spacing on final measure
Hello everyone, Would there be a programmatic way to control the spacing of the final bar to the final note? At the moment, I just use s4 or s4. just to add a tiny bit of space so it doesn't feel as cramped. I do have the following override enabled to compact the spacing of the notes for chant, which really does make a difference in that final bar \override SpacingSpanner.common-shortest-duration = #(ly:make-moment 1/4) I am using \time 1/4. I dug around the engraver documentation and found this, but it deals with breaks. http://lilypond.org/doc/v2.19/Documentation/source/Documentation/internals/barline Many thanks, mattfong
Re: Controlling bar to note spacing on final measure
Hi Matthew, > Would there be a programmatic way to control the spacing of the final bar to > the final note? If I understand correctly, all of the BarLine spacing-alist parameters control spacing *after* the barline. > At the moment, I just use s4 or s4. just to add a tiny bit of space so it > doesn't feel as cramped. Well, as always, there are lots of different ways to clothe this particular cat… 1. spacers (as you’ve done) 2. increase the BarLine.extra-spacing-width [backwards] 3. increase the NoteHead.extra-spacing-width [forwards] 4. apply Score.NonMusicalPaperColumn.padding etc. Each has pros and cons. Ultimately, I prefer something other than adding a spacer… but YMMV. Hope that helps! Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: kie...@kierenmacmillan.info
Combining custom bar line with standard elements
I have a couple of customized bar lines defined and have come across an instance where I want to combine them with a standard bar line element. However, my naive attempts aren’t working as expected. My first attempt resulted in the bar line simple disappearing; in the second the customization disappeared. How can I make the combination while still preserving my customization? \version "2.20.0" \language "english" \layout { \context { \Staff \override BarLine.before-line-breaking = #(lambda (grob) (let ((glyph-name (ly:grob-property grob 'glyph-name))) (if (member glyph-name '("[" "]")) (begin (ly:grob-set-property! grob 'thick-thickness 2) (ly:grob-set-property! grob 'font-size -4) ) ) ) ) } } \defineBarLine "[" #'("" "[" "") \defineBarLine "]" #'("]" "" "") \defineBarLine "]." #'("]." "" "") global = { \key f \major } music = { g' f' e' d' \bar "[" f' g' a' g' \bar "|" f' e' c' d' \bar "]." } \new Staff << \new Voice = "mel" { \global \music } >> ✝✝ 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: Controlling bar to note spacing on final measure
Dear Kieren, Thank you for the suggestions. Now I have another knob to study and play with! https://lilypond.org/doc/v2.20/Documentation/notation/layout-properties My solution: AmenBars = { \skip 1*2/4 \once\revert Score.BarLine.stencil \once\override Staff.BarLine.extra-spacing-width = #'(-1 . 0) \bar "||" } Many thanks, mattfong On Sat, Dec 5, 2020 at 8:04 AM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Matthew, > > > Would there be a programmatic way to control the spacing of the final > bar to the final note? > > If I understand correctly, all of the BarLine spacing-alist parameters > control spacing *after* the barline. > > > At the moment, I just use s4 or s4. just to add a tiny bit of space so > it doesn't feel as cramped. > > Well, as always, there are lots of different ways to clothe this > particular cat… > > 1. spacers (as you’ve done) > > 2. increase the BarLine.extra-spacing-width [backwards] > > 3. increase the NoteHead.extra-spacing-width [forwards] > > 4. apply Score.NonMusicalPaperColumn.padding > > etc. > > Each has pros and cons. > Ultimately, I prefer something other than adding a spacer… but YMMV. > > Hope that helps! > Kieren. > > > Kieren MacMillan, composer (he/him/his) > ‣ website: www.kierenmacmillan.info > ‣ email: kie...@kierenmacmillan.info > >
square brackets around rehearsal marks 2.21.81
Is there a way to put square brackets around a rehearsal mark (bar number if relevant)? TIA, Paul
Re: Stanza Collision
Hi there, > I’m still working on getting my modified slur spacing issues worked out and > have yet to come up with a solution for the collision between \set stanza = > "*" I honestly can’t understand what you’re trying to achieve… =\ Having done a lot of work with Schenker graphs — which have a lot of the same issues and "look & feel" as chants — perhaps if you can explain it a little better, I can help figure out a better way to accomplish what you’re attempting. > Are there other ways of inserting space into the lyrics (that will move the > notes above to preserve relative alignment) that I haven’t tried? There’s the obvious manual way: words = \lyricmode { Some \set stanza = "*" \tweak self-alignment-X #-0.25 \markup \concat { words \hspace #2 } \set stanza = "*" t \set stanza = "*" go longword \set stanza = "*" un -- der notes } But I still feel like if I knew better what you were trying to do, I could figure out a programmatic way to handle it. Cheers, Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenmacmillan.info ‣ email: kie...@kierenmacmillan.info
New OOoLilyPond features: asking for feedback
Dear LilyPond community, there are some new features for OOoLilyPond, the extension for LibreOffice and OpenOffice. In short: - can now also be used in Calc spreadsheets - batch processing now also possible in Calc, Impress and Draw - "keep size & crop settings" now is a per-object setting. Also, some changes to the config dialog were necessary for that. I'd like to hear your feedback: Are those features usable, intuitive, ... Thanks for any comment! Here is a pre-release: https://github.com/OOoLilyPond/OOoLilyPond/releases/tag/1.0.1-4 direct download: https://github.com/OOoLilyPond/OOoLilyPond/releases/download/1.0.1-4/OOoLilyPond-1.0.1-4.oxt Cheers, Klaus
Re: Stanza Collision
> On 5 Dec, 2020, at 1:46 PM, Kieren MacMillan > wrote: > > Hi there, > >> I’m still working on getting my modified slur spacing issues worked out and >> have yet to come up with a solution for the collision between \set stanza = >> "*" > > I honestly can’t understand what you’re trying to achieve… =\ > > Having done a lot of work with Schenker graphs — which have a lot of the same > issues and "look & feel" as chants — perhaps if you can explain it a little > better, I can help figure out a better way to accomplish what you’re > attempting. This all started with me trying to imitate a particular chant style: https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00290.html Aaron kindly provided the Slur_spacing_engraver to accomplish this: https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00320.html This is working fine for my hymns, but when I tried using it with the antiphons, which have an asterisk in them to indicate when the choir joins the cantor, the spacing around said asterisk is too tight in some cases. In the attached files the "Blessed be God" antiphon is fine but in the "Let the mind” the asterisk collides with the words just before it. I’ve tried changing the various parameters in the Slur_spacing_engraver to solve this, but changing those parameters have undesirable side-effects (mostly the desired spacing changes on the slurred notes gets wrecked). So now I’m thinking that perhaps just a crude addition of space might be the easiest way to do this. >> Are there other ways of inserting space into the lyrics (that will move the >> notes above to preserve relative alignment) that I haven’t tried? > > There’s the obvious manual way: > > words = \lyricmode { > Some \set stanza = "*" > \tweak self-alignment-X #-0.25 \markup \concat { words \hspace #2 } \set > stanza = "*" > t \set stanza = "*" > go longword \set stanza = "*" un -- der notes > } > > But I still feel like if I knew better what you were trying to do, I could > figure out a programmatic way to handle it. This does work, but if you could figure out a programmatic way to solve this, I would greatly appreciate 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 ☧ ΧΡΙΣΤΟΣ Blessed_be_God.pdf Description: Adobe PDF document Let_the_mind.pdf Description: Adobe PDF document
Re: square brackets around rehearsal marks 2.21.81
On 2020-12-05 10:30 am, Paul Scott wrote: Is there a way to put square brackets around a rehearsal mark (bar number if relevant)? bracketify-stencil should do what you need. Here's a wrapper for it: \version "2.20.0" bracketify = #(define-music-function (grob-path axis thick protrusion padding) (key-list? number? number? number? number?) #{ \override $grob-path . stencil = #(grob-transformer 'stencil (lambda (grob orig) (bracketify-stencil orig axis thick protrusion padding))) #}) { \bracketify Score.RehearsalMark #Y 0.1 0.3 0.5 \mark \default b'4 4 2 4 2. 1 \temporary \bracketify NoteHead #X 0.2 0.5 0.3 \mark \default b'4 4 2 4 2. 1 \revert NoteHead.stencil \mark \default b'4 4 2 4 2. 1 } -- Aaron Hill