Getting absolute position of objects
Hello, I found an old thread which was never answered: https://lists.gnu.org/archive/html/lilypond-user/2015-05/msg00860.html I also need to output the absolute coordinates of all objects on the page, to generate training data for optical music recognition. I'm trying to print some information in \applyOutput, and I see that NoteHead X-offset and Y-offset are 0, and X-parent, Y-parent, X-positions, and Y-positions all seem to be (). Is there a way to get the absolute coordinates, so that I can add them to event-listener.ly? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is there a way to circle around tab numbers?
you could just change it to tab circle = \once \override TabNoteHead.stencil = #(lambda (grob) (let* ((note (tab-note-head::print grob)) (combo-stencil (ly:stencil-add note (circle-stencil note 0.1 0.8 (ly:make-stencil (ly:stencil-expr combo-stencil) (ly:stencil-extent note X) (ly:stencil-extent note Y \score { \new TabStaff { \tabFullNotation \circle c' } } HTH Stephen ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Is there a way to circle around tab numbers?
Hi all, I see that there is a way to circle around note heads, but I would like to circle around fret numbers. Ultimately, I would like the string line to be hidden from the space within the circle as well to emphasize the number. I want to use this for pedagogical reasons. (If this description needs further explanation, please let me know) I see this code for the note heads: http://lilypond.org/doc/v2.19/Documentation/snippets/editorial-annotations#editorial-annotations-drawing-circles-around-note-heads circle = \once \override NoteHead.stencil = #(lambda (grob) (let* ((note (ly:note-head::print grob)) (combo-stencil (ly:stencil-add note (circle-stencil note 0.1 0.8 (ly:make-stencil (ly:stencil-expr combo-stencil) (ly:stencil-extent note X) (ly:stencil-extent note Y { \circle c'' } I do not really understand this level of lilypond code very well, but I suspect with some tweaks it could do what I need. Is anyone on this list able to help? I would appreciate it. Thanks, Devin ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
2017-09-08 23:33 GMT+02:00 David Kastrup: > Simon Albrecht writes: > >> On 08.09.2017 22:58, David Kastrup wrote: >>> Thomas Morley writes: >>> at = #(define-music-function (time event music) (ly:duration? ly:music? ly:music?) "Place @var{event} at a relative duration @var{time} in relation to @var{music}." #{ \context Bottom << { \skip $time <>$event } $music >> #}) >>> Someone remind me: was there a reason we did not make this part of >>> LilyPond proper? I think there was but I cannot remember it. It's >>> coming up time and again... >> >> I think one reason is the lack of a really satisfying name – >> personally, I like the way >> \after 4 \< c2 >> translates to >> ‘after a quarter note duration, insert a hairpin on the note c2’ >> but I don’t really think that’s good enough for Lily proper, namely >> because it’s too unspecific. > > It's missing the relation to the c2: \after 4 \< c2 sounds like > > \skip 4 <>\< c2 > > to me. \within does not really work since c2 has to come last or > placing several elements will become completely awkward syntactically. > > Maybe we really should just bikeshed this one as "at" and be done. +1 Btw, afterGrace is a strange and misleading name as well, imho. At least as a starter I had difficulties to understand what this name may have to do with the requiered arguments. Though, this ship is sailed long time ago ... Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
Simon Albrechtwrites: > On 08.09.2017 22:58, David Kastrup wrote: >> Thomas Morley writes: >> >>> at = #(define-music-function (time event music) >>>(ly:duration? ly:music? ly:music?) >>> "Place @var{event} at a relative duration @var{time} in relation >>> to @var{music}." >>>#{ \context Bottom << { \skip $time <>$event } $music >> #}) >> Someone remind me: was there a reason we did not make this part of >> LilyPond proper? I think there was but I cannot remember it. It's >> coming up time and again... > > I think one reason is the lack of a really satisfying name – > personally, I like the way > \after 4 \< c2 > translates to > ‘after a quarter note duration, insert a hairpin on the note c2’ > but I don’t really think that’s good enough for Lily proper, namely > because it’s too unspecific. It's missing the relation to the c2: \after 4 \< c2 sounds like \skip 4 <>\< c2 to me. \within does not really work since c2 has to come last or placing several elements will become completely awkward syntactically. Maybe we really should just bikeshed this one as "at" and be done. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
On 08.09.2017 22:58, David Kastrup wrote: Thomas Morleywrites: at = #(define-music-function (time event music) (ly:duration? ly:music? ly:music?) "Place @var{event} at a relative duration @var{time} in relation to @var{music}." #{ \context Bottom << { \skip $time <>$event } $music >> #}) Someone remind me: was there a reason we did not make this part of LilyPond proper? I think there was but I cannot remember it. It's coming up time and again... I think one reason is the lack of a really satisfying name – personally, I like the way \after 4 \< c2 translates to ‘after a quarter note duration, insert a hairpin on the note c2’ but I don’t really think that’s good enough for Lily proper, namely because it’s too unspecific. Best, Simon ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
Thomas Morleywrites: > 2017-09-08 12:15 GMT+02:00 Thomas Morley : >> 2017-09-07 20:59 GMT+02:00 Robert Schmaus : >> >>> So anyway, except for writing a music function that basically does >>> the ottava voiding + spacer grace + ottava reset in one go, I don't >>> have any other solution as well. >> >> Quick'n dirty: >> >> { >> \ottava 1 >> c'''4 4 4 >> \afterGrace 4 \ottava 0 >> \ottava 1 >> d'''4 4 4 4 >> \ottava 0 >> } >> >> Cheers, >> Harm > > Also, David K's at-function will work (not sure if below is the most recent > one: > > at = > #(define-music-function (time event music) > (ly:duration? ly:music? ly:music?) > "Place @var{event} at a relative duration @var{time} in relation > to @var{music}." > #{ \context Bottom << { \skip $time <>$event } $music >> #}) > > > { > \ottava 1 > c'''4 4 4 > \at 8. \ottava 0 c'''4 > \ottava 1 > d'''4 4 4 4 > \ottava 0 > } Someone remind me: was there a reason we did not make this part of LilyPond proper? I think there was but I cannot remember it. It's coming up time and again... -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
2017-09-08 12:15 GMT+02:00 Thomas Morley: > 2017-09-07 20:59 GMT+02:00 Robert Schmaus : > >> So anyway, except for writing a music function that basically does the >> ottava voiding + spacer grace + ottava reset in one go, I don't have any >> other solution as well. > > Quick'n dirty: > > { > \ottava 1 > c'''4 4 4 > \afterGrace 4 \ottava 0 > \ottava 1 > d'''4 4 4 4 > \ottava 0 > } > > Cheers, > Harm Also, David K's at-function will work (not sure if below is the most recent one: at = #(define-music-function (time event music) (ly:duration? ly:music? ly:music?) "Place @var{event} at a relative duration @var{time} in relation to @var{music}." #{ \context Bottom << { \skip $time <>$event } $music >> #}) { \ottava 1 c'''4 4 4 \at 8. \ottava 0 c'''4 \ottava 1 d'''4 4 4 4 \ottava 0 } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fwd: fretdiagram bug?
David Kastrupwrites: > bb writes: > >> I forgot to mention, that I produced a whole bunch of such fingerboard >> diagrams without trouble. Only the g:6/gSix makes trouble. >> >> regards >> >> >> >> Weitergeleitete Nachricht >> Betreff: fretdiagram bug? >> Datum: Fri, 8 Sep 2017 16:28:42 +0200 >> Von: bb >> An: lilypond-user@gnu.org >> >> >> >> I kindly ask the lilypond experts to check this code if I did a >> mistake or is it a bug? >> >> Whatever I define in the line >> \storePredefinedDiagram #default-fret-table \gSix >> #allFourthsE >> #"o,o,o,o,o" >> >> lilypond will ignore! >> >> Given is a questionable fretboard instead. >> >> Please tell me where there is my error or if I should write a bug report. > > #'gSix Sorry, that was nonsense. You did define gSix in your example. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Fwd: Fwd: fretdiagram bug?
I found my mistake: \storePredefinedDiagram #default-fret-table \gSix #allFourthsE #"o,o,o,o,o" I used "," instead of ";". Sorry for the noise. Regards BB Weitergeleitete Nachricht Betreff:Fwd: fretdiagram bug? Datum: Fri, 8 Sep 2017 16:34:49 +0200 Von:bbAn: lilypond-user@gnu.org, bb I forgot to mention, that I produced a whole bunch of such fingerboard diagrams without trouble. Only the g:6/gSix makes trouble. regards Weitergeleitete Nachricht Betreff:fretdiagram bug? Datum: Fri, 8 Sep 2017 16:28:42 +0200 Von:bb An: lilypond-user@gnu.org I kindly ask the lilypond experts to check this code if I did a mistake or is it a bug? Whatever I define in the line \storePredefinedDiagram #default-fret-table \gSix #allFourthsE #"o,o,o,o,o" lilypond will ignore! Given is a questionable fretboard instead. Please tell me where there is my error or if I should write a bug report. Kind regards BB START # \version "2.19.2" allFourthsE =\stringTuning < e, a, d g c'> gSix ={< e,\5 b'\4 d\3 g\2 d'\1 >1} %cegb * **\storePredefinedDiagram #default-fret-table \gSix** **#allFourthsE** **#"o,o,o,o,o"* % end of potential include file /predefined-cuatro-fretboards.ly %#(set-global-staff-size 27) chordNames = \chordmode { g:6 } notes = { \gSix \break \bar "||" } \score { << \set Timing.defaultBarType = "" \new ChordNames { %\set chordChanges = ##t \chordNames } \new Staff { \clef "treble_8" \new Voice \with { \remove "New_fingering_engraver" } \relative c { \notes } } \new FretBoards { \set Staff.stringTunings = #allFourthsE \notes } >> \layout { } } END ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: fretdiagram bug?
bbwrites: > I kindly ask the lilypond experts to check this code if I did a > mistake or is it a bug? > > Whatever I define in the line > \storePredefinedDiagram #default-fret-table \gSix > #allFourthsE > #"o,o,o,o,o" > > lilypond will ignore! > > Given is a questionable fretboard instead. > > Please tell me where there is my error or if I should write a bug report. Why don't you look where _LilyPond_ says your error is? The error messages are there for a reason. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fwd: fretdiagram bug?
bbwrites: > I forgot to mention, that I produced a whole bunch of such fingerboard > diagrams without trouble. Only the g:6/gSix makes trouble. > > regards > > > > Weitergeleitete Nachricht > Betreff: fretdiagram bug? > Datum:Fri, 8 Sep 2017 16:28:42 +0200 > Von: bb > An: lilypond-user@gnu.org > > > > I kindly ask the lilypond experts to check this code if I did a > mistake or is it a bug? > > Whatever I define in the line > \storePredefinedDiagram #default-fret-table \gSix > #allFourthsE > #"o,o,o,o,o" > > lilypond will ignore! > > Given is a questionable fretboard instead. > > Please tell me where there is my error or if I should write a bug report. #'gSix -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Fwd: fretdiagram bug?
I forgot to mention, that I produced a whole bunch of such fingerboard diagrams without trouble. Only the g:6/gSix makes trouble. regards Weitergeleitete Nachricht Betreff:fretdiagram bug? Datum: Fri, 8 Sep 2017 16:28:42 +0200 Von:bbAn: lilypond-user@gnu.org I kindly ask the lilypond experts to check this code if I did a mistake or is it a bug? Whatever I define in the line \storePredefinedDiagram #default-fret-table \gSix #allFourthsE #"o,o,o,o,o" lilypond will ignore! Given is a questionable fretboard instead. Please tell me where there is my error or if I should write a bug report. Kind regards BB START # \version "2.19.2" allFourthsE =\stringTuning < e, a, d g c'> gSix ={< e,\5 b'\4 d\3 g\2 d'\1 >1} %cegb * **\storePredefinedDiagram #default-fret-table \gSix** **#allFourthsE** **#"o,o,o,o,o"* % end of potential include file /predefined-cuatro-fretboards.ly %#(set-global-staff-size 27) chordNames = \chordmode { g:6 } notes = { \gSix \break \bar "||" } \score { << \set Timing.defaultBarType = "" \new ChordNames { %\set chordChanges = ##t \chordNames } \new Staff { \clef "treble_8" \new Voice \with { \remove "New_fingering_engraver" } \relative c { \notes } } \new FretBoards { \set Staff.stringTunings = #allFourthsE \notes } >> \layout { } } END ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
fretdiagram bug?
I kindly ask the lilypond experts to check this code if I did a mistake or is it a bug? Whatever I define in the line \storePredefinedDiagram #default-fret-table \gSix #allFourthsE #"o,o,o,o,o" lilypond will ignore! Given is a questionable fretboard instead. Please tell me where there is my error or if I should write a bug report. Kind regards BB START # \version "2.19.2" allFourthsE =\stringTuning < e, a, d g c'> gSix ={< e,\5 b'\4 d\3 g\2 d'\1 >1} %cegb * **\storePredefinedDiagram #default-fret-table \gSix** **#allFourthsE** **#"o,o,o,o,o"* % end of potential include file /predefined-cuatro-fretboards.ly %#(set-global-staff-size 27) chordNames = \chordmode { g:6 } notes = { \gSix \break \bar "||" } \score { << \set Timing.defaultBarType = "" \new ChordNames { %\set chordChanges = ##t \chordNames } \new Staff { \clef "treble_8" \new Voice \with { \remove "New_fingering_engraver" } \relative c { \notes } } \new FretBoards { \set Staff.stringTunings = #allFourthsE \notes } >> \layout { } } END ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Is it possible to insert a "break" in a ottava bracket?
2017-09-07 20:59 GMT+02:00 Robert Schmaus: > So anyway, except for writing a music function that basically does the ottava > voiding + spacer grace + ottava reset in one go, I don't have any other > solution as well. Quick'n dirty: { \ottava 1 c'''4 4 4 \afterGrace 4 \ottava 0 \ottava 1 d'''4 4 4 4 \ottava 0 } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Fwd: coloring notes according harmonic function
Dear Marc, It works!!! Thank you very much! And thank you for all the developers, experts for their fantastic work!! Sister Judit (Composer is just like Potter/ Young/ Smith - I translated my surname) 2017-09-08 9:09 GMT+02:00 Marc Hohl: > Am 07.09.2017 um 21:20 schrieb Rita Composer: > >> Dear David and other Experts, >> >> Unfortunately I couldn't really follow you. >> > > You have to use > > > << > \new Voice { \voiceOne ... } > \new Voice { \voiceTwo ... } > \new Voice { \voiceThree ... } > >> > > The curly brackets { ... } are important, otherwise the first \new Voice > ends directly after \voiceOne, and ... is treated as if \voiceOne was never > set. > > HTH a bit, > > Marc > > > ___ > 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: Fwd: coloring notes according harmonic function
Am 07.09.2017 um 21:20 schrieb Rita Composer: Dear David and other Experts, Unfortunately I couldn't really follow you. You have to use << \new Voice { \voiceOne ... } \new Voice { \voiceTwo ... } \new Voice { \voiceThree ... } >> The curly brackets { ... } are important, otherwise the first \new Voice ends directly after \voiceOne, and ... is treated as if \voiceOne was never set. HTH a bit, Marc ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user