File: UnGraceAfter.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 (29 lines) | stat: -rw-r--r-- 892 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
27
28
29
;;UnGraceAfter
(d-PushPosition)
(if (Appending?)
  (d-MoveCursorLeft))
(while  (and (d-IsGrace) (d-MoveCursorLeft))
	#t)
(if (and (Note?) (d-Directive-chord? "MainGraceAfter"))
    (begin
      (while (and (d-MoveCursorRight) (d-IsGrace))
      	#t)
      (if (not (d-IsGrace))
	  (d-MoveCursorLeft))
      ;; on last grace note
      (let loop ()
 	(if (d-IsGrace)
 		(let ((beam (d-DirectiveGet-chord-postfix "Beam")))
		   (if beam
		      (d-DirectivePut-chord-override "Beam" 0);;really should just 0 the HIDDEN bit
		      )		
    		   (d-DirectiveDelete-chord "GraceAfter" )
       		   (if (d-MoveCursorLeft)
       		   	(loop)))))
      ; now on main note
       (d-DirectiveDelete-chord "MainGraceAfter")
       (d-PopPosition)
       (d-SetSaved #f))
    (begin
      (d-PopPosition)
      (d-WarningDialog  (_ "The cursor is not on a grace note after a main note or chord\n"))))