Hello Everybody!
I’m sitting now quite a while at a instrument and i don’t get it… my head is maybe not working perfectly right now.
But i have a few problems with recursive UDOs:
- it’s too loud. of course, you say. you are adding a lot of signals together. yes, i know. but i don’t get the right spot to make it quiter. And also i don’t get the right factor to make it quiter.
- when i change the order of my frequencies in my input kFreq array it’s also changing the sound. and i don’t get why.
Maybe someone can help ![]()
Philipp
opcode saw_voice, a, kkpp
kAmp, kFreq, iDetune, iIndex xin
if iIndex < iDetune then
aDetune saw_voice kAmp, kFreq, iDetune, iIndex+1
endif
aSaw vco2 kAmp, kFreq + (random(-0.5,0.5)*randomi:k(kFreq*0.005, kFreq*0.01, 0.25, 1))
aVoice sum aSaw, aDetune
xout aVoice/iDetune
endop
opcode saw_array, a, kk[]po
kAmp, kFreqs[], iDetune, iIndex xin
print iIndex
iInstances lenarray kFreqs
if iIndex < iInstances-1 then
aVoice saw_array kAmp, kFreqs, iDetune, iIndex+1
endif
kAmp = kAmp
kFreq = kFreqs[iIndex]
aSaw saw_voice kAmp, kFreq, iDetune, iIndex
aOut sum aSaw, aVoice
xout aOut
endop
instr 1
// signal
kAmp = 1
kFreqs[] fillarray 65/2, 65*11, 65*17
iDetune = 1
aSaw saw_array kAmp, kFreqs, iDetune
// amp env
iAtt = 0.05
iRel = iAtt
iSusTime = p3 - (iAtt + iRel)
aEnv linseg 0, iAtt, 1, iSusTime, 1, iRel, 0
aSaw *= aEnv
// output
aOut1 = aSaw
aOut2 = aSaw
outs aOut1, aOut2
endin
</CsInstruments>
<CsScore>
i1 0 10
</CsScore>
</CsoundSynthesizer>
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here