Re: whole page rotated
Harm, and what if I don't want to rotate my note head along with stem-dir? How to modify your code then? Some note heads look beeter when they are not being rotated. If you only want noteheads of doThin-type, try: \version 2.18.0 #(define nhg (lambda (grob) (let* ((stil (ly:note-head::print grob)) (dur-log (ly:grob-property grob 'duration-log)) (nh-id-nr (if (= dur-log 2) 2 1)) (stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (new-note-head-stil (grob-interpret-markup grob (markup #:musicglyph (format #f noteheads.u~adoThin nh-id-nr) (ly:stencil-scale new-note-head-stil 1 stem-dir \layout { \context { \Voice \override NoteHead.stencil = #nhg } } \relative c '' { c1 c2 \repeat unfold 4 c8 \repeat unfold 64 c4 } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
OK, I made it. I think I begin to understand scheme :-) #(define nhg (lambda (grob) (let* ((stil (ly:note-head::print grob)) (dur-log (ly:grob-property grob 'duration-log)) (nh-id-nr (if (= dur-log 2) 2 1)) (new-note-head-stil (grob-interpret-markup grob (markup #:musicglyph (format #f noteheads.u~adoThin nh-id-nr) new-note-head-stil))) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
whole page rotated
Hi, In the following code, I want to rotate custom note head. To my suprise, this code makes the whole page rotated if there is a line break. What I'm I doing wrong? #(define nhg (lambda (grob) (if (= 2 (ly:grob-property grob 'duration-log)) (begin (let* ((stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (rot (if (= stem-dir 1) 0 180))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob (markup #:rotate rot #:musicglyph noteheads.u2doThin \layout { \context { \Staff \override NoteHead.stencil = #nhg } } { c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
2014-03-04 19:19 GMT+01:00 Karol Majewski karo...@wp.pl: Hi, In the following code, I want to rotate custom note head. To my suprise, this code makes the whole page rotated if there is a line break. What I'm I doing wrong? #(define nhg (lambda (grob) (if (= 2 (ly:grob-property grob 'duration-log)) (begin (let* ((stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (rot (if (= stem-dir 1) 0 180))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob (markup #:rotate rot #:musicglyph noteheads.u2doThin \layout { \context { \Staff \override NoteHead.stencil = #nhg } } { c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user Hi Karol, I've no idea what happens here. Below a tiny code triggering the same bug. It's present as far as I can go back, i.e. 2.12.3 up to 2.19.1 { \override NoteHead #'rotation = #'(180 0 0) \repeat unfold 80 c''4 } I cc-ed the bug-list. Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
2014-03-04 20:05 GMT+01:00 Thomas Morley thomasmorle...@gmail.com: 2014-03-04 19:19 GMT+01:00 Karol Majewski karo...@wp.pl: Hi, In the following code, I want to rotate custom note head. To my suprise, this code makes the whole page rotated if there is a line break. What I'm I doing wrong? [...] As a workaround you could use: \version 2.18.2 #(define nhg (lambda (grob) (let* ((stil (ly:note-head::print grob)) (dur-log (ly:grob-property grob 'duration-log)) (stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (new-note-head-stil (grob-interpret-markup grob (markup #:musicglyph noteheads.u2doThin (if (= 2 dur-log) (ly:stencil-scale new-note-head-stil 1 stem-dir) stil \layout { \context { \Voice \override NoteHead.stencil = #nhg } } { \repeat unfold 64 c''4 } Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
Hi Harm, this is nice workaround, indeed. But how can I modify it to have different glyph for each duration-log? The original code was: #(define nhg (lambda (grob) (if (= 2 (ly:grob-property grob 'duration-log)) (begin (let* ((stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (rot (if (= stem-dir 1) 0 180))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob (markup #:rotate rot #:musicglyph noteheads.u2doThin)) (if (= 1 (ly:grob-property grob 'duration-log)) (begin (let* ((stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (rot (if (= stem-dir 1) 0 180))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob (markup #:rotate rot #:musicglyph noteheads.u1doThin \layout { \context { \Voice \override NoteHead.stencil = #nhg } } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
2014-03-04 21:45 GMT+01:00 Karol Majewski karo...@wp.pl: Hi Harm, this is nice workaround, indeed. But how can I modify it to have different glyph for each duration-log? The original code was: [...] If you only want noteheads of doThin-type, try: \version 2.18.0 #(define nhg (lambda (grob) (let* ((stil (ly:note-head::print grob)) (dur-log (ly:grob-property grob 'duration-log)) (nh-id-nr (if (= dur-log 2) 2 1)) (stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (new-note-head-stil (grob-interpret-markup grob (markup #:musicglyph (format #f noteheads.u~adoThin nh-id-nr) (ly:stencil-scale new-note-head-stil 1 stem-dir \layout { \context { \Voice \override NoteHead.stencil = #nhg } } \relative c '' { c1 c2 \repeat unfold 4 c8 \repeat unfold 64 c4 } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: whole page rotated
Not sure this is all helpful but any value between 135 and 235 is causing the whole page to rotate. On Tue, Mar 4, 2014 at 2:05 PM, Thomas Morley thomasmorle...@gmail.com wrote: 2014-03-04 19:19 GMT+01:00 Karol Majewski karo...@wp.pl: Hi, In the following code, I want to rotate custom note head. To my suprise, this code makes the whole page rotated if there is a line break. What I'm I doing wrong? #(define nhg (lambda (grob) (if (= 2 (ly:grob-property grob 'duration-log)) (begin (let* ((stem (ly:grob-object grob 'stem)) (stem-dir (ly:grob-property stem 'direction)) (rot (if (= stem-dir 1) 0 180))) (ly:grob-set-property! grob 'stencil (grob-interpret-markup grob (markup #:rotate rot #:musicglyph noteheads.u2doThin \layout { \context { \Staff \override NoteHead.stencil = #nhg } } { c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 c''4 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user Hi Karol, I've no idea what happens here. Below a tiny code triggering the same bug. It's present as far as I can go back, i.e. 2.12.3 up to 2.19.1 { \override NoteHead #'rotation = #'(180 0 0) \repeat unfold 80 c''4 } I cc-ed the bug-list. Cheers, 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: whole page rotated
Thanks! This is exactly what I need! Hopefully the rotation bug will be solved eventually. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user