C	.TITLE	HARMON
C
C  1 DEC 71
C  7 JUN 71
C
	LOGICAL SKIP,FOUND
	DIMENSION ICHAN(6),IFREQ(6),FILE(2),FILEIN(2)
C  NAME OF FILE OF TUNES TO BE PLAYED
	DATA FILE(1),FILE(2)/4HTUNE,4H SRC/
	DATA SKIP/.FALSE./
	DATA END/3HEND/
1	IF(SKIP) GO TO 11
	CALL INIT (IER)
	IF(IER.EQ.0) GO TO 11
	PAUSE 1
	GO TO 1
C
11	SKIP=.TRUE.
	CALL SPOT (95,2000,20,IER)
	IF(IER.NE.0) PAUSE 2
	CALL SAMO (1,IER)
	CALL SLMO (1,IER)
	DO 12 K=1,4
12	CALL SSCL (K,IER)
	CALL STCO (2,IER)
3	CALL FSTAT (3,FILE,FOUND)
	IF(FOUND) GO TO 31
	CALL REST (30)
	CALL WAIT
	GO TO 3
31	CALL SEEK (3,FILE)
2	READ (3,9) FILEIN
	IF(FILEIN(1).EQ.END) GO TO 3
	CALL FSTAT (1,FILEIN,FOUND)
	IF(.NOT.FOUND) GO TO 2
	CALL SEEK (1,FILEIN)
	CALL SAMO (4,IER)
21	READ (1,8) MULT
	READ (1,8) IWAIT,N,(ICHAN(K),IFREQ(K),K=1,N)
13	IWAIT=IWAIT*MULT
	IF(N.GT.6) GO TO 6
	DO 4 K=1,N
	ICH=ICHAN(K)
	IFR=IFREQ(K)*128
	CALL SSCL (ICH,IER)
4	CALL LTDA (ICH,IFR,IER)
	DO 41 K=1,1000
41	CONTINUE
	DO 5 K=1,N
5	IF(IFREQ(K).NE.0) CALL RSCL (ICHAN(K),IER)
	CALL REST (IWAIT)
	READ (1,8) IWAIT,N,(ICHAN(K),IFREQ(K),K=1,N)
	CALL WAIT
	GO TO 13
C
6	IF(N.EQ.7) GO TO 21
	DO 7 K=1,4
7	CALL SSCL (K,IER)
	CALL SAMO (1,IER)
	CALL REST (IWAIT)
	CALL WAIT
C
8	FORMAT(I3,I2,8(I2,I4))
9	FORMAT(2A5)
	GO TO 2
	END
