lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting up classical guitar fingerings


From: Valentin Petzel
Subject: Re: Setting up classical guitar fingerings
Date: Sun, 06 Mar 2022 20:29:16 +0100

Am Sonntag, 6. März 2022, 20:02:21 CET schrieb Luca Fascione:
>  - Your code "just prepends" a new cell with a key we're interested in
> right in front of the old content (with which shares structure)
>  - It relies on lists being ordered, and all access to alists being a
> straight linear scan front-to-back (point being: 'beamed-lengths appears
> twice and we use "first one wins" to deal with the repeated key)
>  - Your way is probably more economical than mine in that mine copies all
> entries in the list, while yours just prepends one onto a list that is
> otherwise shared
>  - Your quasiquote segment produces exactly the same output as (append
> '(('beamed-lengths . stem-bmlgths)) detls)

@1: Yes, it does.
@2: Yes, it does. An a list is simply a list of pairs. Getting the value just 
scans the list and returns the first match. This is kind of a standard way LISP 
scopes work, and they easily allow to override symbols within a limited scope.
@3: To some extent yes.
@4: That is not correct, you’d need
    (append `((beamed-lengths . ,stem-bmlgths)) detls)
for that. But I do not see a good reason to use append for appending a small 
amount of elements, just cons them together.

About collisions: To get proper support you’d need to go into the details of 
the Beam position calculation and adapt it to incorporate fingerings. But if 
you look at my solution you can see a way how we can only handle those 
positions where we actually have a collision between fingering and Beam.

Cheers,
Valentin

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]