From crhodes at common-lisp.net Thu Mar 11 15:16:55 2004 From: crhodes at common-lisp.net (Christophe Rhodes) Date: Thu, 11 Mar 2004 10:16:55 -0500 Subject: [gsharp-cvs] CVS update: gsharp/midi.lisp Message-ID: Update of /project/gsharp/cvsroot/gsharp In directory common-lisp.net:/tmp/cvs-serv1844 Modified Files: midi.lisp Log Message: Implement (SETF MIDIFILE-FORMAT) for identity transforms and 0<->1. Format 2 will follow whenever someone finds a use. Fix a bug in the writer for the key-signature message. Date: Thu Mar 11 10:16:55 2004 Author: crhodes Index: gsharp/midi.lisp diff -u gsharp/midi.lisp:1.2 gsharp/midi.lisp:1.3 --- gsharp/midi.lisp:1.2 Wed Feb 18 13:15:46 2004 +++ gsharp/midi.lisp Thu Mar 11 10:16:55 2004 @@ -220,7 +220,8 @@ (setf time (message-time message)))) 1) ; the delta time of the end-of-track message 4) - (mapc #'write-timed-message track) + (dolist (message track) + (write-timed-message message)) (setf (message-time end-of-track-message) *time*) (write-timed-message end-of-track-message))) @@ -230,7 +231,7 @@ (with-midi-input (filename) (let ((type (read-fixed-length-quantity 4)) (length (read-fixed-length-quantity 4)) - (format (read-fixed-length-quantity 2)) + (format (read-fixed-length-quantity 2)) (nb-tracks (read-fixed-length-quantity 2)) (division (read-fixed-length-quantity 2))) (unless (and (= length +header-mthd-length+) (= type +header-mthd+)) @@ -245,7 +246,7 @@ (defun write-midi-file (midifile filename) (with-midi-output (filename :if-exists :supersede) (write-fixed-length-quantity +header-mthd+ 4) - (write-fixed-length-quantity +header-mthd-length+ 4) + (write-fixed-length-quantity +header-mthd-length+ 4) (with-slots (format division tracks) midifile (write-fixed-length-quantity format 2) (write-fixed-length-quantity (length tracks) 2) @@ -257,6 +258,44 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; +;;; Conversion routines + +(defun format1-tracks-to-format0-tracks (tracks) + (list (reduce (lambda (t1 t2) (merge 'list t1 t2 #'< :key #'message-time)) + (copy-tree tracks)))) + +(defun format0-tracks-to-format1-tracks (tracks) + (assert (null (cdr tracks))) + (let (tempo-map track) + (dolist (message (car tracks) (list (nreverse tempo-map) (nreverse track))) + (if (typep message 'tempo-map-message) + (push message tempo-map) + (push message track))))) + +(defun change-to-format-0 (midifile) + (assert (= (midifile-format midifile) 1)) + (setf (slot-value midifile 'format) 0 + (slot-value midifile 'tracks) (format1-tracks-to-format0-tracks (midifile-tracks midifile)))) + +(defun change-to-format-1 (midifile) + (assert (= (midifile-format midifile) 0)) + (setf (slot-value midifile 'format) 1 + (slot-value midifile 'tracks) (format0-tracks-to-format1-tracks (midifile-tracks midifile)))) + +(defmethod (setf midifile-format) (new-value midifile) + (cond + ((= (midifile-format midifile) new-value) new-value) + ((and (= new-value 0) (= (midifile-format midifile) 1)) + (change-to-format-0 midifile) + new-value) + ((and (= new-value 1) (= (midifile-format midifile) 0)) + (change-to-format-1 midifile) + new-value) + (t (error "Unsupported conversion from format ~S to format ~S" + (midifile-format midifile) new-value)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; ;;; Macro for defining midi messages (defparameter *status-min* (make-hash-table :test #'eq) @@ -485,6 +524,8 @@ (define-midi-message system-message (message)) +(define-midi-message tempo-map-message (message)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; system common messages @@ -579,7 +620,7 @@ :filler next-byte ; the first data byte which gives the type of meta message :writer (write-bytes data-min)) -(define-midi-message sequence-number-message (meta-message) +(define-midi-message sequence-number-message (meta-message tempo-map-message) :data-min #x00 :data-max #x00 :slots ((sequence)) :filler (let ((data2 next-byte)) @@ -609,7 +650,7 @@ (define-midi-message copyright-message (text-message) :data-min #x02 :data-max #x02) -(define-midi-message sequence/track-name-message (text-message) +(define-midi-message sequence/track-name-message (text-message tempo-map-message) :data-min #x03 :data-max #x03) (define-midi-message instrument-message (text-message) @@ -618,7 +659,7 @@ (define-midi-message lyric-message (text-message) :data-min #x05 :data-max #x05) -(define-midi-message marker-message (text-message) +(define-midi-message marker-message (text-message tempo-map-message) :data-min #x06 :data-max #x06) (define-midi-message cue-point-message (text-message) @@ -651,14 +692,14 @@ :length 0 :writer (write-bytes 0)) -(define-midi-message tempo-message (meta-message) +(define-midi-message tempo-message (meta-message tempo-map-message) :data-min #x51 :data-max #x51 :slots ((tempo :reader message-tempo)) :filler (progn next-byte (setf tempo (read-fixed-length-quantity 3))) :length 3 :writer (progn (write-bytes 3) (write-fixed-length-quantity tempo 3))) -(define-midi-message smpte-offset-message (meta-message) +(define-midi-message smpte-offset-message (meta-message tempo-map-message) :data-min #x54 :data-max #x54 :slots ((hr) (mn) (se) (fr) (ff)) :filler (progn next-byte (setf hr next-byte mn next-byte se next-byte @@ -666,7 +707,7 @@ :length 5 :writer (write-bytes 5 hr mn se fr ff)) -(define-midi-message time-signature-message (meta-message) +(define-midi-message time-signature-message (meta-message tempo-map-message) :data-min #x58 :data-max #x58 :slots ((nn :reader message-numerator) (dd :reader message-denominator) @@ -686,7 +727,7 @@ temp-sf)) mi next-byte)) :length 2 - :writer (write-bytes 2 sf mi)) + :writer (write-bytes 2 (if (< sf 0) (+ sf 256) sf) mi)) (define-midi-message proprietary-event (meta-message) :data-min #x7f :data-max #x7f From rstrandh at common-lisp.net Thu Mar 25 06:48:57 2004 From: rstrandh at common-lisp.net (Robert Strandh) Date: Thu, 25 Mar 2004 01:48:57 -0500 Subject: [gsharp-cvs] CVS update: gsharp/Fonts/ties.mf gsharp/Fonts/Makefile gsharp/Fonts/charmap.mf gsharp/Fonts/sdl.mf Message-ID: Update of /project/gsharp/cvsroot/gsharp/Fonts In directory common-lisp.net:/tmp/cvs-serv21198 Modified Files: Makefile charmap.mf sdl.mf Added Files: ties.mf Log Message: New glyphs for ties, small version. More being worked on. Date: Thu Mar 25 01:48:56 2004 Author: rstrandh Index: gsharp/Fonts/Makefile diff -u gsharp/Fonts/Makefile:1.1.1.1 gsharp/Fonts/Makefile:1.2 --- gsharp/Fonts/Makefile:1.1.1.1 Mon Feb 16 10:46:31 2004 +++ gsharp/Fonts/Makefile Thu Mar 25 01:48:56 2004 @@ -2,7 +2,7 @@ f_clef.mf c_clef.mf accents.mf dot.mf accidentals.mf sharp.mf\ double-sharp.mf double-flat.mf flat.mf natural.mf flags.mf\ rests.mf whole_rest.mf half_rest.mf quarter_rest.mf\ - eighth_rest.mf beams.mf + eighth_rest.mf ties.mf all: sdl6.gf sdl8.gf sdl10.gf sdl12.gf Index: gsharp/Fonts/charmap.mf diff -u gsharp/Fonts/charmap.mf:1.1.1.1 gsharp/Fonts/charmap.mf:1.2 --- gsharp/Fonts/charmap.mf:1.1.1.1 Mon Feb 16 10:46:32 2004 +++ gsharp/Fonts/charmap.mf Thu Mar 25 01:48:56 2004 @@ -85,3 +85,22 @@ global_variable(numeric)(flags_up_four_light)(127) global_variable(numeric)(flags_up_five)(128) global_variable(numeric)(flags_up_five_light)(129) + +global_variable(numeric)(small_tie_one_up)(130) +global_variable(numeric)(small_tie_two_up)(132) +global_variable(numeric)(small_tie_three_up)(134) +global_variable(numeric)(small_tie_four_up)(136) +global_variable(numeric)(small_tie_five_up)(138) +global_variable(numeric)(small_tie_six_up)(140) +global_variable(numeric)(small_tie_seven_up)(142) +global_variable(numeric)(small_tie_eight_up)(144) + +global_variable(numeric)(small_tie_one_down)(146) +global_variable(numeric)(small_tie_two_down)(148) +global_variable(numeric)(small_tie_three_down)(150) +global_variable(numeric)(small_tie_four_down)(152) +global_variable(numeric)(small_tie_five_down)(154) +global_variable(numeric)(small_tie_six_down)(156) +global_variable(numeric)(small_tie_seven_down)(158) +global_variable(numeric)(small_tie_eight_down)(160) + Index: gsharp/Fonts/sdl.mf diff -u gsharp/Fonts/sdl.mf:1.1.1.1 gsharp/Fonts/sdl.mf:1.2 --- gsharp/Fonts/sdl.mf:1.1.1.1 Mon Feb 16 10:46:35 2004 +++ gsharp/Fonts/sdl.mf Thu Mar 25 01:48:56 2004 @@ -143,10 +143,11 @@ endfor; enddef; -input noteheads; -input accidentals; +input noteheads +input accidentals input rests -input clefs; +input clefs input accents input flags +input ties bye From rstrandh at common-lisp.net Thu Mar 25 06:50:26 2004 From: rstrandh at common-lisp.net (Robert Strandh) Date: Thu, 25 Mar 2004 01:50:26 -0500 Subject: [gsharp-cvs] CVS update: gsharp/Fonts/viewer.lisp Message-ID: Update of /project/gsharp/cvsroot/gsharp/Fonts In directory common-lisp.net:/tmp/cvs-serv8952 Added Files: viewer.lisp Log Message: Software for viewing gf font files. Date: Thu Mar 25 01:50:26 2004 Author: rstrandh From rstrandh at common-lisp.net Thu Mar 25 12:53:16 2004 From: rstrandh at common-lisp.net (Robert Strandh) Date: Thu, 25 Mar 2004 07:53:16 -0500 Subject: [gsharp-cvs] CVS update: gsharp/Fonts/charmap.mf gsharp/Fonts/ties.mf Message-ID: Update of /project/gsharp/cvsroot/gsharp/Fonts In directory common-lisp.net:/tmp/cvs-serv31120 Modified Files: charmap.mf ties.mf Log Message: Code factoring for small ties. Introduced light glyphs for small ties. Date: Thu Mar 25 07:53:16 2004 Author: rstrandh Index: gsharp/Fonts/charmap.mf diff -u gsharp/Fonts/charmap.mf:1.2 gsharp/Fonts/charmap.mf:1.3 --- gsharp/Fonts/charmap.mf:1.2 Thu Mar 25 01:48:56 2004 +++ gsharp/Fonts/charmap.mf Thu Mar 25 07:53:16 2004 @@ -87,20 +87,36 @@ global_variable(numeric)(flags_up_five_light)(129) global_variable(numeric)(small_tie_one_up)(130) +global_variable(numeric)(small_tie_one_up_light)(131) global_variable(numeric)(small_tie_two_up)(132) +global_variable(numeric)(small_tie_two_up_light)(133) global_variable(numeric)(small_tie_three_up)(134) +global_variable(numeric)(small_tie_three_up_light)(135) global_variable(numeric)(small_tie_four_up)(136) +global_variable(numeric)(small_tie_four_up_light)(137) global_variable(numeric)(small_tie_five_up)(138) +global_variable(numeric)(small_tie_five_up_light)(139) global_variable(numeric)(small_tie_six_up)(140) +global_variable(numeric)(small_tie_six_up_light)(141) global_variable(numeric)(small_tie_seven_up)(142) +global_variable(numeric)(small_tie_seven_up_light)(143) global_variable(numeric)(small_tie_eight_up)(144) +global_variable(numeric)(small_tie_eight_up_light)(145) global_variable(numeric)(small_tie_one_down)(146) +global_variable(numeric)(small_tie_one_down_light)(147) global_variable(numeric)(small_tie_two_down)(148) +global_variable(numeric)(small_tie_two_down_light)(149) global_variable(numeric)(small_tie_three_down)(150) +global_variable(numeric)(small_tie_three_down_light)(151) global_variable(numeric)(small_tie_four_down)(152) +global_variable(numeric)(small_tie_four_down_light)(153) global_variable(numeric)(small_tie_five_down)(154) +global_variable(numeric)(small_tie_five_down_light)(155) global_variable(numeric)(small_tie_six_down)(156) +global_variable(numeric)(small_tie_six_down_light)(157) global_variable(numeric)(small_tie_seven_down)(158) +global_variable(numeric)(small_tie_seven_down_light)(159) global_variable(numeric)(small_tie_eight_down)(160) +global_variable(numeric)(small_tie_eight_down_light)(161) Index: gsharp/Fonts/ties.mf diff -u gsharp/Fonts/ties.mf:1.1 gsharp/Fonts/ties.mf:1.2 --- gsharp/Fonts/ties.mf:1.1 Thu Mar 25 01:48:56 2004 +++ gsharp/Fonts/ties.mf Thu Mar 25 07:53:16 2004 @@ -9,244 +9,186 @@ local_variable(numeric)(small_tie_height) (round(0.5 * staff_line_distance)); + save small_tie_up; + def small_tie_up(expr width) = + fill ((0, top){right} .. + (width, top-small_tie_height) -- + (width-1, top-small_tie_height) .. + (0.5*width, top-tie_thickness) .. + (0, top-tie_thickness) .. + (-0.5*width, top-tie_thickness) .. + (-(width-1), top-small_tie_height) -- + (-width, top-small_tie_height) .. cycle) + scaled magnification; + enddef; + + save small_tie_up_light; + def small_tie_up_light(expr width) = + fill ((0, top){right} .. + (width, top-small_tie_height) -- + (width-1, top-small_tie_height) .. + (0.5*width, top-tie_thickness) .. + (0, top-tie_thickness) .. + (-0.5*width, top-tie_thickness) .. + (-(width-1), top-small_tie_height) -- + (-width, top-small_tie_height) .. cycle) + scaled magnification; + stripes(width, 2*tie_thickness); + enddef; + + save small_tie_down; + def small_tie_down(expr width) = + fill ((0, -bot){right} .. + (width, small_tie_height-bot) -- + (width-1, small_tie_height-bot) .. + (0.5*width, tie_thickness-bot) .. + (0, tie_thickness-bot) .. + (-0.5*width, tie_thickness-bot) .. + (-(width-1), small_tie_height-bot) -- + (-width, small_tie_height-bot) .. cycle) + scaled magnification; + enddef; + + save small_tie_down_light; + def small_tie_down_light(expr width) = + fill ((0, -bot){right} .. + (width, small_tie_height-bot) -- + (width-1, small_tie_height-bot) .. + (0.5*width, tie_thickness-bot) .. + (0, tie_thickness-bot) .. + (-0.5*width, tie_thickness-bot) .. + (-(width-1), small_tie_height-bot) -- + (-width, small_tie_height-bot) .. cycle) + scaled magnification; + stripes(width, 2*tie_thickness) + enddef; + begin_character(small_tie_one_up) - local_variable(numeric)(width) - (round(0.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(0.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_one_up_light) + small_tie_up_light(round(0.33 * staff_line_distance)); end_character; begin_character(small_tie_two_up) - local_variable(numeric)(width) - (round(0.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(0.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_two_up_light) + small_tie_up_light(round(0.67 * staff_line_distance)); end_character; begin_character(small_tie_three_up) - local_variable(numeric)(width) - (round(1.0 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(1.0 * staff_line_distance)); + end_character; + + begin_character(small_tie_three_up_light) + small_tie_up_light(round(1.0 * staff_line_distance)); end_character; begin_character(small_tie_four_up) - local_variable(numeric)(width) - (round(1.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(1.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_four_up_light) + small_tie_up_light(round(1.33 * staff_line_distance)); end_character; begin_character(small_tie_five_up) - local_variable(numeric)(width) - (round(1.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(1.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_five_up_light) + small_tie_up_light(round(1.67 * staff_line_distance)); end_character; begin_character(small_tie_six_up) - local_variable(numeric)(width) - (round(2.0 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(2.0 * staff_line_distance)); + end_character; + + begin_character(small_tie_six_up_light) + small_tie_up_light(round(2.0 * staff_line_distance)); end_character; begin_character(small_tie_seven_up) - local_variable(numeric)(width) - (round(2.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(2.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_seven_up_light) + small_tie_up_light(round(2.33 * staff_line_distance)); end_character; begin_character(small_tie_eight_up) - local_variable(numeric)(width) - (round(2.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle); - fill tie scaled magnification; + small_tie_up(round(2.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_eight_up_light) + small_tie_up_light(round(2.67 * staff_line_distance)); end_character; begin_character(small_tie_one_down) - local_variable(numeric)(width) - (round(0.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(0.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_one_down_light) + small_tie_down_light(round(0.33 * staff_line_distance)); end_character; begin_character(small_tie_two_down) - local_variable(numeric)(width) - (round(0.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(0.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_two_down_light) + small_tie_down_light(round(0.67 * staff_line_distance)); end_character; begin_character(small_tie_three_down) - local_variable(numeric)(width) - (round(1.0 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(1.0 * staff_line_distance)); + end_character; + + begin_character(small_tie_three_down_light) + small_tie_down_light(round(1.0 * staff_line_distance)); end_character; begin_character(small_tie_four_down) - local_variable(numeric)(width) - (round(1.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(1.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_four_down_light) + small_tie_down_light(round(1.33 * staff_line_distance)); end_character; begin_character(small_tie_five_down) - local_variable(numeric)(width) - (round(1.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(1.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_five_down_light) + small_tie_down_light(round(1.67 * staff_line_distance)); end_character; begin_character(small_tie_six_down) - local_variable(numeric)(width) - (round(2.0 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(2.0 * staff_line_distance)); + end_character; + + begin_character(small_tie_six_down_light) + small_tie_down_light(round(2.0 * staff_line_distance)); end_character; begin_character(small_tie_seven_down) - local_variable(numeric)(width) - (round(2.33 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(2.33 * staff_line_distance)); + end_character; + + begin_character(small_tie_seven_down_light) + small_tie_down_light(round(2.33 * staff_line_distance)); end_character; begin_character(small_tie_eight_down) - local_variable(numeric)(width) - (round(2.67 * staff_line_distance)); - local_variable(path)(tie) - ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle); - fill tie scaled magnification; + small_tie_down(round(2.67 * staff_line_distance)); + end_character; + + begin_character(small_tie_eight_down_light) + small_tie_down_light(round(2.67 * staff_line_distance)); end_character; endgroup; From rstrandh at common-lisp.net Fri Mar 26 14:24:11 2004 From: rstrandh at common-lisp.net (Robert Strandh) Date: Fri, 26 Mar 2004 09:24:11 -0500 Subject: [gsharp-cvs] CVS update: gsharp/sdl.lisp gsharp/gf.lisp Message-ID: Update of /project/gsharp/cvsroot/gsharp In directory common-lisp.net:/tmp/cvs-serv30061 Modified Files: sdl.lisp gf.lisp Log Message: Make it possible for the gf file loader to handle fonts with more than 256 characters. Date: Fri Mar 26 09:24:11 2004 Author: rstrandh Index: gsharp/sdl.lisp diff -u gsharp/sdl.lisp:1.3 gsharp/sdl.lisp:1.4 --- gsharp/sdl.lisp:1.3 Thu Feb 19 00:57:22 2004 +++ gsharp/sdl.lisp Fri Mar 26 09:24:11 2004 @@ -168,9 +168,9 @@ *fonts-directory*))) (maxchar (reduce #'max (gf-font-chars gf-font) :key #'gf-char-no)) (glyphs (make-array (list (1+ maxchar)) :initial-element nil))) - (loop for char in (gf-font-chars gf-font) do - (setf (aref glyphs (gf-char-no char)) - (make-instance 'glyph :gf-char char))) + (loop for char in (gf-font-chars gf-font) + do (setf (aref glyphs (gf-char-no char)) + (make-instance 'glyph :gf-char char))) (make-instance 'font :staff-line-distance staff-line-distance :gf-font gf-font Index: gsharp/gf.lisp diff -u gsharp/gf.lisp:1.1.1.1 gsharp/gf.lisp:1.2 --- gsharp/gf.lisp:1.1.1.1 Mon Feb 16 10:46:11 2004 +++ gsharp/gf.lisp Fri Mar 26 09:24:11 2004 @@ -78,9 +78,10 @@ (paint-command d)) (defun boc-command (char-no prev-char min-m max-m min-n max-n) - (declare (ignore prev-char)) (push (make-instance 'gf-char - :char-no char-no + :char-no (if (= prev-char -1) + char-no + (+ 256 (gf-char-no (find char-no *chars* :key #'gf-char-no)))) :min-m min-m :max-m max-m :min-n min-n :max-n max-n) *chars*) (setf *current-matrix* (make-array `(,(1+ (- max-n min-n)) ,(1+ (- max-m min-m))) @@ -178,10 +179,10 @@ (defun parse-gf-stream (*gf-stream*) (let ((*current-font* nil) (*chars* '())) - (loop for command-code = (u1) then (u1) do - (cond ((<= command-code 63) (paint-command command-code)) - ((<= 74 command-code 238) (new-row-command command-code)) - (t (funcall (aref *commands* command-code)))) + (loop for command-code = (u1) then (u1) + do (cond ((<= command-code 63) (paint-command command-code)) + ((<= 74 command-code 238) (new-row-command command-code)) + (t (funcall (aref *commands* command-code)))) until (= command-code 249) finally (return *current-font*)))) From rstrandh at common-lisp.net Fri Mar 26 14:25:35 2004 From: rstrandh at common-lisp.net (Robert Strandh) Date: Fri, 26 Mar 2004 09:25:35 -0500 Subject: [gsharp-cvs] CVS update: gsharp/Fonts/charmap.mf gsharp/Fonts/ties.mf Message-ID: Update of /project/gsharp/cvsroot/gsharp/Fonts In directory common-lisp.net:/tmp/cvs-serv22368 Modified Files: charmap.mf ties.mf Log Message: Added the rest of the tie glyphs. Date: Fri Mar 26 09:25:35 2004 Author: rstrandh Index: gsharp/Fonts/charmap.mf diff -u gsharp/Fonts/charmap.mf:1.3 gsharp/Fonts/charmap.mf:1.4 --- gsharp/Fonts/charmap.mf:1.3 Thu Mar 25 07:53:16 2004 +++ gsharp/Fonts/charmap.mf Fri Mar 26 09:25:34 2004 @@ -120,3 +120,103 @@ global_variable(numeric)(small_tie_eight_down)(160) global_variable(numeric)(small_tie_eight_down_light)(161) +global_variable(numeric)(large_tie_line_one_up)(162) +global_variable(numeric)(large_tie_line_one_up_light)(163) +global_variable(numeric)(large_tie_line_two_up)(164) +global_variable(numeric)(large_tie_line_two_up_light)(165) +global_variable(numeric)(large_tie_line_three_up)(166) +global_variable(numeric)(large_tie_line_three_up_light)(167) +global_variable(numeric)(large_tie_line_four_up)(168) +global_variable(numeric)(large_tie_line_four_up_light)(169) +global_variable(numeric)(large_tie_line_five_up)(170) +global_variable(numeric)(large_tie_line_five_up_light)(171) +global_variable(numeric)(large_tie_line_six_up)(172) +global_variable(numeric)(large_tie_line_six_up_light)(173) +global_variable(numeric)(large_tie_line_seven_up)(174) +global_variable(numeric)(large_tie_line_seven_up_light)(175) +global_variable(numeric)(large_tie_line_eight_up)(176) +global_variable(numeric)(large_tie_line_eight_up_light)(177) +global_variable(numeric)(large_tie_line_nine_up)(178) +global_variable(numeric)(large_tie_line_nine_up_light)(179) +global_variable(numeric)(large_tie_line_ten_up)(180) +global_variable(numeric)(large_tie_line_ten_up_light)(181) +global_variable(numeric)(large_tie_line_left_up)(182) +global_variable(numeric)(large_tie_line_left_up_light)(183) +global_variable(numeric)(large_tie_line_right_up)(184) +global_variable(numeric)(large_tie_line_right_up_light)(185) + +global_variable(numeric)(large_tie_space_one_up)(186) +global_variable(numeric)(large_tie_space_one_up_light)(187) +global_variable(numeric)(large_tie_space_two_up)(188) +global_variable(numeric)(large_tie_space_two_up_light)(189) +global_variable(numeric)(large_tie_space_three_up)(190) +global_variable(numeric)(large_tie_space_three_up_light)(191) +global_variable(numeric)(large_tie_space_four_up)(192) +global_variable(numeric)(large_tie_space_four_up_light)(193) +global_variable(numeric)(large_tie_space_five_up)(194) +global_variable(numeric)(large_tie_space_five_up_light)(195) +global_variable(numeric)(large_tie_space_six_up)(196) +global_variable(numeric)(large_tie_space_six_up_light)(197) +global_variable(numeric)(large_tie_space_seven_up)(198) +global_variable(numeric)(large_tie_space_seven_up_light)(199) +global_variable(numeric)(large_tie_space_eight_up)(200) +global_variable(numeric)(large_tie_space_eight_up_light)(201) +global_variable(numeric)(large_tie_space_nine_up)(202) +global_variable(numeric)(large_tie_space_nine_up_light)(203) +global_variable(numeric)(large_tie_space_ten_up)(204) +global_variable(numeric)(large_tie_space_ten_up_light)(205) +global_variable(numeric)(large_tie_space_left_up)(206) +global_variable(numeric)(large_tie_space_left_up_light)(207) +global_variable(numeric)(large_tie_space_right_up)(208) +global_variable(numeric)(large_tie_space_right_up_light)(209) + +global_variable(numeric)(large_tie_line_one_down)(210) +global_variable(numeric)(large_tie_line_one_down_light)(211) +global_variable(numeric)(large_tie_line_two_down)(212) +global_variable(numeric)(large_tie_line_two_down_light)(213) +global_variable(numeric)(large_tie_line_three_down)(214) +global_variable(numeric)(large_tie_line_three_down_light)(215) +global_variable(numeric)(large_tie_line_four_down)(216) +global_variable(numeric)(large_tie_line_four_down_light)(217) +global_variable(numeric)(large_tie_line_five_down)(218) +global_variable(numeric)(large_tie_line_five_down_light)(219) +global_variable(numeric)(large_tie_line_six_down)(220) +global_variable(numeric)(large_tie_line_six_down_light)(221) +global_variable(numeric)(large_tie_line_seven_down)(222) +global_variable(numeric)(large_tie_line_seven_down_light)(223) +global_variable(numeric)(large_tie_line_eight_down)(224) +global_variable(numeric)(large_tie_line_eight_down_light)(225) +global_variable(numeric)(large_tie_line_nine_down)(226) +global_variable(numeric)(large_tie_line_nine_down_light)(227) +global_variable(numeric)(large_tie_line_ten_down)(228) +global_variable(numeric)(large_tie_line_ten_down_light)(229) +global_variable(numeric)(large_tie_line_left_down)(230) +global_variable(numeric)(large_tie_line_left_down_light)(231) +global_variable(numeric)(large_tie_line_right_down)(232) +global_variable(numeric)(large_tie_line_right_down_light)(233) + +global_variable(numeric)(large_tie_space_one_down)(234) +global_variable(numeric)(large_tie_space_one_down_light)(235) +global_variable(numeric)(large_tie_space_two_down)(236) +global_variable(numeric)(large_tie_space_two_down_light)(237) +global_variable(numeric)(large_tie_space_three_down)(238) +global_variable(numeric)(large_tie_space_three_down_light)(239) +global_variable(numeric)(large_tie_space_four_down)(240) +global_variable(numeric)(large_tie_space_four_down_light)(241) +global_variable(numeric)(large_tie_space_five_down)(242) +global_variable(numeric)(large_tie_space_five_down_light)(243) +global_variable(numeric)(large_tie_space_six_down)(244) +global_variable(numeric)(large_tie_space_six_down_light)(245) +global_variable(numeric)(large_tie_space_seven_down)(246) +global_variable(numeric)(large_tie_space_seven_down_light)(247) +global_variable(numeric)(large_tie_space_eight_down)(248) +global_variable(numeric)(large_tie_space_eight_down_light)(249) +global_variable(numeric)(large_tie_space_nine_down)(250) +global_variable(numeric)(large_tie_space_nine_down_light)(251) +global_variable(numeric)(large_tie_space_ten_down)(252) +global_variable(numeric)(large_tie_space_ten_down_light)(253) +global_variable(numeric)(large_tie_space_left_down)(254) +global_variable(numeric)(large_tie_space_left_down_light)(255) +global_variable(numeric)(large_tie_space_right_down)(256) +global_variable(numeric)(large_tie_space_right_down_light)(257) + Index: gsharp/Fonts/ties.mf diff -u gsharp/Fonts/ties.mf:1.2 gsharp/Fonts/ties.mf:1.3 --- gsharp/Fonts/ties.mf:1.2 Thu Mar 25 07:53:16 2004 +++ gsharp/Fonts/ties.mf Fri Mar 26 09:25:35 2004 @@ -2,15 +2,13 @@ local_variable(numeric)(tie_thickness) (round(0.33 * staff_line_distance)); - local_variable(numeric)(top) - (round(0.33 * staff_line_distance)-1); - local_variable(numeric)(bot) - (round(0.33 * staff_line_distance)); local_variable(numeric)(small_tie_height) (round(0.5 * staff_line_distance)); save small_tie_up; def small_tie_up(expr width) = + local_variable(numeric)(top) + (round(0.33 * staff_line_distance)-1); fill ((0, top){right} .. (width, top-small_tie_height) -- (width-1, top-small_tie_height) .. @@ -24,20 +22,14 @@ save small_tie_up_light; def small_tie_up_light(expr width) = - fill ((0, top){right} .. - (width, top-small_tie_height) -- - (width-1, top-small_tie_height) .. - (0.5*width, top-tie_thickness) .. - (0, top-tie_thickness) .. - (-0.5*width, top-tie_thickness) .. - (-(width-1), top-small_tie_height) -- - (-width, top-small_tie_height) .. cycle) - scaled magnification; + small_tie_up(width); stripes(width, 2*tie_thickness); enddef; save small_tie_down; def small_tie_down(expr width) = + local_variable(numeric)(bot) + (round(0.33 * staff_line_distance)); fill ((0, -bot){right} .. (width, small_tie_height-bot) -- (width-1, small_tie_height-bot) .. @@ -51,15 +43,7 @@ save small_tie_down_light; def small_tie_down_light(expr width) = - fill ((0, -bot){right} .. - (width, small_tie_height-bot) -- - (width-1, small_tie_height-bot) .. - (0.5*width, tie_thickness-bot) .. - (0, tie_thickness-bot) .. - (-0.5*width, tie_thickness-bot) .. - (-(width-1), small_tie_height-bot) -- - (-width, small_tie_height-bot) .. cycle) - scaled magnification; + small_tie_down(width); stripes(width, 2*tie_thickness) enddef; @@ -190,5 +174,571 @@ begin_character(small_tie_eight_down_light) small_tie_down_light(round(2.67 * staff_line_distance)); end_character; + + local_variable(numeric)(large_tie_line_height) + (round(0.5 * staff_line_distance)); + + local_variable(numeric)(large_tie_space_height) + (round(0.5 * staff_line_distance)); + + save large_tie_up; + def large_tie_up(expr width_multiplier, height) = + local_variable(numeric)(top) + (round(0.33 * staff_line_distance)-1); + local_variable(numeric)(width) + (round(width_multiplier * staff_line_distance)); + fill ((0, top){right} .. + (width, top-height) -- + (width-1, top-height) .. + (0.3*width, top-tie_thickness) .. + (0, top-tie_thickness) .. + (-0.3*width, top-tie_thickness) .. + (-(width-1), top-height) -- + (-width, top-height) .. cycle) + scaled magnification; + enddef; + + save large_tie_up_light; + def large_tie_up_light(expr width, height) = + large_tie_up(width, height); + stripes(width, 2*height); + enddef; + + save large_tie_line_up; + def large_tie_line_up(expr width_multiplier) = + large_tie_up(width_multiplier, round(1.0 * staff_line_distance)); + enddef; + + save large_tie_line_up_light; + def large_tie_line_up_light(expr width_multiplier) = + large_tie_up_light(width_multiplier, round(1.0 * staff_line_distance)); + enddef; + + begin_character(large_tie_line_one_up) + large_tie_line_up(2.0); + end_character; + + begin_character(large_tie_line_one_up_light) + large_tie_line_up_light(2.0); + end_character; + + begin_character(large_tie_line_two_up) + large_tie_line_up(2.33); + end_character; + + begin_character(large_tie_line_two_up_light) + large_tie_line_up_light(2.33); + end_character; + + begin_character(large_tie_line_three_up) + large_tie_line_up(2.67); + end_character; + + begin_character(large_tie_line_three_up_light) + large_tie_line_up_light(2.67); + end_character; + + begin_character(large_tie_line_four_up) + large_tie_line_up(3.0); + end_character; + + begin_character(large_tie_line_four_up_light) + large_tie_line_up_light(3.0); + end_character; + + begin_character(large_tie_line_five_up) + large_tie_line_up(3.33); + end_character; + + begin_character(large_tie_line_five_up_light) + large_tie_line_up_light(3.33); + end_character; + + begin_character(large_tie_line_six_up) + large_tie_line_up(3.67); + end_character; + + begin_character(large_tie_line_six_up_light) + large_tie_line_up_light(3.67); + end_character; + + begin_character(large_tie_line_seven_up) + large_tie_line_up(4.0); + end_character; + + begin_character(large_tie_line_seven_up_light) + large_tie_line_up_light(4.0); + end_character; + + begin_character(large_tie_line_eight_up) + large_tie_line_up(4.33); + end_character; + + begin_character(large_tie_line_eight_up_light) + large_tie_line_up_light(4.33); + end_character; + + begin_character(large_tie_line_nine_up) + large_tie_line_up(4.67); + end_character; + + begin_character(large_tie_line_nine_up_light) + large_tie_line_up_light(4.67); + end_character; + + begin_character(large_tie_line_ten_up) + large_tie_line_up(5.0); + end_character; + + begin_character(large_tie_line_ten_up_light) + large_tie_line_up_light(5.0); + end_character; + + begin_character(large_tie_line_left_up) + large_tie_line_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_line_left_up_light) + large_tie_line_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + begin_character(large_tie_line_right_up) + large_tie_line_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_line_right_up_light) + large_tie_line_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + save large_tie_space_up; + def large_tie_space_up(expr width_multiplier) = + large_tie_up(width_multiplier, round(1.33 * staff_line_distance)); + enddef; + + save large_tie_space_up_light; + def large_tie_space_up_light(expr width_multiplier) = + large_tie_up_light(width_multiplier, round(1.33 * staff_line_distance)); + enddef; + + begin_character(large_tie_space_one_up) + large_tie_space_up(2.0); + end_character; + + begin_character(large_tie_space_one_up_light) + large_tie_space_up_light(2.0); + end_character; + + begin_character(large_tie_space_two_up) + large_tie_space_up(2.33); + end_character; + + begin_character(large_tie_space_two_up_light) + large_tie_space_up_light(2.33); + end_character; + + begin_character(large_tie_space_three_up) + large_tie_space_up(2.67); + end_character; + + begin_character(large_tie_space_three_up_light) + large_tie_space_up_light(2.67); + end_character; + + begin_character(large_tie_space_four_up) + large_tie_space_up(3.0); + end_character; + + begin_character(large_tie_space_four_up_light) + large_tie_space_up_light(3.0); + end_character; + + begin_character(large_tie_space_five_up) + large_tie_space_up(3.33); + end_character; + + begin_character(large_tie_space_five_up_light) + large_tie_space_up_light(3.33); + end_character; + + begin_character(large_tie_space_six_up) + large_tie_space_up(3.67); + end_character; + + begin_character(large_tie_space_six_up_light) + large_tie_space_up_light(3.67); + end_character; + + begin_character(large_tie_space_seven_up) + large_tie_space_up(4.0); + end_character; + + begin_character(large_tie_space_seven_up_light) + large_tie_space_up_light(4.0); + end_character; + + begin_character(large_tie_space_eight_up) + large_tie_space_up(4.33); + end_character; + + begin_character(large_tie_space_eight_up_light) + large_tie_space_up_light(4.33); + end_character; + + begin_character(large_tie_space_nine_up) + large_tie_space_up(4.67); + end_character; + + begin_character(large_tie_space_nine_up_light) + large_tie_space_up_light(4.67); + end_character; + + begin_character(large_tie_space_ten_up) + large_tie_space_up(5.0); + end_character; + + begin_character(large_tie_space_ten_up_light) + large_tie_space_up_light(5.0); + end_character; + + begin_character(large_tie_space_left_up) + large_tie_space_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_space_left_up_light) + large_tie_space_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + begin_character(large_tie_space_right_up) + large_tie_space_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_space_right_up_light) + large_tie_space_up(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + save large_tie_down; + def large_tie_down(expr width_multiplier, height) = + local_variable(numeric)(bot) + (round(0.33 * staff_line_distance)); + local_variable(numeric)(width) + (round(width_multiplier * staff_line_distance)); + fill ((0, -bot){right} .. + (width, height-bot) -- + (width-1, height-bot) .. + (0.3*width, tie_thickness-bot) .. + (0, tie_thickness-bot) .. + (-0.3*width, tie_thickness-bot) .. + (-(width-1), height-bot) -- + (-width, height-bot) .. cycle) + scaled magnification; + enddef; + + save large_tie_down_light; + def large_tie_down_light(expr width, height) = + large_tie_down(width, height); + stripes(width, 2*height); + enddef; + + save large_tie_line_down; + def large_tie_line_down(expr width_multiplier) = + large_tie_down(width_multiplier, round(1.0 * staff_line_distance)); + enddef; + + save large_tie_line_down_light; + def large_tie_line_down_light(expr width_multiplier) = + large_tie_down_light(width_multiplier, round(1.0 * staff_line_distance)); + enddef; + + begin_character(large_tie_line_one_down) + large_tie_line_down(2.0); + end_character; + + begin_character(large_tie_line_one_down_light) + large_tie_line_down_light(2.0); + end_character; + + begin_character(large_tie_line_two_down) + large_tie_line_down(2.33); + end_character; + + begin_character(large_tie_line_two_down_light) + large_tie_line_down_light(2.33); + end_character; + + begin_character(large_tie_line_three_down) + large_tie_line_down(2.67); + end_character; + + begin_character(large_tie_line_three_down_light) + large_tie_line_down_light(2.67); + end_character; + + begin_character(large_tie_line_four_down) + large_tie_line_down(3.0); + end_character; + + begin_character(large_tie_line_four_down_light) + large_tie_line_down_light(3.0); + end_character; + + begin_character(large_tie_line_five_down) + large_tie_line_down(3.33); + end_character; + + begin_character(large_tie_line_five_down_light) + large_tie_line_down_light(3.33); + end_character; + + begin_character(large_tie_line_six_down) + large_tie_line_down(3.67); + end_character; + + begin_character(large_tie_line_six_down_light) + large_tie_line_down_light(3.67); + end_character; + + begin_character(large_tie_line_seven_down) + large_tie_line_down(4.0); + end_character; + + begin_character(large_tie_line_seven_down_light) + large_tie_line_down_light(4.0); + end_character; + + begin_character(large_tie_line_eight_down) + large_tie_line_down(4.33); + end_character; + + begin_character(large_tie_line_eight_down_light) + large_tie_line_down_light(4.33); + end_character; + + begin_character(large_tie_line_nine_down) + large_tie_line_down(4.67); + end_character; + + begin_character(large_tie_line_nine_down_light) + large_tie_line_down_light(4.67); + end_character; + + begin_character(large_tie_line_ten_down) + large_tie_line_down(5.0); + end_character; + + begin_character(large_tie_line_ten_down_light) + large_tie_line_down_light(5.0); + end_character; + + begin_character(large_tie_line_left_down) + large_tie_line_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_line_left_down_light) + large_tie_line_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + begin_character(large_tie_line_right_down) + large_tie_line_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_line_right_down_light) + large_tie_line_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + save large_tie_space_down; + def large_tie_space_down(expr width_multiplier) = + large_tie_down(width_multiplier, round(1.33 * staff_line_distance)); + enddef; + + save large_tie_space_down_light; + def large_tie_space_down_light(expr width_multiplier) = + large_tie_down_light(width_multiplier, round(1.33 * staff_line_distance)); + enddef; + + begin_character(large_tie_space_one_down) + large_tie_space_down(2.0); + end_character; + + begin_character(large_tie_space_one_down_light) + large_tie_space_down_light(2.0); + end_character; + + begin_character(large_tie_space_two_down) + large_tie_space_down(2.33); + end_character; + + begin_character(large_tie_space_two_down_light) + large_tie_space_down_light(2.33); + end_character; + + begin_character(large_tie_space_three_down) + large_tie_space_down(2.67); + end_character; + + begin_character(large_tie_space_three_down_light) + large_tie_space_down_light(2.67); + end_character; + + begin_character(large_tie_space_four_down) + large_tie_space_down(3.0); + end_character; + + begin_character(large_tie_space_four_down_light) + large_tie_space_down_light(3.0); + end_character; + + begin_character(large_tie_space_five_down) + large_tie_space_down(3.33); + end_character; + + begin_character(large_tie_space_five_down_light) + large_tie_space_down_light(3.33); + end_character; + + begin_character(large_tie_space_six_down) + large_tie_space_down(3.67); + end_character; + + begin_character(large_tie_space_six_down_light) + large_tie_space_down_light(3.67); + end_character; + + begin_character(large_tie_space_seven_down) + large_tie_space_down(4.0); + end_character; + + begin_character(large_tie_space_seven_down_light) + large_tie_space_down_light(4.0); + end_character; + + begin_character(large_tie_space_eight_down) + large_tie_space_down(4.33); + end_character; + + begin_character(large_tie_space_eight_down_light) + large_tie_space_down_light(4.33); + end_character; + + begin_character(large_tie_space_nine_down) + large_tie_space_down(4.67); + end_character; + + begin_character(large_tie_space_nine_down_light) + large_tie_space_down_light(4.67); + end_character; + + begin_character(large_tie_space_ten_down) + large_tie_space_down(5.0); + end_character; + + begin_character(large_tie_space_ten_down_light) + large_tie_space_down_light(5.0); + end_character; + + begin_character(large_tie_space_left_down) + large_tie_space_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_space_left_down_light) + large_tie_space_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (6 * staff_line_distance, -2 * staff_line_distance) -- + (6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + begin_character(large_tie_space_right_down) + large_tie_space_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + end_character; + + begin_character(large_tie_space_right_down_light) + large_tie_space_down(5.0); + erase fill ((0, -2 * staff_line_distance) -- + (-6 * staff_line_distance, -2 * staff_line_distance) -- + (-6 * staff_line_distance, 2 * staff_line_distance) -- + (0, 2 * staff_line_distance) -- cycle) + scaled magnification; + stripes(6 * staff_line_distance, 2 * staff_line_distance); + end_character; + + endgroup;