Re: CueDuring and Markup
2015-01-10 4:36 GMT+01:00 Craig Dabelstein craig.dabelst...@gmail.com: Thanks Thomas. text-script-event was the one I was missing. Hi again, let me add some basic hints. If you don't know how something is called in LilyPond, it's often useful to display it as a first and lookup what you get in the IR. For example 'markup': \displayMusic { c'' -xy } returns: (make-music 'SequentialMusic 'elements (list (make-music 'NoteEvent 'articulations (list (make-music 'TextScriptEvent 'text xy)) 'duration (ly:make-duration 2) 'pitch (ly:make-pitch 1 0 You'll see the 'markup' is called 'TextScriptEvent' In the IR you'll find at http://www.lilypond.org/doc/v2.19/Documentation/internals-big-page#text_002dscript_002devent 1.1.86 TextScriptEvent Event classes: music-event, script-event, StreamEvent and text-script-event. Also, you probably may want to look up 1.2.70 text-script-event 3.1.121 TextScript 2.2.123 Text_engraver Now you should have enough info to proceed in whatever you aim. Maybe too much info ;) HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Kieren, Am 10.01.2015 um 16:20 schrieb Kieren MacMillan: Hi Jan-Peter, TimeSignature grobs are another kind, I'd like to add conditionally or with the edition-engraver, if the instrument-transposition changes. Um… you mean KeySignature? =) In any case, YES — this would let me remove about a third of the remaining \tag constructs in the content part of my music. ah, yes - I mean KeySigs. TimeSignature would make more trouble than help, I think ... Again, that shouldn't be that hard, there is a TimeSignatureEngraver, which does it, but it didn't work out correctly yet. Also, Clef (if it’s not already supported) — that would let me remove another quarter of my \tag constructs. Clef is supported, like anything, that can be wrapped inside a context-mod. Clef is catched, other objects might need to be wrapped in a with-block. Best, Jan-Peter ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Jan-Peter, TimeSignature grobs are another kind, I'd like to add conditionally or with the edition-engraver, if the instrument-transposition changes. Um… you mean KeySignature? =) In any case, YES — this would let me remove about a third of the remaining \tag constructs in the content part of my music. Again, that shouldn't be that hard, there is a TimeSignatureEngraver, which does it, but it didn't work out correctly yet. Also, Clef (if it’s not already supported) — that would let me remove another quarter of my \tag constructs. Looking forward to seeing how this evolves, and helping where I can. Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Jan-Peter, I'm still having a hard time understanding how engravers, events, acknowledgers etc. relate, so I'm not sure if I understand your explanations. Am I right that the problem is *not* in addressing the score context but that marks are simply not supported yet? And if yes, is this a fundamental issue or is it just that marks have to be added to the list of supported items? Urs Am 10.01.2015 um 11:35 schrieb Jan-Peter Voigt: Hi Urs, hi list, as I am the inventor of the edition-engraver, I'd like to try some explanation ... The edition-engraver is a scheme-engraver, which looks at most of the defined hooks, if there are mods for its id on the current time (= measure + position-in-measure). They are: * initialize : init engraver with id * acknowledgers: * paper-column-interface : catch up with break events * start-translation-timestep : context-mod-apply, overrides, sets * stop-translation-timestep : revert overrides and sets, which are tagged with 'once' * process-music : create grobs for TextScript-events * finalize : write edition-log-file, if context is Score As you can see, mark-events are not processed right now. This is an engraver and engravers should be able to engrave any grob. I am going to - my time is still filled up with other workings to do, totally unrelated to lilypond ... - so, I am going to redesign the edition-engraver that it can deal more flexible with the id as you, Kieren et al. proposed. Another thing is, to create other grobs, like marks, KeySignatures and such. It might be possible to utilize existing engravers for such a path. Right now the id is injected on creation, so each edition-engraver is a unique object. On redesign, I will make the engraver a common object, which looks for a context-property 'edition-id' (or the like). Then the engraver can be consisted globally in the layout block to all contexts and the id just be set as a context-property as needed. And on redesign, I hope to write some comments in some more readable, organized code ;) For now :) Best, Jan-Peter P.S.: A happy new year to you! Am 09.01.2015 um 18:31 schrieb Urs Liska: Hi folks, I've successfully managed to add \break events to a score with the edition-engraver. With a wrapper function I can now maintain all manual breaks in one Scheme list. Another thing I find very useful is passing skipTypesetting events to the score, so I could create a function to compile parts of a score only (e.g. measure 50-67 or page 3-5 (which can be deduced from the above list of (original) page breaks). However,what doesn't seem to work is passing \mark events that way with \editionMod fullscore 5 0/4 score.Score.A \mark \default Is it known that I don't get them in the score like this? Do I have to create a dummy voice and add it to a staff? Anything else I could do? While I am extremely impressed by the edition-engraver I' m often at a loss because editing is somewhat like flying in the dark. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Am 10.01.2015 um 16:20 schrieb Kieren MacMillan: Hi Jan-Peter, TimeSignature grobs are another kind, I'd like to add conditionally or with the edition-engraver, if the instrument-transposition changes. Um… you mean KeySignature? =) In any case, YES — this would let me remove about a third of the remaining \tag constructs in the content part of my music. Again, that shouldn't be that hard, there is a TimeSignatureEngraver, which does it, but it didn't work out correctly yet. Also, Clef (if it’s not already supported) — that would let me remove another quarter of my \tag constructs. Looking forward to seeing how this evolves, and helping where I can. What makes me quite excited is that I can see how all this stuff can be integrated in Frescobaldi. As it is possible to inject temporary LilyPond code I see a lot of fancy things becoming possible. Including my favourite original breaks ;-) Urs Thanks, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Collect barnumbers for line and page breaks
Hi list, is it possible to collect the measure/measure-position values of all breaks in a compilation and output that to a logfile? As mentioned yesterday I found a way to ask LilyPond to compile only a portion of a score by passing a range of measures. And if I had a generated list of all current breaks I could ask LilyPond to recompile just the staff (or page) I'm currently working on. Eventually this could be extended with the help of outputting single files for systems (à la lilypond-book-preamble). I think of having Frescobaldi display not a usual engraved PDF but concatenate these individual system images. Then the autocompile function could be used to only autocompile the current system - which would be a huge improvement in terms of responsiveness. As mentioned in my post a few minutes ago I haven't understood yet how engravers, listeners and friends actually work so I'd need some starters to get me going. TIA Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Urs, Am 10.01.2015 um 15:29 schrieb Urs Liska: I'm not sure if I understand your explanations. Am I right that the problem is *not* in addressing the score context but that marks are simply not supported yet? Yes And if yes, is this a fundamental issue or is it just that marks have to be added to the list of supported items? well, I wouldn't call fundamental, but it is more than just adding it to a list of supported items. If one can tell, how to create a RehearsalMark-grob in a scheme-engraver, we can add that (quite) easily. TimeSignature grobs are another kind, I'd like to add conditionally or with the edition-engraver, if the instrument-transposition changes. Again, that shouldn't be that hard, there is a TimeSignatureEngraver, which does it, but it didn't work out correctly yet. So, if one can show a scheme-engraver, that produces marks (or time-sigs) programmaticly, I can easily add it to the edition-engraver. Best, Jan-Peter Am 10.01.2015 um 11:35 schrieb Jan-Peter Voigt: Hi Urs, hi list, as I am the inventor of the edition-engraver, I'd like to try some explanation ... The edition-engraver is a scheme-engraver, which looks at most of the defined hooks, if there are mods for its id on the current time (= measure + position-in-measure). They are: * initialize : init engraver with id * acknowledgers: * paper-column-interface : catch up with break events * start-translation-timestep : context-mod-apply, overrides, sets * stop-translation-timestep : revert overrides and sets, which are tagged with 'once' * process-music : create grobs for TextScript-events * finalize : write edition-log-file, if context is Score As you can see, mark-events are not processed right now. This is an engraver and engravers should be able to engrave any grob. I am going to - my time is still filled up with other workings to do, totally unrelated to lilypond ... - so, I am going to redesign the edition-engraver that it can deal more flexible with the id as you, Kieren et al. proposed. Another thing is, to create other grobs, like marks, KeySignatures and such. It might be possible to utilize existing engravers for such a path. Right now the id is injected on creation, so each edition-engraver is a unique object. On redesign, I will make the engraver a common object, which looks for a context-property 'edition-id' (or the like). Then the engraver can be consisted globally in the layout block to all contexts and the id just be set as a context-property as needed. And on redesign, I hope to write some comments in some more readable, organized code ;) For now :) Best, Jan-Peter P.S.: A happy new year to you! Am 09.01.2015 um 18:31 schrieb Urs Liska: Hi folks, I've successfully managed to add \break events to a score with the edition-engraver. With a wrapper function I can now maintain all manual breaks in one Scheme list. Another thing I find very useful is passing skipTypesetting events to the score, so I could create a function to compile parts of a score only (e.g. measure 50-67 or page 3-5 (which can be deduced from the above list of (original) page breaks). However,what doesn't seem to work is passing \mark events that way with \editionMod fullscore 5 0/4 score.Score.A \mark \default Is it known that I don't get them in the score like this? Do I have to create a dummy voice and add it to a staff? Anything else I could do? While I am extremely impressed by the edition-engraver I' m often at a loss because editing is somewhat like flying in the dark. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Urs, hi list, as I am the inventor of the edition-engraver, I'd like to try some explanation ... The edition-engraver is a scheme-engraver, which looks at most of the defined hooks, if there are mods for its id on the current time (= measure + position-in-measure). They are: * initialize : init engraver with id * acknowledgers: * paper-column-interface : catch up with break events * start-translation-timestep : context-mod-apply, overrides, sets * stop-translation-timestep : revert overrides and sets, which are tagged with 'once' * process-music : create grobs for TextScript-events * finalize : write edition-log-file, if context is Score As you can see, mark-events are not processed right now. This is an engraver and engravers should be able to engrave any grob. I am going to - my time is still filled up with other workings to do, totally unrelated to lilypond ... - so, I am going to redesign the edition-engraver that it can deal more flexible with the id as you, Kieren et al. proposed. Another thing is, to create other grobs, like marks, KeySignatures and such. It might be possible to utilize existing engravers for such a path. Right now the id is injected on creation, so each edition-engraver is a unique object. On redesign, I will make the engraver a common object, which looks for a context-property 'edition-id' (or the like). Then the engraver can be consisted globally in the layout block to all contexts and the id just be set as a context-property as needed. And on redesign, I hope to write some comments in some more readable, organized code ;) For now :) Best, Jan-Peter P.S.: A happy new year to you! Am 09.01.2015 um 18:31 schrieb Urs Liska: Hi folks, I've successfully managed to add \break events to a score with the edition-engraver. With a wrapper function I can now maintain all manual breaks in one Scheme list. Another thing I find very useful is passing skipTypesetting events to the score, so I could create a function to compile parts of a score only (e.g. measure 50-67 or page 3-5 (which can be deduced from the above list of (original) page breaks). However,what doesn't seem to work is passing \mark events that way with \editionMod fullscore 5 0/4 score.Score.A \mark \default Is it known that I don't get them in the score like this? Do I have to create a dummy voice and add it to a staff? Anything else I could do? While I am extremely impressed by the edition-engraver I' m often at a loss because editing is somewhat like flying in the dark. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score and parts template
- Original Message - From: James Harkins jamshar...@qq.com To: lily-users lilypond-user@gnu.org Sent: Saturday, January 10, 2015 3:12 AM Subject: Demo: Score and parts template Hi, Since the question came up about organizing LilyPond code for score and parts, I thought I would make a quick demo of what I believe to be the standard way to do it. Somehow I pieced these ideas together from LP code that I found online (Mozart Horn Concerto, as I recall), but I don't remember finding a compact example. I used a few bars from a recent woodwind trio, because it uses some notational features that you would like to be handled automatically -- and which *are* handled automatically using these techniques: - Multi-measure rests - Meter changes - Tempo markings (at the top of the score only, and in all parts) - Clef changes in one part, independent of the others - Transposing instruments Comments are in the file, but to summarize briefly: - A global variable holds any elements that need to be shared across all parts. Spacer (s) rests set the number of bars between tempo changes, meter or key changes, rehearsal marks, double barlines etc. - Each instrument has a variable containing notes, rests, dynamics etc. Clef changes go into these variables (because they are specific to each part). - The score creates staves for each instrument and fills them with simultaneous music expressions: \global \instrumentNotes . - A part is a \score containing one staff, using only the instrument's notes. If the part is for a multi-staff instrument, like piano, the \score would hold a PianoStaff or StaffGroup. - \compressFullBarRests in the parts does what you think it should do. Multi-measure rests should get broken by rehearsal marks etc. (the global things), and that's exactly what happens. I also use the \override because I don't like Kirchenpausen. In the real piece, I have a score.ly file that \include's the global and instrument variables, and separate oboe.ly, clarinet.ly etc. files that \include only what's needed for each part. For the demo, it's easier to send just one ly file but you wouldn't do it that way in real life. /Theme and Variations/ is released under CC-BY-NC-SA 4.0; please don't steal the notes :) Comments welcome. Hope this is helpful. hjh I think this is potentially very useful. Is the clarinet part an octave low? If you can confirm that the clarinet is correct, then I think adding it to the LSR, with a tag of docs and templates would be an excellent idea. -- Phil Holmes ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
Hi David, thank you for that suggestion. I'll try to get my mind around this ASAP. On the first sight I don't understand too much of it. But at least I notice that I'm not afraid of these lambda, let and let* constructs anymore. Finally I'm getting *somewhere* to familiarity with the basic working of Scheme code. What I'm still at a major loss is how Scheme interacts with LilyPond specific functionality. There's really a need for education in that sector. Best Urs Am 10.01.2015 um 20:50 schrieb David Nalesnik: On Sat, Jan 10, 2015 at 1:39 PM, David Nalesnik david.nales...@gmail.com mailto:david.nales...@gmail.com wrote: \version 2.19.15 writeBreaksEngraver = #(lambda (context) (let ((out (open-output-file output.txt))) (make-engraver (listeners ((line-break-event engraver event) (let* ((ccc (ly:context-property context 'currentCommandColumn)) ccc is not used here It's left over from my attempts to query the NonMusicalPaperColumn grobs in the piece for break-status (0 = unbroken, -1 = end-of-line, 1 = beginning-of-line), but break-status always comes back 0. Try (ly:item-break-dir ccc) to see what I mean. The conclusion I draw is that useful information about paper columns has not been set when our engraver is operational. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Am 10.01.2015 um 19:34 schrieb Kieren MacMillan: Hi Urs, I'm right now busy moving our Fried score to an edition-engraver based set-up, which is more than promising. I’m so glad you’ve jumped on the bandwagon. =) Me too ... Maybe it would have been better to do so in a project where failure isn't mission critical, but then I'd maybe never have done it. I'm just with the very first steps (and know the engraver isn't really mature yet), but it is already really promising! I suppose, in all fairness, I should get off my butt and get my Git-flow working now… ;) Hmm. Maybe yes? You can start with a very non-intrusive set-up to get aqcuainted with the tools. There's absolutely no need to become an expert *before* starting. Best Urs Cheers, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: segmented glissando lines
Am 10.01.2015 um 22:22 schrieb Orm Finnendahl: Hi, I can't find documentation about how to write segmented glissando lines, like in the attached png. The line segments have to get notated with precise rhythms, so I'm looking for something similar to glissando notation but without noteheads. I tried this: \new Staff \relative c'' { \hide NoteHead \hide Stem d,8 \glissando f' \glissando d, \glissando f' \glissando e, \glissando g' \glissando d, \glissando f' \glissando } But this only makes the NoteHeads invisible. Removing the Note_heads_engraver makes the glissandolines disappear. Does anybody know how to achieve this? Can't test right now, but what about \omit NoteHead? Urs -- Orm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
segmented glissando lines
Hi, I can't find documentation about how to write segmented glissando lines, like in the attached png. The line segments have to get notated with precise rhythms, so I'm looking for something similar to glissando notation but without noteheads. I tried this: \new Staff \relative c'' { \hide NoteHead \hide Stem d,8 \glissando f' \glissando d, \glissando f' \glissando e, \glissando g' \glissando d, \glissando f' \glissando } But this only makes the NoteHeads invisible. Removing the Note_heads_engraver makes the glissandolines disappear. Does anybody know how to achieve this? -- Orm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: segmented glissando lines
Am 10.01.2015 um 23:02 schrieb Orm Finnendahl: Hi Urs, Am Samstag, den 10. Januar 2015 um 22:22:15 Uhr (+0100) schrieb Urs Liska: Can't test right now, but what about \omit NoteHead? same problem, glissandolines aren't drawn at all if NoteHeads are omitted: And making the NoteHead infinitely small? \override NoteHead #'stencil = #point-stencil ??? Can't one override the extent of a grob to be zero? AFAIK this is usually done to deliberately avoid collision handling but couldn't this be used in conjunction with \hide to achieve what you want? HTH Urs % \version 2.19 \new Staff \relative c'' { \omit NoteHead d,2 \glissando f' \glissando d, \glissando f' \glissando e, \glissando g' \glissando d, \glissando f' \glissando } \paper { ragged-right = ##f } % ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Demo: Score and parts template
On Fri, Jan 9, 2015 at 10:12 PM, James Harkins jamshar...@qq.com wrote: Hi, Since the question came up about organizing LilyPond code for score and parts, I thought I would make a quick demo of what I believe to be the standard way to do it. Somehow I pieced these ideas together from LP code that I found online (Mozart Horn Concerto, as I recall), but I don't remember finding a compact example. Thanks, James Harkins. I don't have the time to look at it immediately, but I've been wishing there were just such a template. Thanks again, Ralph -- Ralph Palmer Brattleboro, VT USA palmer.r.vio...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: segmented glissando lines
Hi Urs, Am Samstag, den 10. Januar 2015 um 22:22:15 Uhr (+0100) schrieb Urs Liska: Can't test right now, but what about \omit NoteHead? same problem, glissandolines aren't drawn at all if NoteHeads are omitted: % \version 2.19 \new Staff \relative c'' { \omit NoteHead d,2 \glissando f' \glissando d, \glissando f' \glissando e, \glissando g' \glissando d, \glissando f' \glissando } \paper { ragged-right = ##f } % ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
2015-01-10 15:44 GMT+01:00 Jan-Peter Voigt jp.vo...@gmx.de: So, if one can show a scheme-engraver, that produces marks (or time-sigs) programmaticly, I can easily add it to the edition-engraver. Hi Jan-Peter, I did not look into your edition-engraver, below you'll find an engraver printing RehearsalMarks, though. (It's a boiled down version of some unfinshed own coding) Obviously you'll need to add an argument (a list, I think) what should be printed and some conditions when to print. Nevertheless, maybe it might be helpful. \version 2.19.15 #(define (RM-engraver context) `((process-music . ,(lambda (engraver) (if (= 0 (ly:moment-main-numerator (ly:context-property context 'measurePosition))) (let* ((event '()) (newgrob (ly:engraver-make-grob engraver 'RehearsalMark event))) (set! (ly:grob-property newgrob 'text) XY)) #f) %% %% EXAMPLE %% \score { \new Staff { \repeat unfold 60 c''4 } \layout { \context { \Score \consists #RM-engraver } } } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
Hi Urs, On Sat, Jan 10, 2015 at 8:44 AM, Urs Liska u...@openlilylib.org wrote: Hi list, is it possible to collect the measure/measure-position values of all breaks in a compilation and output that to a logfile? Yes, it is possible. As far as I can tell, though, an engraver only has access to explicit line- and page-breaks. I could be wrong, and I hope I am! The following engraver will write line- and page-break info to the file output.txt in the format (measure . measure-position). Nothing will be output for files that don't contain \break or \pageBreak. \version 2.19.15 writeBreaksEngraver = #(lambda (context) (let ((out (open-output-file output.txt))) (make-engraver (listeners ((line-break-event engraver event) (let* ((ccc (ly:context-property context 'currentCommandColumn)) (m (ly:context-property context 'currentBarNumber)) (mpos (ly:context-property context 'measurePosition)) (loc (cons m mpos))) (format out Line break at ~a~% loc))) ((page-break-event engraver event) (let* ((ccc (ly:context-property context 'currentCommandColumn)) (m (ly:context-property context 'currentBarNumber)) (mpos (ly:context-property context 'measurePosition)) (loc (cons m mpos))) (format out Page break at ~a~% loc ((finalize trans) (close-output-port out) { c'1 \break c'1 \break c'1 \pageBreak c'1 \break } \layout { \context { \Score \consists \writeBreaksEngraver } } As mentioned yesterday I found a way to ask LilyPond to compile only a portion of a score by passing a range of measures. And if I had a generated list of all current breaks I could ask LilyPond to recompile just the staff (or page) I'm currently working on. Eventually this could be extended with the help of outputting single files for systems (à la lilypond-book-preamble). I think of having Frescobaldi display not a usual engraved PDF but concatenate these individual system images. Then the autocompile function could be used to only autocompile the current system - which would be a huge improvement in terms of responsiveness. As mentioned in my post a few minutes ago I haven't understood yet how engravers, listeners and friends actually work so I'd need some starters to get me going. TIA Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Am 10.01.2015 um 20:16 schrieb Kieren MacMillan: Hi Urs, As it is possible to inject temporary LilyPond code I see a lot of fancy things becoming possible. Including my favourite original breaks ;-) Uh-oh… Are we going to get into another debate about what “edition” means?! ;) Not necessarily because that kind of work wouldn't be in the context of scholarly edition ;-) Best, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
Am 10.01.2015 um 22:04 schrieb David Nalesnik: On Sat, Jan 10, 2015 at 2:06 PM, Urs Liska u...@openlilylib.org mailto:u...@openlilylib.org wrote: Hi David, thank you for that suggestion. I'll try to get my mind around this ASAP. On the first sight I don't understand too much of it. But at least I notice that I'm not afraid of these lambda, let and let* constructs anymore. Finally I'm getting *somewhere* to familiarity with the basic working of Scheme code. What I'm still at a major loss is how Scheme interacts with LilyPond specific functionality. There's really a need for education in that sector. Yes, The Scheme comes in a natural progression.. There's plenty on the internet to assist self-study, and you can do a lot with simple constructs. One thing I found particularly preventing progress is the variety of Scheme dialects, and the fact that the learner isn't pointed to that fact enough. If you're looking for solutions on the internet they so often just don't apply to LilyPond, and if you're looking for documentation it's just the same. If you're looking for topics like recursion, list access, loops or whatever, chances are quite low that search results will lead you to pages that actually help you, instead they are extremely confusing to the learner, simply because solutions may not work in LilyPond. By now I know that I should never enter scheme conditional in a search engine but rather hope that guile scheme conditional will give me a helping hand. But it's just recently that I found this out. OK, it *is* stated on http://lilypond.org/doc/v2.18/Documentation/extending/scheme-tutorial.html, but this is in a way that you never understand the implications until you return to it when you already know about it (just like me rereading this now). LilyPond internals? There's huge room for documentation/tutorials here. Not just explanations for the user, but comments in the code, of which there are precious few. The internal reference of Scheme functions is quite a nightmare for people like me. I think it can be used as a desktop reference for people who are really familiar with what ly:add-option sym val description might mean, but for me it's mostly only helpful for getting a vague idea where I could start trying. I would love to help out with this, but I don't know where to begin! Well, the most important thing is not to think you'd have to do everything in one go, not even having to ensure that a first step leads to a consistent whole in the future. I think if we add items to the collection of slow-paced tutorials each single item is helpful. I think what I've tried with my first Scheme tutorials is about the right direction. They deal with a very small topic but try to be quite elaborate and give the reader a chance to slowly consider the topic from all sides. Everything that goes into LilyPond's official documentation is more or less forced to be *concise* - which is of course necessary from the perspective of the project but not too helpful to get people into this complicated matter. So if you would for example write one tutorial at first (even when it should be split into a number of posts) explaining one aspect thoroughly this would be very helpful. Think about phrases that are commonly simply used to give some other expert a hint but don't say anything to others. Just a few ideas for such tutorials: - What does overriding a stencil mean and imply? - What is an engraver, really? How to write one, why? What do the discussions mean about which information is available at which stage? - Where do these ly: functions come from? - how can we interact with LilyPond internals? - How do define-music-function and friends relate to plain define? - etc. If you'd be ready spending some time writing (a) tutorial(s) we could surely find something useful and practical for you ;-) Best Urs David -- Urs Liska www.openlilylib.org ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
It would be fantastic if that could be integrated in the edition-engraver. I'm very sorry that I can only express wishes and can't offer any help. Actually I'm right now busy moving our Fried score to an edition-engraver based set-up, which is more than promising. Urs Am 10. Januar 2015 19:21:16 MEZ, schrieb Thomas Morley thomasmorle...@gmail.com: 2015-01-10 15:44 GMT+01:00 Jan-Peter Voigt jp.vo...@gmx.de: So, if one can show a scheme-engraver, that produces marks (or time-sigs) programmaticly, I can easily add it to the edition-engraver. Hi Jan-Peter, I did not look into your edition-engraver, below you'll find an engraver printing RehearsalMarks, though. (It's a boiled down version of some unfinshed own coding) Obviously you'll need to add an argument (a list, I think) what should be printed and some conditions when to print. Nevertheless, maybe it might be helpful. \version 2.19.15 #(define (RM-engraver context) `((process-music . ,(lambda (engraver) (if (= 0 (ly:moment-main-numerator (ly:context-property context 'measurePosition))) (let* ((event '()) (newgrob (ly:engraver-make-grob engraver 'RehearsalMark event))) (set! (ly:grob-property newgrob 'text) XY)) #f) %% %% EXAMPLE %% \score { \new Staff { \repeat unfold 60 c''4 } \layout { \context { \Score \consists #RM-engraver } } } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Urs, As it is possible to inject temporary LilyPond code I see a lot of fancy things becoming possible. Including my favourite original breaks ;-) Uh-oh… Are we going to get into another debate about what “edition” means?! ;) Best, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
On Sat, Jan 10, 2015 at 2:06 PM, Urs Liska u...@openlilylib.org wrote: Hi David, thank you for that suggestion. I'll try to get my mind around this ASAP. On the first sight I don't understand too much of it. But at least I notice that I'm not afraid of these lambda, let and let* constructs anymore. Finally I'm getting *somewhere* to familiarity with the basic working of Scheme code. What I'm still at a major loss is how Scheme interacts with LilyPond specific functionality. There's really a need for education in that sector. Yes, The Scheme comes in a natural progression.. There's plenty on the internet to assist self-study, and you can do a lot with simple constructs. LilyPond internals? There's huge room for documentation/tutorials here. Not just explanations for the user, but comments in the code, of which there are precious few. I would love to help out with this, but I don't know where to begin! David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Add \mark entries with edition-engraver?
Hi Urs, I'm right now busy moving our Fried score to an edition-engraver based set-up, which is more than promising. I’m so glad you’ve jumped on the bandwagon. =) I suppose, in all fairness, I should get off my butt and get my Git-flow working now… ;) Cheers, Kieren. ___ Kieren MacMillan, composer www: http://www.kierenmacmillan.info email: i...@kierenmacmillan.info ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
On Sat, Jan 10, 2015 at 1:39 PM, David Nalesnik david.nales...@gmail.com wrote: \version 2.19.15 writeBreaksEngraver = #(lambda (context) (let ((out (open-output-file output.txt))) (make-engraver (listeners ((line-break-event engraver event) (let* ((ccc (ly:context-property context 'currentCommandColumn)) ccc is not used here It's left over from my attempts to query the NonMusicalPaperColumn grobs in the piece for break-status (0 = unbroken, -1 = end-of-line, 1 = beginning-of-line), but break-status always comes back 0. Try (ly:item-break-dir ccc) to see what I mean. The conclusion I draw is that useful information about paper columns has not been set when our engraver is operational. David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Collect barnumbers for line and page breaks
Hi Urs, On Sat, Jan 10, 2015 at 3:50 PM, Urs Liska u...@openlilylib.org wrote: Am 10.01.2015 um 22:04 schrieb David Nalesnik: On Sat, Jan 10, 2015 at 2:06 PM, Urs Liska u...@openlilylib.org mailto:u...@openlilylib.org wrote: Hi David, thank you for that suggestion. I'll try to get my mind around this ASAP. On the first sight I don't understand too much of it. But at least I notice that I'm not afraid of these lambda, let and let* constructs anymore. Finally I'm getting *somewhere* to familiarity with the basic working of Scheme code. What I'm still at a major loss is how Scheme interacts with LilyPond specific functionality. There's really a need for education in that sector. Yes, The Scheme comes in a natural progression.. There's plenty on the internet to assist self-study, and you can do a lot with simple constructs. One thing I found particularly preventing progress is the variety of Scheme dialects, and the fact that the learner isn't pointed to that fact enough. If you're looking for solutions on the internet they so often just don't apply to LilyPond, and if you're looking for documentation it's just the same. If you're looking for topics like recursion, list access, loops or whatever, chances are quite low that search results will lead you to pages that actually help you, instead they are extremely confusing to the learner, simply because solutions may not work in LilyPond. By now I know that I should never enter scheme conditional in a search engine but rather hope that guile scheme conditional will give me a helping hand. But it's just recently that I found this out. OK, it *is* stated on http://lilypond.org/doc/v2.18/Documentation/extending/ scheme-tutorial.html, but this is in a way that you never understand the implications until you return to it when you already know about it (just like me rereading this now). And there definitely should be something there to point the user to the manuals for 1.8! LilyPond internals? There's huge room for documentation/tutorials here. Not just explanations for the user, but comments in the code, of which there are precious few. The internal reference of Scheme functions is quite a nightmare for people like me. I think it can be used as a desktop reference for people who are really familiar with what ly:add-option sym val description might mean, but for me it's mostly only helpful for getting a vague idea where I could start trying. I have spent an enormous amount of time learning how to use some of those functions. One example: *Function:* *ly:grob-relative-coordinate** grob refp axis* Get the coordinate in axis direction of grob relative to the grob refp. An extremely useful function. What of the grob refp? The description makes it sound like if you can get your hands on another grob, like a LedgerLineSpanner or something, you can find the coordinate of the grob grob relative to it. Not so. The two grobs need to be related by a chain of parentage. The obvious usage of the command--please return the X or Y coordinate of grob in its system--can be done easily like so: (ly:grob-relative-coordinate grob (ly:grob-system grob) X) Similar constraints apply to ly:grob-extent. [Of course, the above assumes you know where such a line might go :) ] There are functions on that page that I have no idea how to use. The series of functions ly:paper-book[...] -- how do I get the Paper_book object they take as an argument? How do I get ly:set-grob-modification-callback to work? I would love to help out with this, but I don't know where to begin! Well, the most important thing is not to think you'd have to do everything in one go, not even having to ensure that a first step leads to a consistent whole in the future. I think if we add items to the collection of slow-paced tutorials each single item is helpful. I think what I've tried with my first Scheme tutorials is about the right direction. They deal with a very small topic but try to be quite elaborate and give the reader a chance to slowly consider the topic from all sides. Everything that goes into LilyPond's official documentation is more or less forced to be *concise* - which is of course necessary from the perspective of the project but not too helpful to get people into this complicated matter. So if you would for example write one tutorial at first (even when it should be split into a number of posts) explaining one aspect thoroughly this would be very helpful. I've considered that tutorials are the best way to go for me. I would be hard pressed to write something for the NR or Extending. I'd find it considerably easier to tackle a specific problem--let's write a function to do this--and work through it in a relaxed style. Think about phrases that are commonly simply used to give some other expert a hint but don't say anything to others. Just a few ideas for such
instrumentSwitch and addInstrumentDefinition use
Hi, version 2.19.15: Is anyone using instrumentSwitch that can explain what the various variables in addInstrumentDefinition mean? I don't care about the midi transposition. AFAIK I really only want the key signature to change automatically when I do an instrument switch. In the following example I don't see why the alto (sax) pitch is an octave higher than the piccolo pitch or why I get the errors except for the clef change errors. (Both instruments are treble clef so it seems pointless to show a new treble clef. Therefore I left the clefGlyph definitions empty.) Almost everything is copied from NM 1.6.3 \version 2.19.15 \addInstrumentDefinition #Piccolo #'( (instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . ) (clefGlyph . ) (middleCPosition . 1) (clefPosition . 2) (instrumentCueName . ,(make-bold-markup Pic)) (midiInstrument . flute) ) \addInstrumentDefinition #alto #'( (instrumentTransposition . ,(ly:make-pitch -1 0 0)) (shortInstrumentName . ) (clefGlyph . ) (middleCPosition . 1) (clefPosition . 2) (instrumentCueName . ,(make-bold-markup Alto)) (midiInstrument . saxophone) ) \score{ \new Staff \with { instrumentName = #Piccolo } \relative{ c''2 r^\markup{to alto} \instrumentSwitch alto c2 } } GNU LilyPond 2.19.15 Processing `swtest.ly' Parsing... Interpreting music... warning: type check for `instrumentTransposition' failed; value `(unquote (ly:make-pitch -1 0 0))' must be of type `pitch' warning: type check for `instrumentCueName' failed; value `(unquote (make-bold-markup Alto))' must be of type `markup' Preprocessing graphical objects... warning: clef `_change' not found warning: clef `' not found warning: clef `_change' not found Thanks for any help, Paul Scott ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: box around notes
Hi David, thanks for your work - this is a really great tool. I often work with things like this: http://lsr.di.unimi.it/LSR/Item?id=960 http://lsr.di.unimi.it/LSR/Item?id=960 so what I found in this thread is very interesting for analysis purposes. I started to try some modifications on color, thickness, solid background etc: http://lilypond.1069038.n5.nabble.com/file/n170307/boxer-attempt.png Unfortunately, I'm helpless with scheme, so I don't know how to get this to an end... I added two properties to the grob definition (and also made some additions to the drawing procedures): * #(add-grob-definition 'Box `( (stencil . ,box-stil) (thickness . 0.1) ; added by KB (filled . #f) ; added by KB (meta . ((class . Item) (interfaces . ()) * Now I tried to modify these properties: * \override Score.Box.thickness = 0.5 \override Score.Box.filled = ##t * Changing the thickness property works well, but changing filled obviously has no effect. Instead, I get this error: /Warnung: Eigenschafts-Typprüfung für »filled« (backend-type?) kann nicht gefunden werden. vielleicht ein Tippfehler? Warnung: Zuweisung wird übersprungen/ can't find property type-check for »filled« (backend-type?). perhaps a typing error? Warning: skipping assignment Now I'm at an end... does anybody know what I'm doing wrong? :( Thanks in advance for any hint! Cheers, Klaus boxer-attempt.ly http://lilypond.1069038.n5.nabble.com/file/n170307/boxer-attempt.ly boxer-attempt.png http://lilypond.1069038.n5.nabble.com/file/n170307/boxer-attempt.png -- View this message in context: http://lilypond.1069038.n5.nabble.com/box-around-notes-tp35581p170307.html Sent from the User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
OT crop eps to printed area
Hello, Still struggling with gregorian.ly: So I compile first the gregorian to pdf then convert eps (directly as dbackend=eps returns inverted black-white and very bad quality), and include in mybook.ly as \markup { \epsfile #X #20 #rorateCoeli.eps } but I dont find how to crop the image to printed area. Can somebody help? Thanks in advance, Francois ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: segmented glissando lines
Hi Orm, How about : \version 2.19.15 #(define (add-gliss m) (case (ly:music-property m 'name) ((NoteEvent) (set! (ly:music-property m 'articulations) (append (ly:music-property m 'articulations) (list (make-music (quote GlissandoEvent) m) (else #f))) addGliss = #(define-music-function (parser location music) (ly:music?) (map-some-music add-gliss music)) \relative c'' { \override Glissando.thickness = #2 \override Glissando.bound-details =#'( (right (attach-dir . 1) (padding . 0)) (left (attach-dir . 1) (padding . 0))) \override NoteHead.no-ledgers = ##t \addGliss { d,2 \omit Stem \override NoteHead.transparent = ##t f' d, f' e, g' d, f' } } Cheers, Pierre ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: box around notes
Hi Klaus, On Sat, Jan 10, 2015 at 7:03 PM, Klaus Blum benbigno...@gmx.de wrote: Hi David, thanks for your work - this is a really great tool. I often work with things like this: http://lsr.di.unimi.it/LSR/Item?id=960 http://lsr.di.unimi.it/LSR/Item?id=960 so what I found in this thread is very interesting for analysis purposes. I started to try some modifications on color, thickness, solid background etc: http://lilypond.1069038.n5.nabble.com/file/n170307/boxer-attempt.png Now THAT looks cool! Unfortunately, I'm helpless with scheme, so I don't know how to get this to an end... I added two properties to the grob definition (and also made some additions to the drawing procedures): * #(add-grob-definition 'Box `( (stencil . ,box-stil) (thickness . 0.1) ; added by KB (filled . #f) ; added by KB (meta . ((class . Item) (interfaces . ()) * Now I tried to modify these properties: * \override Score.Box.thickness = 0.5 \override Score.Box.filled = ##t * Changing the thickness property works well, but changing filled obviously has no effect. Instead, I get this error: /Warnung: Eigenschafts-Typprüfung für »filled« (backend-type?) kann nicht gefunden werden. vielleicht ein Tippfehler? Warnung: Zuweisung wird übersprungen/ can't find property type-check for »filled« (backend-type?). perhaps a typing error? Warning: skipping assignment You need to make LilyPond aware of the new property: what type does it have? does it have a documentation string? (The latter is important because the documentation in the Internals Reference is generated automatically.) Add the following lines above the stencil function (make-box): %%% #(define (define-grob-property symbol type? description) (if (not (equal? (object-property symbol 'backend-doc) #f)) (ly:error (_ symbol ~S redefined) symbol)) (set-object-property! symbol 'backend-type? type?) (set-object-property! symbol 'backend-doc description) symbol) #(map (lambda (x) (apply define-grob-property x)) `( (filled ,boolean? Should we fill in this box?) ; add more properties here )) % Now here is where you might run into a problem with the new grob. Let's say you decide to run a batch of files using this new grob: lilypond file1.ly file2.ly [...] You'll get an error about property redefined, but it will work. (I suppose you could remove the error warning in the definition above if the errors in the log bother you.) Hope this is helpful, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Score and parts template
From: Phil Holmes Since the question came up about organizing LilyPond code for score and parts, I thought I would make a quick demo of what I believe to be the standard way to do it. Somehow I pieced these ideas together from LP code that I found online (Mozart Horn Concerto, as I recall), but I don't remember finding a compact example. I think this is potentially very useful. Is the clarinet part an octave low? No, it's in the correct octave. There's nothing in the clarinet part that goes any lower than Brahms went in bar 13 of the clarinet quintet. If you can confirm that the clarinet is correct, then I think adding it to the LSR, with a tag of docs and templates would be an excellent idea. OK! Thanks for the feedback. I'll do that later. hjh ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user