midi for many pieces

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

midi for many pieces

Daniel Hernández-5
Hello I working with a composition with many pieces. I structure all they
in a book enviroment like this:

--- file book.ly ----------
:
: Flute = \relative c'' {
:   \key c \major
:   \time 4/4
:   a b c d f g a
: } flute = {
:   \set Staff.instrument = "Flute "
:   \set Staff.midiInstrument = "flute"
:   \clef treble
:   \context Staff << \Flute >>
: }
:
: Violin = \relative c'' {
:   \key c \major
:   \time 4/4
:   g f e d c b a g
: } violin = {
:   \set Staff.instrument = "Violin "
:   \set Staff.midiInstrument = "violin"
:   \clef treble
:   \context Staff << \Violin >>
: }
:
: \book {
:   \header {
:     title = "Book test"
:     composer = "My name"
: }
:
:   \score {
:     \header { piece = "Piece 1" }
:     <<
:       \context Staff = flute \flute
:     >>
:     \layout { }
:     \midi { \tempo 4=60 }
:   }
:
:   \score {
:     \header { piece = "Pice 2" }
:     <<
:       \context Staff = violin \violin
:     >>
:     \layout { }
:     \midi { \tempo 4=60 }
:   }
: }
:
---------------------------

But when I compile the *.ly file it generate only the midi for the second
score. For the compilation comments above I think that it overwrite the
first score.

[daniel@alerce]$ lilypond book.ly
GNU LilyPond 2.4.5
Processing `book.ly'
Analizando...
Interpreting music... [2]
Preprocessing graphical objects...
Calculating line breaks...
Interpreting music...
Salida MIDI a `book.midi'...
Track...
Interpreting music... [3]
Preprocessing graphical objects...
Calculating line breaks...
Interpreting music...
Salida MIDI a `book.midi'...
Track...
Layout output to `book.tex'...
Converting to `book.dvi'...
Converting to `book.ps'...
Converting to `book.pdf'...

I want to get one midi file, with the two consecutive scores, or two midi
files, one for each score. Do you know how can I do it?

Thanks
Daniel Hernandez


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: midi for many pieces

Mats Bengtsson-6
I seem to recall that this was a bug in version 2.4 that has been fixed
in later
versions. On possibility might be to put each \score{...} within its own
\book{...}, at least for the MIDI outputs (if you do that for the paper
output,
you will get one PDF file for each \book). Note also that the \book in your
example below is completely redundant.

   /Mats

Daniel Hernandez wrote:

> Hello I working with a composition with many pieces. I structure all they
> in a book enviroment like this:
>
> --- file book.ly ----------
> : : Flute = \relative c'' {
> :   \key c \major
> :   \time 4/4
> :   a b c d f g a
> : } flute = {
> :   \set Staff.instrument = "Flute "
> :   \set Staff.midiInstrument = "flute"
> :   \clef treble
> :   \context Staff << \Flute >>
> : }
> : : Violin = \relative c'' {
> :   \key c \major
> :   \time 4/4
> :   g f e d c b a g
> : } violin = {
> :   \set Staff.instrument = "Violin "
> :   \set Staff.midiInstrument = "violin"
> :   \clef treble
> :   \context Staff << \Violin >>
> : }
> : : \book {
> :   \header {
> :     title = "Book test"
> :     composer = "My name"
> : }
> : :   \score {
> :     \header { piece = "Piece 1" }
> :     <<
> :       \context Staff = flute \flute
> :     >>
> :     \layout { }
> :     \midi { \tempo 4=60 }
> :   }
> : :   \score {
> :     \header { piece = "Pice 2" }
> :     <<
> :       \context Staff = violin \violin
> :     >>
> :     \layout { }
> :     \midi { \tempo 4=60 }
> :   }
> : }
> :
> ---------------------------
>
> But when I compile the *.ly file it generate only the midi for the
> second score. For the compilation comments above I think that it
> overwrite the first score.
>
> [daniel@alerce]$ lilypond book.ly
> GNU LilyPond 2.4.5
> Processing `book.ly'
> Analizando...
> Interpreting music... [2]
> Preprocessing graphical objects...
> Calculating line breaks...
> Interpreting music...
> Salida MIDI a `book.midi'...
> Track...
> Interpreting music... [3]
> Preprocessing graphical objects...
> Calculating line breaks...
> Interpreting music...
> Salida MIDI a `book.midi'...
> Track...
> Layout output to `book.tex'...
> Converting to `book.dvi'...
> Converting to `book.ps'...
> Converting to `book.pdf'...
>
> I want to get one midi file, with the two consecutive scores, or two
> midi files, one for each score. Do you know how can I do it?
>
> Thanks
> Daniel Hernandez
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-user


--
=============================================
        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: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: midi for many pieces

Gilles Sadowski
In reply to this post by Daniel Hernández-5
>
> But when I compile the *.ly file it generate only the midi for the second
> score. For the compilation comments above I think that it overwrite the
> first score.
>
> [daniel@alerce]$ lilypond book.ly
> GNU LilyPond 2.4.5
               ^^^^^

That's a known bug.
The only way out is to upgrade to 2.6.x.


Best,
Gilles


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: midi for many pieces

Daniel Hernández-5

>> But when I compile the *.ly file it generate only the midi for the second
>> score. For the compilation comments above I think that it overwrite the
>> first score.
>>
>> [daniel@alerce]$ lilypond book.ly
>> GNU LilyPond 2.4.5
>               ^^^^^
>
> That's a known bug.
> The only way out is to upgrade to 2.6.x.

Thanks, I upgrated lilypond and lilypond-data packages to the 2.6.3-9
versions from the unstable debian package repositories and now it works
fine.

--
Daniel Hernandez


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user