&dA &dA &d@ BEGIN: Music conversion program &dA &d@ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ &dA &dA &d@ Program to expanded phase1 music data files into the &dA &d@ new phase2 file format. Program expands the data files &dA &d@ into the new format and makes an educated guess about &dA &d@ the placement of ties and beams. For tracks that have &dA &d@ text, program includes the facility to add text and &dA &d@ slurs. &dA &dA &d@ new rev 1.0 (11/14/92) &dA &d@ rev 1.1 (06/05/93) &dA &d@ rev 1.2 (01/07/94) (adding text feature from ENTER) &dA #define STEVE 0 #define CLAVE 1 #define AX 2 #define DUR 3 #define NTYPE 4 #define DOT 5 #define TRIP 6 #define TIE 7 #define BEAM 8 #define YPOS 9 #define STEM 10 #define BCODE 11 #define AXCODE 12 #define BACKTIE 13 #define TS_SIZE 13 *process A * str temp.12,out.100,date.8,yname.12 str ifile.100,ofile.100 str tout.100 str line.100,wkstr1.100,lineout.160,inline.100,line2.150,tempo.100 str measline.100 str note.4,strmeas.30,accs.3 str claves.7,numbers.10,tempmeas.12(40),text.16(40),num.3 str chord.5(6),tie.1,ttext.16 str hstring.20,nnames.10,wname.60,mname.30,tname.30 str backup1.7,backup2.7,clear.4 str tm.29(1000,2),lms.87 int f1,f2 int divpoint,csize int beamnum,stack(2,20,3),ntype,beamdata(16,4),bcount int lengmap(29),tempdur(40),ncount,ts(100,TS_SIZE) int key,divspm,divspq,tnum,tden,clef,cflag int measnum,notedur int sct,trflag,textflag int a,b,c,d,e,f,h,i,j,k,m,n,x,y,z int clave,gflag,stem,ax int type,cmptym,dot int setcnt int simtriple,drflag,tinqf,beamf int claveax(50),measax(50) int backtie,stemflag int edflag table FI(5000) int tcnt * * initialization * edflag = 0 claves = "CDEFGAB" numbers = "0123456789" accs = "#f" nnames = "zyxtseqhwb" backup1 = chr(27) // "&a12C" backup2 = chr(27) // "&a16C" clear = chr(27) // "U" wname = "" mname = "" backtie = 0 * The lms string contains data for lengmap (the allowable durations) lms = "001002003004006008009012016018024027032036048054064" lms = lms // "072096108128144192216256288384432512" * j = 1 loop for i = 1 to 29 lengmap(i) = int(lms{j,3}) j = j + 3 repeat * putc putc BEGIN: Music Conversion and Text Adding Program putc * putc Questions for this session .b46 .b46 .b46 putc putc (1) Allow dotted rests in compound time? (return = no) getc line line = trm(line) if line = "" drflag = 0 else drflag = 1 end * putc (2) Inquire about beaming in simple triple time? ... putc (return = no) getc line line = trm(line) if line = "" tinqf = 0 else tinqf = 1 end putc * stemflag = 0 putc (3) Fix stem direction? (1 = up; 2 = down; return = variable stems) getc stemflag putc * Q0: putc (4) Today's date? ... putc (mm/dd/yy, eg 07/04/90--fourth of July, 90) getc date date = trm(date) if len(date) <> 8 putc proper format? goto Q0 end putc * putc (5) Your name? (12 characters max) getc yname putc * putc Input file? ... getc .t13 line ifile = trm(line) putc putc Destination file? ... getc .t19 ofile ofile = trm(ofile) * open [1,1] ifile open [4,2] ofile putc Source = &dA~ifile &d@ Destination = &dA~ofile &d@ getf [1] getf [1] line .t7 out line = line // pad(6) line = line{1,6} line = trm(line) out = trm(out) &dA &d@ Use the new S-file format &dA &dA &d@ record 1: free &dA &d@ record 2: free &dA &d@ record 3: free &dA &d@ record 4: [date] [encoder] &dA &d@ record 5: WK#:[work number] MV#:[movement number] putf [4] putf [4] putf [4] putf [4] ~date .t10 ~yname putf [4] WK#:~line .t15 MV#:~out putc putc Number field one: ~line Number field two: ~out * get source getf [1] line2 line2 = line2 // pad(12) getf [1] line line = trm(line) if line <> "." and line <> "" line = line // pad(12) line2 = line2 // line end getf [1] line line = trm(line) if line <> "." and line <> "" line = line // pad(12) line2 = line2 // line end * get work name and movement name putc Work Title: ~wname ~backup1 ... getc .t13 wname putc Movement Title: ~mname ~backup2 ... getc .t17 mname putc Name of part: ... getc .t15 tname * getf [1] n m getf [1] a key divspm divspq getf [1] a b c d e if divspm > 999 putc Too many divisions per measure. Unable to continue. stop end &dA &dA &d@ get textflag (Brought over from ENTER 01/07/94) &dA putc Q3: putc Text flag (S, A, T, B, or just return) getc line line = trm(line) textflag = 0 if line <> "" if len(line) = 1 and "SATB" con line{1} textflag = 1 else goto Q3 end else loop for i = 1 to 40 text(i) = "" repeat end &dA &d@ record 6: [source] &dA &d@ record 7: [work title] &dA &d@ record 8: [movement title] &dA &d@ record 9: [name of part] &dA &d@ record 10: [mode] [movement type] [voice] putf [4] ~line2 putf [4] ~wname putf [4] ~mname putf [4] ~tname putf [4] ~d ~e ~line &dA &d@ write group membership (just one for starters) &dA &dA &d@ record 11: Group memberships: [name1] [name2] ... &dA &d@ recore 12: [name1]: part [x] or [number in group] &dA &d@ record 13: ... putf [4] Group memberships: data putf [4] data: part ~m of ~n &dA &d@ comment putf [4] & putf [4] Initial conversion from stage 1 to stage 2 putf [4] & lineout = "$ K:" // chs(key) lineout = lineout // " Q:" // chs(divspq) // " T:" putc Key: ~key sharps (- = flats) putc ~divspm divisions per measure; ... putc ~divspq divisions per quarter; if c = 0 clef = 4 else if c = 1 clef = 22 else if c = 11 clef = 15 else if c = 14 clef = 12 else if c = 2 clef = 4 else if c = 24 clef = 22 else clef = c end end end end end end &dA &dA &d@ check for correct clef &dA Q1: if clef = 4 out = "treble" else if clef = 15 out = "soprano" else if clef = 13 out = "alto" else if clef = 12 out = "tenor" else if clef = 23 out = "baritone" else if clef = 22 out = "bass" else out = chs(clef) end end end end end end putc putc Clef = ~out (type return or enter corrected clef code) getc line line = trm(line) if line <> "" clef = int(line) goto Q1 end &dA &dA &d@ check for correct time signature &dA tnum = a tden = b * Q2: putc Time Signature = ~tnum :~tden ... putc (return, or enter corrected numbers) getc line .t1 a b line = trm(line) if line <> "" tnum = a tden = b goto Q2 end lineout = lineout // chs(tnum) // "/" // chs(tden) // " C:" // chs(clef) * putc Transposition (return = none, 23 = up 5th, -23 = down 5th, etc.) i = 0 getc i if i <> 0 lineout = lineout // " X:" // chs(i) end putc Time word? (return = none) getc tempo tempo = trm(tempo) if tempo <> "" lineout = lineout // " D:" // tempo end putf [4] ~lineout if a = 1 and b = 1 tnum = 4 tden = 4 end &dA &dA &d@ compute cmptym, gflag and type &dA &dA &d@ (1) cmptym: flag for compound time signature &dA &d@ 0 = simple &dA &d@ 1 = compound (6/8 9/8 12/8 etc.) &dA &dA &d@ (2) gflag: flag for determining beaming groups &dA &dA &d@ for duple meter, gflag = (divisions per half note) &dA &d@ unless there are triplets, in which case gflag = divspq &dA &dA &d@ for simple triple time, gflag = 3 * (divisions per beat) &dA &d@ unless you have 3/2 or 3/4 time and there are eight or &dA &d@ more divisions per beat &dA &dA &d@ for compound time, gflag = 3 * (divisions per beat) &dA &dA &d@ (3) type: meter type &dA &dA &d@ for simple time with no triplets, type = 0 &dA &dA &d@ for simple time with triplets, type = 3 * (number of &dA &d@ divisions in the standard triplet) &dA &dA &d@ for compound time, type = 3 * (divisions per beat) &dA &d@ (same as gflag) &dA cmptym = 0 simtriple = 0 a = tnum / 3 if rem = 0 c = a / 2 if rem = 0 cmptym = 1 end c = a / 3 if rem = 0 cmptym = 1 end if cmptym = 0 simtriple = divspq * 4 / tden end gflag = divspq * 12 / tden if cmptym = 0 and tden < 8 and gflag > 16 gflag = divspq end else a = divspq / 3 if rem = 0 gflag = divspq else gflag = divspq * 2 end end * beamf = 0 if tinqf = 1 and simtriple > 0 &dA &d@ New addition to ENTER. We give the user a chance to say whether &dA &d@ the beaming tends to include more or less notes. QBF: putc Strong, Medium, Weak or Default beaming? (3,2,1 or 0) getc beamf if beamf > 3 or beamf < 0 goto QBF end end * getf [1] line tcnt = 1 tput [FI,tcnt] ~line if cmptym = 0 type = 0 a = divspq / 18 if rem = 0 type = 18 goto SA end a = divspq / 9 if rem = 0 type = 9 goto SA end a = divspq / 3 if rem = 0 type = 24 goto SA end else type = divspq * 12 / tden end SA: b = 0 c = 0 d = 0 e = 0 loop getf [1] line .t6 a line = line // pad(12) ++tcnt tput [FI,tcnt] ~line if line{1,3} = "END" if type = 24 and cmptym = 0 if b > c type = 3 else if c > d type = 6 else if d > e type = 12 end end end end goto SAA end if type = 24 and cmptym = 0 if line{1} <> "m" and line{1} <> "d" if a = 1 b = b + 1 end if a = 2 c = c + 1 end if a = 4 d = d + 1 end if a = 8 e = e + 1 end end end repeat SAA: putc type = ~type , cmptym = ~cmptym , gflag = ~gflag close [1] if chr(type) not_in [0,3,6,9,12,18,24] if cmptym = 0 or type <> 36 putc Warning: type ~type may not be supported in this program. putc Type return to continue getc if type > 24 a = type / 9 if rem = 0 type = 18 else type = 24 end end end end &dA &dA &d@ set up global accidentals for claveax &dA loop for i = 1 to 50 claveax(i) = 0 repeat h = key if h > 0 k = 4 loop for i = 1 to h loop for a = k to 50 step 7 claveax(a) = 2 repeat k = k + 4 if k > 7 k = k - 7 end repeat end if h < 0 h = 0 - h k = 7 loop for i = 1 to h loop for a = k to 50 step 7 claveax(a) = 3 repeat k = k - 4 if k < 1 k = k + 7 end repeat end * perform template &dA &dA &d@ Begin reading data in file &dA &d@ -------------------------- &dA tcnt = 1 tget [FI,tcnt] inline .t9 temp strmeas = temp ncount = 0 divpoint = 0 sct = 0 out = trm(inline) putc &dL~inline &d@ * B: notedur = 0 ++tcnt tget [FI,tcnt] inline .t1 note .t5 notedur inline = inline // pad(80) inline = inline{1,12} if note = "rest" and notedur = divspm putf [4] rest .t6w3 ~notedur ++tcnt tget [FI,tcnt] inline .t9 temp inline = inline // pad(80) inline = inline{1,12} if inline{1,3} <> "END" goto C end end * LP1: if inline{1,3} = "END" perform action putf [4] mheavy2 putf [4] /END putc END close [4] putc putc Destination is ~ofile putc stop end if inline{1,7} = "measure" perform action goto C else if inline{1} <> "d" ncount = ncount + 1 tempmeas(ncount) = inline tempdur(ncount) = notedur end ++tcnt tget [FI,tcnt] inline .t5 notedur .t9 temp inline = inline // pad(80) inline = inline{1,12} if inline{1} = " " notedur = 0 end end goto LP1 * C: strmeas = temp ncount = 0 divpoint = 0 sct = 0 out = trm(inline) putf [4] ~out putc &dL~inline &d@ measline = inline goto B &dA &d@ &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dA &d@ &dAº P R O C E D U R E S º&d@ &dA &d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 1. Procedure: decode º&d@ &dAº º&d@ &dAº Input: note (string of length 4) º&d@ &dAº º&d@ &dAº Output: clave (integer between 1 and 60, or 100) º&d@ &dAº ax (integer between 0 and 15) º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure decode int a,b if note = "rest" clave = 100 ax = 0 return end if claves con note{1} a = mpt else putc Decode Error 1 stop end ax = 0 loop for b = 2 to 4 if numbers con note{b} clave = mpt - 2 * 7 + a return end ax = ax << 2 if accs con note{b} ax = ior(ax,mpt+1) else putc Decode Error 3 stop end repeat putc Decode Error 2 stop return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 2. Procedure: action º&d@ &dAº º&d@ &dAº Input: tempmeas() all valid data lines in measure º&d@ &dAº tempdur() all valid durations in measure º&d@ &dAº ncount number of valid data lines in measure º&d@ &dAº º&d@ &dAº Output: action º&d@ &dAº º&d@ &dAº Purpose: process data in a measure º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure action int a,b,c,d,e,f,g,h,i,j,k,m,n,p,q,r,s,t,u,v,w,x,y,z str cc.1 if ncount = 0 return end loop for i = 1 to 100 loop for j = 1 to TS_SIZE ts(i,j) = 0 repeat repeat loop for i = 1 to 50 measax(i) = claveax(i) repeat &C examine n = 0 loop for i = 1 to ncount &dA &dA &d@ get notes for this division &dA lineout = tempmeas(i) tie = lineout{8} m = tempdur(i) csize = 1 ax = 0 chord(1) = tempmeas(i){1,4} loop while i + 1 <= ncount and tempmeas(i+1){1} = " " csize = csize + 1 i = i + 1 chord(csize) = tempmeas(i){1,5} repeat &dA &dA &d@ determine proper configuration of note durations &dA ACT4: a = n + 1 if tm(a,1) con ['x','y'] loop for c = 1 to 29 if m = lengmap(c) if lineout{1} = "r" cc = tm(a,1){c} if cc = "x" or (cc = "z" and drflag = 1) perform stamp (m,n) goto ACT2 end else if "xyz" con tm(a,1){c} perform stamp (m,n) goto ACT2 end end end repeat end if simtriple > 0 and n = simtriple if m = simtriple * 3 / 2 and lineout{1} <> "r" perform stamp (m,n) goto ACT2 end end if tm(a,2) not_con ['x','y'] putc Illegal division in measure; unable to proceed stop end f = 0 loop for c = 1 to 29 /* 29 = length of template e = 0 if lineout{1} = "r" cc = tm(a,2){c} if cc = "x" or (cc = "z" and drflag = 1) e = 1 end else if "xyz" con tm(a,2){c} e = 1 end end if e = 1 e = lengmap(c) if e = m if lineout{1} <> "r" perform stamp (m,n) goto ACT2 else if m <= simtriple or simtriple = 0 perform stamp (m,n) goto ACT2 end end end if e > m if f = 0 putc note is too short for division stop end goto ACT5 end d = m - e /* left over difference &dA &dA &d@ Threshold for not setting f = e &dA &d@ ------------------------------- &dA &d@ type &dA &d@ 0 3 6 9 12 18 24 &dA &d@ --------------------------- &dA &d@ cmptym 0 | 0 0 0 0 1 1 2 \ value of d &dA &d@ 1 | 0 0 0 0 0 1 0 / ---------- &dA if d > 2 f = e else if d = 2 if type <> 24 or cmptym <> 0 f = e end else if type < 12 f = e else if cmptym = 1 and (type = 12 or type = 24) f = e end end end end end repeat ACT5: n = n + f g = f note = chord(1){1,4} &dA &dA &d@ set clave, accidental and length &dA perform decode sct = sct + 1 ts(sct,CLAVE) = clave ts(sct,AX) = ax ts(sct,DUR) = g if clave < 100 ts(sct,TIE) = 1 end perform putchord m = m - f if m > 0 goto ACT4 end ACT2: repeat &dA &dA &d@ Now that the ts array is fully constructed, we can attempt &dA &d@ to sort out the printed accidentals. &dA &dA &d@ (1) determine which notes are tied backward &dA if backtie = 1 setcnt = 1 LL1: ts(setcnt,BACKTIE) = 1 if setcnt < sct and ts(setcnt+1,DUR) = 0 ++setcnt goto LL1 end end backtie = 0 loop for setcnt = 1 to sct if ts(setcnt,TIE) = 1 a = setcnt + 1 LL2: if a <= sct and ts(a,DUR) = 0 /* skip over rest of this chord ++a goto LL2 end loop for b = a to sct if ts(b,CLAVE) = ts(setcnt,CLAVE) if ts(b,AX) <> ts(setcnt,AX) putc Improper tie; conflicting accidentals stop end ts(b,BACKTIE) = 1 /* set BACKTIE, if you can b = sct end repeat end repeat &dA &dA &d@ (2) determine proper accidental &dA loop for setcnt = 1 to sct if ts(setcnt,BACKTIE) = 0 clave = ts(setcnt,CLAVE) ax = ts(setcnt,AX) perform axcode (clave,ax,setcnt) else ts(setcnt,AXCODE) = 1 end repeat &dA &dA &d@ determine note type and dot &dA &d@ (note: b set later in loop) &dA loop for setcnt = 1 to sct a = ts(setcnt,DUR) trflag = 0 ntype = 7 /* 7 = quarter note if a = 0 c = b else c = a b = a end a = divspq / 9 if rem = 0 d = a * 4 e = c / 27 if rem = 0 dot = 1 c = e * 18 else dot = 0 end a = c / 9 if rem = 0 c = a * 4 else trflag = 1 a = c / 3 if rem = 0 c = a * 2 else trflag = 2 end end goto ACT2a end a = divspq / 3 if rem = 0 d = a * 2 e = c / 9 if rem = 0 dot = 1 c = e * 6 else dot = 0 end a = c / 3 if rem = 0 c = a * 2 else trflag = 1 end goto ACT2a end e = c / 3 if rem = 0 dot = 1 c = e * 2 else dot = 0 end d = divspq &dA &dA &d@ result of above code &dA &d@ -------------------- &dA &d@ case 1: mod(divspq,9) = 0 triplets within triplets &dA &d@ d = 4/9 * divspq &dA &d@ dot stripped from duration &dA &d@ if mod(duration,9) = 0, c = 4/9 * duration (no triplet) &dA &d@ trflag = 0 &dA &d@ if mod(duration,3) = 0, c = 2/3 * duration (single triplet) &dA &d@ trflag = 1 &dA &d@ if mod(duration,3) <> 0, c = duration (double triplet) &dA &d@ trflag = 2 &dA &d@ case 2: mod(divspq,3) = 0 only simple triplets &dA &d@ d = 2/3 * divspq &dA &d@ dot stripped from duration &dA &d@ if mod(duration,3) = 0, c = 2/3 * duration (no triplet) &dA &d@ trflag = 0 &dA &d@ if mod(duration,3) <> 0, c = duration (simple triplet) &dA &d@ trflag = 1 &dA &d@ case 3: mod(divspq,3) <> 0 no triplets &dA &d@ d = divspq &dA &d@ dot stripped from duration trflag = 0 &dA ACT2a: if c < d c = c << 1 ntype = ntype - 1 goto ACT2a end ACT2b: if c > d c = c >> 1 ntype = ntype + 1 goto ACT2b end ts(setcnt,NTYPE) = ntype ts(setcnt,DOT) = dot ts(setcnt,TRIP) = trflag repeat &dA &dA &d@ recode pitches and enter text &dA p = 0 loop for setcnt = 1 to sct if ts(setcnt,CLAVE) = 100 tempmeas(setcnt) = "rest" else b = ts(setcnt,CLAVE) + 13 / 7 tempmeas(setcnt) = claves{rem+1} c = ts(setcnt,AX) JKL1: if c > 0 d = c & 3 tempmeas(setcnt) = tempmeas(setcnt) // accs{d-1} c = c >> 2 goto JKL1 end tempmeas(setcnt) = tempmeas(setcnt) // numbers{b} end if ts(setcnt,DUR) > 0 p = p + 1 end repeat &dA &dA &d@ Enter text (Brought over from ENTER 01/07/94) &dA if textflag > 0 JKL2: putc Enter text for ~p notes (use dot for rest) getc line q = 0 mpt = 0 &dA &dA &d@ Code added by Steve &dA #if STEVE if line = "" if edflag = 0 putc &dL~measline else putc &dN~measline end goto JKL2 end if line{1} = "@" putc &dE EDIT MODE. Type one of the following characters: putc ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ putc ^ = re-enter previous measure; putc P = view the Stage2 output for the previous measure; putc C = view the Stage1 note records in the current measure; putc X = exit this session (your work will be saved in destination file); putc return = return to normal mode now. getc line line = trm(line) JKL2a: if line con "^" tcnt = oldtcnt ocnt = 0 edflag = 1 return end if line con ['C','c'] putc &dL~measline loop for i = tcnt - ncount to tcnt - 1 tget [FI,i] line putc ~line repeat goto JKL2 end if line con ['P','p'] measint = int(strmeas) - 1 putc &dNmeasure ~measint loop for i = 1 to ocnt-1 tget [FO,i] line putc ~line repeat putc &dORe-enter measure ~measint ? &d@ ^ &dO= yes, &d@ return &dO= no.&d@ getc line line = trm(line) if line con "^" goto JKL2a else putc &dL~measline goto JKL2 end end if line con ['X','x'] return 1 end if line = "" putc &dOLeaving edit mode.&d@ putc &dL~measline goto JKL2 end end #endif &dA &dA &d@ End of code added by Steve &dA JKL3: text(q+1) = txt(line,[' ']) if text(q+1) <> "" q = q + 1 * check for slight encoding error if q > 1 if text(q){1} = "-" if text(q-1){..} not_in ['-',')'] text(q-1) = text(q-1) // "-" end end if text(q){1} = "_" if text(q-1){..} not_in ['_',')'] text(q-1) = text(q-1) // "_" end end end goto JKL3 end if q <> p putc Error, wrong number of entries goto JKL2 end end &dA &dA &d@ determine beams and location on staff &dA divpoint = 1 loop for setcnt = 1 to sct ts(setcnt,BEAM) = 0 divpoint = divpoint + ts(setcnt,DUR) perform beams if ts(setcnt,CLAVE) < 100 a = clef / 30 if rem < 10 /* G-clef b = 2 * (6 - rem) - 7 else if rem < 20 /* C-clef b = 2 * (6 - rem) + 17 else /* F-clef b = 2 * (6 - rem) + 41 end end if a > 0 if a = 1 b = b + 7 else b = b - 7 end end ts(setcnt,YPOS) = ts(setcnt,CLAVE) + b end repeat &dA &dA &d@ if text present, make adjustments to beam distribution &dA &d@ (Brought over from ENTER 01/07/94) &dA if textflag = 1 if sct > 1 d = 1 loop for setcnt = 2 to sct EA: if ts(setcnt,DUR) = 0 if setcnt = sct goto EB end setcnt = setcnt + 1 goto EA end d = d + 1 if ts(setcnt,BEAM) = 2 if text(d) in ['_','-'] if text(d-1) not_in ['_','-'] c = setcnt - 1 EC: if ts(c,DUR) = 0 c = c - 1 goto EC end if ts(c,NTYPE) < 7 ts(setcnt,BEAM) = 3 ts(c,BEAM) = 2 end end end end if ts(setcnt,BEAM) = 1 if d <= sct - 2 if text(d+1){1} in ['_','-'] if text(d+2){1} not_in ['_','-'] c = setcnt + 1 ED: if c <= sct and ts(c,DUR) = 0 c = c + 1 goto ED end if c <= sct and ts(c,NTYPE) < 7 ts(setcnt,BEAM) = 3 ts(c,BEAM) = 1 end end end end end repeat end EB: end &dA &dA &d@ determine stem direction &dA loop for setcnt = 1 to sct if ts(setcnt,CLAVE) < 100 d = ts(setcnt,YPOS) f = 1 if ts(setcnt,BEAM) = 2 loop for c = setcnt + 1 to sct d = d + ts(c,YPOS) f = f + 1 if ts(c,BEAM) = 1 goto GG end repeat else c = setcnt end GG: b = c + 1 if b <= sct if ts(b,CLAVE) < 100 and ts(b,DUR) = 0 f = f + 1 c = b d = d + ts(c,YPOS) goto GG end end d = d * 8 / f if d > 196 stem = 2 else stem = 1 end loop for b = setcnt to c ts(b,STEM) = stem repeat setcnt = c end repeat &dA &dA &d@ orient chords with highest note first &dA loop for setcnt = 1 to sct if ts(setcnt,DUR) = 0 x = setcnt - 1 y = x loop while ts(y+1,DUR) = 0 and y + 1 <= sct y = y + 1 repeat b = 100 if y > x /* this should be true loop for u = x to y e = 100 loop for v = x to y a = ts(v,CLAVE) d = b - a if d > 0 and d < e e = d c = v end repeat &dA &dA &d@ c = index to highest remaining note &dA &d@ e = difference between previous highest note and this note &dA &d@ b = height of this new note (set below) &dA b = ts(c,CLAVE) loop for w = 1 to 2 z = ts(u,w) ts(u,w) = ts(c,w) ts(c,w) = z repeat ttext = tempmeas(u) tempmeas(u) = tempmeas(c) tempmeas(c) = ttext z = ts(u,YPOS) ts(u,YPOS) = ts(c,YPOS) ts(c,YPOS) = z repeat end setcnt = y ts(x,STEM) = ts(x,STEM) + 2 end repeat &dA &dA &d@ Construct beam codes &dA loop for setcnt = 1 to sct if ts(setcnt,CLAVE) < 100 b = setcnt if ts(setcnt,STEM) > 2 loop while b < sct and ts(b+1,DUR) = 0 b = b + 1 repeat end ntype = ts(setcnt,NTYPE) if ntype < 7 if ts(setcnt,BEAM) > 0 s = ts(setcnt,BEAM) if s = 2 bcount = 1 else bcount = bcount + 1 end beamdata(bcount,2) = setcnt beamdata(bcount,3) = ntype beamdata(bcount,4) = s if s = 1 perform setbeam end end end setcnt = b end repeat t = 0 loop for setcnt = 1 to sct if ts(setcnt,DUR) > 0 t = t + ts(setcnt,DUR) end if t = divspm if ts(setcnt,TIE) = 1 backtie = 1 end end repeat * if t = divspm measnum = int(strmeas) measnum = measnum + 1 else putc Wrong number of divisions per measure at measure ... putc ~measnum stop end * * display array &A loop for a = 1 to sct &A loop for b = 1 to 10 &A putc .w5 ~ts(a,b) ... &A repeat &A putc ~ts(a,BCODE) &A repeat &dA &dA &d@ print music, calling process &dA perform process return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 3. Procedure: stamp º&d@ &dAº º&d@ &dAº Input: m = number of divisions for this note º&d@ &dAº n = cumulative divisions before this note º&d@ &dAº sct = counter for set parameters º&d@ &dAº chord() = notes in a chord (one or more) º&d@ &dAº csize = number of notes in chord (1 = single note) º&d@ &dAº º&d@ &dAº Output: determines parameters 1,2,3 and 7 for ts(sct) º&d@ &dAº sct is advanced º&d@ &dAº n = n + m º&d@ &dAº m set to zero º&d@ &dAº º&d@ &dAº Purpose: write parameters to set º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure stamp (m,n) int m,n getvalue m getvalue n n = n + m note = chord(1){1,4} sct = sct + 1 perform decode ts(sct,CLAVE) = clave ts(sct,AX) = ax ts(sct,DUR) = m if tie = "-" ts(sct,TIE) = 1 else ts(sct,TIE) = 0 end perform putchord m = 0 passback m passback n return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 4. Procedure: putchord º&d@ &dAº º&d@ &dAº Input: chord() = notes in chord º&d@ &dAº csize = number of note in chord º&d@ &dAº sct = counter for set parameters º&d@ &dAº º&d@ &dAº Output: determines parameters 1,2,3 and 7 for ts(sct) º&d@ &dAº sct is advanced º&d@ &dAº º&d@ &dAº Purpose: write parameters to set for chord º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure putchord int i,j if csize > 1 j = ts(sct,TIE) /* save tie flag loop for i = 2 to csize note = chord(i){2,4} sct = sct + 1 perform decode ts(sct,CLAVE) = clave ts(sct,AX) = ax ts(sct,DUR) = 0 ts(sct,TIE) = j /* write tie flag repeat end return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 5. Procedure: beams º&d@ &dAº º&d@ &dAº Input: divpoint º&d@ &dAº divspq º&d@ &dAº beamf = special beaming flag º&d@ &dAº gflag = maximum nubmer of divisions in a beam group º&d@ &dAº type = meter type º&d@ &dAº ts(setcnt,.) note parameters for one element of set º&d@ &dAº text(setcnt) text for this note º&d@ &dAº º&d@ &dAº º&d@ &dAº Output: ts(.,BEAM) set to beam code (1,3,or 2) for a º&d@ &dAº group of elements in set. º&d@ &dAº º&d@ &dAº Operation: The procedure processes one element of ts() per º&d@ &dAº call. If a call is made with a note which is an º&d@ &dAº eighth or smaller and is not a extra chord tone, º&d@ &dAº an entry in stack is generated. Conditions are º&d@ &dAº then checked to determine if the stack should º&d@ &dAº should be processed (spf=stack process flag). º&d@ &dAº The array "stack" contains all necessary º&d@ &dAº for processing (i.e. processing does not refer º&d@ &dAº directly to the current value of setcnt). º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure beams int stp,spf,gnum int c,e,f,g,h,i,j,k,m &dA &dA &d@ I. add note to stack if note type eighth or less, and not chord &dA if ts(setcnt,NTYPE) < 7 and ts(setcnt,CLAVE) < 100 if ts(setcnt,DUR) > 0 e = divpoint - ts(setcnt,DUR) if stp = 0 gnum = (e - 1) / gflag + 1 end stp = stp + 1 stack(1,stp,1) = e stack(1,stp,2) = ts(setcnt,DUR) stack(1,stp,3) = setcnt e = ts(setcnt,NTYPE) + 1 hstring = hstring // numbers{e} end end &dA &dA &d@ II. set stack process flag &dA spf = 0 if gnum > 0 * if beyond group (beyond measure, if beamf = 3) if divpoint > gnum * gflag if beamf < 3 spf = 1 else if divpoint > divspq * 12 / tden spf = 1 end end end * if quarter or larger if ts(setcnt,NTYPE) > 6 spf = 1 end * if rest if ts(setcnt,CLAVE) = 100 spf = 1 end * if next note has a new syllable (reactivated 01/07/94) if setcnt < sct ttext = text(setcnt+1) if ttext <> "" if ttext{1} in ['A'..'Z','a'..'z','('] spf = 1 end end end * if weak beaming (in simple triple time) if beamf = 1 e = divspq * 4 / tden /* number of divisions in beat c = divpoint - 1 / e if rem = 0 spf = 1 end end end &dA &dA &d@ III. if spf flag is set, process stack &dA if spf = 1 if stp = 1 goto BCL end &dA &dA &d@ IV. if gflag = 2 * divspq process normally &dA if gflag = 2 * divspq if stp > 2 if hstring not_con ['1'..'5'] /* beam multiple h = 1 /* eighth notes beamnum = stp perform Bbeam (h) goto BCL end end g = ((gnum - 1) * gflag + 1) + divspq goto KK end &dA &dA &d@ V. if beamf = 3, beam all notes together &dA if beamf = 3 h = 1 beamnum = stp perform Bbeam (h) goto BCL end &dA &dA &d@ VI. if beamf = 2, divide beam if there are many notes &dA if beamf = 2 e = 0 loop for c = 1 to stp e = e + stack(1,c,2) repeat if e <= (divspq * 2 * (stp - 2) / tden) g = divspq * 4 / tden + 1 /* divs per beat + 1 * if stack(1,stp,1) < g /* all in first beat h = 1 beamnum = stp perform Bbeam (h) goto BCL end if stack(1,1,1) < g /* some in first beat i = 2 loop while stack(1,i,1) < g i = i + 1 repeat j = 1 loop for k = i to stp loop for m = 1 to 3 stack(2,j,m) = stack(1,k,m) repeat j = j + 1 repeat beamnum = i - 1 h = 1 perform Bbeam (h) stp = stp - (i - 1) loop for k = 1 to stp loop for m = 1 to 3 stack(1,k,m) = stack(2,k,m) repeat repeat end g = g + (divspq * 4 / tden) /* divide remaining part goto KK end end &dA &dA &d@ V. Else beam by groups &dA if hstring con ['1'..'5'] if type = 3 if gflag = 6 f = (gnum - 1) * gflag + 1 g = gflag >> 1 g = g + f goto KK end end else h = 1 beamnum = stp perform Bbeam (h) goto BCL end &dA &dA &d@ split stack and process &dA KK: e = stack(1,stp,1) + stack(1,stp,2) if e > g and stack(1,1,1) < g i = 2 loop while stack(1,i,1) < g i = i + 1 repeat j = 1 loop for k = i to stp loop for m = 1 to 3 stack(2,j,m) = stack(1,k,m) repeat j = j + 1 repeat beamnum = i - 1 h = 1 perform Bbeam (h) beamnum = stp - (i - 1) h = 2 perform Bbeam (h) else h = 1 beamnum = stp perform Bbeam (h) end &dA &dA &d@ VI. Clear flags &dA BCL: stp = 0 gnum = 0 hstring = "" end return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 6. Procedure: Bbeam º&d@ &dAº º&d@ &dAº Input: stack(.,.,3) beam processing data º&d@ &dAº beamnum = second dimension fo stack º&d@ &dAº h = first stack parameter (1 or 2) º&d@ &dAº º&d@ &dAº Output: ts(.,BEAM) set to beam code (1,3,or 2) º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure Bbeam (h) int e,f,g,h getvalue h loop for e = 1 to beamnum f = 0 if e < beamnum f = f | 2 end if e > 1 f = f | 1 end g = stack(h,e,3) ts(g,BEAM) = f repeat return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 7. Procedure: process º&d@ &dAº º&d@ &dAº Input: ts() array of integer parameters º&d@ &dAº tempmeas() adjusted data lines for this measure º&d@ &dAº sct size of sct º&d@ &dAº text() array of text lines º&d@ &dAº º&d@ &dAº Output: records to output file º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure process int a,e,g,i e = 0 loop for a = 1 to sct g = ts(a,DUR) if g < 10 num = " " // chs(g) else if g < 100 num = " " // chs(g) else num = chs(g) end end &dA &d@ construct pitch, duration, tie flag, note_name, dot, triple_flag: &dA &d@ out{1,22} if g > 0 out = tempmeas(a) // pad(5) out = out // num // pad(22) i = ts(a,NTYPE) if ts(a,TIE) = 1 out{9} = "-" end out{17} = nnames{i} if ts(a,DOT) = 1 out{18} = "." end out{19} = " n#f SF x &"{ts(a,AXCODE)} if ts(a,TRIP) > 0 out{20} = "3" end tout = out else out = tout out{1,5} = " " // tempmeas(a) // pad(5) out{19} = " n#f SF x &"{ts(a,AXCODE)} end * construct stem direction: out{23..25} if ts(a,STEM) > 0 testfor stemflag = 1 out = out // "u" else (<) if bit(0,ts(a,STEM)) = 1 out = out // "u" else out = out // "d" end else (>) out = out // "d" end else out = out // " " end out = out // pad(25) * construct beam code: out{26..31} g = ts(a,BCODE) if g = 0 wkstr1 = "000000" else wkstr1 = chs(g) end loop for g = 1 to 6 if wkstr1{g} = "0" wkstr1{g} = " " end if wkstr1{g} = "1" wkstr1{g} = "=" end if wkstr1{g} = "2" wkstr1{g} = "[" end if wkstr1{g} = "3" wkstr1{g} = "]" end if wkstr1{g} = "4" wkstr1{g} = "/" end if wkstr1{g} = "5" wkstr1{g} = "\" end repeat out = out // wkstr1 &dA &dA &d@ construct other notation field (ties, slurs): out{32..43} &dA if ts(a,TIE) > 0 out = out // "-" end if textflag = 1 /* (Brought over from ENTER 01/07/94) e = e + 1 if text(e) con "(" or text(e) con ")" out = out // text(e){mpt} wkstr1 = text(e) // " " wkstr1 = wkstr1{1,mpt-1} // wkstr1{mpt+1..} text(e) = trm(wkstr1) end end out = out // pad(43) &dA &dA &d@ construct text: out{44..} (Brought over from ENTER 01/07/94) &dA if textflag = 1 if ts(a,DUR) > 0 if text(e) <> "." out = out // text(e) end end end out = trm(out) putf [4] ~out repeat sct = 0 return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 8. Procedure: setbeam º&d@ &dAº º&d@ &dAº Input: beamdata(.,4) data for setting beams º&d@ &dAº bcount number of elements in beamdata º&d@ &dAº º&d@ &dAº Output: ts(.,BCODE) is set for notes under this beam º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure setbeam str ira.6(40) int j,k,n,q * &B putc SETBEAM called &B displat beamdata array &B loop for j = 1 to bcount &B loop for k = 1 to 4 &B putc ~beamdata(j,k) ... &B repeat &B putc &B repeat &B ira(1) = "200000" /* becomes [ loop for j = 2 to bcount ira(j) = "100000" /* becomes = repeat ira(bcount) = "300000" /* becomes ] n = 1 loop for q = 1 to 5 n = n + 1 ntype = 6 - q loop for j = 1 to bcount - 1 if beamdata(j,3) <= ntype if beamdata(j+1,3) <= ntype * j and j+1 are connected if ira(j){n} = "3" ira(j){n} = "1" else ira(j){n} = "2" end ira(j+1){n} = "3" goto BEAM1 end if beamdata(j+1,3) > beamdata(j,3) if j = 1 * forward hook on j ira(j){n} = "4" else if beamdata(j-1,3) > beamdata(j+1,3) * forward hook on j ira(j){n} = "4" end end end end if beamdata(j+1,3) <= ntype if beamdata(j+1,3) < beamdata(j,3) if j = bcount - 1 * backward hook on j+1 ira(j+1){n} = "5" else if beamdata(j+2,3) >= beamdata(j,3) * backward hook on j+1 ira(j+1){n} = "5" end end end end BEAM1: repeat repeat loop for j = 1 to bcount k = beamdata(j,2) ts(k,BCODE) = int(ira(j)) repeat return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 9. Procedure: axcode º&d@ &dAº º&d@ &dAº Input: clave clave number º&d@ &dAº ax absolute accidental º&d@ &dAº sct array counter º&d@ &dAº º&d@ &dAº Output: ts(sct,AXCODE) (number from 1 to 15) º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure axcode (clave,ax,sct) int clave,ax,sct int j,k getvalue clave,ax,sct if clave < 100 k = ax if ax = measax(clave) k = 0 else if ax = 0 k = 1 else if measax(clave) > 7 and ax < 4 k = k | 4 /* natural-sharp or natural-flat end end measax(clave) = ax end ts(sct,AXCODE) = k + 1 else ts(sct,AXCODE) = 1 end return &dAÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»&d@ &dAº 10. Procedure: template º&d@ &dAº º&d@ &dAº Input: type 0, 3, 6, 9, 12, 18, or 24 º&d@ &dAº cmptym 0 or 1 º&d@ &dAº º&d@ &dAº Output: tm(1000,2) note value template º&d@ &dAÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ&d@ procedure template label TL(36) int i,j,k if type = 0 goto TL0 end goto TL(type) &dA &d@ Duration templates for various meters: tm(x,2) &dA &dA &dE &dA &dE I. Simple duple (with or without triplets) &dA &dE TL0: &dA &d@ &dE &dA &d@ &dE 1) type = 0 (no triplets) &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . y y y y y y y " tm(1,2) = "xxyx x x x x x x x" tm(2,1) = " y . . . . . . . ." tm(2,2) = "x.y. . . . . . . ." tm(3,1) = " . y . . . . . . ." tm(3,2) = "xx .y. . . . . . ." tm(4,1) = " . . . . . . . . ." tm(4,2) = "x. . . . . . . . ." tm(5,1) = " . . y . . . . . ." tm(5,2) = "xxyx . y. . . . . ." tm(6,1) = " y . . . . . . . ." tm(6,2) = "x.y. . . . . . . ." tm(7,1) = " . . . . . . . . ." tm(7,2) = "xx . . . . . . . ." tm(8,1) = " . . . . . . . . ." tm(8,2) = "x. . . . . . . . ." tm(9,1) = " . .y y . . . . ." tm(9,2) = "xxyx x . y . . . . ." tm(10,1) = " y . . . . . . . ." tm(10,2) = "x.y. . . . . . . ." tm(11,1) = " . y . . . . . . ." tm(11,2) = "xx .y. . . . . . ." tm(12,1) = " . . . . . . . . ." tm(12,2) = "x. . . . . . . . ." tm(13,1) = " . . . . . . . . ." tm(13,2) = "xxyx . . . . . . ." tm(14,1) = " y . . . . . . . ." tm(14,2) = "x.y. . . . . . . ." tm(15,1) = " . . . . . . . . ." tm(15,2) = "xx . . . . . . . ." tm(16,1) = " . . . . . . . . ." tm(16,2) = "x. . . . . . . . ." loop for i = 1 to 16 loop for j = 1 to 2 tm(i+16,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842648422 tm(17,1) = " . y y y . . . ." tm(17,2) = "xxyx x x . y . . . ." tm(25,1) = " . .y . . . . . ." tm(25,2) = "xxyx x . . . . . ." loop for i = 1 to 32 loop for j = 1 to 2 tm(i+32,j) = tm(i,j) repeat repeat tm(33,1) = " . y y y y . . ." tm(33,2) = "xxyx x x x y . . ." tm(49,1) = " . y y . . . . ." tm(49,2) = "xxyx x x . . . . ." loop for i = 1 to 64 loop for j = 1 to 2 tm(i+64,j) = tm(i,j) repeat repeat tm(65,1) = " . y y y y . y . ." tm(65,2) = "xxyx x x x x . y . ." tm(97,1) = " . y y y . . . . ." tm(97,2) = "xxxx x x x . . . ." loop for i = 1 to 128 loop for j = 1 to 2 tm(i+128,j) = tm(i,j) repeat repeat tm(129,1) = " . y y y y . y . y ." tm(129,2) = "xxyx x x x x x . y ." tm(193,1) = " . y y y . y . . . ." tm(193,2) = "xxxx x x x x . . ." loop for i = 1 to 744 loop for j = 1 to 2 tm(i+256,j) = tm(i,j) repeat repeat return &dA &d@ &dE &dA &d@ &dE 2) type = 3 (triplets at lowest level) &dA &d@ &dE TL(3): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . y y y y y " tm(1,2) = "xyx x yx x x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = "xy . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = "x . . . . . . . " tm(4,1) = " y . . . . . . " tm(4,2) = "xyx . y. . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = "xy . . . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = "x . . . . . . . " tm(7,1) = " . y . . . . . " tm(7,2) = "xyx x . y. . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = "xy . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = "x . . . . . . . " tm(10,1) = " . . . . . . . " tm(10,2) = "xyx . . . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = "xy . . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = "x . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . y . . . . " tm(13,2) = "xyx x yx . y. . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = "xyx x . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . y y . . . " tm(25,2) = "xyx x yx x . y. . . " tm(37,1) = " . . . . . . . " tm(37,2) = "xyx x yx . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . y y y . . " tm(49,2) = "xyx x yx x x . y. . " tm(73,1) = " . . y . . . . " tm(73,2) = "xyx x yx x . . . . " loop for i = 1 to 96 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat tm(97,1) = " . . y y y y " tm(97,2) = "xyx x yx x x x y " tm(145,1) = " . . y y . . . " tm(145,2) = "xyx xyx x x . . . " loop for i = 1 to 808 loop for j = 1 to 2 tm(i+192,j) = tm(i,j) repeat repeat return else &dA &d@ case: type = 3, cmptym = 1 &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . . . . " tm(1,2) = "xxz x x x x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = "xy . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = "x . . . . . . . " tm(4,1) = " x . . . . . . " tm(4,2) = "xxz . . . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = "xy . . . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = "x . . . . . . . " tm(7,1) = " . y . . . . . " tm(7,2) = "xxz x . . . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = "xy . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = "x . . . . . . . " tm(10,1) = " . . . . . . . " tm(10,2) = "xxz . . . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = "xy . . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = "x . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . . . . . . " tm(13,2) = "xxz x x . . . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = "xxz x . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . . y . . . " tm(25,2) = "xxz x yx x . . . . " tm(37,1) = " . . . . . . . " tm(37,2) = "xxz x yx . . . . . " loop for i = 1 to 952 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 3) type = 6 (triplets which can be divided in 2 or &dA &d@ &dE triplets and regulars of the same type) &dA &d@ &dE TL(6): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . y y y y y " tm(1,2) = "xxxyx yx x x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = "x . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = "xx.y. . . . . . . " tm(4,1) = " . y . . . . . . " tm(4,2) = "x x . y. . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = "xx. . . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = "x . . . . . . . . " tm(7,1) = " . . y . . . . . " tm(7,2) = "xxxyx . y. . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = "x . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = "xx.y. . . . . . . " tm(10,1) = " . . . . . . . . " tm(10,2) = "x x . . . . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = "xx. . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = "x . . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . . y . . . . " tm(13,2) = "xxxyx yx . y. . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = "xxxyx . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . . y. y . . . " tm(25,2) = "xxxyx yx x . y. . . " tm(37,1) = " . . . . . . . . " tm(37,2) = "xxxyx yx . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . y. y. y . . " tm(49,2) = "xxxyx yx x x . y. . " tm(73,1) = " . . . y. . . . . " tm(73,2) = "xxxyx yx x . . . . " loop for i = 1 to 96 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat tm(97,1) = " . . . y y. y. y . " tm(97,2) = "xxxyx yx x x x . y. " tm(145,1) = " . . . y y. . . . " tm(145,2) = "xxxyx yx x x . . . " loop for i = 1 to 808 loop for j = 1 to 2 tm(i+192,j) = tm(i,j) repeat repeat return else &dA &d@ &dE &dA &d@ &dE case: type = 6, cmptym = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . . . . . " tm(1,2) = "xxyxz yx x x x x x " tm(2,1) = " y. . . . . . . . " tm(2,2) = "x . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = "xxyy. . . . . . . " tm(4,1) = " . . . . . . . . " tm(4,2) = "xyy . . . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = "xx. . . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = "x . . . . . . . . " tm(7,1) = " . . y . . . . . " tm(7,2) = "xxyxz . . . . . . " tm(8,1) = " y. . . . . . . . " tm(8,2) = "x . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = "xxyy. . . . . . . " tm(10,1) = " . . . . . . . . " tm(10,2) = "xyy . . . . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = "xx. . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = "x . . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . . . . . . . " tm(13,2) = "xxyxz yx . . . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = "xxyxz . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . . . . . . . " tm(25,2) = "xxyxz yx x . y. . . " tm(37,1) = " . . . . . . . . " tm(37,2) = "xxyxz yx . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . . . . . . " tm(49,2) = "xxyxz yx x x . y. . " tm(73,1) = " . . . . . . . . " tm(73,2) = "xxyxz yx x . . . . " loop for i = 1 to 904 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 4) type = 9 (triplets which can be divided in 3) &dA &d@ &dE TL(9): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . y y y y y " tm(1,2) = "x x y x. x x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = "x . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = "x . . . . . . . . " tm(4,1) = " . . . . . . . . " tm(4,2) = "x x y . . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = "x . . . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = "x . . . . . . . . " tm(7,1) = " . . . . . . . . " tm(7,2) = "x x . . . . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = "x . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = "x . . . . . . . . " tm(10,1) = " . . . y . . . . " tm(10,2) = "x x y x . y . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = "x . . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = "x . . . . . . . . " tm(13,1) = " . . . . . . . . " tm(13,2) = "x x y . . . . . . " tm(14,1) = " . . . . . . . . " tm(14,2) = "x . . . . . . . . " tm(15,1) = " . . . . . . . . " tm(15,2) = "x . . . . . . . . " tm(16,1) = " . . . . . . . . " tm(16,2) = "x x . . . . . . . " tm(17,1) = " . . . . . . . . " tm(17,2) = "x . . . . . . . . " tm(18,1) = " . . . . . . . . " tm(18,2) = "x . . . . . . . . " loop for i = 1 to 18 loop for j = 1 to 2 tm(i+18,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(19,1) = " . . . . y . . . " tm(19,2) = "x x y x x . y . . . " tm(28,1) = " . . . . . . . . " tm(28,2) = "x x y x . . . . . " loop for i = 1 to 36 loop for j = 1 to 2 tm(i+36,j) = tm(i,j) repeat repeat tm(37,1) = " . . . . y . y . . " tm(37,2) = "x x y x x x . y . . " tm(55,1) = " . . . . . . . . " tm(55,2) = "x x y x x . . . . " loop for i = 1 to 72 loop for j = 1 to 2 tm(i+72,j) = tm(i,j) repeat repeat tm(73,1) = " . . . . y . y . y . " tm(73,2) = "x x y x x x x . y . " tm(109,1) = " . . . . y . . . . " tm(109,2) = "x x y x x x . . . " loop for i = 1 to 144 loop for j = 1 to 2 tm(i+144,j) = tm(i,j) repeat repeat tm(145,1) = " . . . . y . y . y . y " tm(145,2) = "x x y x x x x x . y " tm(217,1) = " . . . . y . y . . . " tm(217,2) = "x x y x x x x . . " loop for i = 1 to 712 loop for j = 1 to 2 tm(i+288,j) = tm(i,j) repeat repeat return else &dA &d@ &dE &dA &d@ &dE case: type = 9, cmptym = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . . . . . " tm(1,2) = "x x x z. x x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = "x . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = "x . . . . . . . . " tm(4,1) = " . . . . . . . . " tm(4,2) = "x x y . . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = "x . . . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = "x . . . . . . . . " tm(7,1) = " . . . . . . . . " tm(7,2) = "x x . . . . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = "x . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = "x . . . . . . . . " tm(10,1) = " . . . y . . . . " tm(10,2) = "x x x z . . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = "x . . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = "x . . . . . . . . " tm(13,1) = " . . . . . . . . " tm(13,2) = "x x y . . . . . . " tm(14,1) = " . . . . . . . . " tm(14,2) = "x . . . . . . . . " tm(15,1) = " . . . . . . . . " tm(15,2) = "x . . . . . . . . " tm(16,1) = " . . . . . . . . " tm(16,2) = "x x . . . . . . . " tm(17,1) = " . . . . . . . . " tm(17,2) = "x . . . . . . . . " tm(18,1) = " . . . . . . . . " tm(18,2) = "x . . . . . . . . " loop for i = 1 to 18 loop for j = 1 to 2 tm(i+18,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(19,1) = " . . . . . . . . " tm(19,2) = "x x x z x . . . . " tm(28,1) = " . . . . . . . . " tm(28,2) = "x x x z . . . . . " loop for i = 1 to 36 loop for j = 1 to 2 tm(i+36,j) = tm(i,j) repeat repeat tm(37,1) = " . . . . . y . . " tm(37,2) = "x x x z x x . . . " tm(55,1) = " . . . . . . . . " tm(55,2) = "x x x z x . . . . " loop for i = 1 to 928 loop for j = 1 to 2 tm(i+72,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 5) type = 12 (triplets which can be divided in 2 and &dA &d@ &dE regulars of half the triplet type) &dA &d@ &dE TL(12): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . y y y y y " tm(1,2) = " xxxxyyx x x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = " . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = " x. . . . . . . . " tm(4,1) = " x . . . . . . " tm(4,2) = " x . y. . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = " x x y . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = " . . . . . . . . " tm(7,1) = " . . x . . . . . " tm(7,2) = " xx x . y. . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = " . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = " x x . . . . . . " tm(10,1) = " . . . . . . . . " tm(10,2) = " x . . . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = " x . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = " . . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . . x . . . . " tm(13,2) = " xxxxyyx y. . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = " xx x . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . . y. y . . . " tm(25,2) = " xxxxyyx x . y. . . " tm(37,1) = " . . . . . . . . " tm(37,2) = " xxxxyyx . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . y. y. y . . " tm(49,2) = " xxxxyyx x x . y. . " tm(73,1) = " . . . y. . . . . " tm(73,2) = " xxxxyyx x . . . . " loop for i = 1 to 96 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat tm(97,1) = " . . . y. y. y. y . " tm(97,2) = " xxxxyyx x x x . y. " tm(145,1) = " . . y y. . . . " tm(145,2) = " xxxxyyx x x . . . " loop for i = 1 to 808 loop for j = 1 to 2 tm(i+192,j) = tm(i,j) repeat repeat return else &dA &d@ &dE &dA &d@ &dE case: type = 12, cmpytm = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . . . . . " tm(1,2) = "xx xyx z x x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = "x . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = "xx x . . . . . . . " tm(4,1) = " . . . . . . . . " tm(4,2) = "x . . . . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = "xx xyy . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = "x . . . . . . . . " tm(7,1) = " . . . . . . . . " tm(7,2) = "xx .y. . . . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = "x . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = "xx x . . . . . . . " tm(10,1) = " . . . . . . . . " tm(10,2) = "x . . . . . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = "xx . . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = "x . . . . . . . . " loop for i = 1 to 12 loop for j = 1 to 2 tm(i+12,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(13,1) = " . . . y . . . . " tm(13,2) = "xx xyx z . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat tm(25,1) = " . . . . y . . . " tm(25,2) = "xx xyx z x . . . . " tm(37,1) = " . . . . . . . . " tm(37,2) = "xx xyx z . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . . . y . . " tm(49,2) = "xx xyx z x x . . . " tm(73,1) = " . . . . . . . . " tm(73,2) = "xx xyx z x . . . . " loop for i = 1 to 904 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 6) type = 18 (triplets which can be divided in 3 or 2 &dA &d@ &dE and regulars of the same type) &dA &d@ &dE TL(18): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . y . y . y . y " tm(1,2) = " xx x xy x y x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = " . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = " x. . . . . . . " tm(4,1) = " . . . . . . . " tm(4,2) = " x . . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = " x. . . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = " . . . . . . . " tm(7,1) = " . . . . . . . " tm(7,2) = " xx x y . . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = " . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = " x. . . . . . . " tm(10,1) = " . . y . . . . " tm(10,2) = " x . x . y . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = " x. . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = " . . . . . . . " tm(13,1) = " . . . . . . . " tm(13,2) = " xx x . . . . . " tm(14,1) = " . . . . . . . " tm(14,2) = " . . . . . . . " tm(15,1) = " . . . . . . . " tm(15,2) = " x. . . . . . . " tm(16,1) = " . . . . . . . " tm(16,2) = " x . . . . . . " tm(17,1) = " . . . . . . . " tm(17,2) = " x. . . . . . . " tm(18,1) = " . . . . . . . " tm(18,2) = " . . . . . . . " loop for i = 1 to 18 loop for j = 1 to 2 tm(i+18,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(19,1) = " . . . y . . . " tm(19,2) = " xx x xy x . y . . . " tm(28,1) = " . . . . . . . " tm(28,2) = " x . x . . . . . " loop for i = 1 to 36 loop for j = 1 to 2 tm(i+36,j) = tm(i,j) repeat repeat tm(37,1) = " . . . . y . . " tm(37,2) = " xx x xy x y x . y . . " tm(55,1) = " . . . . . . . " tm(55,2) = " xx x xy x . . . . " loop for i = 1 to 72 loop for j = 1 to 2 tm(i+72,j) = tm(i,j) repeat repeat tm(73,1) = " . . . . y . y . " tm(73,2) = " xx x xy x y x x . y . " tm(109,1) = " . . . . . . . " tm(109,2) = " xx x xy x y x . . . " loop for i = 1 to 144 loop for j = 1 to 2 tm(i+144,j) = tm(i,j) repeat repeat tm(145,1) = " . . . . y . y . y " tm(145,2) = " xx x xy x y x x x . y " tm(217,1) = " . . . . y . . . " tm(217,2) = " xx x xy x y x x . . " loop for i = 1 to 712 loop for j = 1 to 2 tm(i+288,j) = tm(i,j) repeat repeat return else &dA &d@ &dE &dA &d@ &dE case: type = 18, cmptym = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . y . y . y . y " tm(1,2) = " xx x yx z x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = " . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = " x. . . . . . . " tm(4,1) = " . . . . . . . " tm(4,2) = " x y . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = " x. . . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = " . . . . . . . " tm(7,1) = " . . . . . . . " tm(7,2) = " xx x yy . . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = " . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = " x. . . . . . . " tm(10,1) = " . . . . . . . " tm(10,2) = " x . y . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = " x. . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = " . . . . . . . " tm(13,1) = " . . . . . . . " tm(13,2) = " xx x . . . . . " tm(14,1) = " . . . . . . . " tm(14,2) = " . . . . . . . " tm(15,1) = " . . . . . . . " tm(15,2) = " x. . . . . . . " tm(16,1) = " . . . . . . . " tm(16,2) = " x . . . . . . " tm(17,1) = " . . . . . . . " tm(17,2) = " x. . . . . . . " tm(18,1) = " . . . . . . . " tm(18,2) = " . . . . . . . " loop for i = 1 to 18 loop for j = 1 to 2 tm(i+18,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(19,1) = " . . . y . . . " tm(19,2) = " xx x yx z . . . . " loop for i = 1 to 36 loop for j = 1 to 2 tm(i+36,j) = tm(i,j) repeat repeat tm(37,1) = " . . . . y . . " tm(37,2) = " xx x yx z x . . . " tm(55,1) = " . . . . . . . " tm(55,2) = " xx x yx z . . . . " loop for i = 1 to 928 loop for j = 1 to 2 tm(i+72,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 7) type = 24 (triplets which can be divided in 2 and &dA &d@ &dE regulars of half or quarter the triplet type) &dA &d@ &dE TL(24): if cmptym = 0 &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . y. y. y. y. " tm(1,2) = " xxxxyxyyx x x x x " tm(2,1) = " . . . . . . . . " tm(2,2) = " . . . . . . . . " tm(3,1) = " . . . . . . . . " tm(3,2) = " . . . . . . . . " tm(4,1) = " . x . . . . . . " tm(4,2) = " x . y. . . . . . " tm(5,1) = " . . . . . . . . " tm(5,2) = " .x. . . . . . . " tm(6,1) = " . . . . . . . . " tm(6,2) = " . . . . . . . . " tm(7,1) = " . . x . . . . . " tm(7,2) = " x x . y. . . . . " tm(8,1) = " . . . . . . . . " tm(8,2) = " . . . . . . . . " tm(9,1) = " . . . . . . . . " tm(9,2) = " .x.x .y . . . . . " tm(10,1) = " . . . . . . . . " tm(10,2) = " x . . . . . . . " tm(11,1) = " . . . . . . . . " tm(11,2) = " . . . . . . . . " tm(12,1) = " . . . . . . . . " tm(12,2) = " . . . . . . . . " tm(13,1) = " . . . x . . . . " tm(13,2) = " xxx yx . y. . . . " tm(14,1) = " . . . . . . . . " tm(14,2) = " . . . . . . . . " tm(15,1) = " . . . . . . . . " tm(15,2) = " . . . . . . . . " tm(16,1) = " . x . . . . . . " tm(16,2) = " x . y. . . . . . " tm(17,1) = " . . . . . . . . " tm(17,2) = " .x x . . . . . . " tm(18,1) = " . . . . . . . . " tm(18,2) = " . . . . . . . . " tm(19,1) = " . . . . . . . . " tm(19,2) = " x x . . . . . . " tm(20,1) = " . . . . . . . . " tm(20,2) = " . . . . . . . . " tm(21,1) = " . . . . . . . . " tm(21,2) = " .x. . . . . . . " tm(22,1) = " . . . . . . . . " tm(22,2) = " x . . . . . . . " tm(23,1) = " . . . . . . . . " tm(23,2) = " . . . . . . . . " tm(24,1) = " . . . . . . . . " tm(24,2) = " . . . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(25,1) = " . . . . y . . . " tm(25,2) = " xxxxyxyyx . y. . . " tm(37,1) = " . . . . . . . . " tm(37,2) = " xxx yx . . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . . y. y . . " tm(49,2) = " xxxxyxyyx x . y. . " tm(73,1) = " . . . . . . . . " tm(73,2) = " xxxxyxyyx . . . . " loop for i = 1 to 96 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat tm(97,1) = " . . . . y. y. y . " tm(97,2) = " xxxxyxyyx x x . y. " tm(145,1) = " . . . . y. . . . " tm(145,2) = " xxxxyxyyx. x . . . " loop for i = 1 to 808 loop for j = 1 to 2 tm(i+192,j) = tm(i,j) repeat repeat return else &dA &d@ &dE &dA &d@ &dE case: type = 24, cmpytm = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . . . . . . " tm(1,2) = "xx xyx yx z x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = "x . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = "xx . . . . . . . " tm(4,1) = " . . . . . . . " tm(4,2) = "x . . . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = "xx x x . . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = "x . . . . . . . " tm(7,1) = " x. . . . . . . " tm(7,2) = "xx . . . . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = "x . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = "xx xyx yy . . . . . " tm(10,1) = " . . . . . . . " tm(10,2) = "x . . . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = "xx . . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = "x . . . . . . . " tm(13,1) = " x. . . . . . . " tm(13,2) = "xx x . y. . . . . . " tm(14,1) = " . . . . . . . " tm(14,2) = "x . . . . . . . " tm(15,1) = " . . . . . . . " tm(15,2) = "xx . . . . . . . " tm(16,1) = " . . . . . . . " tm(16,2) = "x . . . . . . . " tm(17,1) = " . . . . . . . " tm(17,2) = "xx xyx . . . . . . " tm(18,1) = " . . . . . . . " tm(18,2) = "x . . . . . . . " tm(19,1) = " x. . . . . . . " tm(19,2) = "xx . . . . . . . " tm(20,1) = " . . . . . . . " tm(20,2) = "x . . . . . . . " tm(21,1) = " . . . . . . . " tm(21,2) = "xx x . . . . . . . " tm(22,1) = " . . . . . . . " tm(22,2) = "x . . . . . . . " tm(23,1) = " . . . . . . . " tm(23,2) = "xx . . . . . . . " tm(24,1) = " . . . . . . . " tm(24,2) = "x . . . . . . . " loop for i = 1 to 24 loop for j = 1 to 2 tm(i+24,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(25,1) = " . . . . y . . . " tm(25,2) = "xx xyx yx z . . . . " loop for i = 1 to 48 loop for j = 1 to 2 tm(i+48,j) = tm(i,j) repeat repeat tm(49,1) = " . . . . . y . . " tm(49,2) = "xx xyx yx z x . . . " tm(73,1) = " . . . . . . . . " tm(73,2) = "xx xyx yx z . . . . " loop for i = 1 to 904 loop for j = 1 to 2 tm(i+96,j) = tm(i,j) repeat repeat return end &dA &d@ &dE &dA &d@ &dE 8) type = 36 (cmptym = 1 only) &dA &d@ &dE &dA &d@ &dE TL(36): &dA &d@ &dE &dA &d@ &dE case: type = 36, cmptym = 1 &dA &d@ &dE &dA &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(1,1) = " . . y . . y . y . y " tm(1,2) = " xxxx yx .x x x x x " tm(2,1) = " . . . . . . . " tm(2,2) = " . . . . . . . " tm(3,1) = " . . . . . . . " tm(3,2) = " x. . . . . . . " tm(4,1) = " . . . . . . . " tm(4,2) = " x . . . . . . " tm(5,1) = " . . . . . . . " tm(5,2) = " x.x. . . . . . " tm(6,1) = " . . . . . . . " tm(6,2) = " . . . . . . . " tm(7,1) = " . . . . . . . " tm(7,2) = " xx x . . . . . " tm(8,1) = " . . . . . . . " tm(8,2) = " . . . . . . . " tm(9,1) = " . . . . . . . " tm(9,2) = " x.x. . . . . . " tm(10,1) = " . . . . . . . " tm(10,2) = " x . . . . . . " tm(11,1) = " . . . . . . . " tm(11,2) = " x. . . . . . . " tm(12,1) = " . . . . . . . " tm(12,2) = " . . . . . . . " tm(13,1) = " . . y . . . . " tm(13,2) = " xxxx yx .x . . . . " tm(14,1) = " . . . . . . . " tm(14,2) = " . . . . . . . " tm(15,1) = " . . . . . . . " tm(15,2) = " x. . . . . . . " tm(16,1) = " . . . . . . . " tm(16,2) = " x . . . . . . " tm(17,1) = " . . . . . . . " tm(17,2) = " x.x. . . . . . " tm(18,1) = " . . . . . . . " tm(18,2) = " . . . . . . . " tm(19,1) = " . . . . . . . " tm(19,2) = " xx x . . . . . " tm(20,1) = " . . . . . . . " tm(20,2) = " . . . . . . . " tm(21,1) = " . . . . . . . " tm(21,2) = " x.x. . . . . . " tm(22,1) = " . . . . . . . " tm(22,2) = " x . . . . . . " tm(23,1) = " . . . . . . . " tm(23,2) = " x. . . . . . . " tm(24,1) = " . . . . . . . " tm(24,2) = " . . . . . . . " tm(25,1) = " . . . . . . . " tm(25,2) = " xxxx yx . . . . . " tm(26,1) = " . . . . . . . " tm(26,2) = " . . . . . . . " tm(27,1) = " . . . . . . . " tm(27,2) = " x. . . . . . . " tm(28,1) = " . . . . . . . " tm(28,2) = " x . . . . . . " tm(29,1) = " . . . . . . . " tm(29,2) = " x.x. . . . . . " tm(30,1) = " . . . . . . . " tm(30,2) = " . . . . . . . " tm(31,1) = " . . . . . . . " tm(31,2) = " xx x . . . . . " tm(32,1) = " . . . . . . . " tm(32,2) = " . . . . . . . " tm(33,1) = " .x. . . . . . " tm(33,2) = " x. . . . . . . " tm(34,1) = " . . . . . . . " tm(34,2) = " x . . . . . . " tm(35,1) = " . . . . . . . " tm(35,2) = " x. . . . . . . " tm(36,1) = " . . . . . . . " tm(36,2) = " . . . . . . . " loop for i = 1 to 36 loop for j = 1 to 2 tm(i+36,j) = tm(i,j) repeat repeat &dA &d@ 1111222345 &dA &d@ 1112233456790249158831 &dA &d@ 12346892684726844268842668422 tm(37,1) = " . . y . y . . " tm(37,2) = " xxxx yx .x x . . . " loop for i = 1 to 928 loop for j = 1 to 2 tm(i+72,j) = tm(i,j) repeat repeat return &dA &dA E N D O F P R O C E D U R E S &dA run