|
From: | Lukas-Fabian Moser |
Subject: | Re: How to connect two note on diffrent stave with brace? |
Date: | Sat, 12 Jun 2021 09:54:31 +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 07:40 schrieb Lukas-Fabian Moser:
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:
Maybe better: \version "2.22.1" #(define (other-axis a) (remainder (+ a 1) 2)) #(define-markup-command (squash layout props axis arg) (ly:dir? markup?) (let* ((orig (interpret-markup layout props arg)) (orig-extent (ly:stencil-extent orig (other-axis axis)))) (ly:stencil-outline orig (make-filled-box-stencil (if (= axis X) empty-interval orig-extent) (if (= axis Y) empty-interval orig-extent))))) braceArpeggio = #(define-music-function (size) (number?) #{ \set PianoStaff.connectArpeggios = ##t \override PianoStaff.Arpeggio.stencil = #ly:text-interface::print \override PianoStaff.Arpeggio.text = \markup \squash #Y \general-align #Y #UP \left-align \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 } >>As of now, I couldn't get rid of the need to specify the size of the brace manually. (The markup command \left-brace seems to expect a value in points, and the relationship to staff-size arpeggio extents seems to be above my current paygrade :-).)
Lukas
[Prev in Thread] | Current Thread | [Next in Thread] |