| Thanks, Istvan, for both of these updates. They take care of all my
immediate needs. (It also would be wonderful if someone could update and
clarify the documentation for loscil, loscil3 and nsamp. I'd be happy to
review any updates if that would help.)
I'd noted, upon further study of the docs for ftlen and nsamp, that clearly
ftlen had been updated to work with deferred-size ftables, whereas nsamp
apparently had not. So, following your fix, nsamp is updated as well. Good.
I've been trying further to investigate whether loscil works correctly with
samples that contain their own looping information. Either 1) it is not
working; or 2) the distribution doesn't contain any such samples, so you
can't know whether the feature works or not.
Either of the following should loop a sample that contains its own loop
data:
a1 loscil 10000, 1, 1, 1
a1 loscil 10000, 1, 1, 1, -1
All the samples in the distribution, including mary.wav, beats.aiff and
kickroll.wav, simply play once and stop. So either they contain no looping
information or else loscil is ignoring it - even when ftable size is not
deferred. (This is fine with me, but is not what the docs indicate.)
You would especially expect beats.aiff to contain looping info, as it is
used as an example of this feature in the documentation for loscil.
I'd really like to be certain loscil is not working correctly with samples
than include their own looping info. Does anyone know of a sample in the
distribution that includes looping information?
Or could someone send me such a sample so I can test it with loscil?
(Perhaps, OTOH, someone has already tested this and can report whether this
feature works with the above loscil code or not.)
TIA, and thanks again, Istvan.
Art Hunkins
----- Original Message -----
From: "Istvan Varga"
To:
Sent: Monday, May 29, 2006 10:00 AM
Subject: Re: [Csnd] Help Needed: loscil
> On Monday 29 May 2006 00:18, Art Hunkins wrote:
>
> > 1) Get nsamp to work with deferred-size ftables;
>
> Done. nsamp() now returns the number of sample frames in a table loaded
> with GEN01. Note that it differs from ftlen(), for example with a stereo
> sound file of 10000 samples, ftlen() would return 19999 (i.e. a total of
> 20000 mono samples, not including a guard point), but nsamp() returns
> 10000. Also, currently nsamp() will return 0 if the table was not loaded
> with GEN01; it is not clear from the documentation how the function
> should behave in this case, so I kept what seemed to be the intended
> behavior of the code.
>
> > 2) When looping is requested in loscil (and loscil3), and no looping
data is
> > specified in the opcode, default the sustain loop to the length of the
> > entire sample. Example (that works the same as the above code):
> > a1, a2 loscil 10000, 1, 1, 1, 1
>
> This is also implemented now.
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |