Re: placement sostenuto
On Fri 23 Sep 2011, 09:07 David Nalesnik wrote: I was experimenting with this approach, but 'padding doesn't seem to respond when set to a procedure. In the following snippet, the first override works, the second doesn't. Am I missing something? \version 2.14.2 { \once \override Script #'Y-offset = #(lambda (grob) -3) c''1_- \once \override Script #'padding = #(lambda (grob) 3) c''1_- } Yes, really .( Who knows wether it's intentional or it's a bug. -- Dmytro O. RedchukEasy to use is easy to say. Bug Squad -- Jeff Garbers ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
on 2011-09-25 at 20:27 David Nalesnik wrote: Good idea. like wow, i couldn't expect that my original post would trigger all this thread (most of it way over my head, i'm afraid...) thank you all! ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Hi David 2011/9/24 David Nalesnik david.nales...@gmail.com Hi Harm, Thanks for the insight! So then you could do something like this: I tried, but without success. :) \version 2.14.2 #(define (padding-for-tenuto x) (lambda (grob) (if (equal? tenuto (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob 'padding x) '( #(define (custom-articulation-padding type x) (lambda (grob) (if (equal? type (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob 'padding x) '( \relative c'' { \once \override Script #'after-line-breaking = #(padding-for-tenuto 0.75) f1-- f1-- \override Script #'after-line-breaking = #(custom-articulation-padding accent 1) f- f- \revert Script #'after-line-breaking f- } I don't know if I've gotten at the name of the articulation in the best way, but this works. One drawback is that there can only be one override of 'after-line-breaking at a time. 'before-line-breaking works too (see code below). So, if you want multiple changes to default values -- a change to tenuto, a change to accent, etc. -- these should be added as conditions to the function. The second function lets you plug in the name of the articulation you want to override. I did it this way: \version 2.14.2 #(define my-script-alist '( (staccato . (font-size . 15)) (accent . (font-size . 4)) (tenuto . (rotation . (45 0 0))) (staccatissimo . (padding . 2)) )) #(define ((custom-script-tweaks type) grob) (map (lambda (arg) (let ((lst (assoc-ref my-script-alist arg))) (if (equal? arg (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob (car lst) (cdr lst)) '( type)) #(define (custom-articulation-tweaks type property x) (lambda (grob) (if (equal? type (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob property x) '( \relative c'' { f1-- f1-- \override Script #'after-line-breaking = #(custom-articulation-tweaks accent 'color red) \override Script #'before-line-breaking = #(custom-script-tweaks '(staccato tenuto accent staccatissimo)) f-. f-| f- f- f-- f-| \revert Script #'after-line-breaking \revert Script #'before-line-breaking f- f-. } To override accent I used the second function with 'before-line-breaking. I'd prefer to store several properties in an alist, but I couldn't figure out how to read-out and call. p.e.: #(define ls '( (staccato . ((color . (1 0 0 (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0 (staccatissimo . ((padding . -10) (color . (1 0 0 )) Any idea? Best, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Hi Harm, On Sun, Sep 25, 2011 at 1:01 PM, Thomas Morley thomasmorle...@googlemail.com wrote: 2011/9/24 David Nalesnik david.nales...@gmail.com I don't know if I've gotten at the name of the articulation in the best way, but this works. One drawback is that there can only be one override of 'after-line-breaking at a time. 'before-line-breaking works too (see code below). Aha -- good to know! [ . . . ] I'd prefer to store several properties in an alist, but I couldn't figure out how to read-out and call. p.e.: #(define ls '( (staccato . ((color . (1 0 0 (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0 (staccatissimo . ((padding . -10) (color . (1 0 0 )) Any idea? You could change the function to map ly:grob-set-property! onto the alist if a match is found: \version 2.14.2 #(define ls '( (staccato . ((color . (0 1 0 (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0)) (padding . 2))) (staccatissimo . ((padding . -10) (color . (0 0 1 )) #(define ((custom-script-tweaks type) grob) (map (lambda (arg) (let ((lst (assoc-ref ls arg))) (if (equal? arg (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) lst) '( type)) \relative c'' { f1-- f1-- \override Script #'before-line-breaking = #(custom-script-tweaks '(staccato tenuto accent staccatissimo)) f-. f-| f- f- f-- f-| \revert Script #'before-line-breaking f- f-. } -David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Hi David, 2011/9/25 David Nalesnik david.nales...@gmail.com You could change the function to map ly:grob-set-property! onto the alist if a match is found: \version 2.14.2 #(define ls '( (staccato . ((color . (0 1 0 (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0)) (padding . 2))) (staccatissimo . ((padding . -10) (color . (0 0 1 )) #(define ((custom-script-tweaks type) grob) (map (lambda (arg) (let ((lst (assoc-ref ls arg))) (if (equal? arg (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) lst) '( type)) \relative c'' { f1-- f1-- \override Script #'before-line-breaking = #(custom-script-tweaks '(staccato tenuto accent staccatissimo)) f-. f-| f- f- f-- f-| \revert Script #'before-line-breaking f- f-. } thanks a lot! I added ls as an argument to the definition to get the possibility to access different alists in polyphonic situations: \version 2.14.2 #(define ls-1 '( (staccato . ((color . (0 1 0))(padding . 0.5))) (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0)) (padding . 2)(font-size . 10))) (staccatissimo . ((padding . -10) (color . (0 0 1 )) #(define ls-2 '( (staccato . ((color . (0 1 0 (accent . ((font-size . 4)(color . (0 1 0))(padding . 1.5))) (tenuto . ((rotation . (-45 0 0)) (padding . 2)(font-size . 10))) (staccatissimo . ((padding . -10) (color . (0 0 1 (coda . ((color . (0 0 1 )) #(define ((custom-script-tweaks type ls) grob) (map (lambda (arg) (let ((lst (assoc-ref ls arg))) (if (equal? arg (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) lst) '( type)) one = \relative c'' { f1-- f1-- \override Voice.Script #'before-line-breaking = #(custom-script-tweaks '(staccato tenuto accent staccatissimo) ls-1) f-. f-| f- f- f-- f-| \revert Script #'before-line-breaking f- f-. } two = \relative c' { f1--- f1-- \override Voice.Script #'before-line-breaking = #(custom-script-tweaks '(staccato tenuto accent staccatissimo coda) ls-2) f-. f-| f- f- f--- f-| %\revert Script #'before-line-breaking f- f-.\coda } \new Staff \new Voice { \voiceOne \one } \new Voice { \voiceTwo \two } Thanks, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
On Sun, Sep 25, 2011 at 6:24 PM, Thomas Morley thomasmorle...@googlemail.com wrote: Hi David, thanks a lot! You're welcome! I added ls as an argument to the definition to get the possibility to access different alists in polyphonic situations: Good idea. One thought I had is that someone using this might want to be able to override all the settings without specifying a list of articulations. So in that case you could use this: \version 2.14.2 #(define ls-1 '( (staccato . ((color . (0 1 0))(padding . 0.5))) (accent . ((font-size . 4)(color . (1 0 0 (tenuto . ((rotation . (45 0 0)) (padding . 2)(font-size . 10))) (staccatissimo . ((padding . -10) (color . (0 0 1 )) #(define ls-2 '( (staccato . ((color . (0 1 0 (accent . ((font-size . 4)(color . (0 1 0))(padding . 1.5))) (tenuto . ((rotation . (-45 0 0)) (padding . 2)(font-size . 10))) (staccatissimo . ((padding . -10) (color . (0 0 1 (coda . ((color . (0 0 1 )) #(define ((custom-script-tweaks ls) grob) (let* ((type (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (tweaks (assoc-ref ls type))) (if tweaks (for-each (lambda (x) (ly:grob-set-property! grob (car x) (cdr x))) tweaks) '( one = \relative c'' { f1-- f1-- \override Voice.Script #'before-line-breaking = #(custom-script-tweaks ls-1) f-. f-| f- f- f-- f-| \revert Script #'before-line-breaking f- f-. } two = \relative c' { f1--- f1-- \override Voice.Script #'before-line-breaking = #(custom-script-tweaks ls-2) f-. f-| f- f- f--- f-| %\revert Script #'before-line-breaking f- f-.\coda } \new Staff \new Voice { \voiceOne \one } \new Voice { \voiceTwo \two } Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/24 David Nalesnik david.nales...@gmail.com ( . . .) In the following snippet, the override of 'Y-offset works, but the one of 'padding doesn't. \version 2.14.2 \relative c' { \once \override Script #'padding = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- \once \override Script #'Y-offset = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- } -David Hi David, I don't know, why it doesn't work this way. But the following seems to be successful: #(define (proc x y) (lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1) (ly:grob-set-property! grob 'padding x) (ly:grob-set-property! grob 'padding y) ))) \relative c' { \once \override Script #'after-line-breaking = #(proc 5 0.2) c1^- %{ \once \override Script #'after-line-breaking = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1) (ly:grob-set-property! grob 'padding 5) (ly:grob-set-property! grob 'padding 0.2) )) c1^- %} \once \override Script #'Y-offset = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- } Best, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Hi Harm, On Sat, Sep 24, 2011 at 8:59 AM, Thomas Morley thomasmorle...@googlemail.com wrote: Hi David, I don't know, why it doesn't work this way. But the following seems to be successful: #(define (proc x y) (lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1) (ly:grob-set-property! grob 'padding x) (ly:grob-set-property! grob 'padding y) ))) \relative c' { \once \override Script #'after-line-breaking = #(proc 5 0.2) c1^- %{ \once \override Script #'after-line-breaking = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) 1) (ly:grob-set-property! grob 'padding 5) (ly:grob-set-property! grob 'padding 0.2) )) c1^- %} \once \override Script #'Y-offset = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- } Thanks for the insight! So then you could do something like this: \version 2.14.2 #(define (padding-for-tenuto x) (lambda (grob) (if (equal? tenuto (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob 'padding x) '( #(define (custom-articulation-padding type x) (lambda (grob) (if (equal? type (ly:prob-property (assoc-ref (ly:grob-properties grob) 'cause) 'articulation-type)) (ly:grob-set-property! grob 'padding x) '( \relative c'' { \once \override Script #'after-line-breaking = #(padding-for-tenuto 0.75) f1-- f1-- \override Script #'after-line-breaking = #(custom-articulation-padding accent 1) f- f- \revert Script #'after-line-breaking f- } I don't know if I've gotten at the name of the articulation in the best way, but this works. One drawback is that there can only be one override of 'after-line-breaking at a time. So, if you want multiple changes to default values -- a change to tenuto, a change to accent, etc. -- these should be added as conditions to the function. The second function lets you plug in the name of the articulation you want to override. Not sure which of the several methods of changing specific articulations is best, but I hope this proves helpful. -David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
eluze elu...@gmail.com writes: hello i think it's called tenuto in lilypond and it belongs to the Script objects. you could change the distance to the notehead with \once \override Script #'padding = #.75 and/or define a function which you can apply before you insert a tenuto: myTenuto = { \once \override Script #'padding = #.75 } it's also possible to use the \tweak command: { c''1 - \tweak #'padding #.75 _- } ten = -\tweak #'padding #.75 -- { c''1\ten } -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
On Fri 23 Sep 2011, 13:48 David Kastrup wrote: ten = -\tweak #'padding #.75 -- { c''1\ten } Great, even { c''1^\ten } and { c''1_\ten } do work, thanks .) -- Dmytro O. RedchukEasy to use is easy to say. Bug Squad -- Jeff Garbers ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
on 2011-09-23 at 13:40 eluze wrote: i think it's called tenuto in lilypond of course! [in lilypond and elsewhere :-), i just had a lapsus...] and it belongs to the Script objects. you could change the distance to the notehead with \once \override Script #'padding = #.75 this works! as well as the tweaks suggested by david and dmytro, thank you all. i see that this override changes the placement of all the objects belonging to Script, including articulation marks like accent and the rest. anyway, i prefer to use a global \override in my template, instead of individual tweaks. i understand one cannot adjust with \override the properties of individual objects belonging to script? thank you, lj ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
nice abbreviation, thanks! i wonder however if - and how - one could override the default padding (.20) defined in \script.scm, as to continue to use the normal liylpond syntax! Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
On Fri 23 Sep 2011, 10:30 luis jure wrote: i see that this override changes the placement of all the objects belonging to Script, including articulation marks like accent and the rest. anyway, i prefer to use a global \override in my template, instead of individual tweaks. i understand one cannot adjust with \override the properties of individual objects belonging to script? If i understtod your right, you'd like to \override something for, let's say, tenuto only. I believe it's possible; i would start with this approach: %- \displayMusic { c''1-- } %- Compiling this we can see in log/terminal: %- (make-music 'SequentialMusic 'elements (list (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 0 0 1 1) 'pitch (ly:make-pitch 1 0 0)) (make-music 'ArticulationEvent 'articulation-type tenuto) %- So, this 'ArticulationEvent has an 'articulation-type = tenuto. As we can use a function for \override: \override Script #'padding = #(padding-for-tenuto) --- we can imagine a function which takes a grob as an argument and checks if an articulation is tenuto and returns .75 if it is, or default value otherwise. So, what you need is posible, if it's possible to get 'articulation-type from grob (which would be passed to our function as an argument). And if it is possible to return default value for any other but tenuto. To be honest, i don't know if it's possible .) ;; If it was --- would be better to modify our function ;; to accept default value for tenuto: \override Script #'padding = #(padding-for-tenuto .75) ;;; Actually i would love to see somebody really knowledgeable helping you .) -- Dmytro O. RedchukEasy to use is easy to say. Bug Squad -- Jeff Garbers ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
On Fri, Sep 23, 2011 at 8:59 AM, Dmytro O. Redchuk brownian@gmail.comwrote: On Fri 23 Sep 2011, 10:30 luis jure wrote: i see that this override changes the placement of all the objects belonging to Script, including articulation marks like accent and the rest. anyway, i prefer to use a global \override in my template, instead of individual tweaks. i understand one cannot adjust with \override the properties of individual objects belonging to script? If i understtod your right, you'd like to \override something for, let's say, tenuto only. I believe it's possible; i would start with this approach: %- \displayMusic { c''1-- } %- Compiling this we can see in log/terminal: %- (make-music 'SequentialMusic 'elements (list (make-music 'EventChord 'elements (list (make-music 'NoteEvent 'duration (ly:make-duration 0 0 1 1) 'pitch (ly:make-pitch 1 0 0)) (make-music 'ArticulationEvent 'articulation-type tenuto) %- So, this 'ArticulationEvent has an 'articulation-type = tenuto. As we can use a function for \override: \override Script #'padding = #(padding-for-tenuto) --- we can imagine a function which takes a grob as an argument and checks if an articulation is tenuto and returns .75 if it is, or default value otherwise. So, what you need is posible, if it's possible to get 'articulation-type from grob (which would be passed to our function as an argument). And if it is possible to return default value for any other but tenuto. To be honest, i don't know if it's possible .) ;; If it was --- would be better to modify our function ;; to accept default value for tenuto: \override Script #'padding = #(padding-for-tenuto .75) ;;; I was experimenting with this approach, but 'padding doesn't seem to respond when set to a procedure. In the following snippet, the first override works, the second doesn't. Am I missing something? \version 2.14.2 { \once \override Script #'Y-offset = #(lambda (grob) -3) c''1_- \once \override Script #'padding = #(lambda (grob) 3) c''1_- } -David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
i'm neither expert nor knowledgeable with scheme but i would prefer a solution that lets you define your own preferences and include them with -dinclude-settings=….ly afaics in script.scm a list is defined with (sub-)properties of many/all script objects. now it should be possible to redefine these items (override/replace this list) with user settings. hoping somebody can help !?! thanks Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/23 eluze elu...@gmail.com i'm neither expert nor knowledgeable with scheme but i would prefer a solution that lets you define your own preferences and include them with -dinclude-settings=….ly afaics in script.scm a list is defined with (sub-)properties of many/all script objects. now it should be possible to redefine these items (override/replace this list) with user settings. hoping somebody can help !?! thanks Eluze Hi, this does the job: \version 2.14.2 #(define-public my-script-alist `( (accent . ( (avoid-slur . around) (padding . 0.20) (script-stencil . (feta . (sforzato . sforzato))) (side-relative-direction . ,DOWN))) (accentus . ( (script-stencil . (feta . (uaccentus . uaccentus))) (side-relative-direction . ,DOWN) (avoid-slur . ignore) (padding . 0.20) (quantize-position . #t) (script-priority . -100) (direction . ,UP))) (circulus . ( (script-stencil . (feta . (circulus . circulus))) (side-relative-direction . ,DOWN) (avoid-slur . ignore) (padding . 0.20) (quantize-position . #t) (script-priority . -100) (direction . ,UP))) (coda . ( (script-stencil . (feta . (coda . coda))) (padding . 0.20) (avoid-slur . outside) (direction . ,UP))) (comma . ( (script-stencil . (feta . (lcomma . rcomma))) (quantize-position . #t) (padding . 0.20) (avoid-slur . ignore) (direction . ,UP))) (downbow . ( (script-stencil . (feta . (downbow . downbow))) (padding . 0.20) (avoid-slur . around) (direction . ,UP) (script-priority . 150))) (downmordent . ( (script-stencil . (feta . (downmordent . downmordent))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (downprall . ( (script-stencil . (feta . (downprall . downprall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (espressivo . ( (avoid-slur . around) (padding . 0.20) (script-stencil . (feta . (espr . espr))) (side-relative-direction . ,DOWN))) (fermata . ( (script-stencil . (feta . (dfermata . ufermata))) (padding . 0.20) (avoid-slur . around) (script-priority . 4000) (direction . ,UP))) (flageolet . ( (script-stencil . (feta . (flageolet . flageolet))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,UP))) (halfopen . ( (avoid-slur . outside) (padding . 0.20) (script-stencil . (feta . (halfopen . halfopen))) (direction . ,UP))) (ictus . ( (script-stencil . (feta . (ictus . ictus))) (side-relative-direction . ,DOWN) (quantize-position . #t) (avoid-slur . ignore) (padding . 0.20) (script-priority . -100) (direction . ,DOWN))) (lheel . ( (script-stencil . (feta . (upedalheel . upedalheel))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,DOWN))) (lineprall . ( (script-stencil . (feta . (lineprall . lineprall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (longfermata . ( (script-stencil . (feta . (dlongfermata . ulongfermata))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (ltoe . ( (script-stencil . (feta . (upedaltoe . upedaltoe))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,DOWN))) (marcato . ( (script-stencil . (feta . (dmarcato . umarcato))) (padding . 0.20) (avoid-slur . inside) ;;(staff-padding . ()) (quantize-position . #t) (side-relative-direction . ,DOWN))) (mordent . ( (script-stencil . (feta . (mordent . mordent))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (open . ( (avoid-slur . outside) (padding . 0.20) (script-stencil . (feta . (open . open))) (direction . ,UP))) (portato . ( (script-stencil . (feta . (uportato . dportato))) (avoid-slur . around) (slur-padding . 0.3) (padding . 0.45) (side-relative-direction . ,DOWN))) (prall . ( (script-stencil . (feta . (prall . prall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (pralldown . ( (script-stencil . (feta . (pralldown . pralldown))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (prallmordent . ( (script-stencil . (feta . (prallmordent . prallmordent))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (prallprall . ( (script-stencil . (feta . (prallprall . prallprall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (prallup . ( (script-stencil . (feta . (prallup . prallup))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (reverseturn . ( (script-stencil . (feta
Re: placement sostenuto
On Fri, Sep 23, 2011 at 4:38 PM, Thomas Morley thomasmorle...@googlemail.com wrote: But I didn't manage to shorten it. Not sure if this is expressed in the best form, but putting this line at the top of the file should change the 'padding value of the tentuo mark only: #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Am 23.09.2011, 23:38 Uhr, schrieb Thomas Morley thomasmorle...@googlemail.com: Hi, this does the job: \version 2.14.2 #(define-public my-script-alist `( (accent . ( %- Test \layout { \context { \Score scriptDefinitions = #my-script-alist } } \relative c' { c'1-. c-| c1_- c-^ c } But I didn't manage to shorten it. Perhaps someone else ... Cheers, Harm great, thanks - i knew it's possible! now we need a way to only override the relevant items - i.e. to replace the padding for tenuto in the original list! (then we even get rid of the \layout part!) anybody has ideas?! Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
On Fri, Sep 23, 2011 at 5:08 PM, eluze elu...@gmail.com wrote: now we need a way to only override the relevant items - i.e. to replace the padding for tenuto in the original list! (then we even get rid of the \layout part!) anybody has ideas?! Yes, with the line I just posted you don't need to include the long list in your file. Best, David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Am 24.09.2011, 00:08 Uhr, schrieb David Nalesnik david.nales...@gmail.com: On Fri, Sep 23, 2011 at 4:38 PM, Thomas Morley thomasmorle...@googlemail.com wrote: But I didn't manage to shorten it. Not sure if this is expressed in the best form, but putting this line at the top of the file should change the 'padding value of the tentuo mark only: #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) Best, David thanks, it works too! now i'll have to see how to implement this in my -include-settings file! Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/24 David Nalesnik david.nales...@gmail.com On Fri, Sep 23, 2011 at 4:38 PM, Thomas Morley thomasmorle...@googlemail.com wrote: But I didn't manage to shorten it. Not sure if this is expressed in the best form, but putting this line at the top of the file should change the 'padding value of the tentuo mark only: #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) Best, David Hi David, that's it. Great!! Thanks, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Dmytro O. Redchuk brownian@gmail.com writes: On Fri 23 Sep 2011, 13:48 David Kastrup wrote: ten = -\tweak #'padding #.75 -- { c''1\ten } Great, even { c''1^\ten } and { c''1_\ten } do work, thanks .) I wished the documention made it easier to figure out the kinds of thing that just happen to work without breaking half a leg. I have been working on the parser lately in order to increase their number, hopefully making people less likely to keep expecting the worst from Lilypond, anyway. Perhaps one should make a collection of Lilypond programming gems. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/24 David Nalesnik david.nales...@gmail.com On Fri, Sep 23, 2011 at 5:08 PM, eluze elu...@gmail.com wrote: now we need a way to only override the relevant items - i.e. to replace the padding for tenuto in the original list! (then we even get rid of the \layout part!) anybody has ideas?! Yes, with the line I just posted you don't need to include the long list in your file. Best, David There might be another point of interest: How to reset? I'm aware it could be done with a new #(assoc-set! ... ) using default values. Is there another, easier method? Best, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/24 Thomas Morley thomasmorle...@googlemail.com There might be another point of interest: How to reset? I'm aware it could be done with a new #(assoc-set! ... ) using default values. I was wrong: This doesn't work! Sorry! But: Is there another, easier method? Best, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
Hi Harm, On Fri, Sep 23, 2011 at 5:52 PM, Thomas Morley thomasmorle...@googlemail.com wrote: 2011/9/24 Thomas Morley thomasmorle...@googlemail.com There might be another point of interest: How to reset? I'm aware it could be done with a new #(assoc-set! ... ) using default values. I was wrong: This doesn't work! Sorry! Yes, if you set the 'padding value like this, it will apply to all tenuto marks in your file. If you reset it to another value, it will change the 'padding values of every tenuto to the new value. So, unfortunately, it's not like using \override and \revert. You could do something like this to revert to Lily's default: \version 2.14.2 #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) { c''1_- \once \override Script #'padding = #0.2 c''1_- c''1_- } I was hoping to be able to set 'padding to a procedure. But 'padding doesn't respond if set that way, as I noted on an earlier email of this thread. I wonder if I'm doing something wrong here -- can 'padding be set to a procedure somehow? David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: placement sostenuto
2011/9/24 David Nalesnik david.nales...@gmail.com Hi Harm, On Fri, Sep 23, 2011 at 5:52 PM, Thomas Morley thomasmorle...@googlemail.com wrote: 2011/9/24 Thomas Morley thomasmorle...@googlemail.com There might be another point of interest: How to reset? I'm aware it could be done with a new #(assoc-set! ... ) using default values. I was wrong: This doesn't work! Sorry! Yes, if you set the 'padding value like this, it will apply to all tenuto marks in your file. If you reset it to another value, it will change the 'padding values of every tenuto to the new value. So, unfortunately, it's not like using \override and \revert. You could do something like this to revert to Lily's default: \version 2.14.2 #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) { c''1_- \once \override Script #'padding = #0.2 c''1_- c''1_- } I was hoping to be able to set 'padding to a procedure. But 'padding doesn't respond if set that way, as I noted on an earlier email of this thread. I wonder if I'm doing something wrong here -- can 'padding be set to a procedure somehow? David Hi David, (a) I did some very simple exercises on 'padding and procedures: #(define (add a b) (+ a b)) #(define sum (lambda (x y) (+ x y))) \relative c' { \once \override Script #'padding = #3 c'1-- \once \override Script #'padding = #(+ 1 2) c1-- \once \override Script #'padding = #(add 1 2) c1-- \once \override Script #'padding = #(sum 1 2) c1-- \once \override Script #'padding = #((lambda (x y) (+ x y)) 1 2) c1-- } Seems to work. (b) Using my first idea creating a new script-alist, \set and \unset is possible: \version 2.14.2 #(define my-script-alist `( (accent . ( (avoid-slur . around) (padding . 0.20) (script-stencil . (feta . (sforzato . sforzato))) (side-relative-direction . ,DOWN))) (accentus . ( (script-stencil . (feta . (uaccentus . uaccentus))) (side-relative-direction . ,DOWN) (avoid-slur . ignore) (padding . 0.20) (quantize-position . #t) (script-priority . -100) (direction . ,UP))) (circulus . ( (script-stencil . (feta . (circulus . circulus))) (side-relative-direction . ,DOWN) (avoid-slur . ignore) (padding . 0.20) (quantize-position . #t) (script-priority . -100) (direction . ,UP))) (coda . ( (script-stencil . (feta . (coda . coda))) (padding . 0.20) (avoid-slur . outside) (direction . ,UP))) (comma . ( (script-stencil . (feta . (lcomma . rcomma))) (quantize-position . #t) (padding . 0.20) (avoid-slur . ignore) (direction . ,UP))) (downbow . ( (script-stencil . (feta . (downbow . downbow))) (padding . 0.20) (avoid-slur . around) (direction . ,UP) (script-priority . 150))) (downmordent . ( (script-stencil . (feta . (downmordent . downmordent))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (downprall . ( (script-stencil . (feta . (downprall . downprall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (espressivo . ( (avoid-slur . around) (padding . 0.20) (script-stencil . (feta . (espr . espr))) (side-relative-direction . ,DOWN))) (fermata . ( (script-stencil . (feta . (dfermata . ufermata))) (padding . 0.20) (avoid-slur . around) (script-priority . 4000) (direction . ,UP))) (flageolet . ( (script-stencil . (feta . (flageolet . flageolet))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,UP))) (halfopen . ( (avoid-slur . outside) (padding . 0.20) (script-stencil . (feta . (halfopen . halfopen))) (direction . ,UP))) (ictus . ( (script-stencil . (feta . (ictus . ictus))) (side-relative-direction . ,DOWN) (quantize-position . #t) (avoid-slur . ignore) (padding . 0.20) (script-priority . -100) (direction . ,DOWN))) (lheel . ( (script-stencil . (feta . (upedalheel . upedalheel))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,DOWN))) (lineprall . ( (script-stencil . (feta . (lineprall . lineprall))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (longfermata . ( (script-stencil . (feta . (dlongfermata . ulongfermata))) (padding . 0.20) (avoid-slur . around) (direction . ,UP))) (ltoe . ( (script-stencil . (feta . (upedaltoe . upedaltoe))) (padding . 0.20) (avoid-slur . around) ;guessing? (direction . ,DOWN))) (marcato . ( (script-stencil . (feta . (dmarcato . umarcato))) (padding . 0.20) (avoid-slur . inside) ;;(staff-padding . ()) (quantize-position . #t) (side-relative-direction . ,DOWN)))
Re: placement sostenuto
On Fri, Sep 23, 2011 at 7:28 PM, Thomas Morley thomasmorle...@googlemail.com wrote: 2011/9/24 David Nalesnik david.nales...@gmail.com Hi Harm, On Fri, Sep 23, 2011 at 5:52 PM, Thomas Morley thomasmorle...@googlemail.com wrote: 2011/9/24 Thomas Morley thomasmorle...@googlemail.com There might be another point of interest: How to reset? I'm aware it could be done with a new #(assoc-set! ... ) using default values. I was wrong: This doesn't work! Sorry! Yes, if you set the 'padding value like this, it will apply to all tenuto marks in your file. If you reset it to another value, it will change the 'padding values of every tenuto to the new value. So, unfortunately, it's not like using \override and \revert. You could do something like this to revert to Lily's default: \version 2.14.2 #(assoc-set! (assoc-ref default-script-alist tenuto) 'padding 0.75) { c''1_- \once \override Script #'padding = #0.2 c''1_- c''1_- } I was hoping to be able to set 'padding to a procedure. But 'padding doesn't respond if set that way, as I noted on an earlier email of this thread. I wonder if I'm doing something wrong here -- can 'padding be set to a procedure somehow? David Hi David, (a) I did some very simple exercises on 'padding and procedures: #(define (add a b) (+ a b)) #(define sum (lambda (x y) (+ x y))) \relative c' { \once \override Script #'padding = #3 c'1-- \once \override Script #'padding = #(+ 1 2) c1-- \once \override Script #'padding = #(add 1 2) c1-- \once \override Script #'padding = #(sum 1 2) c1-- \once \override Script #'padding = #((lambda (x y) (+ x y)) 1 2) c1-- } Seems to work. True, but not for all procedures . . . In the following snippet, the override of 'Y-offset works, but the one of 'padding doesn't. \version 2.14.2 \relative c' { \once \override Script #'padding = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- \once \override Script #'Y-offset = #(lambda (grob) (if (eq? (ly:grob-property grob 'direction) UP) 5 0.2)) c1^- } -David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user