> On 12 Jan 2017, at 10:58, Jonathan Scholbach <j.scholb...@posteo.de> wrote:
> 
> Dear Ponders,
> 
> I have a feature wish, and I hope this is the right channel to utter it:
> 
> I typeset choir pieces and in this field it is a big advantage of
> LilyPond that producing MIDI files with highlighted voices for each
> single voice is possible. Today I do this by defining a new book for
> each voice and by "highlighting" the respective voice - by increasing
> her volume and assigning her a distinct midiInstrument - see the
> attached MWE. The result is good and very usable for choirs to improve
> the individual practicing at home.
> 
> But the input is ugly. The MWE works with only 2 voices and yet has a
> lot of repetitive code. Imagine a piece with 8 voices! The MIDI output
> for 8 highlighted voices would need hundreds of highly repetitive lines
> of LilyPond code. I wish there was a feature to produce the output with
> one line of code in the \midi{}-section of the pdf producing \score.
> LilyPond would have to loop over the voices in the score and produce a
> book as described in the MWE.
> 
> I have tried to understand Scheme multiple times but I didn't make it
> yet. That's why I would be thankful if someone could write the Scheme
> function to achieve that. I think many typesetters of choir music would
> appreciate an easy way to produce the MIDI as described. (Actually,
> there are some guys around who do that with some other programmes, see
> [1], [2]). I believe most typesetters don't know the way how to do it
> with LilyPond today - that's why I think this would be a great benefit
> for the community.
> 
> Kind regards,
> Jonathan
> 
> [1] http://www.learnchoralmusic.co.uk/
> 
> [2] http://www.choraltech.us/midilibrary.htm
> 
> <midi with highlighted 
> voices.ly>_______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
Jonathan,

I have recently adopted the rehearsalMidi function that is hidden in the gridly 
part of the openlilylib snippets for this purpose

https://github.com/openlilylib/snippets/blob/master/ly/gridly/grid-templates.ily

Creating the rehearsal-tracks for the different voices is then as easy as 
including a

\rehearsalMidi { \music } “voiceName”

for each voice that you want a rehearsal track for into your lilypond file (or 
even better: in the template for a specific voices arrangement that you include 
in your main lilypond file)

In my current setup I use:
- a main file for a song (eg MySong.ly)
- a subfolder with the same name as the song (eg MySong) containing the various 
voices which are all included by the main file (soprano.ly, alto.ly etc)
- a choral template (eg SATB.ly for the typical S-A-T-B vocal score) that 
expects music and lyrics of the voices present under predefined variable names 
that is included in the main file
- a file with the rehearsalMidi function that is included by the Choral 
template and used there to generate per-voice rehearsalmidis

It might even be possible to have it inspect the music and act and loop 
accordingly, but IMHO the one line per voice extra is too little overhead to 
bother trying to extend the code to automagically detect the present voices.

Kind regards,
Hans
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to