[comp.music] Csound and synthesis

jalkio@cc.helsinki.fi (06/19/91)

In article <3308@esquire.dpw.com>, rreid@DPW.COM (r l reid ) writes:
> In article <1991Jun13.210000.1@cc.helsinki.fi> jalkio@cc.helsinki.fi writes:
>>Are there any books on Csound or software music synthesis and algorithms
>>in general? Reading the Csound docs is a bit "experimental" if you have
>>stepped to this kind of system from commercial hardware synthesizers :-)
> 
> The CSound manual is actually quite good for that - has a tutorial and
> everything.  But for background, get hold of these:

Actually, after playing a bit with the Csound I find the documentation
quite o.k., as long as you know what you are doing.

>>Oh, and I would like to get recommendations about which
>>languages/systems are good to make music with. I have a NeXTstation and
>>enough hard disk space (about 700MB) to do some composition.
> You have the necessary hardware.  As for language, it depends an 
> awful lot on what you intend to do with it.  Most everyone I
> know who does software synthesis uses a little bit of everything.
> 
>>I thought that Csound is "the best" but then I heard that it isn't so
>>spectacular.
> Such generalizations serve no purpose.  Csound has certain advantages
> (rather complete documentation being one of them) while cmix has
> total flexibility (but very little documentation).  Saying that
> "CSound isn't so spectacular", tho is a real slap in the face -
> would you prefer to write you wavetables by hand?

That was a friend of mine who said that Csound isn't good. I have now
even done short pieces with it and I find it quite interesting! It feels
great to use this kind of system after commercial hard wired
synthesizers. Now I have limitless number of oscillators and
everything...

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.)


> 
> Ro

			Jouni

cook@roger (Doug Cook 756-1460) (06/19/91)

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				|

sandell@ils.nwu.edu (Greg Sandell) (06/19/91)

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.)
> 

To import sounds to the CSOUND environment, try using the soundin utility.
It makes the unfortunate requirement that you name the soundfiles you
want to import "soundin.number", as in soundin.1, soundin.2, etc.  To
play the 3-second soundfile soundin.66 in your Csound score, you say

a1 soundin 0.0 3.0 66   (this is from memory, it may be wrong)

However, you cant make any pitch adjustments to this as far as I
know.  You probably need a phase vocorder to do that.  I don't know
if you have the CARL software as well, but it includes a program
called pvoc for this.

-- 
Greg Sandell
sandell@ils.nwu.edu