[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamics context spawns additional contexts when polyphonic
From: |
Valentin Villenave |
Subject: |
Re: Dynamics context spawns additional contexts when polyphonic |
Date: |
Thu, 31 Oct 2013 17:32:28 +0100 |
On Thu, Oct 31, 2013 at 12:24 PM, David Kastrup <address@hidden> wrote:
> First you have to figure out what you want to happen here. Do you want
> two Dynamics contexts with different orientation and settings? In that
> case, you'll need to provide a superior context aliased to Staff where
> it can anchor those Dynamics contexts.
I still must be missing something: in the following example, the new
dynamics-"voice" context is created *below* the PianoStaff, and not
inserted inside the DynamicsStaff context as intended.
\layout {
\context {
\type "Engraver_group"
\name "DynamicsStaff"
\alias "Staff"
\accepts "Dynamics"
\defaultchild "Dynamics"
}
\context {
\PianoStaff
\accepts DynamicsStaff
%\denies Dynamics % doesn't change anything here.
}
}
one = \relative c' {
c1 d << {g a} \\ {e d\mf} >>
}
two = \relative c' {
d1 e\f f g
}
#(define (dynamic? x)
(let ((name (ly:music-property x 'name)))
(or
(eq? name 'DynamicEvent)
(eq? name 'AbsoluteDynamicEvent)
(eq? name 'CrescendoEvent)
(eq? name 'DecrescendoEvent)
(eq? name 'SpanDynamicEvent))))
removeDynamics =
#(define-music-function (parser location music) (ly:music?)
(music-filter
(lambda (x)
(not (dynamic? x)))
music))
\new PianoStaff <<
\new Staff \removeDynamics \one
\new DynamicsStaff << \one \two >>
\new Staff \removeDynamics \two
>>
I'm stumped. Why aren't there any such problems with DrumVoice/DrumStaff?
Cheers,
Valentin.
- Dynamics context spawns additional contexts when polyphonic, Valentin Villenave, 2013/10/30
- Re: Dynamics context spawns additional contexts when polyphonic, David Kastrup, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic, Valentin Villenave, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic, David Kastrup, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic, Valentin Villenave, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic, David Kastrup, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic,
Valentin Villenave <=
- Re: Dynamics context spawns additional contexts when polyphonic, David Kastrup, 2013/10/31
- Re: Dynamics context spawns additional contexts when polyphonic, Valentin Villenave, 2013/10/31