[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Denemo-devel] Script to add transpose Clarinet staff to existing mu
Re: [Denemo-devel] Script to add transpose Clarinet staff to existing music
Sun, 22 Sep 2019 14:54:59 +0100
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0
Thanks. That works.
1.... I don't get error messages because I don't have a command line
interface to receive them in Windows.
On 22/09/2019 12:42, Richard Shann wrote:
On Sun, 2019-09-22 at 12:09 +0100, Joe Wilkinson wrote:
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
with a dialogue box.
I have played with the script from the Transpose on Print button, but
either gives me a dialogue box, if I leave it alone, or nothing
if I change
(set! Transpose::Interval (d-GetNoteNamesFromUser 2
(_ "--> Transpose to -->") )))
(set! Transpose::Interval ( "c d" 2 Transpose::Interval (_ "-->
Transpose to -->") )))
without testing it looks like that should throw an error in Scheme when
you try to set! the variable Transpose::Interval to the expression
following, which is
( "c d" 2 Transpose::Interval (_ "-->> Transpose to -->") )
I don't get error messages; I probably need a window to receive them!
That expression can't evaluate to anything because the first thing in
this list, the string "c d", is not a procedure - a list is evaluated
by executing the first element with the following elements as
It looks like you would mean to write
(set! Transpose::Interval "c d")
where the first element set! is a procedure that sets the second
element (a variable) to the value of the third element (a string).
I assume there is more to it than a simple kludge. Apart from
else when the interval is changed the system remembers. Is
Transpose::Interval some sort of Global variable?
Not sure, but it looks like it. Try evaluating
(d-InfoDialog (format #f "~s" Transpose::Interval))
this does indeed give me the current setting of the Transpose Interval
in the Scheme window to find out...
But I don't think changing that value will help - what you need to do
is create an example of this staff and then clone the staff
directive(**) as a button to be clicked to apply that transposition to
the current staff. Then you can copy(*) the Scheme script that this
button executes and use it in your script to set the transposition of
the current staff.
That now works. Thanks
(*) right click the button and choose Get Script into Scheme Window
(**) you will find the staff directives under the staff properties
editor - click on the staff number right at the start of the staff.