| Hi Kevin,
At present time input is implemented only for old MME driver for
DirectCsound.
This means that you will hear a delay due to latency and buffer length
you have to set.
this is an example of command line (change the buffer length if
necessary):
Csound.exe -+q -+e -+p12 -b500 -i in.orc in.sco
for the following example
;******* IN.ORC ************
sr=48000
kr=480
ksmps=100
nchnls=2
instr 1
a2 init 0
a3 init 0
a1 a5 ins
a2 delay a1+a2*.8, .36767676
a3 delay a1+a3*.8, .5
outs (a1+a2) * .5, (a1+a3) * .5
endin
;******* IN.SCO **************
f1 0 4096 10 1
i1 0 3600
It produces a stereo echo.
Kevin Gallagher wrote:
>
> Has anybody done any experimentation with the "in" (ins, inq) opcode?
> I'm interested in Csound's potential as a signal processor, and I'm
> guessing that it's possible because buffering digital audio in shouldn't
> be that much different than buffering it out, right? Anyway, I tried it
> with DirectSound 2.7 and got this: When I used the Primary Sound
> Driver, I got "unable to create a primary buffer for DirectSound," and
> when I used the CS4232 DirectSound Driver, I got "unable to create a
> DirectSound object." I also tried it with Winsound (with script below
> as orc and sco) and it just terminated immediately.
> Here is the file:
>
>
>
>
>
> -+* -+X -b100 -i -o c:\csound\test.wav
> ;use Windows yielding, ask for sound driver, buffer 100, -i for file
> input, -o for file output as "c:\csound\test.wav"
>
>
>
>
> sr=44100
> kr=441
> ksmps=100
> nchnls=2
>
> instr 1
> asigr, asigl ins
> ;right and left signals in
> outs asigr, asigl
> ;exact same right and left signals out
> endin
>
>
>
>
> i1 0 10
> ;record for 10 seconds, then terminate
> e
>
>
>
>
> When I execute the script, I play a tape player that is hooked to my
> sound card's line in, and it should ideally record test.wav as the
> signal from the tape. Obviously, the signal will be modified before
> going out if I can get this stuff working right.
>
> So can anybody offer any insight here? Thanks in advance!
>
> --
> Kevin Gallagher
> Composer, Guitarist, Music Copyist
> Email: kgallagh@astro.temple.edu
> Web site: http://astro.temple.edu/~kgallagh
--
Gabriel Maldonado
|