Hello Jan-Peter and Tim,
thanks for your replies.
I would like to use this on sources I'm already working on.
So I don't need to use your include construct.
But I think I'll try out your Scheme engraver approach. If it doesn't
work or behave as I would like, then I'll go for entering the double
bars manually. This is of course manageable, but I'd find it cleaner to
have it as a 'setting' in the layout block and use simple \time commands
in the source.
Best
Urs
Am 13.04.2012 09:49, schrieb Jan-Peter Voigt:
Hello Urs,
There are two possibilities:
1.: use a little music-function-helper:
--snip--
\version "2.15.36"
dbtime = #(define-music-function (parser location frac)(fraction?)
#{
\bar "||" \time $frac
#})
% example
\relative c' {
c4 e g b \dbtime 3/4 c des b | c2.
}
--snip--
but this means not using the standard \time command.
2.: If you want to have this effect on existing sources, you might
want to use a scheme-engraver.
This is based on a snippet, I took from this list ... I think David
Nalesnik wrote it(?)
--snip--
\version "2.15.36"
% this might work in 2.14 too?
DbBars = #(lambda (context)
(let ((time-signature '())
(last-fraction #f))
`((process-music
. ,(lambda (trans)
(let ((frac (ly:context-property context
'timeSignatureFraction)))
(if (and (null? time-signature)
(not (equal? last-fraction frac))
(fraction? frac))
(begin
(ly:context-set-property! context
'whichBar "||")
(set! last-fraction frac)
)))
))
(stop-translation-timestep
. ,(lambda (trans)
(set! time-signature '()))))
))
% example
\score {
\relative c' {
c4 e g b \time 3/4 c des b | c2.
}
\layout {
\context {
\Score
\consists \DbBars
}
}
}
--snip--
With the engraver, you should be able to include an existing file
while using this custom engraver globally:
--snip--
\layout {
\context {
\Score
\consists \DbBars
}
}
\include "mymusic.ly"
--snip--
HTH
Cheers, Jan-Peter
On 12.04.2012 16:29, Urs Liska wrote:
Hello list,
I'm sorry, but I can't find the relevant documentation.
I want to change lilyPond's default behaviour and tell it to use "||"
barlines before \time changes instead of normal ones.
Although it is quite easy to do this manually, I'd like to know where
and how I could change this setting, possibly in a \layout section.
Best
Urs
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user