Csound Csound-dev Csound-tekno Search About

[Csnd] first experiment mit delay and feedback

Date2011-04-01 11:49
FromStefan Thomas
Subject[Csnd] first experiment mit delay and feedback
Dear community,
I've made my first experiment with a delay line.
With I don't understand, in the below quoted example:
the tuning is quite different from what I've expected.
It should be conventional 12tone tuning, but it isn't.
Here is my code:
<CsoundSynthesizer>
;<CsOptions>
;</CsOptions>
; ==============================================
<CsInstruments>

sr    =    48000
ksmps     =     100
nchnls    =    2
0dbfs    =    1
gisine ftgen 0,0,2^10, 10, 1
instr 1   
aDel init 0
iamp ampmidi 1
icps cpsmidi
ifeedback = 0.999
idel = 1/icps
imod = (13/8)^0.5
indx = 20
anoise pinkish iamp
aenv     linseg 0, 1/icps, 1, 0.1, 0
asound = aenv*anoise
kfilterfrq linseg 800, 7, 0

afilt    tone     asound, kfilterfrq
;afilt balance    afilt, anoise
aDel delay afilt + ifeedback*aDel, idel

outs aDel, aDel

endin

</CsInstruments>
; ==============================================
<CsScore>
f 0 36


</CsScore>
</CsoundSynthesizer>



Date2011-04-01 16:55
FromSteven Yi
SubjectRe: [Csnd] first experiment mit delay and feedback
Hi Stefan,

I tested this out and got the same results.  However, changing ksmps
to 10 or better 1, I got the expected 12tet tuning.  If I remember
correctly, it's best to use delay with ksmps=1, so you may want to
wrap part of this code in a UDO and use setksmps 1.

Optionally, you may want to use wguide1 which works without setting
ksmps=1 and has a low pass filter built-in.  I modified the last lines
of your instr to remove the delay opcode line and used:

aDel wguide1 afilt, icps, 5000, ifeedback
outs aDel, aDel

which worked nicely IMO.

steven

On Fri, Apr 1, 2011 at 6:49 AM, Stefan Thomas
 wrote:
> Dear community,
> I've made my first experiment with a delay line.
> With I don't understand, in the below quoted example:
> the tuning is quite different from what I've expected.
> It should be conventional 12tone tuning, but it isn't.
> Here is my code:
> 
> ;
> ;
> ; ==============================================
> 
>
> sr    =    48000
> ksmps     =     100
> nchnls    =    2
> 0dbfs    =    1
> gisine ftgen 0,0,2^10, 10, 1
> instr 1
> aDel init 0
> iamp ampmidi 1
> icps cpsmidi
> ifeedback = 0.999
> idel = 1/icps
> imod = (13/8)^0.5
> indx = 20
> anoise pinkish iamp
> aenv     linseg 0, 1/icps, 1, 0.1, 0
> asound = aenv*anoise
> kfilterfrq linseg 800, 7, 0
>
> afilt    tone     asound, kfilterfrq
> ;afilt balance    afilt, anoise
> aDel delay afilt + ifeedback*aDel, idel
>
> outs aDel, aDel
>
> endin
>
> 
> ; ==============================================
> 
> f 0 36
>
>
> 
> 
>
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"