[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Denemo-devel] Script to add transpose Clarinet staff to existing music
From: |
Joe Wilkinson |
Subject: |
[Denemo-devel] Script to add transpose Clarinet staff to existing music |
Date: |
Sun, 22 Sep 2019 12:09:47 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Hi Richard,
I am trying to write a scheme script to automatically add a Clarinet
line below and to copy existing music. It needs to be transposed on
print up a tone. I'd rather it did not ask me each time for the interval
with a dialogue box.
I have played with the script from the Transpose on Print button, but it
either gives me a dialogue box, if I leave it alone, or nothing happens
if I change
(set! Transpose::Interval (d-GetNoteNamesFromUser 2 Transpose::Interval
(_ "--> Transpose to -->") )))
to
(set! Transpose::Interval ( "c d" 2 Transpose::Interval (_ "-->
Transpose to -->") )))
I assume there is more to it than a simple kludge. Apart from anything
else when the interval is changed the system remembers. Is
Transpose::Interval some sort of Global variable?
Best wishes
Joe
;;;;; TransposeStaffPrint
(define-once Transpose::Interval "c ees")
(let ((tag "TransposeStaffPrint")(lily #f) (text #f)(params
TransposeStaffPrint::params))
(if (and params (not (equal? params "edit")))
(set! Transpose::Interval params)
(set! Transpose::Interval (d-GetNoteNamesFromUser 2
Transpose::Interval (_ "--> Transpose to -->") )))
(if Transpose::Interval
(begin
(set! lily (string-append "\\transpose "
Transpose::Interval " "))
(set! text (string-append (_ "Print transposed: ")
Transpose::Interval " "))
(d-DirectivePut-staff-override tag DENEMO_OVERRIDE_GRAPHIC)
(d-DirectivePut-staff-display tag text)
(d-DirectivePut-staff-postfix tag lily)
(d-SetSaved #f))
(d-WarningDialog (_ "Cancelled"))))
- [Denemo-devel] Script to add transpose Clarinet staff to existing music,
Joe Wilkinson <=