[Csnd] first experiment mit delay and feedback
Date | 2011-04-01 11:49 |
From | Stefan 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> |
Date | 2011-04-01 16:55 |
From | Steven Yi |
Subject | Re: [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 |