Hi Andrés.
On Mon, May 11, 2015 at 7:06 PM, AndrésPérezLópez <
[email protected]> wrote:
> Dear all,
>
> it's a pleasure for me to write my first email in the list. I'm still very
> new to Lilypond, so please forgive my ignorance.
>
Welcome to Lilypond and to the list!
>
> We are in the development of an alternative music notation system, based on
> proportional pitch and time representation. At the moment we have a
> SuperCollider-based GUI for music edition and automatic transcription
> trough
> MIDI.
>
> We have considered using Lilypond for the graphical score output, due to
> its
> wonderful features. Most of our required graphical notation symbols are
> already implemented.
>
> However, we are having problems with position of bar lines. We do use
> regular bar lines for separating the bars but, in our proposal, the notes
> are placed over the bars (and not at the right side, as in normal
> notation).
> We still didn't find any property of the bar lines that would allow us to
> place them in top of the first bar's note.
>
> Therefore, I would like to ask you if someone has an advice about the
> point.
>
I remember this coming up on the user list a while ago. Actually, quite a
while ago: http://www.mail-archive.com/[email protected]/msg70143.html.
I've updated the file attached to that thread to work with current
versions. I haven't looked at the code beyond that, and I'm guessing
there's room for quite a bit of improvement.
Maybe it will prove useful, or at least pave the way to a better tool.
Best,
David
\version "2.19.16"
#(define adjust-for-note-head
(lambda (grob)
(let* ((refp (ly:grob-system grob))
(bar-coord (ly:grob-relative-coordinate grob refp X))
(all (ly:grob-array->list (ly:grob-object refp 'all-elements)))
(note-heads
(filter
(lambda (n)
(eq? (assq-ref (ly:grob-property n 'meta) 'name)
'NoteColumn))
all))
(note-head-coords
(map
(lambda (heads)
(interval-center (ly:grob-extent heads refp X)))
note-heads))
(coords-to-right
(filter
(lambda (coord) (< bar-coord coord))
note-head-coords))
(closest-coord
(if (pair? coords-to-right)
(apply min
(map (lambda (coord) (- coord bar-coord))
coords-to-right))
0)))
(set! (ly:grob-property grob 'extra-offset) (cons closest-coord 0)))))
centerBarToNote = \override Staff.BarLine.after-line-breaking = #adjust-for-note-head
centerSpanBarToNote = \override StaffGroup.SpanBar.after-line-breaking = #adjust-for-note-head
{
\new StaffGroup <<
\centerSpanBarToNote
\time 2/4
\new Staff {
\centerBarToNote
\override Stem.stencil = #point-stencil
\repeat unfold 30 { d' d' }
}
\new Staff {
\override Stem.stencil = #point-stencil
\centerBarToNote
\repeat unfold 30 { d' d' }
}
>>
}
\layout {
\context {
\Score
\override SpacingSpanner.strict-note-spacing = ##t
proportionalNotationDuration = #(ly:make-moment 1/8)
}
\context {
\Staff
\remove "Time_signature_engraver"
%\override BarLine.transparent = ##t
}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user