On 2016-03-30 13:49, Jaime Oliver wrote:
Sometimes it preferable to change the source directly instead of using function 
calls.
Could you explain when this is the case?

This was only a general reflection. The source code is more transparent without getting filtered by functions that change the output. Also if you want to change something after the function is applied things can get complicated.


If we take the example of transposing to be more specific - transposing by Lilypond (with \transpose) contra transposing by Frescobaldi (Tools->Pitch->Transpose). The functionality is identical but Frescobaldi's version changes the source code but LilyPond only the output. When does this difference matter?

If we for example have a music variable that we want to transpose from C (major) to B (Major), but want to change a couple of g# to g (natural) afterwards. Then I think the Frescobaldi method is preferable because we have to make a copy of the variable anyway. And it's more straightforward to actually change the pitches from g# to g than to change from a to ab.

On the other hand if you know that you're not going to do any manipulation of the variable afterwards it's perhaps preferable to use the LilyPond method - in this case to avoid having to make a copy of the variable.

In general I think working with LilyPond features a whole range of interesting decisions between manipulating the source code directly and using functions (internal or usermade) to manipulate the output.

This is only a transposing instrument situation so it should be doable.

Yes, not much to think about in that case.

But I hope a made my point clearer!? :)

Best
Peter
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to