Hi Aaron,

All good. But I use \shapeII from the openlilylib library. There are some
insoluble issues with it that crop up sometimes, but in general I hammer it
heavily in use and it holds up well. There are a variety of ways to specify
the shape, including using polar coordinates which is surprisingly
intuitive.

Anyway, I think the OP just wanted a way to get the slurs inside the beam.
But then of course, the moment you achieve this you want to refine them!

Andrew


On Sun, 12 Aug 2018 at 15:33, Aaron Hill <lilyp...@hillvisions.com> wrote:

> On 2018-08-11 13:30, David F. wrote:
> > While we’re on the topic of bending slurs to our will, I’d like for
> > slurred, beamed eighth notes to have the slur printed below or inside
> > the beam.  This works with a simple ^~ for ties.  How might I
> > accomplish this?
>
> > The behavior I am after can also be seen here:
> >   https://hymnary.org/hymn/SS4C1956/page/561
>
> You can always adjust the control points to get the slur to fit within
> the notes.  However, manually setting control points can be a little
> tedious, especially if you have a slur that is almost correct but just
> needs a little nudging in the right direction.
>
> This (likely over-engineered) approach allows you to transform an
> existing slur by means of scaling, rotation and translation.  It
> automatically scales and rotates about the center of the slur, which
> seemed most natural when I was experimenting with it.
>
> %%%%
> \version "2.19.82"
> \language "english"
>
> #(define (transform-coords coords scale rotate offset)
>    (let* ((x-coords (map (lambda (coord) (car coord)) coords))
>           (y-coords (map (lambda (coord) (cdr coord)) coords))
>           (x-center (/ (+ (apply min x-coords) (apply max x-coords)) 2))
>           (y-center (/ (+ (apply min y-coords) (apply max y-coords)) 2))
>           (theta (* rotate (/ PI 180)))
>           (c (cos theta)) (s (sin theta)))
>      (map (lambda (coord) (let (
>          (x (* (- (car coord) x-center) (car scale)))
>          (y (* (- (cdr coord) y-center) (cdr scale))))
>        (cons (+ (* x c) (* y (- s)) x-center (car offset))
>              (+ (* x s) (* y c) y-center (cdr offset))))) coords)))
>
> #(define ((transform-slur scale rotate offset) grob)
>    (let ((coords (ly:slur::calc-control-points grob)))
>      (transform-coords coords scale rotate offset)))
>
> transformSlur =
> #(define-music-function (parser location scale rotate offset)
>                          (pair? number? pair?)
>    #{ \once \override Slur.control-points =
>         #(transform-slur scale rotate offset) #})
>
> \new Staff \with { beamExceptions = #'() } << {
>    e'8 ( a'8 )
>    \transformSlur #'(0.6 . 0.8) #15 #'(-0.3 . -2.6)
>    e'8 ^( a'8 )
>    \tuplet 3/2 { b'8 ( a'8 ) f'8 }
>    \tuplet 3/2 {
>      \transformSlur #'(0.5 . 0.6) #180 #'(0.4 . 2)
>      b'8 _( a'8 )f'8 }
> } >>
> %%%%
>
> NOTE: Purely for the sake of demonstrating rotation, the second slur is
> a "down" slur that I have flipped over.
>
> -- Aaron Hill_______________________________________________
> 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

Reply via email to