what do you mean duty cycle? Is that a 2-stage envelope?
If you mean  having an attack and a decay and then 'squeezing' them
over time, you might be able to do it with a phasor and a table
reader (non-wrap-around), e.g.

a1 phasor   ifreq
a2 tablei    a1*kfactor, 1,1

and

f1 0  1025  7   0 100 1 100  0 824 0

as the factor is raised from 1, the envelope gets squeezed out
(and below 1 gets stretched out).

Victor



----- Original Message -----
From: Rory Walsh <rorywalsh@ear.ie>
Date: Thursday, February 3, 2011 7:23 pm
Subject: [Csnd] variable duty cycle..I think...
To: csound@lists.bath.ac.uk

> Is there an opcode that will let me load an envelope from a function
> table and then let me vary the duty cycle but not the frequency?
> Actually, in this case duty cycle might be slightly
> misleading.  I'm
> just looking to shorten the length of an envelope without
> changing the
> frequency of it. I know I can use different function tables but I'd
> prefer to be able to do it dynamically with k-rate control. I could
> write a UDO for this but surely there is any easier way! Perhaps
> someone can point me in the right direction? In the meantime I'll
> continue looking through the reference manual...
>
>
> 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"
>

Dr Victor Lazzarini, Senior Lecturer, Dept. of Music,
National University of Ireland, Maynooth