Csound Csound-dev Csound-tekno Search About

Re: Delay stuff again

Date1999-04-28 05:05
FromHans Mikelson
SubjectRe: Delay stuff again
>hi folks
>found this simple delay on the front page
>can someone explain a proper sco for me
>; Delay  -- Simple Delay
>       instr  10
>
>idur   =      p3
>idtime =      p4/1000; i would like this to be 5 seconds (at least)
>igain  =      p5 ; i am not sure about this one
>iinch  =      p6 ; this is new to me
>ioutch =      p7; as is this
>
>ain    zar    iinch          ; Read the channel ; should the channel
>remain the same? do i need zar to read the delay??
>aout   delay  ain, idtime    ; Delay for time;;;;;;can i change ain to a
>simple oscil??
>       zaw    aout, ioutch   ; Output the channel ;;;;;;;do i need the
>iinch and the ioutch??
>
>       endin


The zak channels allow very flexible routing but for the beginner it may be
easier to use global variables.

ain     zar   iinch

The iinch must be written to before you can read from it presumably in some
other instrument.  I think the instrument number must be lower than the
instrument the zak read is done in.

idtime =      p4/1000

This is assuming the delay times will be in milisconds in the score.  For
five seconds you would need some thing like:

;    Sta  Dur  Amp    Pitch  OutputCh
i1   0    1    10000  8.00   1

;    Sta  Dur  DelayTime  Feedback  InputCh  OutputCh
i10  0    10   5000       .5        1        2

;    Sta  Dur  InputCh
i20  0    10   2

Two additional instrument would be required to use this delay.  i1 would
generate a signal and write to zak channel 1.  The delay reads from zak
channel 1 and outputs to zak channel 2.  i20 would have to read from zak
channel 2 and likely generate some type of output possibly using outs.

Good luck,
Hans Mikelson