File: TypesetOnlyClef.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 (92 lines) | stat: -rw-r--r-- 3,435 bytes parent folder | download | duplicates (3)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
;;;;TypesetOnlyClef

(let (  (tag "TypesetOnlyClef")
		(text (_"t.o."))
		(start (and (= (d-GetMeasure) 1) (or (not (d-GetStartTick)) (zero? (d-GetStartTick)))))
		(choice #f))	
		(if (d-Directive-standalone? tag)
			(begin
				(if (Appending?)
					(d-MoveCursorLeft))
				(d-DirectiveDelete-standalone tag)
				(d-WarningDialog (_ "Typeset Only Clef deleted")))
			(if (and start (d-Directive-clef? tag))
				(begin
					(d-DirectiveDelete-clef tag)
					(d-WarningDialog (_ "Typeset Only Clef deleted")))
					(let ()		
							
					 (set! choice (RadioBoxMenu (cons (_ "Treble") "treble")
												  (cons (_ "Bass") "bass")
												  (cons (_ "Alto") "alto")                     
												  (cons (_ "Tenor") "tenor")                   
												  (cons (_ "Treble Octava Bassa") "treble_8")
												  (cons (_ "Bass Octava Bassa") "bass_8")
												  (cons (_ "Soprano") "soprano")
												  (cons (_ "French") "french")
												  (cons (_ "LilyPond") 'lilypond)))

						(if (eq? choice 'lilypond)
									(set! choice (d-GetUserInput (_ "Custom Clef") (_ "Give LilyPond syntax for clef name") "treble^8")))
						
						(if choice
							(let ((glyph "\nD\nDenemo\n24")(y 40)(ty 70)(tx -5))
								(cond 
									((equal? choice "treble") 
										(set! glyph "\nÉ\nfeta26\n36")
										(set! y 30))
										((equal? choice "bass") 
											(set! glyph "\nÇ\nfeta26\n36")
											(set! y 10))	
										((equal? choice "bass_8") 
											(set! ty 95)
											(set! text "8 t.o.")
											(set! glyph "\nÇ\nfeta26\n36")
											(set! y 10))	
										((equal? choice "alto") 
											(set! glyph "\nÅ\nfeta26\n36")
											(set! y 20))	
										((equal? choice "tenor") 
											(set! glyph "\nÅ\nfeta26\n36")
											(set! y 10))
										((equal? choice "soprano")
											(set! ty 115) 
											(set! glyph "\nÅ\nfeta26\n36")
											(set! y 40))
										((equal? choice "treble_8") 
											(set! text "8 t.o.")
											(set! glyph "\nÉ\nfeta26\n36")
											(set! y 30))
										((equal? choice "french")
											(set! ty 118) 
											(set! glyph "\nÉ\nfeta26\n36")
											(set! y 40))					
										
										)		
								(if start
									(begin
										(d-DirectivePut-clef-postfix tag (string-append "\\clef \"" choice "\" "))
										(d-DirectivePut-clef-graphic tag glyph)
										(d-DirectivePut-clef-gy tag y)
										(d-DirectivePut-clef-override tag (logior DENEMO_OVERRIDE_GRAPHIC DENEMO_OVERRIDE_LILYPOND))
										(d-DirectivePut-clef-display tag (string-append text "("(d-GetPrevailingClef)")"))
										(d-DirectivePut-clef-ty tag ty)
										(d-DirectivePut-clef-tx tag tx)
										(SetDirectiveConditional "clef" tag)
									
									)
									(begin
										(d-Directive-standalone tag)
										(d-DirectivePut-standalone-postfix tag (string-append "\\clef \"" choice "\" "))
										(d-DirectivePut-standalone-graphic tag glyph)
										(d-DirectivePut-standalone-gy tag (- y 21)) 
										(d-DirectivePut-standalone-ty tag (- ty 30))
										(d-DirectivePut-standalone-tx tag tx)
										(d-DirectivePut-standalone-display tag text)
										(d-DirectivePut-standalone-minpixels tag 30)
										(SetDirectiveConditional "standalone" tag)
										(d-SetSaved #f)         
										(d-RefreshDisplay))))
							(d-InfoDialog (_ "Cancelled")))))))