|
From: | Urs Liska |
Subject: | Re: merging different voices |
Date: | Wed, 1 Mar 2017 12:23:05 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Am 01.03.2017 um 11:45 schrieb Federico
Camara Halac:
Thanks for the example. This makes it clearer, but I think in order to judge what you *really* need you will have to be pretty concrete. Of course it's difficult to provide because you are currently investigating on a rather general level. But from this you can only get rather general replies. I think there are two different fundamental ways to achieve what you need: 1) a "Scheme music function". This is a programming construct that can process arbitrary arguments or input and returns a new music _expression_. In your case it would be written to consume a given number of music expressions (i.e. voices), iterate over them in terms of musical moments and consider what's happening at the given moment in the different voices. From there it could process the new element/rest/etc. for the resulting voice. This is actually pretty similar to what \partcombine does, and this is a good thing and a bad thing. The good part is that one could take \partcombine as a starting point, the bad thing is that this indicates how complex the problem is. [It may also be possible to take another approach, called "Engravers", which would in a way be attached to the voices, but the complexity would probably be pretty much the same] 2) I would also consider using a programming language outside of LilyPond to actually process the input files *before* passing them to LilyPond. It's possible that python-ly (http://python-ly.readthedocs.io/en/latest/) can be of significant help if one would use Python for that job. I can't make further recommendations at the moment, but it might give you a better idea already. Best Urs |
[Prev in Thread] | Current Thread | [Next in Thread] |