File: CompactChordScale.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 (31 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (6)
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
27
28
29
30
31
;;;CompactChordScale
(let* ((tag "CompactChordScale")(params CompactChordScale::params)(scalex "2.0") (scaley "2.0") (data  (d-DirectiveGet-standalone-data tag)))
    (if data
        (begin
            (d-DirectiveDelete-standalone tag)
            (set! data (eval-string data))
            (set! scalex (car data))
            (set! scaley (cdr data))))
     (if (equal? params "edit")
     	(set! params #f))
    (if params
    	(begin
    		(set! scalex (number->string (car params)))
    		(set! scaley (number->string (cdr params)))
    		(set! params 'finished)))
    (if (not params)	
    	(set! scalex (d-GetUserInput (_ "Chord Symbol Scale") (_ "Give horizontal scaling for next chord") scalex)))
    	
        (if scalex
            (begin
            	(if (not params)
                	(set! scaley (d-GetUserInput (_ "Chord Symbol Scale") (_ "Give vertical scaling for next chord") scaley)))
                (if scaley 
                    (begin
                        (d-DirectivePut-standalone tag)
                        (d-DirectivePut-standalone-postfix tag (string-append "\\once \\set Score.chordCompactScale = #'(" scalex " . " scaley ") "))
                        (d-DirectivePut-standalone-display tag "Scale")
                        (d-DirectivePut-standalone-data tag (format #f "'~s" (cons scalex scaley)))
                        (d-DirectivePut-standalone-minpixels tag 30)
                        (d-SetSaved #f)
                        (d-RefreshDisplay))))))