;=================================================
;Table testing instrument made in class on 9/14/06
;RP
;=================================================
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
 	instr	1
 ifn	=	p4	;p4 of i-statement will have function number
 ival0	table	0,ifn	;get 0th val
 ival1	table	1,ifn	;get 1st val
 ival7	table	7,ifn	;get 7th val
 	print	ival0,ival1,ival7 
 	endin
	instr	2
ifn	=	p4
isize	=	p5
kval	line	0,p3,isize-1
koutput	table	kval,ifn
	display	koutput,p3
	endin

f01	0	8	2	1	2	3	4	5	6	7	8
f02 0 8 -2 1 2 3 4 5 6 7 8
i01 0 1 1
i01 1 1 2
s
; try some gen07 tests
;an envlp shape # val nlocs val1 nlocs val2 nlocs val3...
f03 0 128 7 0 16 10 32 5 64 5 16 0
;a linear rise
f04 0 129 7 0 129 1
i02 0 1 3 128
i02 1 1 4 129
s
; try some gen05 tests
;an exponential envlp # val nlocs val nlocs val...
f05 0 128 5 .0001 16 10 32 5 64 5 16 .0001
;an exponential rise
f06 0 129 5 .0001 129 1
i02 0 1 5 128
i02 1 1 6 129


Download tabletst.orc

 

Download tabletst.sco