Re: Change size of all notes in one voice with partCombine

2021-06-29 Thread Dinh Hoang Tu
Hi Jean, It works wonderfully! Many thanks for your help! We can close the support here. Thanks Jean, Knute! Just my notice maybe out of scope: when I select 1 note on Frescobaldi, whole tweaked part is selected I can work around on it. Best, Tu' DINH On Tue, 29 Jun 2021 at 23:26, Jean Abou

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Matt Hood
That's quite handy to know, thanks for your response Carl. Cheers, Matt. On Wed, Jun 30, 2021 at 2:35 AM Carl Sorensen wrote: > > > > On 6/29/21, 2:43 AM, "lilypond-user on behalf of Matt Hood" > mattho...@gmail.com> wrote: > > Hi everyone, > > I'm working with lilypond output in the

Fwd: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Matt Hood
On Wed, Jun 30, 2021 at 3:32 AM Aaron Hill wrote: > > On 2021-06-29 9:43 am, Jean Abou Samra wrote: > > However, this problem can be solved by writing > > an engraver (those are the powerful tools that > > \applyOutput uses under the hood). > > > > \version "2.22.0" > > > > \layout { > >

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Matt Hood
P.S. (Sorry to be spamming the list!) > Out of curiosity: what tool is this for? A browser-based rhythm game I'm putting together, which makes use of Lilypond's fantastic proportional notation feature. The addition of classes is used to separate moving objects (NoteHead, Stem, BarLine, etc) from

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Matt Hood
On Wed, Jun 30, 2021 at 2:43 AM Jean Abou Samra wrote: > > Hello, > >... > > I'm not sure how you got this output. The way > the code is written, the \applyOutput is separate > from the main \score, so it is a score of its own > containing no actual music. If you move it to > the beginning of the

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Jean Abou Samra
> Le 29/06/2021 23:42, Jean Abou Samra a écrit : > > That being said, I'm not sure I would want to see something > along the lines of publicizing nested_property_alist. We already > use ly:assoc-get nearly everywhere (through the alias assoc-get), > and while more convenient thanks to the

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Jean Abou Samra
> Le 29/06/2021 22:45, David Kastrup a écrit : > > > Aaron Hill writes: > > > On 2021-06-29 1:20 pm, David Kastrup wrote: > > >> > > >> \version "2.22.0" > > >> SvgAddClassName = > > >> #(lambda (ctxt) > > >> (define (add-class-name grob) > > >> (let* ((attribs (ly:grob-property grob

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread David Kastrup
Aaron Hill writes: > On 2021-06-29 1:45 pm, David Kastrup wrote: >> Aaron Hill writes: >>> Hrm... would it be better to explicitly alist-copy the result from >>> ly:assoc-get? Actually, I guess you could do: >>> >>> (alist-cons 'class ... (alist-delete 'class attribs)) >>> >> Either

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Carl Sorensen
On 6/29/21, 2:55 PM, "lilypond-user on behalf of Aaron Hill" wrote: On 2021-06-29 1:45 pm, David Kastrup wrote: > Aaron Hill writes: >> Hrm... would it be better to explicitly alist-copy the result from >> ly:assoc-get? Actually, I guess you could do: >> >>

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Aaron Hill
On 2021-06-29 1:45 pm, David Kastrup wrote: Aaron Hill writes: Hrm... would it be better to explicitly alist-copy the result from ly:assoc-get? Actually, I guess you could do: (alist-cons 'class ... (alist-delete 'class attribs)) Either that or not even bother about deleting the

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread David Kastrup
Aaron Hill writes: > On 2021-06-29 1:20 pm, David Kastrup wrote: >>> >>> \version "2.22.0" >>> SvgAddClassName = >>> #(lambda (ctxt) >>> (define (add-class-name grob) >>>(let* ((attribs (ly:grob-property grob 'output-attributes '())) >>> (class (ly:assoc-get 'class attribs

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Aaron Hill
On 2021-06-29 1:20 pm, David Kastrup wrote: \version "2.22.0" SvgAddClassName = #(lambda (ctxt) (define (add-class-name grob) (let* ((attribs (ly:grob-property grob 'output-attributes '())) (class (ly:assoc-get 'class attribs '())) (name (grob::name grob)))

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Carl Sorensen
On 6/29/21, 2:14 PM, "Aaron Hill" wrote: On 2021-06-29 12:45 pm, Carl Sorensen wrote: > I believe that the logical implications of side-effects are not very > concerning when local variables are set!, so there's probably very > little or no downside to the set!s in Aaron's

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread David Kastrup
Aaron Hill writes: > On 2021-06-29 9:43 am, Jean Abou Samra wrote: >> However, this problem can be solved by writing >> an engraver (those are the powerful tools that >> \applyOutput uses under the hood). >> \version "2.22.0" >> \layout { >> \context { >> \Score >> \consists >>

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Aaron Hill
On 2021-06-29 12:45 pm, Carl Sorensen wrote: I believe that the logical implications of side-effects are not very concerning when local variables are set!, so there's probably very little or no downside to the set!s in Aaron's code. In fact, it's possible that Aaron's code will use less heap

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Carl Sorensen
On 6/29/21, 11:33 AM, "lilypond-user on behalf of Aaron Hill" wrote: On 2021-06-29 9:43 am, Jean Abou Samra wrote: > However, this problem can be solved by writing > an engraver (those are the powerful tools that > \applyOutput uses under the hood). > > \version

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Aaron Hill
On 2021-06-29 9:43 am, Jean Abou Samra wrote: However, this problem can be solved by writing an engraver (those are the powerful tools that \applyOutput uses under the hood). \version "2.22.0" \layout { \context { \Score \consists #(lambda (context) (make-engraver

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Jean Abou Samra
Hello, > Le 29/06/2021 10:42, Matt Hood a écrit : > > > Hi everyone, > > I'm working with lilypond output in the browser, using its SVG export > function. Lilypond permits attaching attributes to particular kinds of > grobs, e.g.: > > { > \override NoteHead.output-attributes = > #'((class .

Re: SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Carl Sorensen
On 6/29/21, 2:43 AM, "lilypond-user on behalf of Matt Hood" wrote: Hi everyone, I'm working with lilypond output in the browser, using its SVG export function. Lilypond permits attaching attributes to particular kinds of grobs, e.g.: { \override

Re: Change size of all notes in one voice with partCombine

2021-06-29 Thread Jean Abou Samra
> Le 29/06/2021 16:18, Knute Snortum a écrit : > > > On Mon, Jun 28, 2021 at 6:07 PM Dinh Hoang Tu wrote: > > > > Hello Knute Snortum, > > Thanks for your reply. > > I just tried \magnifyMusic but it makes both voices after \partCombine > > smaller, not only the selected voice. > > Did I

Re: Change size of all notes in one voice with partCombine

2021-06-29 Thread Knute Snortum
On Mon, Jun 28, 2021 at 6:07 PM Dinh Hoang Tu wrote: > > Hello Knute Snortum, > > Thanks for your reply. > I just tried \magnifyMusic but it makes both voices after \partCombine > smaller, not only the selected voice. > Did I make a mistake here? > > \version "2.22.1" > smallNote = \tweak

SVG export - how might you add classes for all graphical objects?

2021-06-29 Thread Matt Hood
Hi everyone, I'm working with lilypond output in the browser, using its SVG export function. Lilypond permits attaching attributes to particular kinds of grobs, e.g.: { \override NoteHead.output-attributes = #'((class . "NoteHead")) c } The above will cause all NoteHead objects to have