Re: How to enlarge the size of accidentals in a figured bass ?
On Wed, 2017-04-19 at 00:08 +0200, David Kastrup wrote: > Richard Shann writes: > > > On Tue, 2017-04-18 at 10:04 -0500, David Nalesnik wrote: [...] > >> > for particular values? > >> > > >> > >> > >> It's a Duration object. > > > > Hmm, that's the LilyPond type, but I'm still curious as to what Scheme > > type it is that displays using #< ...> > > I've been combing the Guile manual and thought for a moment it was a > > vector, but no, no that. > > None. It is a user-defined type, and a user-defined print form which > Guile cannot read back in (at least currently). > ah, thanks for this. I see now I needed to look in http://lilypond.org/doc/v2.18/Documentation/notation/scheme-functions to get to grips with it. Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to enlarge the size of accidentals in a figured bass ?
Richard Shann writes: > On Tue, 2017-04-18 at 10:04 -0500, David Nalesnik wrote: >> On Tue, Apr 18, 2017 at 9:25 AM, Richard Shann >> wrote: >> > On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote: >> >> ;; hmm, how to get figures centered between note, and >> >> ;; lone accidentals too? >> >> >> >> ; (if (markup? fig-markup) >> >> ; (set! >> >> ; fig-markup (markup #:translate (cons 1.0 0) >> >> ; #:center-align fig-markup))) >> > >> > This part of the code is commented out like this in >> > translation-functions.scm, but I tried it out, and it improves the >> > centering over whole-notes but makes it worse over other notes. >> > >> > I see that (ly:event-property event 'duration) gives the duration of >> > the note that the bass figure is on as: >> > >> > # >> > >> > for a whole note. >> > >> > so if I could test that I could use that code for this case (and the 1. >> > case). But here my understanding of Guile's display syntax runs out ... >> > what sort of a type is ly:event-property returning, and how do I test >> > for particular values? >> > >> >> >> It's a Duration object. > > Hmm, that's the LilyPond type, but I'm still curious as to what Scheme > type it is that displays using #< ...> > I've been combing the Guile manual and thought for a moment it was a > vector, but no, no that. None. It is a user-defined type, and a user-defined print form which Guile cannot read back in (at least currently). -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to enlarge the size of accidentals in a figured bass ?
On Tue, Apr 18, 2017 at 9:25 AM, Richard Shann wrote: > On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote: >> ;; hmm, how to get figures centered between note, and >> ;; lone accidentals too? >> >> ; (if (markup? fig-markup) >> ; (set! >> ; fig-markup (markup #:translate (cons 1.0 0) >> ; #:center-align fig-markup))) > > This part of the code is commented out like this in > translation-functions.scm, but I tried it out, and it improves the > centering over whole-notes but makes it worse over other notes. > > I see that (ly:event-property event 'duration) gives the duration of > the note that the bass figure is on as: > > # > > for a whole note. > > so if I could test that I could use that code for this case (and the 1. > case). But here my understanding of Guile's display syntax runs out ... > what sort of a type is ly:event-property returning, and how do I test > for particular values? > It's a Duration object. Why not: (if (and (markup? fig-markup) (eqv? 0 (ly:duration-log (ly:event-property event 'duration (set! fig-markup (markup #:translate (cons 1.0 0) #:center-align fig-markup))) BTW, your snippet above won't compile because of the following: (plus-markup (if (eq? #t (ly:event-property event 'augmented)) (markup #:number \"+\") #f)) Why are you trying to escape the quotation marks here? Hope this helps-- David ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to enlarge the size of accidentals in a figured bass ?
On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote: > ;; hmm, how to get figures centered between note, and > ;; lone accidentals too? > > ; (if (markup? fig-markup) > ; (set! > ; fig-markup (markup #:translate (cons 1.0 0) > ; #:center-align fig-markup))) This part of the code is commented out like this in translation-functions.scm, but I tried it out, and it improves the centering over whole-notes but makes it worse over other notes. I see that (ly:event-property event 'duration) gives the duration of the note that the bass figure is on as: # for a whole note. so if I could test that I could use that code for this case (and the 1. case). But here my understanding of Guile's display syntax runs out ... what sort of a type is ly:event-property returning, and how do I test for particular values? Richard ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to enlarge the size of accidentals in a figured bass ?
On Thu, 2017-04-13 at 20:48 +0200, Thomas Morley wrote: > 2017-04-13 19:52 GMT+02:00 Ziad Gholam : > > Hello, > > > > > > > > Could someone help with advice about : > > > > How to enlarge the size of accidentals in a figured bass ? > > ... Either leaving the size of the numbers unchanged or not ... > > > > (version used = 2.18.2) > > > > > > Thanks you & > > R > > egards, > > > > > > Ziad R. GHOLAM > > > Hi, > > figured bass is fomated by the context-property `figuredBassFormatter' > which is set per default to the procedure `format-bass-figure'. > > There is no single property to affect fontsize of accidentals only, afaik. > > Though you could c/p the definition from translation-functions.scm > into your ly-file, change it to fit your needs and let LilyPond use > it. > Below I did exactly that, giving accidentals a far too huge fontsize > (just to make it obvious). > > > #(define-public (format-bass-figures figure event context) > (let* ((fig (ly:event-property event 'figure)) > (fig-markup (if (number? figure) > > ;; this is not very elegant, but center-aligning > ;; all digits is problematic with other markups, > ;; and shows problems in the (lack of) overshoot > ;; of feta-alphabet glyphs. > ((if (<= 10 figure) > (lambda (y) (make-translate-scaled-markup >(cons -0.7 0) y)) > identity) > > (cond >((eq? #t (ly:event-property event 'diminished)) > (markup #:slashed-digit figure)) >((eq? #t (ly:event-property event > 'augmented-slash)) > (markup #:backslashed-digit figure)) >(else (markup #:number (number->string figure > 10) > #f)) > > (alt (ly:event-property event 'alteration)) > (alt-markup > (if (number? alt) > (markup >#:general-align Y DOWN #:fontsize > ;; ! >(if (not (= alt DOUBLE-SHARP)) >;-2 2 :; is the default >4 4 ;; changed > ) > ;; ! I've been long wanting to tweak the size of the accidentals in the figured bass and not got round to looking at it. This code you have pointed to has given me a start. I noticed that simply changing the font size of the accidental leads to knock-on effects with the figure placement. What I find undesirable in the current default is the size of lone accidentals (those indicating a third) and also the heights of the sharp and flat when they precede a number - sharp too high, flat too low. I have come up with the following version which fixes these two problems: 8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8>< #(define-public (format-bass-figures figure event context) (let* ((fig (ly:event-property event 'figure)) (fig-markup (if (number? figure) ;; this is not very elegant, but center-aligning ;; all digits is problematic with other markups, ;; and shows problems in the (lack of) overshoot ;; of feta-alphabet glyphs. ((if (<= 10 figure) (lambda (y) (make-translate-scaled-markup (cons -0.7 0) y)) identity) (cond ((eq? #t (ly:event-property event 'diminished)) (markup #:slashed-digit figure)) ((eq? #t (ly:event-property event 'augmented-slash)) (markup #:backslashed-digit figure)) (else (markup #:number (number->string figure 10) #f)) (alt (ly:event-property event 'alteration)) (alt-markup (if (number? alt) (markup #:general-align Y DOWN #:fontsize (if (not (= alt DOUBLE-SHARP)) ;-2 2 ;; is the defau
Re: How to enlarge the size of accidentals in a figured bass ?
Thank you Thomas.Morley So I have to copy this "source" ( in an include file .ily, for example ? ) in every source code , isn't it ? __ Cordialement, Ziad R. GHOLAM Consultant Méthodes / Organisation / Qualité +33.681.488.898 = = = = = = = = = www.proactivis.com I.T. Services / Conseil = = = = = = = = = 2017-04-13 20:48 GMT+02:00 Thomas Morley : > 2017-04-13 19:52 GMT+02:00 Ziad Gholam : > > Hello, > > > > > > > > Could someone help with advice about : > > > > How to enlarge the size of accidentals in a figured bass ? > > ... Either leaving the size of the numbers unchanged or not ... > > > > (version used = 2.18.2) > > > > > > Thanks you & > > R > > egards, > > > > > > Ziad R. GHOLAM > > > Hi, > > figured bass is fomated by the context-property `figuredBassFormatter' > which is set per default to the procedure `format-bass-figure'. > > There is no single property to affect fontsize of accidentals only, afaik. > > Though you could c/p the definition from translation-functions.scm > into your ly-file, change it to fit your needs and let LilyPond use > it. > Below I did exactly that, giving accidentals a far too huge fontsize > (just to make it obvious). > > > #(define-public (format-bass-figures figure event context) > (let* ((fig (ly:event-property event 'figure)) > (fig-markup (if (number? figure) > > ;; this is not very elegant, but center-aligning > ;; all digits is problematic with other markups, > ;; and shows problems in the (lack of) overshoot > ;; of feta-alphabet glyphs. > ((if (<= 10 figure) > (lambda (y) (make-translate-scaled-markup >(cons -0.7 0) y)) > identity) > > (cond >((eq? #t (ly:event-property event 'diminished)) > (markup #:slashed-digit figure)) >((eq? #t (ly:event-property event > 'augmented-slash)) > (markup #:backslashed-digit figure)) >(else (markup #:number (number->string figure > 10) > #f)) > > (alt (ly:event-property event 'alteration)) > (alt-markup > (if (number? alt) > (markup >#:general-align Y DOWN #:fontsize > ;; ! >(if (not (= alt DOUBLE-SHARP)) >;-2 2 :; is the default >4 4 ;; changed > ) > ;; ! >(alteration->text-accidental-markup alt)) > #f)) > > (plus-markup (if (eq? #t (ly:event-property event 'augmented)) > (markup #:number "+") > #f)) > > (alt-dir (ly:context-property context ' > figuredBassAlterationDirection)) > (plus-dir (ly:context-property context > 'figuredBassPlusDirection))) > > (if (and (not fig-markup) alt-markup) > (begin > (set! fig-markup (markup #:left-align #:pad-around 0.3 > alt-markup)) > (set! alt-markup #f))) > > > ;; hmm, how to get figures centered between note, and > ;; lone accidentals too? > > ;;(if (markup? fig-markup) > ;; (set! > ;; fig-markup (markup #:translate (cons 1.0 0) > ;; #:center-align fig-markup))) > > (if alt-markup > (set! fig-markup > (markup #:put-adjacent > X (if (number? alt-dir) > alt-dir > LEFT) > fig-markup > #:pad-x 0.2 alt-markup))) > > (if plus-markup > (set! fig-markup > (if fig-markup > (markup #:put-adjacent > X (if (number? plus-dir) > plus-dir > LEFT) > fig-markup > #:pad-x 0.2 plus-markup) > plus-markup))) > > (if (markup? fig-markup) > (markup #:fontsize -2 fig-markup) > empty-markup))) > > > \layout { > \context { > \Score > figuredBassFormatter = #format-bass-figures > } > } > > \figures { > <7! 6+ 4-> <5++> <3--> < _+ > < 7 _!> > } > > > > HTH, > Harm > ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: How to enlarge the size of accidentals in a figured bass ?
2017-04-13 19:52 GMT+02:00 Ziad Gholam : > Hello, > > > > Could someone help with advice about : > > How to enlarge the size of accidentals in a figured bass ? > ... Either leaving the size of the numbers unchanged or not ... > > (version used = 2.18.2) > > > Thanks you & > R > egards, > > > Ziad R. GHOLAM Hi, figured bass is fomated by the context-property `figuredBassFormatter' which is set per default to the procedure `format-bass-figure'. There is no single property to affect fontsize of accidentals only, afaik. Though you could c/p the definition from translation-functions.scm into your ly-file, change it to fit your needs and let LilyPond use it. Below I did exactly that, giving accidentals a far too huge fontsize (just to make it obvious). #(define-public (format-bass-figures figure event context) (let* ((fig (ly:event-property event 'figure)) (fig-markup (if (number? figure) ;; this is not very elegant, but center-aligning ;; all digits is problematic with other markups, ;; and shows problems in the (lack of) overshoot ;; of feta-alphabet glyphs. ((if (<= 10 figure) (lambda (y) (make-translate-scaled-markup (cons -0.7 0) y)) identity) (cond ((eq? #t (ly:event-property event 'diminished)) (markup #:slashed-digit figure)) ((eq? #t (ly:event-property event 'augmented-slash)) (markup #:backslashed-digit figure)) (else (markup #:number (number->string figure 10) #f)) (alt (ly:event-property event 'alteration)) (alt-markup (if (number? alt) (markup #:general-align Y DOWN #:fontsize ;; ! (if (not (= alt DOUBLE-SHARP)) ;-2 2 :; is the default 4 4 ;; changed ) ;; ! (alteration->text-accidental-markup alt)) #f)) (plus-markup (if (eq? #t (ly:event-property event 'augmented)) (markup #:number "+") #f)) (alt-dir (ly:context-property context 'figuredBassAlterationDirection)) (plus-dir (ly:context-property context 'figuredBassPlusDirection))) (if (and (not fig-markup) alt-markup) (begin (set! fig-markup (markup #:left-align #:pad-around 0.3 alt-markup)) (set! alt-markup #f))) ;; hmm, how to get figures centered between note, and ;; lone accidentals too? ;;(if (markup? fig-markup) ;; (set! ;; fig-markup (markup #:translate (cons 1.0 0) ;; #:center-align fig-markup))) (if alt-markup (set! fig-markup (markup #:put-adjacent X (if (number? alt-dir) alt-dir LEFT) fig-markup #:pad-x 0.2 alt-markup))) (if plus-markup (set! fig-markup (if fig-markup (markup #:put-adjacent X (if (number? plus-dir) plus-dir LEFT) fig-markup #:pad-x 0.2 plus-markup) plus-markup))) (if (markup? fig-markup) (markup #:fontsize -2 fig-markup) empty-markup))) \layout { \context { \Score figuredBassFormatter = #format-bass-figures } } \figures { <7! 6+ 4-> <5++> <3--> < _+ > < 7 _!> } HTH, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
How to enlarge the size of accidentals in a figured bass ?
Hello, Could someone help with advice about : How to enlarge the size of accidentals in a figured bass ? ... Either leaving the size of the numbers unchanged or not ... (version used = 2.18.2) Thanks you & R egards, Ziad R. GHOLAM ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user