pushing items "through" or "beyond" other contexts

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

pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hello all,

No compilable code/snippet here… just a thought-experiment/question for discussion.

Is there any way (currently possible, or relatively easily coded) that items in one context can be independently pushed “through” or “beyond” other contexts?

As one (obvious) example, say I start with

 \new PianoStaff <<
   \new Staff = “upper” \upperStuff
   \new Dynamics = “dyn” \centredDynamics
   \new Staff = “lower” \lowerStuff
>>

Now let’s say I want one particular dynamic (in the centred context) to appear *above* the upper staff. I would love to write

 \once \alignAboveContext = “upper” s4\p

or whatever. (Right now, I just use the edition-engraver and an extra-offset tweak.)

Thoughts?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

Re: pushing items "through" or "beyond" other contexts

caagr98
Couldn't you do \new Dynamics { \alignAboveContext = "upper" s4/p }?

On 06/02/2017 09:00 PM, Kieren MacMillan wrote:

> Hello all,
>
> No compilable code/snippet here… just a thought-experiment/question for discussion.
>
> Is there any way (currently possible, or relatively easily coded) that items in one context can be independently pushed “through” or “beyond” other contexts?
>
> As one (obvious) example, say I start with
>
>   \new PianoStaff <<
>     \new Staff = “upper” \upperStuff
>     \new Dynamics = “dyn” \centredDynamics
>     \new Staff = “lower” \lowerStuff
>>>
>
> Now let’s say I want one particular dynamic (in the centred context) to appear *above* the upper staff. I would love to write
>
>   \once \alignAboveContext = “upper” s4\p
>
> or whatever. (Right now, I just use the edition-engraver and an extra-offset tweak.)
>
> Thoughts?
>
> Thanks,
> Kieren.
> ________________________________
>
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: [hidden email]
>
>
> _______________________________________________
> lilypond-user mailing list
> [hidden email]
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

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

Re: pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hi,

> Couldn't you do \new Dynamics { \alignAboveContext = "upper" s4/p }?

No.  =\

p.s. I’ve now included a compilable snippet, if anyone wants to try stuff out.

Thanks,
Kieren.

%%%  SNIPPET BEGINS
\version "2.19.61"

upperStuff = {
 c''2 d''4( c'')
}

centredDynamics = {
  s2\f
  % I want the following dynamic above the upper staff.
  % Currently, I have to use extra-offset (or similar)
  \once \override DynamicText.extra-offset = #'(0 . 8.5)
  s2\p
}

lowerStuff = {
  \clef bass
  c1
}

\new PianoStaff <<
  \new Staff = “upper” \upperStuff
  \new Dynamics = “dyn” \centredDynamics
  \new Staff = “lower” \lowerStuff
>>
%%%  SNIPPET ENDS

>
> On 06/02/2017 09:00 PM, Kieren MacMillan wrote:
>> Hello all,
>> No compilable code/snippet here… just a thought-experiment/question for discussion.
>> Is there any way (currently possible, or relatively easily coded) that items in one context can be independently pushed “through” or “beyond” other contexts?
>> As one (obvious) example, say I start with
>>  \new PianoStaff <<
>>    \new Staff = “upper” \upperStuff
>>    \new Dynamics = “dyn” \centredDynamics
>>    \new Staff = “lower” \lowerStuff
>>>>
>> Now let’s say I want one particular dynamic (in the centred context) to appear *above* the upper staff. I would love to write
>>  \once \alignAboveContext = “upper” s4\p
>> or whatever. (Right now, I just use the edition-engraver and an extra-offset tweak.)
>> Thoughts?
>> Thanks,
>> Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

Re: pushing items "through" or "beyond" other contexts

Mark Knoop-4
At 15:53 on 02 Jun 2017, Kieren MacMillan wrote:

>Hi,
>
>> Couldn't you do \new Dynamics { \alignAboveContext = "upper"
>> s4/p }?  
>
>No.  =\
>
>p.s. I’ve now included a compilable snippet, if anyone wants to try
>stuff out.
>
>Thanks,
>Kieren.
>
>%%%  SNIPPET BEGINS
>\version "2.19.61"
>
>upperStuff = {
> c''2 d''4( c'')
>}
>
>centredDynamics = {
>  s2\f
>  % I want the following dynamic above the upper staff.
>  % Currently, I have to use extra-offset (or similar)
>  \once \override DynamicText.extra-offset = #'(0 . 8.5)
>  s2\p
>}
>
>lowerStuff = {
>  \clef bass
>  c1
>}
>
>\new PianoStaff <<
>  \new Staff = “upper” \upperStuff
>  \new Dynamics = “dyn” \centredDynamics
>  \new Staff = “lower” \lowerStuff
>>>  
>%%%  SNIPPET ENDS

What about

\context Staff = "upper" s2^\p

?

--
Mark Knoop

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

Re: pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hi Mark,

> What about
> \context Staff = "upper" s2^\p

You mean

\version "2.19.60"

upperStuff = {
 c''2 d''4( c'')
}

centredDynamics = {
  s2\f
  \context Staff = "upper" s2^\p
}

lowerStuff = {
  \clef bass
  c1
}

\new PianoStaff <<
  \new Staff = “upper” \upperStuff
  \new Dynamics = “dyn” \centredDynamics
  \new Staff = “lower” \lowerStuff
>>

?? That doesn’t work (at least here).

Thanks,
Kieren.

________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

Re: pushing items "through" or "beyond" other contexts

Simon Albrecht-2
In reply to this post by Kieren MacMillan
Hi Kieren,
 
here you are with an elaboration: <http://lilybin.com/f2e2fx/1>
BTW, your snippet would have been more compilable without the typographical quotes (it seems your mail client inserts them - can you send as plain text?)
 
Best, Simon



Am 02-Jun-2017 21:53:59 +0200 schrieb [hidden email]:

Hi,

> Couldn't you do \new Dynamics { \alignAboveContext = "upper" s4/p }?

No. =\

p.s. I’ve now included a compilable snippet, if anyone wants to try stuff out.

Thanks,
Kieren.

%%% SNIPPET BEGINS
\version "2.19.61"

upperStuff = {
c''2 d''4( c'')
}

centredDynamics = {
s2\f
% I want the following dynamic above the upper staff.
% Currently, I have to use extra-offset (or similar)
\once \override DynamicText.extra-offset = #'(0 . 8.5)
s2\p
}

lowerStuff = {
\clef bass
c1
}

\new PianoStaff <<
\new Staff = “upper” \upperStuff
\new Dynamics = “dyn” \centredDynamics
\new Staff = “lower” \lowerStuff
>>
%%% SNIPPET ENDS

>
> On 06/02/2017 09:00 PM, Kieren MacMillan wrote:
>> Hello all,
>> No compilable code/snippet here… just a thought-experiment/question for discussion.
>> Is there any way (currently possible, or relatively easily coded) that items in one context can be independently pushed “through” or “beyond” other contexts?
>> As one (obvious) example, say I start with
>> \new PianoStaff <<
>> \new Staff = “upper” \upperStuff
>> \new Dynamics = “dyn” \centredDynamics
>> \new Staff = “lower” \lowerStuff
>>>>
>> Now let’s say I want one particular dynamic (in the centred context) to appear *above* the upper staff. I would love to write
>> \once \alignAboveContext = “upper” s4\p
>> or whatever. (Right now, I just use the edition-engraver and an extra-offset tweak.)
>> Thoughts?
>> Thanks,
>> Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

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

Re: pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hi Simon,

> here you are with an elaboration: <http://lilybin.com/f2e2fx/1>

Thanks.
It's good to know what the "solution" is, in this MWE context.
It might even be feasible — albeit frustratingly verbose — in a simple situation (e.g., piano with centred dynamics).

That being said, I was (am still?) hoping for a more robust and extensible solution: in the real-world situations I'm looking at, this method/mechanism either won't work at all, or at the very least would seem to be a coding, reusability, and maintenance nightmare.

> BTW, your snippet would have been more compilable without the typographical quotes

Sorry!  =(

> (it seems your mail client inserts them - can you send as plain text?)

My emails *are* plain text!  =)  Unfortunately, it looks like my last Mac OS upgrade turned on a [system-wide] preference to auto-substitute "smart quotes". I've now turned that off. Sorry for the inconvenience.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

Re: pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hi all,

To clarify/expand:

> That being said, I was (am still?) hoping for a more robust and extensible solution: in the real-world situations I'm looking at, this method/mechanism either won't work at all, or at the very least would seem to be a coding, reusability, and maintenance nightmare.

In my first post, I said

> As one (obvious) example, say I start with [this dynamics thing]

What I *eventually* hope to do is have/build a method to easily push note columns, markup, lyrics, etc. around an entire system. Some examples:

1. If one lyric needs to sit on top of a choral staff (becuase of a voice split), I want to define it in the main Lyrics context and just "pop" it above the staff for that one moment (while another lyric might simultaneously appear on the main lyric line). Right now, I need to define a whole separate Lyric context, keep it alive (with spacers), etc.

2. In my musical theatre works, I have a custom TextLine context (containing stage directions). Generally, this sits just above the top staff of a system. Depending on the situation, tempo marks (which I always keep in a custom ScoreMarks context) might be above the TextLine contents, or they might be below.

3. Another related thing (though not exactly the same issue as above) would be to have "cross-staff" stuff jump across multiple staves, or have "connective tissue" (e.g., glissando, arrows) between notes in one staff/context and notes in another one (possibly not adjacent).

etc. etc.

Any thoughts (even off-list!) on how to best accomplish all of these things — hopefully with a single, fairly concise mechanism — would be appreciated.

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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

Re: pushing items "through" or "beyond" other contexts

Noeck
Hi Kieren,

I am sorry, I don't have the time to read all replies to this thread, so
it might be already discussed – I haven't seen it on a quick look. But
how about this:

LilyPond has no strict hierarchy of voices and staves (like other
programs do). This allows for voices switching between the staves (as
you know).

Could this be done for Dynamics as well? That you have a \new Dynamics =
"above" and a \new Dynamics = "below" and then you have one context with
dynamics content which you can move between the two? I haven't tried it.

Best,
Joram


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

Re: pushing items "through" or "beyond" other contexts

Kieren MacMillan
Hi Joram,

> \new Dynamics = "above" and a \new Dynamics = "below"
> and then you have one context with dynamics content
> which you can move between the two? I haven't tried it.

Thanks for the suggestion.

I think I threw people off with my concrete example…
I'm really trying to figure out if I can push grobs around *without* having to have multiple pre-defined contexts into which to push them.

For example [!!], say I have a four-stave score

   <<
      \new Staff \one
      \new Staff \two
      \new Staff \three
      \new Staff \four
   >>

Now I want to add a *single* Lyrics context, but potentially align arbitrary bits of lyrics above or below *any one* of the four Staff contexts.

It may seem from these examples that I'm trying to do very limited, specific things which might (in and of themselves) be done easily enough by just adding an extra context here or there (cf. your suggestion). But what I'm ultimately trying to do is fully free content from the presentation, so I'm going to continue to poke around at the possibilities.

Best,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: [hidden email]


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