File: AvoidSlurAccidentalCollision.scm

package info (click to toggle)
denemo 2.6.49-0.2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 66,916 kB
  • sloc: ansic: 94,587; lisp: 38,713; xml: 22,675; python: 1,930; sh: 1,239; makefile: 642; yacc: 288; sed: 93
file content (19 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;;AvoidSlurAccidentalCollision
;;;http://code.google.com/p/lilypond/issues/detail?id=796
(let ((tag "AvoidSlurAccidentalCollision"))
    (if (d-Directive-chord? tag)
        (begin
            (d-DirectiveDelete-chord  tag)
            (d-InfoDialog (_ "Slur/Accidental avoidance removed")))
        (begin
            (if (d-IsSlurStart)
                (let ((value (d-GetUserInput "Collision Avoidance" "Give edge attraction factor for slur" "0.5")))
                    (if (and value (string->number value))
                        (begin
                            (d-DirectivePut-chord-prefix tag (string-append "\\once \\override Slur.details #'edge-attraction-factor = #" value " "))
                            (d-DirectivePut-chord-override tag DENEMO_OVERRIDE_AFFIX)
                            (d-DirectivePut-chord-display tag "(X"))   ; here  ) to match the string paren open
                         (d-InfoDialog (_ "Cancelled"))))   
                (d-InfoDialog (_ "Use only on a slur start to make the slur avoid accidentals on following notes")))))
    (d-RefreshDisplay)
    (d-SetSaved #f))