Csound Csound-dev Csound-tekno Search About

[Cs-dev] sample usage by losicl ... or phasor?

Date2008-11-26 06:58
FromDavidW
Subject[Cs-dev] sample usage by losicl ... or phasor?
Hi all,

I've got a short file ("randomSamps.aiff") that I'm attempting to  use  
the samples of to (sub-audio rate) FM a sine oscil.
Its SR is 20,000Hz and it has 5017 samples in it.

Here's the current arrangement:
;-------------------------------------------------------------------------------------------------------------------------


; test instr for reading audio file into table so as to use samples at  
sub-audio rate for FM
sr 		= 44100
kr 		= 4410
ksmps	= 10
instr 2
iFileSR = 2.0
;            		ampOP		sampFq		fn#	 basFq	loop?
ar1 loscil 	200,		1/232,		4,	iFileSR,	0
ar1 oscili	20000,	500+ ar1,	 1
out ar1
endin


f1 0 512 10 1 	; out sine wave
;	t	sze	norm	fname		szeSkip fmt chan
f4	0	1	1	"randomSamps.aiff"		0	0	1

i2 0 10
e


;-------------------------------------------------------------------------------------------------------------------------
The idea is to read the samples contiguously and apply them as  
modulation factors to the oscil.
It works,  except I'm having trouble controlling the rate of the  
sample read, say down to a couple of Hz.

(I tried to do this using the phasor opcode (as per the phasor   
helpfile example) but it exceptions with a GEN01 " Invalid ftable" )

Can anyone provide a clue as to how I might read, say 1 sample/sec?
Thanks,
David




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net