lilypond-user
[Top][All Lists]
Advanced

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

Re: Import, edit and export a Lilypond file using Python


From: brentboylan
Subject: Re: Import, edit and export a Lilypond file using Python
Date: Sun, 6 Apr 2014 11:33:49 -0700 (PDT)

If I understand what you are after, you want to produce an audio file for
each part (SATB) that individuals can use to practice at home with.

I have been preparing a lilypond file to do the same thing for the choir I
direct. It is evolving even now, but one of the key components came from
using  Frescobaldi <http://frescobaldi.org>   and the score wizard included:
<http://lilypond.1069038.n5.nabble.com/file/n161307/Score_setup_wizard_-_Parts.png>
 

In the 'Parts' tab of the score wizard, if you insert a 'Choir' instrument,
one of the settings on the right is 'Rehearsal MIDI files'. Checking that
box adds the following code to create a separate MIDI file for each part:

% Rehearsal MIDI files:
\book {
  \bookOutputSuffix "soprano"
  \score {
    \rehearsalMidi "soprano" "soprano sax" \sopranoVerse
    \midi { }
  }
}

\book {
  \bookOutputSuffix "alto"
  \score {
    \rehearsalMidi "alto" "soprano sax" \altoVerse
    \midi { }
  }
}

\book {
  \bookOutputSuffix "tenor"
  \score {
    \rehearsalMidi "tenor" "tenor sax" \tenorVerse
    \midi { }
  }
}

\book {
  \bookOutputSuffix "bass"
  \score {
    \rehearsalMidi "bass" "tenor sax" \bassVerse
    \midi { }
  }
}

This creates MIDI files with filenames that tag on whatever is in the
\bookOutputSuffix field (myChoirPiece-bass.mid for example.) While this is
just the individual parts, you could easily add in the accompaniment or
other parts for reference to be included in the MIDI output.

The way I am using this is by adding it to a template that I use whenever I
create a new SATB arrangement. I like to keep 'content' separate from
'presentation' as is popular in many styles of programming, so my
'presentation' file has the extra MIDI generating lines and my content.ly
file holds everything unique to the piece I am working on. I have an
explanation of what I'm doing on my  blog <http://asariver.com/blog>   but
it is a work in progress. I will post a new item in the forum here when I am
ready to share it, including the .ly template files.

Of course, my method does not involve importing MusicXML information but I
believe it could be done relatively easily, using the content.ly as the
target.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Import-edit-and-export-a-Lilypond-file-using-Python-tp161289p161307.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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