[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Customizing ottava text
From: |
Urs Liska |
Subject: |
Customizing ottava text |
Date: |
Wed, 15 Feb 2017 21:06:38 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
Hi all,
is it really true that the text of the OttavaBracket can't be
customized? All I could find was the doc snippet
http://lilypond.org/doc/v2.19/Documentation/snippets/text#text-ottava-text
which suggests to manually set Staff.ottavation after the \ottava command.
With this I created a function (overwriting the built-in function)
#(define ottava
(let ((orig-ottava ottava)
(numbers '("15" "8" "" "8" "15")))
(define-music-function (oct)(integer?)
#{
#(orig-ottava oct)
#(if (not (= oct 0))
#{
\set Staff.ottavation = #(list-ref numbers (+ oct 2))
#})
#})))
which actually does what I want (change "8va" to "8"), but I can't
believe that it is really necessary to go that long way for a seemingly
simple task.
Any comments?
Urs
--
address@hidden
https://openlilylib.org
http://lilypondblog.org
- Customizing ottava text,
Urs Liska <=
Re: Customizing ottava text, madMuze, 2017/02/15
Re: Customizing ottava text, Urs Liska, 2017/02/15
Re: Customizing ottava text, Thomas Morley, 2017/02/16