Re: Need help with Scheme code

2019-12-19 Thread Paolo Prete
t) >> >> Thanks, >> P >> >> On Wed, Dec 18, 2019 at 6:57 PM wrote: >> >>> Without giving you any solution, I can give you a hint: >>> >>> >>> >>> Write the music in the traditional way, with and without your >>> modi

Re: Need help with Scheme code

2019-12-19 Thread Stefano Troncaro
with and without your >> modification. >> >> >> >> In your lilypond file put: >> >> \displayMusic oldmusic >> >> \displayMusic newmusic >> >> >> >> And what you can see wht you have to write by observing the differences >> >>

Re: Need help with Scheme code

2019-12-18 Thread Paolo Prete
m:* lilypond-user > *On Behalf Of *Paolo Prete > *Sent:* Wednesday, December 18, 2019 3:30 PM > *To:* Aaron Hill > *Cc:* lilypond-user > *Subject:* Re: Need help with Scheme code > > > > Thanks again. > > Now, from what I see, I can extract if #mus is a Beam >

RE: Need help with Scheme code

2019-12-18 Thread lilypond
Jaap From: lilypond-user On Behalf Of Paolo Prete Sent: Wednesday, December 18, 2019 3:30 PM To: Aaron Hill Cc: lilypond-user Subject: Re: Need help with Scheme code Thanks again. Now, from what I see, I can extract if #mus is a Beam with (ly:music-property mus 'name) --> B

Re: Need help with Scheme code

2019-12-18 Thread Paolo Prete
Thanks again. Now, from what I see, I can extract if #mus is a Beam with (ly:music-property mus 'name) --> BeamEvent After that, how can I set, inside the same function you wrote, a variable with the beam-thickness value of the corresponding Beam? something like (pseudo code): (set! myVar curre

Re: Need help with Scheme code

2019-12-17 Thread Aaron Hill
On 2019-12-17 6:01 pm, Paolo Prete wrote: And thanks again to the Scheme-master Aaron. I appreciate the kind words, though I doubt my experience rises to the level of "master". One last thing: how can I arrange that function so to obtain output-attributes = output-attributes + id ? For ex

Re: Need help with Scheme code

2019-12-17 Thread Paolo Prete
And thanks again to the Scheme-master Aaron. One last thing: how can I arrange that function so to obtain output-attributes = output-attributes + id ? For example: if output-attributes is (('a' . 'aa') ('i' . 'ii')) it must become:(('a' . 'aa') ('i' . 'ii') ('id' . 'foobar_1')) On Wed,

Re: Need help with Scheme code

2019-12-17 Thread Aaron Hill
On 2019-12-17 4:21 pm, Paolo Prete wrote: Hi Stefano, unfortunately, it doesn't increment the counter globally, and the two ids in the SVG file are identical You will need to define a music function so that the (serial) procedure is called on each occurrence. Here's an option that rolls in

Re: Need help with Scheme code

2019-12-17 Thread Paolo Prete
Hi Kieren, yes, of course! please let me know how to use it On Wed, Dec 18, 2019 at 1:32 AM Kieren MacMillan < kieren_macmil...@sympatico.ca> wrote: > Hi Paolo, > > > The ids must be: foobar_1, foobar_2 etc. > > Can they be foobar.1, foobar.2, etc. instead? > Lilypond has a nice built-in mechan

Re: Need help with Scheme code

2019-12-17 Thread Kieren MacMillan
Hi Paolo, > The ids must be: foobar_1, foobar_2 etc. Can they be foobar.1, foobar.2, etc. instead? Lilypond has a nice built-in mechanism for that naming/pointer convention. Hope that helps! Kieren. Kieren MacMillan, composer (he/him/his) ‣ website: www.kierenm

Re: Need help with Scheme code

2019-12-17 Thread Paolo Prete
Hi Stefano, unfortunately, it doesn't increment the counter globally, and the two ids in the SVG file are identical On Wed, Dec 18, 2019 at 12:12 AM Stefano Troncaro wrote: > Hi Paolo, > > After some googling and tweaking I managed to make the counter you wished: > > \version "2.19.83" > > #(de

Re: Need help with Scheme code

2019-12-17 Thread Stefano Troncaro
Hi Paolo, After some googling and tweaking I managed to make the counter you wished: \version "2.19.83" #(define* (make-counter #:optional (cnt 0) (inc 1)) (lambda () (set! cnt (+ cnt inc)) cnt)) #(define serial (make-counter)) token = -\tweak output-attributes #`((id . ,(string-a

Re: Need help with Scheme code

2019-12-17 Thread Paolo Prete
In addition, Stefano, If you have time, please try the snippet for tuning the beams (second attachment). Any test of these things are very helpful for me. On Tue, Dec 17, 2019 at 11:18 PM Stefano Troncaro wrote: > Hi Paolo, > > Look at this: > > \version "2.19.83" > > token = -\tweak output-attr

Re: Need help with Scheme code

2019-12-17 Thread Paolo Prete
Thanks Stefano! On Tue, Dec 17, 2019 at 11:18 PM Stefano Troncaro wrote: > Hi Paolo, > > Look at this: > > \version "2.19.83" > > token = -\tweak output-attributes #'((id . "foobar")) \etc > > \relative { c'4 d8 -\token [ e ] f2 } > > That achieves half of what you want. Now, how to make "foobar

Re: Need help with Scheme code

2019-12-17 Thread Stefano Troncaro
Hi Paolo, Look at this: \version "2.19.83" token = -\tweak output-attributes #'((id . "foobar")) \etc \relative { c'4 d8 -\token [ e ] f2 } That achieves half of what you want. Now, how to make "foobar" automatically increment I don't know, perhaps someone else can help with that. Hope that h