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 mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/denemo-devel