> Le 28 janv. 2023 à 08:01, Darren Ng <un1...@gmail.com> a écrit : > > [subject] How to define a macro that expands to a percussion "pitch"?
It may be worth noting that LilyPond does not have macros, only variables and regular functions. Call me pedantic, but I think it is helpful not to conflate the two. There is no way in LilyPond to make a variable "just be replaced by this code". Sometimes users get confused by this (I remember a question about defining a chord modifier, which was similar to this one). Instead, there are functions, as well as some other mechanisms like drumPitchNames. Lukas already gave the solution, so I don’t have anything more to add. Jean