[Top][All Lists]

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

Extracting simultanuous notes from lilypond

From: Han-Wen Nienhuys
Subject: Extracting simultanuous notes from lilypond
Date: Tue, 18 Mar 2003 00:59:50 +0100

address@hidden writes:
> Hello all,
> For my Artificial Intelligence graduating project, I'm working on an 
> "Intelligent Partiture Reduction System". Starting from a partiture for 
> several instruments, I try to reduce it to a partiture for e.g. piano 
> and flute (using AI methods and a computer of course).
> For the representation of the partitures, we chose lilypond. In order to 
> perform any processing on a partiture, it is of course necessary to 
> have, for all time instances, the set of notes that are played 
> simultanuously. I suppose something like that should already be done 
> internally in lilypond, in order to put all simultanuous notes nicely on 
> a vertical line. So I started browsing the code. But since I'm not 
> familiar with the stucture of lilypond's code, and since there is not 
> that much of comments inside the code, this is not a trivial task. (If 
> there is some place where I can find documentation about the code's 
> structure or something, please let me know).  
> So, if anyone could give me any clues of where I can find, for a given 
> moment in time, al simultanuous notes, I would be very gratefull.

This information is not stored or generated as such directly, but you
can collect this information as follows:

Code an engraver, add it to the Score context, and make it
acknowledge all grobs with note-head interface. This engraver will
find at successive moments in time all simultanuous note heads. By
examining the #'cause field of each note head, you can extract the
musical event from the graphical object. For inspiration, see
Grob_pq_engraver and Spacing_engraver.

I recommend that you version 1.7 for coding, since the representation
of the musical information is a little cleaner. 


Han-Wen Nienhuys   |   address@hidden   | 

reply via email to

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