[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sub-music
From: |
Johan Vromans |
Subject: |
Re: Sub-music |
Date: |
Sun, 19 Jun 2011 16:17:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Reinhold Kainhofer <address@hidden> writes:
> The solution really depends on what you want to do with it.
For a piece of music, I want to generate score and midi.
Score is no problem.
The midi needs to be fold out w.r.t. repeats (unfoldRepeats can do that)
but there are also Segno / D.S. and D.C. sections.
Fold out, the piece becomes the following measures:
1, 2…36, 37, 22…36, 38, 2…20, 39…89
The current approach that I have works, but is rather tedious:
For each voice:
highMusic = {
\tag #'scoreOnly {
\highMusicPartOne
\bar "||" \mark \markup { \musicglyph #"scripts.segno" }
\highMusicPartTwoA
\bar "||"
\override Score.RehearsalMark #'self-alignment-X = #RIGHT
\mark \markup { \left-align \vcenter \bold "To Coda " \musicglyph
#"scripts.coda" }
\highMusicPartTwoB
\repeat volta 2 {
\highMusicPartThree
}
\alternative {
{ \highMusicPartFourA }
{ \highMusicPartFourB }
}
\bar "||"
\override Score.RehearsalMark #'self-alignment-X = #LEFT
\mark \markup { \vcenter { \musicglyph #"scripts.coda" \bold " Coda" } }
\highMusicPartFive
}
\tag #'midiOnly {
\highMusicPartOne
\highMusicPartTwoA
\highMusicPartTwoB
\highMusicPartThree
\highMusicPartFourA
\highMusicPartTwoA
\highMusicPartTwoB
\highMusicPartThree
\highMusicPartFourB
\highMusicPartTwoA
\highMusicPartFive
}
}
So, instead of splitting all voices, I'd like to write the voices in one
piece, and the use measure extraction to create the parts for the midi.
highMusicScore = \relative c' {
...
}
highMusic = {
\tag #'scoreOnly {
\highMusicScore
}
\tag #'midiOnly {
\extractMusic \highMusicScore s1*0 s1*1 % 1
\extractMusic \highMusicScore s1*1 s1*19 % 2..20
\extractMusic \highMusicScore s1*20 s1 % 21
\extractMusic \highMusicScore s1*21 s1*15 % 22..36
\extractMusic \highMusicScore s1*36 s1 % 37
\extractMusic \highMusicScore s1*21 s1*15 % 22..36
\extractMusic \highMusicScore s1*37 s1 % 38
\extractMusic \highMusicScore s1*1 s1*19 % 2..20
\extractMusic \highMusicScore s1*38 s1*51 % 39..89
}
}
-- Johan
- Sub-music, Johan Vromans, 2011/06/19
- Re: Sub-music, Kieren MacMillan, 2011/06/19
- Re: Sub-music, Gilles, 2011/06/19
- Re: Sub-music, Phil Holmes, 2011/06/19
- Re: Sub-music, Gilles, 2011/06/19
- Re: Sub-music, Phil Holmes, 2011/06/20
- Re: Sub-music, Gilles, 2011/06/20
- Re: Sub-music, Johan Vromans, 2011/06/20
Re: Sub-music, Reinhold Kainhofer, 2011/06/19
- Re: Sub-music,
Johan Vromans <=