Re: Transparent box around notes

2024-05-04 Thread Paolo Prete
Thanks, I'll check it out! Il ven 3 mag 2024, 14:23 K. Blum ha scritto: > Hi Paolo, hi David, > > I've replaced the current stencil function with the one from the > openLilyLib "frames" module (which has even more capabilities). > Here is the result: >

Re: Transparent box around notes

2024-05-03 Thread K. Blum
Hi Paolo, hi David, I've replaced the current stencil function with the one from the openLilyLib "frames" module (which has even more capabilities). Here is the result: https://github.com/KlausBlum/Ly-Boxer-Snippet If you like, please feel free to experiment or add further things... I'll try to

Re: Transparent box around notes

2024-05-01 Thread K. Blum
Hi Paolo, But the alpha channel is ignored... Is there a way to fix this? AFAIK LilyPond cannot deal with alpha transparency at all. The impression of transparency is only achieved by placing the boxes in a layer behind the staff. I therefore replaced (see the attached file):        (if

Re: Transparent box around notes

2024-05-01 Thread Paolo Prete
Hello David and Klaus, A further improvement is to add colors with alpha channel. I therefore replaced (see the attached file): (if filled (ly:make-stencil (list 'color fill-color (list 'round-filled-box (- (- (car

Re: Transparent box around notes

2024-04-30 Thread Aaron Hill
On 2024-04-30 5:30 pm, David Nalesnik wrote: What LilyPond version is the LSR currently running? (I'm wondering if you are able to use the revised add-grob-definition there.) This is documented on the Contributing page [1]. [1]: https://lsr.di.unimi.it/LSR/html/contributing.html LSR

Re: Transparent box around notes

2024-04-30 Thread David Nalesnik
Hi Paolo, On Tue, Apr 30, 2024 at 4:09 PM Paolo Prete wrote: > Ta > > On Tue, Apr 30, 2024 at 8:04 PM K. Blum wrote: > >> Hi Paolo, hi everyone, >> >> > Yeah, it works if I just replace add-grob-definition with: >> > >> > #(define (add-grob-definition grob-name grob-entry) >> >(set!

Re: Transparent box around notes

2024-04-30 Thread Paolo Prete
Ta On Tue, Apr 30, 2024 at 8:04 PM K. Blum wrote: > Hi Paolo, hi everyone, > > > Yeah, it works if I just replace add-grob-definition with: > > > > #(define (add-grob-definition grob-name grob-entry) > >(set! all-grob-descriptions > > (cons ((@@ (lily) completize-grob-entry) > >

Re: Transparent box around notes

2024-04-30 Thread K. Blum
Hi Paolo, hi everyone, Yeah, it works if I just replace add-grob-definition with: #(define (add-grob-definition grob-name grob-entry)    (set! all-grob-descriptions          (cons ((@@ (lily) completize-grob-entry)                 (cons grob-name grob-entry))                

Re: Transparent box around notes

2024-04-30 Thread Paolo Prete
On Tue, Apr 30, 2024 at 6:38 AM Werner LEMBERG wrote: > > > [...] the snippet is _very_ useful, and certainly much easier to use > > than the lsr snippet. > > Please submit the example as a new LSR snippet. > > I submitted it (see: https://lsr.di.unimi.it/LSR/Item?u=1=1188 ) but the second box

Re: Transparent box around notes

2024-04-29 Thread Werner LEMBERG
> [...] the snippet is _very_ useful, and certainly much easier to use > than the lsr snippet. Please submit the example as a new LSR snippet. Note that we already have a (slightly different) issue for that: https://gitlab.com/lilypond/lilypond/-/issues/833 It would certainly help if you

Re: Transparent box around notes

2024-04-29 Thread Paolo Prete
Yeah, it works if I just replace add-grob-definition with: #(define (add-grob-definition grob-name grob-entry) (set! all-grob-descriptions (cons ((@@ (lily) completize-grob-entry) (cons grob-name grob-entry)) all-grob-descriptions))) That said, the

Re: Transparent box around notes

2024-04-28 Thread Robin Bannister
Paolo Prete wrote: Note that there's also this (no trial-and-error): https://lists.gnu.org/archive/html/lilypond-user/2015-01/msg00142.html But it doesn't compile with 2.24... That's due to merge request !818 [1], applied between 2.23.3 and 2.23.4. Simon Albrecht ran into the same problem

Re: Transparent box around notes

2024-04-27 Thread Paolo Prete
Note that there's also this (no trial-and-error): https://lists.gnu.org/archive/html/lilypond-user/2015-01/msg00142.html But it doesn't compile with 2.24... On Sat, Apr 27, 2024 at 2:20 PM Paolo Prete wrote: > Thanks for the tip, but unfortunately it doesn't seem to fit what I'm > looking

Re: Transparent box around notes

2024-04-27 Thread Paolo Prete
Thanks for the tip, but unfortunately it doesn't seem to fit what I'm looking for. Looking for example at https://lsr.di.unimi.it/LSR/Search?q=background+%7C+colorspan , the box coordinates must be calculated with a trial and error procedure, which is pretty tedious. Cheers, P On Sat, Apr 27,

Re: Transparent box around notes

2024-04-27 Thread Robin Bannister
Paolo Prete wrote: Something like: \coloredBox color offsLeft offsTop offsRight offsBottom "labelstring" labeldirection { c' e' f' } Many thanks for your help! Paolo This may get you started: https://lsr.di.unimi.it/LSR/Search?q=background+%7C+colorspan Cheers, Robin

Transparent box around notes

2024-04-26 Thread Paolo Prete
Hello LilyPonders, How can I draw a box around a group of notes so that (see the attached image) 1) it is filled with a transparent color 2) it occupies the minimum area that includes the notes + four (optional) offsets (left, top, right, bottom) that can be set by the user? 3) ... it would be