Wed 30 Dec 2009 02:30:22 PM UTC, comment #4:
I looked at turning stem direction into a Chord property, and have shied off (attached is a diff for how far I got). Anything involving manipulating the Denemo display I find very tricky.
I haven't looked at changing the drawing of slurs etc from up to down either, though that would not be quite so tricky I guess.
For now I'll include the script. We could make a script to surround the stem directive objects with lilypond comment markers, to prevent the LilyPond output having effect, but I think it is just ignored anyway.
(file #19394)
|
Tue 29 Dec 2009 04:22:49 PM UTC, comment #2:
When I wrote the script I called it VoiceCommands. This script is used when entering several voices per staff--it enters a lilypond command to set all of the various gadgets to the proper directions to avoid clashes and make it all look nice. So the lilypond effect would be duplicated if we issued a denemo stemUp command-there would be redundancy in the lilypond. Also the denemo display would get crowded due to the \stemUp text being there.
What would be best is if this script could tell Denemo to show the stems up or down, but not have the stemUp tag displayed. Is this possible? Why not make the hard-coded version of the stemUp or Down in Denemo just change stem direction--then any scripts that want to say StemUp can just include that as a directive tag or something.
Also, is it possible to tell Denemo to put the slurs and ties up or down? This pertains to the slurUp scripts I sent in a while back as well as to this one.
So basically it would make this script a lot nicer to have scheme commands to only modify the denemo view's direction of the slurs and stems, without changing any lilypond.
-Dan W.
|
Tue 22 Dec 2009 08:12:40 PM UTC, comment #1:
Thanks for this. There are some voice commands already - how does this script fit in? (Notes/Rests->Stem Direction)
It looks like your script would need to have d-StemUp etc added to make the display correspond.
If you can then give a label, tooltip, command name, menupath :-) In fact you can upload these all at once by right clicking on your command and choosing "Upload script to denemo.org" (if on linux that is).
This gives us all the information to install the command without having to know much about it...
|
Sun 20 Dec 2009 02:56:07 AM UTC, original submission:
For polyphonic music the commands \voiceOne, \voiceTwo, \oneVoice, etc. are handy. I'm including a script that lets you choose these commands. It would be good if the denemo view reflected these commands: they affect stem direction (up for Voice 1 and 3, down for 2 and 4, I believe), as well as slur/tie direction (up for 1&3, down for 2&4). OneVoice is basically return to neutral.
What would be really fancy is for denemo to do a good job of selecting these commands as appropriate, automatically, when you have more than one voice on a staff. So, when a multi-voice staff has only one active voice, with the others on non-printing rests, the \oneVoice command would be issued. When several voices were active, they would each have their own appropriate \voiceOne , \voiceTwo, etc.
Here's the script:
(let ((choice #f)(label #f))
(set! choice (d-GetOption (string-append "OneVoice" stop "VoiceOne" stop "VoiceTwo" stop "VoiceThree" stop "VoiceFour" stop) ) )
(cond
( (equal? choice "VoiceOne" ) (begin (set! choice "voiceOne") (set! label "Voice1") ))
( (equal? choice "VoiceTwo" ) (begin (set! choice "voiceTwo") (set! label "Voice2") ))
( (equal? choice "VoiceThree" ) (begin (set! choice "voiceThree") (set! label "Voice3") ))
( (equal? choice "VoiceFour" ) (begin (set! choice "voiceFour") (set! label "Voice4") ))
( (equal? choice "OneVoice" ) (begin (set! choice "oneVoice") (set! label "1Voice") ) )
)
(d-DirectivePut-standalone "Voice" )
(d-DirectivePut-standalone-display "Voice" label )
(d-DirectivePut-standalone-ty "Voice" 60 )
(d-DirectivePut-standalone-postfix "Voice" (string-append "\\" choice ) )
(d-DirectivePut-standalone-minpixels "Voice" 10 )
)
|