Csound Csound-dev Csound-tekno Search About

Re: xyin for Windows/ Theremin Orc, Sco Problems

Date1998-10-20 16:12
FromHans Mikelson
SubjectRe: xyin for Windows/ Theremin Orc, Sco Problems
Hi,

John ffitch wrote:

>The winsound version does do xyin


I'm not able to get xyin working or real-time output on winsound v3.485
(Win95 PII SB64).

Running the following command line:

winsound.exe -odevaudio -B4096 -8 -r44100 -k4410 -d -m7 thermous.orc
thermous.sco

generates the error:

WAVE OUT unknown wave format

Gabriel's version works in real-time but does not read xyin as far as I can
tell.  I can't get xyin working either with a variety of command line
options.  The result is as if xyin was not read.

The following orchestra and score work on an SGI with the command line:

./csound -idevaudio -odevaudio thermous.orc thermous.sco

The fof version sound like a Big Briar Etherwave and the simulated one
sounds more like an RCA.

;-------------------------------------------------------------------------
; Mouse Theremin
; Coded by Hans Mikelson
; March 1998
;-------------------------------------------------------------------------
sr=44100
kr=4410
ksmps=10
nchnls=1
; Formant Theremouse
         instr    1
irate    =        .01                    ; Mouse read rate
kx1, ky1 xyin     irate, 0, 200, 0, 200  ; Read the x & y mouse position
kx       port     (kx1+1)*10, irate      ; Portamento to smooth out
transitions
ky       port     ky1*16, irate          ; Smooth out y too
; Formant synthsis sounds a lot like my Etherwave theremin.
;                 Amp Fqc FormntFqc
a1       fof      ky, kx, 564,      0, 200, .003, .017, .005, 50, 1,19, p3,
0, 1
         out      a1                     ; Ouput result
         endin

; Additive Theremouse
         instr    2
irate    =        .01                    ; Mouse read rate
kx1, ky1 xyin     irate, 0, 200, 0, 200  ; Read the x & y mouse position
kx       port     (kx1+1)*10, irate      ; Smooth and scale x
ky       port     ky1*16, irate          ; Smooth and scale y
a1       oscil    ky,    kx,     1       ; Oscillator with amplitude y and
freqency x
a2       oscil    ky,    kx*1.5, 1       ; Oscillator tuned 1/5 higher.
         out      a1+a2                  ; Combine and output
         endin

; Simulated Theremouse
         instr    3
irate    =        .01                    ; Mouse read rate
kx1, ky1 xyin     irate, 0, 200, 0, 200  ; Read the x & y mouse position
kx       port     kx1,    irate          ; Smooth and scale x
ky       port     ky1*16, irate          ; Smooth and scale y
a1       oscil    1,    20000,     1       ; Fixed oscillator
a2       oscil    1,    20000*(kx/800), 1  ; Variable oscillator
         out      (a1-a2)*ky               ; Combine and output
         endin

;-------------------------------------------------------------------------
; Mouse Theremin
; Coded by Hans Mikelson
; March 1998
;-------------------------------------------------------------------------
f1  0  8192  10  1             ; Sine
f19 0  1024  19 .5 .5 270 .5   ; 1/2 Bell Shape for formant synthesis
;   Sta  Dur
i3  0.0  30.0
;   Sta  Dur
;i2  30.0  30.0