lilypond-user
[Top][All Lists]
Advanced

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

A challenging music transformation...


From: Gordon Bower
Subject: A challenging music transformation...
Date: Wed, 25 Aug 2021 15:54:53 -0600

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 - except that there isn't a convenient way to delete the original note after the replacements are added.

The \changePitch snippet also does something similar. (But I am envision a chord-by-chord replacement of a whole line.)

My own efforts at trying to make sense of how music-map or map-some-music work have *cough* not been going well. Would be nice not to completely reinvent a wheel here. 

If I do have to write it myself: I think I could figure out how to extract a list of pitches in all the NoteEvents in a chord, and push new NoteEvents to the chord - but I don't have much grasp as to how I replace a single note by a chord.

(Why would I want to do this? I am trying to write a function that turns the written notes of the accordion's left hand into the sounding notes. Written notes between c, and b, get turned into parallel octaves depending which reed banks are sounding; written notes between d and c' get turned into 3- 6- or 9-note chords, depending which reed banks are sounding.)

GRB





reply via email to

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