Hello everyone,

You might find some hints in a piece I have done lately:
a score of  J.S. Bach's <https://nextcloud.silvain-dupertuis.net/index.php/s/TKNcaQdNbyBSpcE>Well-Tempered Clavier Praeludium I
Where I wrote functions to create the score programmatically

(like extract groups of five notes, create patterns, manipulating durations,
no extraction of pitch in this example, but it is the same principle to 
manipulate a note,
pitch being defined by its position in an octave and the octave)

You might have to treat your note as a sequence to manipulate its pitch,,,

You can find here <https://lilypond.org/doc/v2.20/Documentation/extending/music-properties.fr.html> description of musical properties as scheme expressions

Sincerely
Silvain


Le 07.03.21 à 20:03, Matthew Fong a écrit :
Hello everyone,

I am in the process of writing a note replacement function that allows me to place a custos anywhere I might need.

I am stuck on writing a function that extracts the pitch of the first note, given a list of notes, and then forcing a duration of 1/4. Any pointers would be appreciated.

For example given the list of notes below, I would like a function to output c4.
{
  \clef treble
  c2 d e f
  g4 a b c
}


Many thanks,
mattfong


--
Silvain Dupertuis
Route de Lausanne 335
1293 Bellevue (Switzerland)
tél. +41-(0)22-774.20.67
portable +41-(0)79-604.87.52
web: silvain-dupertuis.org <http://perso.silvain-dupertuis.org>

Reply via email to