File: ShapeTieHigher.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 (26 lines) | stat: -rw-r--r-- 1,442 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;ShapeTieHigher
(let ((tag "TieShape")(amount "0")(data #f)(height #f))
        (set! data (d-DirectiveGet-standalone-data tag))
        (if data
            (begin
                (set! data (eval-string data)))
             (begin
                (set! data '((0 . 0) (0 . 0) (0 . 0) (0 . 0)))))
       
        (set! amount (d-GetUserInput (_ "Height of Tie") (_ "Give amount to raise (unit = staff line space):") amount))
        (if (and amount (string->number amount))
            (begin
                (set! amount (string->number amount))
                ;modify y offsets by the amount
                (list-set! data 0 (cons (car (list-ref data 0)) (+ amount (cdr (list-ref data 0)))))
                (list-set! data 1 (cons (car (list-ref data 1)) (+ amount (cdr (list-ref data 1)))))
                (list-set! data 2 (cons (car (list-ref data 2)) (+ amount (cdr (list-ref data 2)))))
                (list-set! data 3 (cons (car (list-ref data 3)) (+ amount (cdr (list-ref data 3)))))
                            
                (d-Directive-standalone tag)
                (d-DirectivePut-standalone-minpixels tag 30) 
                (d-DirectivePut-standalone-display tag "~")
                (d-DirectivePut-standalone-data tag (format #f "'~A" data))
                (d-DirectivePut-standalone-postfix tag (string-append "\\shape #'" (format #f "~A" data) " Tie "))))
        (d-RefreshDisplay)
        (d-SetSaved #f))