From ws@roger.ucdavis.edu Mon Jul  3 18:54:49 1989
Received: from [128.120.2.1] by EMS.MEDIA.MIT.EDU (5.59/4.8)  id AA24280; Mon, 3 Jul 89 17:54:44 EST
Received: by ucdavis.ucdavis.edu (5.51/UCD1.41)
	id AA12326; Mon, 3 Jul 89 13:35:06 PDT
Received: by roger.ucdavis.edu (3.2/UCD1.41)
	id AA03776; Mon, 3 Jul 89 13:20:15 PDT
From: ws@roger.ucdavis.edu (Wayne Slawson)
Date: Mon, 3 Jul 89 13:20:15 PDT
Message-Id: <8907032020.AA03776@roger.ucdavis.edu>
To: bv@ems.media.MIT.edu
Subject: ihold problem
Status: R


Here are the test orc and sco that I couldn't get to run.  I tried
the -v option and csound produced a memory fault when it tried to
compile the ihold statement.  Does my version of csound not have
ihold implemented maybe?

;		The idea is to use 
;			p7=0 : an isolated note.
;			p7=1 : the beginning of a series of tied notes.
;			p7=2 :	the middle of tied note series
;			p7>2 : end of a tied note series.

	sr = 25000
	kr = 1000
	ksmps = 25
	nchnls = 1

	instr	1
	if	p7 != 0 goto  tistart
			; no tied note, normal atk, dcy.
		isst	=	p3  - .3 ; chop with kgate 
		kgate	linseg  0.,.1,10000,isst,10000,.1,0.,.1,0.
			goto	sing
tistart: if	p7 != 1 goto  tikeep
			; hold the final amplitudes, no init
		ihold
		isst	=	p3  - .1 ; chop with kgate 
		kgate	linseg  0,.1,10000,isst,10000
			goto	sing
tikeep: if	p7 != 2 goto tistop
			; middle of a tied (held) series
		ihold
		kgate	=	10000
			goto	sing
tistop: isst	=	p3  - .2 ; chop with kgate 
	; end a tied series
		kgate	linseg  10000,isst,10000,.1,0,.1,0
			goto	sing
sing: kf0	expseg p4,p3*.25,p4,p3*.5,p5,p3*.25,p5
gasig	oscili	kgate,kf0,1
	out	gasig
	endin

	instr	2
	display	gasig,p3/10
	endin

f 1 0 128 10 1
i 1 1 1 220 440 0 0
i 1 + . 220 440 0 1
i 1 + . 440 110 0 2
i 1 + . 110 330 0 3
i 1 + . 220 440 0 0
i 1 + . 220 440 0 1
i 1 + . 440 880 0 2
i 1 + . 880 110 0 2
i 1 + . 110 440 0 3
i 1 + . 220 440 0 0

i 2 0 12
e


The idea is to change the amplitude envelope and keep the
oscili running without a glitch when p7 is 1 or 2.

Best to Elizabeth.

Many thanks.

Wayne.


