Csound Csound-dev Csound-tekno Search About

Re: simultaneous "soundin" files

Date1997-02-26 06:54
FromGabriel Maldonado
SubjectRe: simultaneous "soundin" files
John Boyd wrote about soundin UG:

> So what does this mean?  Does it only load a 4K segment of the entire
> sample?
Yes, after reading all the contents of the 4K buffer, soundin loads
a subsequent 4K segment in memory. If the input file length is
not a multiple of 4096 , some sample can be dropped off at the end
of input file. An expedient to avoid this problem is adding some zeroes
at the end of input file for increasing its length.

> Is this the reason that some notes drop off too early?
Yes

> > My new (optional) "soundin2" UG allows input file sampling rates of any
> > value and
> > resample them with current sr value. It also allows krate interpolated
> > pitch-shifting of the original soundfile.
> >
> > The syntax of "soundin2" is:
> >
> > a1      soundin2   ifilcod, iskptim, iformat, kfrqratio
> > a1, a2  soundin2   ifilcod, iskptim, iformat, kfrqratio
> 
> and ifilcod, iskptim and iformat mean what?
> 
> Do any of these parameters handle loop points for sustained notes?  I
> keep wondering how csound running realtime with midi would handle loop
> points...

These parameter ar identical to the old soundin's ones,
so, as we can read in the manual:

ifilcod - integer or character-string denoting the source soundfile
name.  An integer denotes the file soundin.filcod ;  a character-string
(in double quotes, spaces permitted) gives the filename itself,
optionally a full pathname.  If not a full path, the named file is
sought first in the current directory, then in that given by the
environment variable SSDIR (if defined) then by SFDIR.  See also GEN01.

iskptim (optional) - time in seconds of input sound to be skipped.  The
default value is 0.  

iformat (optional) - specifies the audio data file format:  1 = 8-bit
signed char (high-order 8 bits of a 16-bit integer), 2 = 8-bit A-law
bytes, 3 = 8-bit U-law bytes, 4 = 16-bit short integers, 5 = 32-bit long
integers, 6 = 32-bit floats).  If iformat = 0 it is taken from the
soundfile header, and if no header from the csound -o command flag.  The
default value is 0. 

Note that, differently from old "soundin", iskptim and iformat are NOT
optional in "soundin2".

About my realtime midi version of csound you wrote:

> So does this version run with all the features from a command line as
> well?  It sounds like this version is somewhat gui based the way you
> describe it..  
 
My version is NOT gui based and can be run from command line. I haven't
undrestood
how to use the -L option. The flag listing says:

-L dnam read Line-oriented realtime score events from device 'dnam'

but I have never understood why csound does not produce any sound when
inputting
lines as 

i1 0 3 (ecc...)

Is it perhaps possible to have some different syntax?

> I'm using cgi to wrapper csound and provide an html based
> compositional tool, so I'm hoping that your version can handle command
> line options too..

What is this "cgi to wrapper csound" ? I'm curious. My friend Riccardo
Bianchini
wrote a csound GUI shell in MS Visual Basic called "WCSHELL" and my
realtime 
csound works fine with it. 


Gabriel

g.maldonado@agora.stm.it