lilypond-user
[Top][All Lists]
Advanced

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

Extract notes from chords, with silence when there are none


From: mskala
Subject: Extract notes from chords, with silence when there are none
Date: Wed, 16 Sep 2015 07:07:50 -0500 (CDT)
User-agent: Alpine 2.20 (LNX 67 2015-01-07)

I'd like to take a passage of music that contains chords with differing
numbers of notes, and some single notes, and extract it into separate
monophonic streams such that their union is the original passage.  The
application is to generate microtonal MIDI using pitch bend, which can
only practically play one note per channel, from music entered as
polyphonic voices for typesetting convenience.

I'm aware of the snippet at
   http://lsr.di.unimi.it/LSR/Item?id=545

and it does almost what I want, except for the handling of missing notes.
If I specify an index greater than the number of notes playing at a given
moment, then this code returns the highest-numbered note that exists.  I
don't understand why anyone would want that behaviour, but that's what the
code does.  I want to have rests, not duplicated notes, in the remaining
voices when there are fewer notes playing than the number of voices.

Is there any simple, obvious way to modify the code to do this?  I can
probably get it to work with enough trial and error, but it's not clear to
me where in the code it is actually handling the case of index greater
than the number of notes, so I'm not sure what to try modifying first.

-- 
Matthew Skala
address@hidden                 People before principles.
http://ansuz.sooke.bc.ca/



reply via email to

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