I’m currently learning my first steps in Csound. While I’m trying to do is to get the generator (foscil) to be multiplied by a linen opcode. I think I’m in the right way, but I cannot eliminate the final clic on each note (the duration of the linen parameters is relative to the total duration of the note, I think…). I would like to know what I am doing wrong. Here’s the code for the instrument and the code for one note.
I thought I did, by defining the kenv as the afm amplitude. I also tried doing what you say but it multiplied the two amplitudes almost blowing up my ears, do you know why that happended?
I tried using the envelope in audio rate but it is still making that clic in each note.
Right, sorry, I read you email too quickly.
Your code looks right, there might be some mistake in the p-fields that come in I suggest to set once the enelope by numeric constants and print out you p-fields, like:
You’re right. Applying it there is fine. The issue is more likely down to the fact that you can’t use / in the score without wrapping within [ ]. Change to:
; instr strt dur amp freq car mod ndx rise decay
i 101 0 .5 1500 110 1 2 10 [1/10] [1/2]
and it should work better. Finally, you might consider using 0dbfs=1 in your header section. Then scale everything between 0 and 1. It’s the norm these days and reduces the likelihood of people, like me, blowing the ears off themselves when they copy and paste your code with an amp of 1500