| Wow, Erik, thanks so much. Wonderful information, and just what I needed.
I can now verify that WAV files work exactly the same as AIFF files with
respect to loscil. (I assume that this means the current libsndfile is
handling loops appropriately too.)
I was also able to ascertain that both sustain and release loops suffer from
the identical problem (in loscil): a mode of 0 expects start and end loop
info to follow. If it doesn't, an error results and the note is deleted.
It turns out that if a sample contains its own loop info, the only way to
play the sample without looping is to specify 0 for the mode, *plus a start
loop point of zero and an end loop point at end of sample*.
This problem would be solved for both sustain and release loops if the
default loop start and end points were the beginning and end of file. (I
should think that such defaults should be in place for all cases except when
modes = -1, in which case looping reverts to the sample's info.)
Perhaps this is part of the enhancement to loscil Istvan has already made.
If not, Istvan, could you please make this change too? I think this would
make loscil (and loscil3) both more useful and intuitive. I'd appreciate
comments/feedback from other users on this "solution".
When this decision is agreed upon one way or another, Andres, I'll
incorporate the behavior into the loscil doc and send my suggestions back to
you.
Art Hunkins
----- Original Message -----
From: "Erik de Castro Lopo"
To:
Sent: Tuesday, May 30, 2006 7:47 PM
Subject: Re: [Csnd] Help Needed: loscil
> Art Hunkins wrote:
>
> > One interesting thing about running the current sndinfo on the horn
sample
> > is that I get different info from you. I get:
> >
> > util sndinfo:
> > C:\progra~1\csound5\bin\Horn.ff.F5.aif:
> > srate 44100, monaural, 16 bit AIFF, 2.157 seconds
> > (95114 sample frames)
> >
> > No looping info at all, though indeed the info *is* there in the sample
(as
> > indeed it loops without much prompting).
>
> You might want to try the sndfile-info program which is distributed as
> part of libsndfile. Here's what it says about Prent's horn sample:
>
> ========================================
> File : Horn.ff.F5.aif
> Length : 190372
> FORM : 190364
> AIFF
> COMM : 18
> Sample Rate : 44100
> Frames : 95114
> Channels : 1
> Sample Size : 16
> Encoding : NONE
> MARK : 34
> Count : 2
> Mark ID : 1
> Position : 61440
> Name : beg loop
> Mark ID : 2
> Position : 75338
> Name : end loop
> INST : 20
> Base Note : 65
> Detune : 8
> Low Note : 0
> High Note : 127
> Low Vel. : 0
> High Vel. : 127
> Gain (dB) : 0
> Sustain
> mode : 801 => forward
> begin : 1
> end : 2
> Release
> mode : 801 => forward
> begin : 1
> end : 2
> SSND : 190236
> Offset : 0
> Block Size : 0
> NAME : Horn.ff.F5
>
> ----------------------------------------
> Sample Rate : 44100
> Frames : 95114
> Channels : 1
> Format : 0x00020002
> Sections : 1
> Seekable : TRUE
> Duration : 00:00:02.156
> Signal Max : 12042 (-8.70 dB)
>
>
>
> > Unfortunately, I seemed unable to test an internally looped WAV. I tried
> > Audacity - importing the horn AIFF and exporting to WAV.
>
> Audacity is unlikely to be able to do this because 1) Audacity has its
> own internal version of libsndfile which is usually a couple of releases
> behind my own 2) this stuff is recent 3) the instrument loop stuff hasn't
> been tested thoroughly enough yet.
>
> As part of libsndfile, there is another program called sndfile-convert.
> The version of that program in this pre-release:
>
> http://www.mega-nerd.com/tmp/libsndfile-1.0.17pre5.tar.gz
>
> has the first pass at code to convert looping information when its
> present.
>
> > (Incidentally, I've *assumed* that WAV samples routinely *do* contain
loop
> > info, and that such info is not typically confined to AIFF.
>
> Yes, WAV files can carry looping info. The format is very different from
> AIFF ; WAV actually seems to be able to do a superset of what AIFF can do.
>
> > So, I'd be happy is someone could send a *WAV* file that contains loop
> > information.
>
> Try this one:
>
> http://www.mega-nerd.com/tmp/DynoA3.wav
>
> Cheers,
> Erik
> --
> +-----------------------------------------------------------+
> Erik de Castro Lopo
> +-----------------------------------------------------------+
> "The beauty of religious mania is that it has the power to
> explain everything. Once God (or Satan) is accepted as the first
> cause of everything which happens in the mortal world, nothing
> is left to chance...logic can be happily tossed out the window."
> - Stephen King
> --
> Send bugs reports to this list.
> To unsubscribe, send email to csound-unsubscribe@lists.bath.ac.uk |