lilypond-user
[Top][All Lists]
Advanced

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

Re: partcombine, but including rests from quiet voices?


From: Mats Bengtsson
Subject: Re: partcombine, but including rests from quiet voices?
Date: Wed, 12 Dec 2007 17:52:45 +0100
User-agent: Thunderbird 2.0.0.5 (X11/20070716)

I haven't looked much at this code, but just as has been noted a number of
times earlier on the mailing list, it looks so hairy that it's hard to maintain
and bug fix. Anyway, I don't think you need that much knowledge about
the coupling between Scheme and LilyPond. Take a look at
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Displaying-music-expressions
to learn how to see the Scheme representation of a score.
In the part of the code that does the analysis and splitting/combining of the voices, it seems that the only LilyPond specific thing is the call to ly:event-property, mainly to figure out what is a note, what is a tie and so on, and a couple of
functions to extract and compare pitches.
At the end of the file, where they build up the representation of the resulting
music expressions, there are of course some more LilyPond specific
functions involved.

I also noted that they use the object oriented extension to Scheme, GOOPS.
See http://www.gnu.org/software/guile/docs/goops/index.html

Good luck!

  /Mats

Reinhold Kainhofer wrote:
Am Tuesday, 11. December 2007 schrieb Trevor Daniels:
I thought my suggestion might be too much manual
effort, but it's the best I have to offer.  If
\partcombine worked the way you want that would be
the obvious solution, but it doesn't.

Yes, apparently, the issue that bites me is that partcombine detects even a single note played by only one instrument as a "solo". So partcombine will (almost) never print out a rest in parallel with a note in the other instrument. In real scores, there is a de-facto threshold before a rest in one instrument is regarded as a solo in the other instrument. If partcombine allowed such a (ideally user-settable) threshold property, it would fit my needs just fine....

As Mats said, we know \partcombine is lacking but I'm not aware of
any development effort going into it at present.

I would actually work on it to fix my problems. But looking at the code, I'm absolutely lost, mainly because (a) I don't know how lilypond works internally (and there is no documentation about this, only the API documentation, which does not help with understanding how lilypond works), (b) I'm new to scheme, so reading scheme code takes a bit longer than other languages like C++, java or python, and (c) I don't really understand the data structures used, and (d) the scm<=>c bindings and the interaction of the two languages is also not so clear to me...

So, basically, I would need at least some pointers on where I should start looking (I suppose in part-combiner.scm, in the determine-split-list function...? But then, here my problems start, as I don't know anything about the data structures and the way the part combination really works...).

Cheers,
Reinhold




--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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