Csound Csound-dev Csound-tekno Search About

in opcode

Date1999-04-02 06:45
FromKevin Gallagher
Subjectin opcode
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