[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    building a custom context for Schenker urlinie figures
From:       Kieren MacMillan <kieren_macmillan () sympatico ! ca>
Date:       2016-12-30 3:01:46
Message-ID: B8ADA951-487E-4646-B2F0-A72782806A31 () sympatico ! ca
[Download RAW message or body]

Hello all,

As we know, there are usually many ways of coaxing Lily to do what we want. I'm \
looking for some suggestions on the best approach in a particular case.

I'm trying to create a custom context (for my SchenkerLily framework) which consists \
primarily of moment-attached numbers ("urlinie" figures), with a few additional \
markup options/requirements. For myself, any of the methods I've brainstormed and/or \
built are fine — but for the framework, I want the input to be as elegant and \
newbie-proof as possible.

One [main] desirable output is a connected series of numbers (or, less often, \
arbitrary markups), each attached to a moment (or, put another way, each with a \
duration) — see the second example of the snippet included after this email. In \
this version/attempt, I've used a customized FiguredBass context; in other \
versions/attempts, I've used a from-scratch context (with the assistance code that \
Andrew B. graciously wrote for me).

The thing I like about the FiguredBass approach is that it suggests input like

\urlinie {
  \connectionOn <5>2 <4>4 <3>2 <2>8 <1>1
  \connectionOff <5>1 <4>2 <3>1
}

or even

\urlinie {
  <5>2 ~ <4>4 ~ <3>2 ~ <2>8 ~ <1>1
  <5>1 <4>2 <3>1
}
  
the latter being the most clear and newbie-proof version I can currently think of.

I would love to hear suggestions on how this approach might be improved (especially \
how I can get the BassFigureContinuation to automagically extend itself to the next \
figure without the hacks seen in the second score in the snippet), or what might be a \
superior approach.

Thanks,
Kieren.
_______________________

%%  SNIPPET BEGINS
\version "2.19"

\layout {
  line-width = 5\in
  ragged-right = ##f
  \context {
    \Score
    \omit TimeSignature
    \omit BarLine
  }
  \context {
    \FiguredBass
    \override BassFigureContinuation.Y-offset = #0.625
    \override BassFigureContinuation.padding = #0.5
    \override BassFigureContinuation.thickness = #2
  }
}

notes = { c''2 2 2 }

testA = \figuremode {
  \bassFigureExtendersOn
  <5>4 4 <4>4 4 <3>2
  \bassFigureExtendersOff
}

testB = \figuremode {
  \override BassFigureContinuation.padding = #-3
  \override BassFigureContinuation.extra-offset = #'(4 . 0)
  \bassFigureExtendersOn
  <5>4 4
  \override BassFigureContinuation.padding = #-5.75
  \override BassFigureContinuation.extra-offset = #'(6.5 . 0)
  <4>4 4 <3>2
  \bassFigureExtendersOff
}

\markup \bold { DEFAULT: }
<<
  \new FiguredBass \testA
  \new Staff \notes
> > 

\markup \bold { DESIRED: }
<<
  \new FiguredBass \testB
  \new Staff \notes
> > 
%%  SNIPPET ENDS
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: info@kierenmacmillan.info


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic