| User-Defined Opcode Database |
|---|
Outputs a-rate impulses around a certain frequency.
Download UDO FileThis UDO is modelled on the Supercollider UGen GaussTrig. It outputs a stream of impulses with control over the degree of periodicity.
aout GaussTrig adev, afreq, aamp
adev - deviation from center frequency. Ranges between 0-1 where zero is no deviation.
afreq - center frequency for the impulse generator
aamp - amplitude scaling of the output
opcode GaussTrig,a, aaa adev, afreq, aamp xin setksmps 1 kdev downsamp adev kfreq downsamp afreq kamp downsamp aamp krange = kfreq*kdev kgauss gauss krange kgauss = (kfreq+kgauss) kgauss limit kgauss, .0001, sr/2 kintrvl = 1/kgauss ares mpulse kamp, kintrvl xout ares endop
<CsoundSynthesizer> <CsOptions> -o dac </CsOptions> <CsInstruments> sr = 96000 ksmps = 16 nchnls = 2 0dbfs = 1 instr 1 aenv expseg 1, p3, 0.001 ;used for both deviation and amplitude afreq expseg p4, p3, p5 ;controling the input frequency aresL GaussTrig aenv, afreq, aenv*p6 aresR GaussTrig aenv, afreq, aenv*p6 outs aresL, aresR endin </CsInstruments> <CsScore> ; freqStart freqEnd gain i1 0 .5 40 1000 .4 i1 0 2 40 1000 .4 i1 3 1 400 10 .4 i1 5 .1 10000 .001 .7 i1 + .1 10000 1 .7 i1 + .5 100 .0001 .7 i1 + .8 10 10000 .7 i1 + .4 10000 0.02 .7 i1 8 20 1000 1000 .4 i1 8 20 200 200 .4 e </CsScore> </CsoundSynthesizer>
Peiman Khosravi
| Previous | Home | Next |
| gainslider | getFrequency |