Re: A challenging music transformation...

2021-08-26 Thread lilypond
Hello Gordon, I’ve created a function for replacing arbitrary chords with other chords. Note that this requires the use of absolute notation, because to support relative notation I’d need to implement my own parser just to know what octave the notes are in. Cheers, Valentin\version "2.22" % r

Re: A challenging music transformation...

2021-08-25 Thread David Kastrup
Gordon Bower writes: > Your problem is simpler in one essential way: you are neither adding nor > subtracting any notes, just repitching existing notes. I feel fairly > confident I could solve yours -- use map-some-music to find every > NoteEvent, and for each one, read the old pitch, look up the

Re: A challenging music transformation...

2021-08-25 Thread Gordon Bower
Your problem is simpler in one essential way: you are neither adding nor subtracting any notes, just repitching existing notes. I feel fairly confident I could solve yours -- use map-some-music to find every NoteEvent, and for each one, read the old pitch, look up the corresponding new pitch, and w

Re: A challenging music transformation...

2021-08-25 Thread Craig Comstock
Maybe check this thread out. It mostly worked for me but I think your problem if solved will help me even more! https://mail.gnu.org/archive/html/lilypond-user/2021-08/msg00018.html Sent from my iPhone > On Aug 25, 2021, at 5:47 PM, David Kastrup wrote: > > Gordon Bower writes: > >> In a n

A challenging music transformation...

2021-08-25 Thread Gordon Bower
In a nutshell, I would like to write a function that would let me replace a given note or chord with a different chord -- I might have a table of what gets replaced with what -- but leave all the articulations the same. Am I missing something obvious? The \addNote snippet does something similar -