denemo-devel
[Top][All Lists]
Advanced

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

Re: [Denemo-devel] (Justified) text between title and staff and text bef


From: Richard Shann
Subject: Re: [Denemo-devel] (Justified) text between title and staff and text before movement.
Date: Tue, 27 Aug 2019 17:54:03 +0100

On Tue, 2019-08-27 at 09:58 +0100, Richard Shann wrote:
> I've long thought it would be nice to create a pure LilyPond markup
> interactive generator for Denemo, just by cutting down that
> command...

Well, intriguingly this is possible (with one wrinkle):
In the Scheme window paste this script:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

(let ((tag "ScoreMarkup")(user-input ""))
  (set! user-input (d-DirectiveGet-score-data tag))
  (if (not user-input)
      (set! user-input "Insert LilyPond markup syntax here - delete any
paragraph markers ¶ as they will display wrongly\n"))
(set! user-input  (d-GetUserInputWithSnippets #f #f user-input #f))
(disp "user-input " user-input "\n\n")
(if user-input
    (let ((syntax (string-append "\\markup {\n" (string-delete #\¶ (car
user-input)) "\n}")))
      (d-SetSaved #f)
      (d-DirectivePut-score-data tag (car user-input))
      (d-DirectivePut-score-prefix tag syntax)
      (d-DirectivePut-score-display tag syntax))
    (d-WarningDialog (_ "Score Markup unchanged"))))

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

When you execute this it lets you type in LilyPond markup syntax and
displays how it will look in the top pane as you type.
When you are done it puts it at the top of your score (by wrapping it
with \markup {....})
The wrinkle is that the paragraph markers ¶ are still inserted and need
to be deleted, otherwise the preview shows them as new lines. 
There are commands under the Selection button for putting a selection
of your text into a line (and the lines, when selected, into a column).

This script can be made into a palette button, new command etc as
usual.

HTH

Richard







reply via email to

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