Csound Csound-dev Csound-tekno Search About

[Csnd] variable duty cycle..I think...

Date2011-02-03 19:22
FromRory Walsh
Subject[Csnd] variable duty cycle..I think...
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"

Date2011-02-03 19:46
FromVictor.Lazzarini@nuim.ie
SubjectRe: [Csnd] variable duty cycle..I think...
AttachmentsNone  None  

Date2011-02-03 19:58
FromRory Walsh
SubjectRe: [Csnd] variable duty cycle..I think...
That's clever. Duty cycle wasn't quite the right phase, I meant it in
terms of the non-zero part of the signal. Your solution is quite
eloquent.

Rory.


On 3 February 2011 19:46,   wrote:
> 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 
> 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
>


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"


Date2011-02-04 18:52
FromAaron Krister Johnson
SubjectRe: [Csnd] variable duty cycle..I think...

The problem with such solutions, and using simple oscillators with tables, is aliasing.

I recall a paper I read recently which tells how to do such things with a 'blip' signal, so that there is no aliasing. I think this is what vco and vco2 do automagically, so you could just use them....if I understand you correctly, you want to be able to say go from saw to triangle smoothly? If so, I think you probably can use vco or vco2 to do this easily with a krate signal.

AKJ

On Thu, Feb 3, 2011 at 1:58 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
That's clever. Duty cycle wasn't quite the right phase, I meant it in
terms of the non-zero part of the signal. Your solution is quite
eloquent.

Rory.


On 3 February 2011 19:46,  <Victor.Lazzarini@nuim.ie> wrote:
> 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
>


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"




--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org


Date2011-02-04 20:10
FromRory Walsh
SubjectRe: [Csnd] variable duty cycle..I think...
Thanks Aaron. In fact I'm only using it as a controlling signal so
aliasing isn't a problem. I was building an arpeggiator and I wanted
to be able to shorten the notes without shortening the duration of the
arpeggio. Victor's solution works fine, and what's better is that it's
so simple my students understand what's going on.

Rory.

On 4 February 2011 18:52, Aaron Krister Johnson  wrote:
>
> The problem with such solutions, and using simple oscillators with tables,
> is aliasing.
>
> I recall a paper I read recently which tells how to do such things with a
> 'blip' signal, so that there is no aliasing. I think this is what vco and
> vco2 do automagically, so you could just use them....if I understand you
> correctly, you want to be able to say go from saw to triangle smoothly? If
> so, I think you probably can use vco or vco2 to do this easily with a krate
> signal.
>
> AKJ
>
> On Thu, Feb 3, 2011 at 1:58 PM, Rory Walsh  wrote:
>>
>> That's clever. Duty cycle wasn't quite the right phase, I meant it in
>> terms of the non-zero part of the signal. Your solution is quite
>> eloquent.
>>
>> Rory.
>>
>>
>> On 3 February 2011 19:46,   wrote:
>> > 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 
>> > 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
>> >
>>
>>
>> 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"
>>
>
>
>
> --
> Aaron Krister Johnson
> http://www.akjmusic.com
> http://www.untwelve.org
>
>


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"


Date2011-02-04 20:48
FromVictor Lazzarini
SubjectRe: [Csnd] variable duty cycle..I think...
Aliasing is only going to be an issue if the so-called envelopes are not envelopes, but waveforms. Of course, the whole literature of bandlimited or quasi-bandlimited oscillators is full of methods for reducing aliasing. 

Victor

On 4 Feb 2011, at 18:52, Aaron Krister Johnson wrote:


The problem with such solutions, and using simple oscillators with tables, is aliasing.

I recall a paper I read recently which tells how to do such things with a 'blip' signal, so that there is no aliasing. I think this is what vco and vco2 do automagically, so you could just use them....if I understand you correctly, you want to be able to say go from saw to triangle smoothly? If so, I think you probably can use vco or vco2 to do this easily with a krate signal.

AKJ

On Thu, Feb 3, 2011 at 1:58 PM, Rory Walsh <rorywalsh@ear.ie> wrote:
That's clever. Duty cycle wasn't quite the right phase, I meant it in
terms of the non-zero part of the signal. Your solution is quite
eloquent.

Rory.


On 3 February 2011 19:46,  <Victor.Lazzarini@nuim.ie> wrote:
> 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
>


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"




--
Aaron Krister Johnson
http://www.akjmusic.com
http://www.untwelve.org