🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.music
Article #3382

Re: Csound and synthesis

#3382
From: Doug Cook 756-1460
Date: Tue, 18 Jun 1991 22:47
34 lines
2571 bytes
In article <1991Jun18.210901.1@cc.helsinki.fi> jalkio@cc.helsinki.fi writes:
>One question though: Is the best way to incorporate sampled sounds to
>use the GEN1 function generator? (And not the soundin operation in the
>orchestra file.) I have a problem making the samples sound at the
>correct pitch. Has the samplefile to be exactly the same length than the
>table to which I am loading the file? (It's a pity since the table
>length can only be a power of 2 and the samplefiles aren't usually
>exactly that long.)

It's been my experience that GEN01 will work much better than soundin.
(Soundin will not allow you to change the pitch of the sound easily; each
time you "call" soundin, it will get the next sample from the file and return
it verbatim.)  GEN01 does not require that the function table length be
the same as the sample file; the function table does, however, need to be
at least as long as the sample file. The remainder of the function table will
be padded with zeros. Unfortunately, there's no way to determine (without
hard-coding) the original length of the sample file. So you'll need to pass in
the sample length as one of the parameters in the instrument call, as well
as the pitch of the original sample. If you want loop points or multiple 
sample points, you'll need to pass in all that information, too.

I'd really like to see a signal generator in Csound that has more power to
deal with samples. Having to load them all into memory can be a pain. It
would be nice to have a generator which could handle loop points, multiple
sample points with interpolation, etc. Certainly this could be done with the
existing software, but it gets awfully complicated to do it in the general
case. If anyone has a better solution to this, I'd love to hear it. 

	-Doug

Doug Cook				|"Much is being said, my lords,
Dept. of Electrical Engineering and CS	| but nothing is being done."
University of California		| 		-Jeff Beck
Davis, CA				|
Technical Details
Message-ID: <13284@aggie.ucdavis.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ucdavis!roger!cook
References: <1991Jun13.210000.1@cc.helsinki.fi> <3308@esquire.dpw.com> <1991Jun18.210901.1@cc.helsinki.fi>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ucdavis!roger!cook
From: cook@roger (Doug Cook 756-1460)
Newsgroups: comp.music
Subject: Re: Csound and synthesis
Message-ID: <13284@aggie.ucdavis.edu>
Date: 18 Jun 91 22:47:40 GMT
References: <1991Jun13.210000.1@cc.helsinki.fi> <3308@esquire.dpw.com> <1991Jun18.210901.1@cc.helsinki.fi>
Sender: usenet@aggie.ucdavis.edu
Reply-To: cook@roger (Doug Cook 756-1460)
Organization: Music Dept., UC Davis
Lines: 34