[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Brazen feature request
From: |
Gilles |
Subject: |
Re: Brazen feature request |
Date: |
Thu, 02 Aug 2012 13:30:19 +0200 |
User-agent: |
Opera Mail/12.00 (Win64) |
The request is for six commands (NOT markups, but actual music commands
that affect the MIDI output and so on):
\segno
\fine
\tocoda
\coda
\dacapo
\dalsegno
Using the functions described here :
http://lsr.dsi.unimi.it/LSR/Item?id=542
i think you will be able quickly to achieve your goal without all this
commands.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\include "extractMusic.ly"
global = {
s1*2
\bar "||"
\mark \markup { \musicglyph #"scripts.segno" }
s1*2
\mark \markup { \musicglyph #"scripts.coda" }
s1*2
\bar "||"
\once \override Score.RehearsalMark #'break-visibility = #'#(#t #t #f)
\mark \markup { \musicglyph #"scripts.segno" }
\break
s1*2^\markup{ \general-align #Y #CENTER {
\musicglyph #"scripts.coda" "CODA"}}
\bar "|."
}
segnoToMidi = #(define-music-function (parser location music) (ly:music?)
#{
\extractBegin $music \upToMeasure #3
\extractMusic $music \upToMeasure #3 \upToMeasure #7
\extractMusic $music \upToMeasure #3 \upToMeasure #5
\extractEnd $music \upToMeasure #7
#})
music = \relative {
c1 c
c2 d e e
f4 e f fis g1
d c
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\markup "Score output"
\score {
\new Staff << \global \music >>
\layout { }
}
\markup "Midi output"
\score {
\new Staff \segnoToMidi \music
\layout { } % to comment, to have only midi
\midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The can download extractMusic.ly for lilypond 2.15 here :
http://gillesth.free.fr/Lilypond/extractMusic/
For lilypond 2.14, choose in this directory :
extractMusic2.14.ly
You will also find in it, a small doc :
extractMusic-doc.pdf (well probably in bad english, sorry).
Gilles
segnoMidi.png
Description: PNG image