lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to connect two note on diffrent stave with brace?


From: Lukas-Fabian Moser
Subject: Re: How to connect two note on diffrent stave with brace?
Date: Sat, 12 Jun 2021 07:40:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi,

Am 12.06.21 um 06:00 schrieb 睿达 陈:
Hello everyone!

I'm very sorry for my english.
I have tried \left-brace, it is useless. because although it can engrave between two stave but not connect any note.
If need detail, attachment was given.

Best Regards!

One could abuse \arpeggio and make it appear as a brace. Here's a quick-and-dirty way:

\version "2.22.1"

braceArpeggio =
#(define-music-function (size) (number?)
   #{
     \set PianoStaff.connectArpeggios = ##t
     \override PianoStaff.Arpeggio.stencil = #ly:text-interface::print
     \override PianoStaff.Arpeggio.text = \markup
     \with-dimensions-from\null \general-align #Y #UP { \hspace #1 \left-brace #size }
   #})

\new PianoStaff <<
  \new Staff {
    \key d \major
    \once \braceArpeggio 50
    << a'2\arpeggio \\ a >>
  }
  \new Staff \with { \clef bass } {
    \key d \major
    <fis d>2.\arpeggio
  }
>>

Of course, in the long run the size of the brace symbol should be calculated automatically (and \with-dimensions-from\null and \hspace #1 are just ugly.) But I'll have breakfast first :-).

Lukas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]