On Tue, 27 Aug 2019 at 18:54, Richard Shann <rich...@rshann.plus.com> wrote: > > 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 >
Thank you so much for this, and also for the detailed explanation! I'll test it today and report. Cheers, Lib _______________________________________________ Denemo-devel mailing list Denemo-devel@gnu.org https://lists.gnu.org/mailman/listinfo/denemo-devel