Csound Csound-dev Csound-tekno Search About

Re: Durations and Sampling Rate

Date1998-05-22 23:15
FromDerek Pierce
SubjectRe: Durations and Sampling Rate
Hi
I think you'll find that p2 is the start time p3 is duration. Hope this
helps
Derek

Juergen A. Erhard wrote:

> Hi,
>
> I'm very eager to get CSound to work... but I'm stuck here:
>
> The manual (I refer to 3.76 here) claims that p2 is the duration, by
> default in seconds.
>
> But this seems to depend (even in the latest version (3.781)) on the
> sampling rate.  For example, when I do the little example score in the
> manual, but set a sampling rate of 44.1kHz, the whole `piece' is much
> longer than 2.5 seconds (seems to me it's about 4.41 times as long...)
>
> Who's wrong?  The manual, the program... or is it just me.
>
> BTW, I tried the binary for Linux (just to be sure... first time I say
> (heard) it was with a binary I made myself).
>
> Bye, J
>
> PS: Of course, I could leave everything at 10kHz... but then I *think*
> it's better to match the sampling rate(s) supported by the output
> device (or am I wrong here... I'm pretty much a laymen in the area of
> (electro-)acoustics).
>
> --
> Jürgen A. Erhard  eMail: jae@laden.ilk.de  phone: (GERMANY) 0721 27326
>    MARS: http://members.tripod.com/~Juergen_Erhard/mars_index.html
>              Linux - Free PC Unix (http://www.linux.org)
>  "Windows NT" is an acronym for "Windows? No thanks." -- Russ McManus



Date1998-05-28 15:40
From"Juergen A. Erhard"
SubjectRe: Durations and Sampling Rate
I think I can call this off.... I think (have to check, though), it's
because I just cat the resulting audio file to /dev/audio (or
/dev/dsp, forget which one).

And I didn't set no sampling rate on the device... which may default
to 10k, or even 8k (it's an old, very old, 8-bit SB-clone (Sound
Galaxy, I think)).  So, for one second (say), CSound generates 44k
samples, which the sound card uses up at a rate of 10k samples/second
-> voila, 4.4 seconds!

An additional hint at this would have been (which alas I didn't
mention in my original post) that the pitch of the notes was as
dependent on the sample rates as their duration... the higher the
sample rate, the lower the pitch.

This means... I am very stupid.  And I gotta get a sample player, and
then I'll shut up (if this does *not* work, you're gonna hear from me
again).

Anyway,

Bye, J

PS: "Think first, then post"

-- 
J|rgen A. Erhard  eMail: jae@laden.ilk.de  phone: (GERMANY) 0721 27326
	My WebHome: http://members.tripod.com/~Juergen_Erhard
		 The GNU Project (http://www.gnu.org)
 Codito, ergo sum - "I code, therefore I am" -- raster@rasterman.com