Time signature cancellation
Has anyone here ever used or seen the X-shaped time-signature cancellation sign pictured at [1], or anything similar? Thanks, -- Dan [1] https://gitlab.com/lilypond/lilypond/-/merge_requests/2029
Re: Administration of mailing lists
On Oct 7, 2022, at 16:45, Jean Abou Samra wrote: > Thus I wrote to the general GNU list server admins and proposed > to step up for being an admin on these lists, just like I am > already an admin on lilypond-user-fr (the French-speaking equivalent > of lilypond-user, in case you didn't know). > > Is that OK with everyone? It is fine with me. — Dan
Re: \repeat unfold has problems inside \repeat volta
On Jul 2, 2022, at 10:55, Jean Abou Samra wrote: > > Maybe it's possible to introduce other syntax, like another spelling for > \alternative, or just using \volta without an \alternative block (there are > reasons why this doesn't produce volta brackets right now, but there was a > back-and-forth in that respect and I don't recall how it ended up exactly). I. Question for the original poster: There is a comment about ambiguity of nested repeats under the "Known issues and warnings" heading in the NR[1]. Were you sufficiently aware of that such that if it had had been more verbose, you might have been able to solve your problem? II. You can disambiguate with braces as that note in the NR suggests, or with other syntax: \unfoldRepeats \repeat volta 2 { \repeat unfold 2 { R1_"A" } <> % unfold piece to AAB AAC, not to ABAC ABAC \alternative { R1_"B" R1_"C" } } III. It initially seemed like a good idea for \volta to create brackets automatically, but as time passed, I found that I was overriding that behavior in too many cases. I don't remember the specifics of the final straw, but it probably involved nested alternatives. There are cases where automatic brackets on volta-specific music outside \alternative would be convenient, but there are other available ways to create brackets with text, so I consider it less valuable than the features I am currently working on. [1] https://lilypond.org/doc/v2.23/Documentation/notation/long-repeats
Re: Should \partial accept music instead of duration?
On Mar 19, 2022, at 20:53, Aaron Hill wrote: ... >>> A convert-ly rule would probably not be possible given the limited power >>> of regular expressions. As such, \partial might need to support both >>> duration and music arguments. Initially I thought this might not be >>> possible, given that a naked duration can be treated as music; but the >>> following does seem to work: ... I wouldn't want to have to explain to users why these turn out different. \score { \fixed c' { \partial 4. 4. } } \score { \fixed c' { \partial c4. c4. } } — Dan
Re: 2.23.5 and poly-mark-engraver https://lsr.di.unimi.it/LSR/Item?id=976
On Dec 30, 2021, at 14:24, Lukas-Fabian Moser wrote: > > Hi Joel, > >> Several of the scores used poly-mark-engraver from >> <https://lsr.di.unimi.it/LSR/Item?id=976> (see also >> <https://lists.gnu.org/archive/html/lilypond-user/2011-08/msg00157.html>), >> and this now fails with >> >>> fatal error: cannot find music object: MarkEvent >> >> (Minimal example below signature; the demonstration included in >> <https://lsr.di.unimi.it/LSR/Snippet?id=976> also fails the same way.) >> >> This is both a bug-report if anyone’s maintaining the snippet, and a >> question whether there’s now a better way to write da capo, al segno, and >> other coda-like repeats. > > Indeed there is. There's heavy ongoing (or by now maybe even finished?) work > by Dan Eble on precisely this group of features. MarkEvent was split into RehearsalMarkEvent and AdHocMarkEvent in the summer of 2021. You might try replacing MarkEvent with AdHocMarkEvent and see whether it works for you. LilyPond 2.23.6 will support some D.C., D.S., al Fine, and alla Coda repeat structures automatically using "\repeat segno" with the same syntax as "\repeat volta". — Dan
Re: [OpenLilyLib] looking for collaborator(s) on stylesheet package/system
On Aug 27, 2020, at 12:06, Kieren MacMillan wrote: > > Hello all! > > I'm hoping to [finally!] wrestle my large and currently unwieldy collection > of stylesheets into public-worthy form. This effort is really the perfect > time to [finally!] implement a real stylesheet system in OpenLilyLib, so that > the concept of stylesheets can easily be adopted, used, and expanded by any > Lilypond user. > > If anyone would like to help me with this — either coding or mentoring — > please contact me (on- or off-list). I don't know how much I can participate, but I'd like to watch the conversation go by. — Dan
Re: Slurs in FluidSynth
On Sep 14, 2019, at 17:15, David Kastrup wrote: > > Here is an example showing _slurs_. Are you telling me that the > many instances of two slurred A4 notes are to be sounded only once? > That would sound pretty awful, and this is a Bach urtext. Let’s not worry about bariolage. Instead, let’s say I’ve got a flute part which is rendered as if every note is tongued, but I want a legato rendering of slurred notes. If I understand correctly, there is a poly/mono MIDI mode that has something to do with this. I’ve groped and flailed among FluidSynth’s related options with no success, so I figured there might be some essential information missing from LilyPond’s MIDI output, but it seems equally possible that I just haven't found the right set of FluidSynth options. At some point, I may have time to research this issue in more depth, but I am hoping that someone here might be able to save me some work. Regards, — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Slurs in FluidSynth
If anyone has had success getting FluidSynth to avoid attacking each note in a slur when reading from a LilyPond-produced MIDI, I would be grateful to learn how to do it. If you know that it is impossible, I would be grateful to learn what is lacking. (Speak as technically as you like.) Thanks, Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: 2.19.80 restNumberThreshold
On Nov 4, 2017, at 11:33, David Kastrup wrote: > >> The change from 6 numbers being shown to 5 occurred sometime between >> 2.19.23 and 1.19.28. > That looks like a reasonable candidate. In particular (2/4) and (3/4). The thing to do is 1. add a regression test sensitive to the current problem 2. revert the changes that caused it I’m sorry, but now is not a good season for me to get back into Lilypond development to do this myself. — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Changing voice order...
On Oct 28, 2016, at 05:01 , David Kastrup wrote: > > Well, there is still the question of what 1/2/3 should _mean_. > Currently they are connected with \voiceOne, \voiceTwo, > \voiceThree... and the meaning of those is "topmost", "lowest", "below > topmost" ... > > I find this both disturbing and hard to remember and so for me the > question is what the most satisfactory way to change that would be in > the long term. Maybe let << \sopOne \\ \alto \\ \sopTwo >> work as it works and add a function to reorder? e.g.\highToLow << \sopOne \\ \sopTwo \\ \alto >> — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Changing voice order...
On Oct 28, 2016, at 03:51 , David Kastrup wrote: > At any rate, does that mean that you are fine with > > << \sopranoI \\ \alto \\ \sopranoII >> > > and > > << \sopranoI \\ \altoII \\ \sopranoII \\ \altoI >> > > because that is what we currently have? Until I read this thread, I didn’t know that more than two voices were supported, so it hasn’t inconvenienced me; however, it does seem counterintuitive when you write them that way. — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Changing voice order...
On Oct 27, 2016, at 09:54 , David Kastrup wrote: > > << \context Voice = "1" \with \voiceThree ... > \context Voice = "2" \with \voiceOne ... > \context Voice = "3" \with \voiceTwo ... > \context Voice = "4" \with \voiceFour ... I’m not sure whether this thread has progressed beyond the need to mention this (forgive me if it has), but this is repulsive. I mean that in as friendly a way as possible. Regards, — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Music function for arrow directions in arpeggios
On Feb 23, 2016, at 16:22 , Noeck wrote: > > Hi, > >> I like this a lot and I feel like I've seen this exact discussion >> before, but it didn't result in any core changes. > > https://lists.gnu.org/archive/html/lilypond-user/2015-01/msg00908.html > >> Dev Team, >> >> Any reason \arpeggioArrowUp and \arpeggioArrowDown can't be defined this >> way from the beginning? Is there a use-case where the "\arpeggioArrowUp >> \arpeggio" way is necessary? > > I think at first it was just a property that could be set with an > override. Then this was put into a command for convenience > http://lilypond.1069038.n5.nabble.com/grand-predefined-command-thread-td109680.html#a109692 > However, the names \arpeggioUp and \arpeggioDown are still free and > would me much more lilypondish. Is this a case where attaching an arpeggio to a chord with ^ or _ should make a difference, or do I misunderstand the point of those characters? — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
ostinato rhythm
% complete the bass ostinato on the same pitch as the preceding % quarter note ost = \notemode { r8 8~ 4 4 } Used like: | g4 \ost | a4 \ost | … This is good for avoiding some typing in a long piece. Can anyone improve on it? (For example, sometimes I need the same rhythm involving three separate pitches.) TIA. — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: svg font issue(bug?): can't change TimeSignature font (but markup fonts can be changed)
On Apr 29, 2015, at 16:48 , padovani wrote: > > So... I discovered that the TimeSignature issue is related to the fact that > it is not being written as text to the svg file, but as a path. > > If I use this code I can create a svg file with different fonts for the > time signature, overriding the stencil with a text: ... > It works, but I'm struggling here to change the text of the time signature > automatically with a scheme function. \version "2.19.16" #(add-simple-time-signature-style 'swiss (lambda (fraction) (let ((n (car fraction)) (d (cdr fraction))) #{ \markup { \override #'(font-name . "Helvetica") \override #'(baseline-skip . 0.2) \fontsize #4 \column { #(number->string n) #(number->string d) } } #} ))) \score { \new Staff \with { \override TimeSignature.style = #'swiss } { \time 2/4 c2 } } — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: svg font issue(bug?): can't change TimeSignature font (but markup fonts can be changed)
On Apr 28, 2015, at 13:37 , padovani wrote: > > Hi, > > But the code below one gives me an error if I compile with -dbackend=svg [snip] > (I'm using 2.19.19 on OSX 10.9.5.) > PDF output doesn’t even work for me on OSX 10.10.3: GNU LilyPond 2.19.19 Processing `time-signature-font.ly' Parsing... Interpreting music... Preprocessing graphical objects... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `time-signature-font.ps'... warning: `(fondu -force /System/Library/Fonts/Helvetica.dfont)' failed (5) fatal error: failed files: "time-signature-font.ly” — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Alternative Quarter Rest
On Nov 30, 2014, at 01:53 , Werner LEMBERG wrote: > > IMSLP is your friend; there you should also get scans with better > resolution. Here the vocal score of `Don Pasquale' (Ricordi, 1870), > with a slightly different design of the quarter rest, having a > transition form to the modern shape: > > http://imslp.org/wiki/Special:ImagefromIndex/141736 Users, I’m looking for a good name for a rest style that is like the default except for using a quarter rest shaped like a mirrored Z. I’ve seen examples in 19th-C. Italian opera and 20th-C. American hymnals, so names based on time, place, publisher, or genre do not fit very well. Although, I also see the “classical” quarter rest in a late 19th-C. American hymnal, so maybe I shouldn’t worry about universality so much. My best idea is “z” based on its appearance, but it seems strange to name a whole style after just one rest. — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Pianostaff 4-part writing and rests
On Jan 24, 2015, at 16:55 , Kieren MacMillan wrote: > > Hi all, > >> Lastly got this help from Marc Hohl: >> http://lsr.di.unimi.it/LSR/Item?id=336 > > The linked issue (https://code.google.com/p/lilypond/issues/detail?id=1228) > currently has a status of “abandoned” — well, at least the associated patch > does, if not the whole issue. > > Is there a technical reason why the most up-to-date engraver (e.g., > https://github.com/openlilylib/openlilylib/blob/c53380f5ca460d244a017389dc4bcb79a3f04d14/editorial-tools/merge-rests-engraver/definition.ily) > has not been (or cannot be) rolled into the main Lilypond codebase? Or is it > technically sound, and now it's only a matter of somebody making an > appropriate/official patch and submitting it? > > The merged output is definitely standard engraving practice, so it would be > nice to see this enhancement in Lilypond, if the coding is already done (or > at least very close). FYI, for two voices per staff, recent (2.19.16) changes to the part combiner are supposed to merge both rests and multi-measure rests when appropriate. Of course, you must be willing to accept the part combiner's decisions about solo passages etc. or use those tedious \partcombineX commands. It would be nice if concurrent simultaneous rests could be merged without requiring the part combiner. Then we could simplify the part combiner. (You might be a programmer if you enjoy undoing hours worth of work as much as doing it in the first place.) — Dan ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Time signatures ¢¢ and cc
> On Oct 18, 2014, at 14:48 , Kieren MacMillan > wrote: > >> Does anyone know how to reduce the spacing between glyphs in these >> custom time signatures? > > #{ \markup \concat { \musicglyph #"timesig.C22" \musicglyph > #"timesig.C22" } #})) > Hope this helps! Lovely! Thank you! And with just a little space it’s even better: \version "2.18.0" timeTwoOne = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup \concat { \musicglyph #"timesig.C22" \hspace #0.25 \musicglyph #"timesig.C22" } #})) \time 2/1 } timeFourTwo = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup \concat { \musicglyph #"timesig.C44" \hspace #0.25 \musicglyph #"timesig.C44" } #})) \time 4/2 } \relative c' { \timeTwoOne c\breve \time 2/2 c1 \timeFourTwo c\breve \time 4/4 c1 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Time signatures ¢¢ and cc
Does anyone know how to reduce the spacing between glyphs in these custom time signatures? I’ve tried overriding word-space. I’ve tried \translate. Neither had the desired effect. Thanks. -- Dan \version "2.18.0" timeTwoOne = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup { \musicglyph #"timesig.C22" \musicglyph #"timesig.C22" } #})) \time 2/1 } timeFourTwo = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup { \musicglyph #"timesig.C44" \musicglyph #"timesig.C44" } #})) \time 4/2 } \relative c' { \timeTwoOne c\breve \time 2/2 c1 \timeFourTwo c\breve \time 4/4 c1 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Time signatures ¢¢ and cc
On Sep 26, 2014, at 08:20 , Simon Albrecht wrote: > Am 26.09.2014 um 04:10 schrieb Dan Eble: >> I have a hymnal in which many songs have time signatures with symbols >> "cc" and "¢¢" [doubled cut-time symbol]. I can't find any information on >> these online. Does anyone know what they actually mean? Were they >> common historically, or is this hymnal just using them ad hoc? >> >> My hypothesis based on the context and the feeling of the songs as they >> are usually sung is that "¢¢" is 4/2 (i.e. 2/2 + 2/2) and "cc" is a misprint. >> ("cc" appears very rarely.) > I don’t think either of them is a misprint. The double cut c time signature > occurs in Schubert, op. 90, no. 4 (see > <http://imslp.org/wiki/Special:ImagefromIndex/00364>, page 15) for example, > and I do recall having seen double c in a similar kind of music also, so this > kind of time signature has been in use historically: apparently mostly during > the early 19th century. > Now the interpretation and history of the various time signatures derived in > some way from mensural notation is a complex issue, as is the disambiguation > of c and cut c. There are numerous historical dependencies, some > controversially discussed, and I don’t think it’s the music typographer’s job > to make any judgement. In any case, both the double time signatures you > describe add up to a measure length of 4/2, only the musical meaning may > subtly differ. Thanks. That’s very helpful information (it’s No. 3 though). I’m now more inclined to consider ¢¢ as 2/1 and cc as 4/2. (I am also rather puzzled to find that my hymnal also has a song in 4/2. I’m not willing to give up the idea that there were a few lapses of editing.) Since these time signatures are not available by default in Lilypond, I found the following way to get them. They’re not quite as nice as in the Schubert score. I think I’d need to change the spacing between the glyphs if I were going to use these. — Dan \version "2.18.0" timeTwoOne = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup { \musicglyph #"timesig.C22" \musicglyph #"timesig.C22" } #})) \time 2/1 } timeFourTwo = { \once \override Staff.TimeSignature.stencil = #(lambda (grob) (grob-interpret-markup grob #{ \markup { \musicglyph #"timesig.C44" \musicglyph #"timesig.C44" } #})) \time 4/2 } \relative c' { \timeTwoOne c\breve \time 2/2 c1 \timeFourTwo c\breve \time 4/4 c1 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Time signatures ¢¢ and cc
I have a hymnal in which many songs have time signatures with symbols "cc" and "¢¢" [doubled cut-time symbol]. I can't find any information on these online. Does anyone know what they actually mean? Were they common historically, or is this hymnal just using them ad hoc? My hypothesis based on the context and the feeling of the songs as they are usually sung is that "¢¢" is 4/2 (i.e. 2/2 + 2/2) and "cc" is a misprint. ("cc" appears very rarely.) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: shortcut for creating new Staff "subclass" context?
On 2009-09-11, at 06:44 , Kieren MacMillan wrote: Now my question is... does the order of the lines matter at all? I'm assuming they do — e.g., if you don't change the \name until after changing some \override, there'll be confusion — but does anyone know for certain what the precedence must be? The settings in the \context {} block are saved as a group at the same time, so the following example modifies Staff rather than Voice. Inside the \context {} block, the settings take effect in order, so the following example turns the staff lines red. \version "2.12.2" \layout { \context { \Staff \override StaffSymbol #'color = #blue \name Voice \override StaffSymbol #'color = #red \name Staff } } \relative c' { c } Whatever you do, don't do this: \version "2.12.2" \layout { \context { \Staff \name Voice } } \relative c' { c } I'm not sure what it's doing, but it is taking a long time. :-) -- Dan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: shortcut for creating new Staff "subclass" context?
On 2009-09-09, at 08:59 , Kieren MacMillan wrote: Hi Dan, Neil, et al.: Does the following help? SoloVoice is a kind of Voice. UpperVoice and LowerVoice are kinds of SoloVoice. That's [relatively] self-evident. What isn't crystal clear — either in my mind, or (IMO) in the documentation — is why the following wouldn't work (or, perhaps better put, *what* wouldn't work if the following were used): \context { \Voice \name SoloVoice %% \alias "Voice" } or alternatively \context { %% \Voice \name SoloVoice \alias Voice } If I understand parser.yy and output-def.cc files, it looks like "\Voice" starts you off with a copy of the previously defined Voice settings. If "\Voice" is absent, you start from scratch. The context settings are saved by name. If you do not change the name, the modified settings replace the previous settings of the \Voice context. If you change the name, a new kind of context is created. I haven't looked into \alias. -- Dan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: one bar number per system
To whom it may concern, Here is what I have come up with. It does not meet my original goal, but it is good enough for now. \barNumber forces a bar number to appear at the current or next full-measure bar line. \manualBarNumbersOn should appear at the beginning of the score to set things up. A wart that catches my eye is taking the bar number from the grob text in bar-number-break-visibility callback. A useful(?) enhancement would be to make the default visibility a parameter of \manualBarNumbersOn. barNumber = #(define-music-function (parser location) () (let ((m (make-music 'ApplyContext))) (define (force-bar-number ctx) (let* ((barnum-table (ly:context-property ctx 'visibleBarNumbers))) (if (not (hash-table? barnum-table)) ; first use in this score? (begin ; create the set of visible bar numbers (set! barnum-table (make-hash-table 16)) (ly:context-set-property! ctx 'visibleBarNumbers barnum-table))) (let* ((barnum (ly:context-property ctx 'currentBarNumber)) (measurePos (ly:context-property ctx 'measurePosition)) (measureLen (ly:context-property ctx 'measureLength)) (mid-measure (and (ly:momentnumber (ly:grob-property grob 'text (if (and (hash-table? barnum-table) (hash-ref barnum-table barnum)) end-of-line-invisible begin-of-line-visible ))) (ly:context-pushpop-property ctx 'BarNumber 'break-visibility bar-number-break-visibility-callback))) (set! (ly:music-property musForCtx 'procedure) set-callback) (context-spec-music musForCtx 'Score))) -- Dan On 2 Sep 2009, at 18:51, Dan Eble wrote: Thanks for your replies. \bar allows a break, but does not force it. Ideally, I would like a bar number printed only after a break. If memory serves, the all-visible override didn't work in mid- measure for the upcoming full-measure bar line. (I do not have the time right now to override the next full-measure bar line by hand in 250 scores.) I have pieced together an experimental solution to build a hash of manually specified measure numbers, which is used by a custom barNumberVisibility function. It doesn't yet work for my multi- score book, because I based it on the table of contents implementation, so the list is global. I suppose I need to store the list of visible bar numbers in the Score context instead. Is that right? This will give me a bar number wherever I specify it, whether it is the first one after a break or not. It would be functional, but not exactly what I want. -- Dan On 2 Sep 2009, at 09:17, Trevor Daniels wrote: Mats Bengtsson wrote Wednesday, September 02, 2009 1:38 PM Trevor Daniels wrote: Does this not work when inserted immediately before the first full bar on the line? (I haven't actually tried it) \once \override Score.BarNumber #'break-visibility = #'#(#t #t #t) Why not write it as \once \override Score.BarNumber #'break-visibility = #all-visible Of course, this method works, but it requires that you manually insert it where you know that there will be a line break. Yes, I know. But since Dan is already inserting \bar "" in the places where a mid-bar break is required I wondered why he could not also insert this override before the following bar. Trevor ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: shortcut for creating new Staff "subclass" context?
On 2009-09-08, at 15:25 , Kieren MacMillan wrote: It would be so much easier to be able to force "inheritance" of everything, e.g. \context { \name "MyStaff" \from "Staff" instrumentName = #"MyStaff" shortInstrumentName = #"My" } Is there anything like this? (From what I've read and experienced, \alias does *NOT* do this.) I might have done something like that in the recent past. Does the following help? SoloVoice is a kind of Voice. UpperVoice and LowerVoice are kinds of SoloVoice. \context { \Staff \override TimeSignature #'style = #'numbered \accepts "SoloVoice" \accepts "UpperVoice" \accepts "LowerVoice" } \context { \Voice \name SoloVoice \alias Voice %% @todo 2.12.2 is crashing with a bus error in ambitus engraving % \consists "Ambitus_engraver" } \context { \SoloVoice \name UpperVoice \alias Voice %% @todo 2.12.2 is crashing with a bus error in ambitus engraving % \consists "Ambitus_engraver" } \context { \SoloVoice \name LowerVoice \alias Voice %% @todo 2.12.2 is crashing with a bus error in ambitus engraving % \consists "Ambitus_engraver" \override Ambitus #'X-offset = #3.0 } Regards, -- Dan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: one bar number per system
Thanks for your replies. \bar allows a break, but does not force it. Ideally, I would like a bar number printed only after a break. If memory serves, the all-visible override didn't work in mid-measure for the upcoming full-measure bar line. (I do not have the time right now to override the next full-measure bar line by hand in 250 scores.) I have pieced together an experimental solution to build a hash of manually specified measure numbers, which is used by a custom barNumberVisibility function. It doesn't yet work for my multi-score book, because I based it on the table of contents implementation, so the list is global. I suppose I need to store the list of visible bar numbers in the Score context instead. Is that right? This will give me a bar number wherever I specify it, whether it is the first one after a break or not. It would be functional, but not exactly what I want. -- Dan On 2 Sep 2009, at 09:17, Trevor Daniels wrote: Mats Bengtsson wrote Wednesday, September 02, 2009 1:38 PM Trevor Daniels wrote: Does this not work when inserted immediately before the first full bar on the line? (I haven't actually tried it) \once \override Score.BarNumber #'break-visibility = #'#(#t #t #t) Why not write it as \once \override Score.BarNumber #'break-visibility = #all-visible Of course, this method works, but it requires that you manually insert it where you know that there will be a line break. Yes, I know. But since Dan is already inserting \bar "" in the places where a mid-bar break is required I wondered why he could not also insert this override before the following bar. Trevor ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
one bar number per system
I would like Lilypond to print one bar number per system, except the first. The default behavior appears to be to print one bar number per system, except the first, for systems that begin at a measure break. Systems that begin in mid-measure (e.g. due to \bar "") do not get a bar number on the first bar line, and that is what I would like to change. I looked in the snippet reference, but nothing seems to fit. I do not want to use rehearsal marks if I can avoid it. I already use a variable \meterBreak to increase the likelihood of breaking the line at chosen places (mid-measure or not), so if there is something I could add to \meterBreak that would force the next bar line to have a number, that would be useful. If there is no way to get a number on the next bar, an acceptable alternative would be to print the current bar number in parentheses at the beginning of the line. I have seen how "barNumberVisibility" can be set to a function that considers a bar number and says whether or not it should be visible, but I am out of my depth trying to understand if there is any way for such a function to know if a bar number has already been printed on the current line. Thanks for any suggestions, -- Dan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Using one identifier or another
Johan Vromans squirrel.nl> writes: > > Dan Eble faithful.be> writes: > > > These two functions should help. > > Thanks! I can use this. > > > You will either need to define your optional music to be empty when > > it is not required, as in this example, or provide a function to > > create empty music if it is not already defined. > > I would be very interested in the latter. Johan, I have a framework for creating collections of many short pieces. The music for each piece is in its own file, along with metadata pertaining to the music. For example, composer = "William H. Monk" compositionDate = "1861" tune = "Eventide" meter = "10.10.10.10" Four voices are supported: sNotes, aNotes, tNotes, and bNotes. (If I were to start over, I would use aNotes, bNotes, cNotes, etc.) Shared notation (e.g. rehearsal marks) is defined in staffItems. The variable names are the same in every piece, and would normally conflict when included in the top-level file. I use some functions to work around that problem: \include "notes/tune/Eventide.ly" title = "Abide with Me" secRefBook = "Gospel Hymns" secRefPage = "317" \headerStore "AWM" \fourpartStore "AWM" \include "notes/tune/Diadem.ly" title = "All Hail the Power of Jesus' Name" secRefBook = "Apostolic Christian Hymnal" secRefPage = "320" \headerStore "AHTPOJN" \fourpartStore "AHTPOJN" Conceptually, headerStore and fourpartStore move the metadata variables and music variables into a named scope. Actually, they just rename the variables. In the example above, sNotes defined in Eventide.ly becomes AWMsNotes. (Notice that some header variables are defined outside the notes file. This is because they relate to the lyrics rather than the music, so they could differ in other contexts.) This does half the job. The variables for every song can live together in peace and harmony, waiting to be used in the \score blocks. But the staff definition files included from each \score block refer to the original names (e.g. sNotes), so two more functions are required. \score { << \fourpartLoad "AWM" \include "staff/satb_hymn.ly" >> \header { #(header-load "AWM") } \layout { } \midi { } } fourpartLoad and header-load remove the prefixes from the necessary variable names, so that satb_hymn.ly can simply use sNotes etc. (I tried defining a \headerLoad function for symmetry; as I recall, it would not parse.) How does all this connect to your situation? The functions make sure that all the variables which could be used are defined (possibly empty) in the top-level file, even if they had not been defined in the included files. So, without further ado, here are the functions. I store them in a file called namespace-functions.ly. I hope this will serve you well. % For the given symbols that are defined in the module, rename each by % prepending the prefix. #(define (module-add-symbol-prefix module symbols prefix) (for-each (lambda (genSym) (if (module-defined? module genSym) (let* ((var (module-variable module genSym)) (val (variable-ref var)) (specSym (string->symbol (string-append prefix (symbol->string genSym) (module-define! module specSym val) (module-remove! module genSym symbols)) % For the given symbols with the prefix that are defined in the module, % rename each by removing the prefix. For those that are not defined, % define them with the default value. #(define (module-remove-symbol-prefix module symbols prefix defval) (for-each (lambda (genSym) (let* ((specSym (string->symbol (string-append prefix (symbol->string genSym) (if (module-defined? module specSym) (let* ((val (variable-ref (module-variable module specSym (module-define! module genSym val) (module-remove! module specSym)) (module-define! module genSym defval symbols)) #(define fourpart-vars '(sNotes aNotes tNotes bNotes staffItems)) fourpartLoad = #(define-music-function (parser location prefix) (string?) (module-remove-symbol-prefix (current-module) fourpart-vars prefix (make-void-skip-music)) (make-music 'SequentialMusic 'void #t) ) fourpartStore = #(define-music-function (parser location prefix) (string?) (module-add-symbol-prefix (current-module) fourpart-vars prefix) (make-music 'SequentialMusic 'void #t) ) #(define header-vars '(title subtitle subsubtitle poet poemDate translator translationDate mu
Re: bar lines and unfolded repeats
Dan Eble faithful.be> writes: > > David Pounder lineone.net> writes: > > > > > I would probably try using \tag round the \bar commands and > > \removeWithTag for the volta-repeated section. > > > > Well, it gets the job done (thanks for that), but it's less elegant > than I was hoping for. For one thing, I don't want to have to remove > those bars in the usual case. Is there a way to tag something so that > it is *not* present by default, but only when requested? I found a way that makes the ly a little cleaner. acceptWithTag = #(define-music-function (parser location tag music) (symbol? ly:music?) (music-map (lambda (m) (let* ((tags (ly:music-property m 'tags)) (res (memq tag tags))) (if res (let ((void-music (ly:music-property m 'void))) (if (ly:music? void-music) void-music m) ) m))) music)) void = #(define-music-function (parser location music) (ly:music?) (make-music 'SequentialMusic 'void music)) sampleNotes = \relative c' { \partial 2 e e | c c c c | e2 \tag #'unfolded \void \bar "||" \repeat volta 2 { e4 e | e e e e | } \alternative { { d2 \tag #'unfolded \void \bar "" } { c2 \bar "|." } } } \book { \score { \unfoldRepeats \acceptWithTag #'unfolded \sampleNotes } \score { \sampleNotes } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: bar lines and unfolded repeats
David Pounder lineone.net> writes: > > I would probably try using \tag round the \bar commands and \removeWithTag for the volta-repeated section. > Well, it gets the job done (thanks for that), but it's less elegant than I was hoping for. For one thing, I don't want to have to remove those bars in the usual case. Is there a way to tag something so that it is *not* present by default, but only when requested? \version "2.11.52" sampleNotes = \relative c' { \partial 2 e e | c c c c | e2 \tag #'unfolded \bar "||" \repeat volta 2 { e4 e | e e e e | } \alternative { { d2 \tag #'unfolded \bar "" } { c2 \bar "|." } } } \book { \score { \unfoldRepeats \sampleNotes } \score { \removeWithTag #'unfolded \sampleNotes } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Using one identifier or another
Johan Vromans squirrel.nl> writes: > > Hi, > > In a template file I want to check if a particular identifier has been > defined, and act accordingly. These two functions should help. (Suggestions for improvement would be appreciated.) You will either need to define your optional music to be empty when it is not required, as in this example, or provide a function to create empty music if it is not already defined. (It's hard to tell from your example what your needs are.) \version "2.11.52" #(define-public (music-empty? m) (let ((void-music (ly:music-property m 'void))) (or (and (not (null? void-music)) void-music) (and (null? (ly:music-property m 'element)) (null? (ly:music-property m 'elements)) ifThenElse = #(define-music-function (parser location if-music then-music else-music) (ly:music? ly:music? ly:music?) (if (music-empty? if-music) else-music then-music)) aNotes = \relative c' { e1 } bNotes = \relative c' { c1 } cNotes = { } \book { \score { \ifThenElse \aNotes { \time 2/2 \partcombine \aNotes \bNotes } { \time 1/1 \bNotes } } \score { \ifThenElse \cNotes { \time 2/2 \partcombine \cNotes \bNotes } { \time 1/1 \bNotes } } } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
bar lines and unfolded repeats
Is there a way to make specified bar lines appear when repeated music is unfolded, without removing the standard repeat symbols when the music is left in volta format? If it requires heavy-duty Scheme, I'm OK with that, but I'd like the ly to remain as clean as possible. An example follows. If what I am asking for is currently impossible, I could try to be content with a way to allow a line break other than \bar "". Thanks in advance. -- Dan \version "2.11.52" sampleNotes = \relative c' { \partial 2 e e | c c c c | e2 \bar "||" \repeat volta 2 { e4 e | e e e e | } \alternative { { d2 \bar "" } { c2 \bar "|." } } } \book { \score { \unfoldRepeats \sampleNotes } % OK \score { \sampleNotes } % missing repeat bars } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \repeat with upbeat (partial) and alternatives
Dan Eble faithful.be> writes: > Try using the following "\measure" function instead of "\partial 4" in > your example. It should be used in the same place, at the beginning of > the second alternative, otherwise it will cause problems if you ever > unfold the repeat. Whoops! I completely missed the fact that your second alternative does not begin on the first beat of the measure. Good thing they don't throw people in jail for posting without a brain. The \measure function would only be appropriate in the case I *thought* I was describing (which incidentally would be easier to read, in my amateur opinion). ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: \repeat with upbeat (partial) and alternatives
writes: > it is only after a long search that I found an easy way to repeat a part of a > melody > - with an upbeat > - ending before the end of a measure > - having different durations in the alternatives > - without producing warnings in the log > > \version "2.11.49" > { > \repeat volta 2 { \partial 8 c'8 | c'2.} > \alternative {{ f'8 } { \partial 4 f'4 | }} > d'1 | > } > I'm sorry to be the bearer of bad tidings, but this trick is not generally useful. \partial moves the timing counter backwards, which effectively combines the last measure of the first alternative with the first measure of the second alternative, forming one longer-than-usual measure that is split visually by a repeat sign. >From your example, it doesn't seem like a big deal, but change your "f" to "fis" and see what happens. The sharp sign will be missing from the second alternative. Another thing you can do is turn on bar numbers and add enough measures to the example to make lilypond print one. You will see that the first alternative is not counted as a measure. Try using the following "\measure" function instead of "\partial 4" in your example. It should be used in the same place, at the beginning of the second alternative, otherwise it will cause problems if you ever unfold the repeat. % End a measure prematurely. For example, when an alternate ending % ends in a partial measure. measure = #(define-music-function (parser location) () (let ((m (make-music 'ApplyContext))) (define (do-it context) (let* ((measurePos (ly:context-property context 'measurePosition)) (measureLen (ly:context-property context 'measureLength))) (if (and (ly:momenthttp://lists.gnu.org/mailman/listinfo/lilypond-user
LILYPOND_DATADIR in 2.10
The NEWS for 2.11 says that "The environment variable LILYPONDPREFIX has been renamed to LILYPOND_DATADIR." If that is new for 2.11, why are versions of 2.10 complaining about it? This is on Mac OS X 10.3 (PowerPC). $ lilypond GNU LilyPond 2.10.19 error: LILYPONDPREFIX is obsolete, use LILYPOND_DATADIR $ grep -rl LILYPONDPREFIX /Applications/LilyPond.app /Applications/LilyPond.app/Contents/Resources/bin/lilypond /Applications/LilyPond.app/Contents/Resources/lilycall.py /Applications/LilyPond.app/Contents/Resources/Python/LilyPond.py After replacing those vars by hand in the two *.py files, it seems to be working, but it is a bit irritating to have to resort to that. Thanks, -- Dan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user