Csound Csound-dev Csound-tekno Search About

[Csnd] Dynamic wave shapes

Date2010-03-19 21:58
FromDavid Bowen
Subject[Csnd] Dynamic wave shapes
The conversation about analog synths got me looking at the Moog web
pages and, in particular, the Mini Moog. If I understood the demo
video the oscillators had some wave shapes that were continuously
variable via a control knob. One example was a rectangular wave, think
a square wave but with the high and low sections of the wave having
different lengths.  I believe the other was a variable triangle wave.
Is there a Csound opcode for either of these? If not, is there an easy
way to create them with existing op codes? Obviously, you could change
the wave table every time the wave shape parameter changed, but that's
going to be much more effort if the wave shape is changing at a rate.
The code to implement them shouldn't be complicated, so if they don't
exist I may have to code them up myself, but I'm inclined to think I'm
just not seeing them in the Manual.

Dave Bowen


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"

Date2010-03-19 22:40
FromVictor Lazzarini
Subject[Csnd] Re: Dynamic wave shapes
I have a Minimoog voyager and its oscilators have a continuous  
waveform control (the original moog had a 4 position switch instead),  
going from triangle to saw to square to pulse. The waveforms are a  
little different from the 'classic' shapes, e.g. sawtooth has a non- 
linear rise and the square does not have straight tops (and  
consequently some (albeit low) even harmonic energy).
I have not worked exactly how the transition can be emulated, but for  
a simple effect you can try using three vco or vco2 and then  
crossfading between them to get the transition.

Victor

On 19 Mar 2010, at 21:58, David Bowen wrote:

> The conversation about analog synths got me looking at the Moog web
> pages and, in particular, the Mini Moog. If I understood the demo
> video the oscillators had some wave shapes that were continuously
> variable via a control knob. One example was a rectangular wave, think
> a square wave but with the high and low sections of the wave having
> different lengths.  I believe the other was a variable triangle wave.
> Is there a Csound opcode for either of these? If not, is there an easy
> way to create them with existing op codes? Obviously, you could change
> the wave table every time the wave shape parameter changed, but that's
> going to be much more effort if the wave shape is changing at a rate.
> The code to implement them shouldn't be complicated, so if they don't
> exist I may have to code them up myself, but I'm inclined to think I'm
> just not seeing them in the Manual.
>
> Dave Bowen
>
>
> 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"
>



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"

Date2010-03-19 23:07
FromSteven Yi
Subject[Csnd] Re: Re: Dynamic wave shapes
Hi Victor,

Your post got me curious about the continous waveform and I saw a post here:

http://electro-music.com/forum/viewtopic.php?p=246287

where someone did a circuit model of the Voyager waveshaper with a
Nord Modular G2.  I was able to open up the patch using the G2 Demo
software here:

http://www.clavia.se/products/nordmodular/demo.htm

I was able to play the patch and am looking at the setup now.  In the
UI, I found you can right click a module and select help to figure out
what the module type is and the help info for it, so I think it can be
reverse engineered from this patch.

steven

On Fri, Mar 19, 2010 at 6:40 PM, Victor Lazzarini
 wrote:
> I have a Minimoog voyager and its oscilators have a continuous waveform
> control (the original moog had a 4 position switch instead), going from
> triangle to saw to square to pulse. The waveforms are a little different
> from the 'classic' shapes, e.g. sawtooth has a non-linear rise and the
> square does not have straight tops (and consequently some (albeit low) even
> harmonic energy).
> I have not worked exactly how the transition can be emulated, but for a
> simple effect you can try using three vco or vco2 and then crossfading
> between them to get the transition.
>
> Victor
>
> On 19 Mar 2010, at 21:58, David Bowen wrote:
>
>> The conversation about analog synths got me looking at the Moog web
>> pages and, in particular, the Mini Moog. If I understood the demo
>> video the oscillators had some wave shapes that were continuously
>> variable via a control knob. One example was a rectangular wave, think
>> a square wave but with the high and low sections of the wave having
>> different lengths.  I believe the other was a variable triangle wave.
>> Is there a Csound opcode for either of these? If not, is there an easy
>> way to create them with existing op codes? Obviously, you could change
>> the wave table every time the wave shape parameter changed, but that's
>> going to be much more effort if the wave shape is changing at a rate.
>> The code to implement them shouldn't be complicated, so if they don't
>> exist I may have to code them up myself, but I'm inclined to think I'm
>> just not seeing them in the Manual.
>>
>> Dave Bowen
>>
>>
>> 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"
>>
>
>
>
> 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"
>
>


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"


Date2010-03-19 23:21
FromVictor Lazzarini
Subject[Csnd] Re: Re: Re: Dynamic wave shapes
Thanks for the tip, steven. I'll have a look.
On 19 Mar 2010, at 23:07, Steven Yi wrote:

> Hi Victor,
>
> Your post got me curious about the continous waveform and I saw a  
> post here:
>
> http://electro-music.com/forum/viewtopic.php?p=246287
>
> where someone did a circuit model of the Voyager waveshaper with a
> Nord Modular G2.  I was able to open up the patch using the G2 Demo
> software here:
>
> http://www.clavia.se/products/nordmodular/demo.htm
>
> I was able to play the patch and am looking at the setup now.  In the
> UI, I found you can right click a module and select help to figure out
> what the module type is and the help info for it, so I think it can be
> reverse engineered from this patch.
>
> steven
>
> On Fri, Mar 19, 2010 at 6:40 PM, Victor Lazzarini
>  wrote:
>> I have a Minimoog voyager and its oscilators have a continuous  
>> waveform
>> control (the original moog had a 4 position switch instead), going  
>> from
>> triangle to saw to square to pulse. The waveforms are a little  
>> different
>> from the 'classic' shapes, e.g. sawtooth has a non-linear rise and  
>> the
>> square does not have straight tops (and consequently some (albeit  
>> low) even
>> harmonic energy).
>> I have not worked exactly how the transition can be emulated, but  
>> for a
>> simple effect you can try using three vco or vco2 and then  
>> crossfading
>> between them to get the transition.
>>
>> Victor
>>
>> On 19 Mar 2010, at 21:58, David Bowen wrote:
>>
>>> The conversation about analog synths got me looking at the Moog web
>>> pages and, in particular, the Mini Moog. If I understood the demo
>>> video the oscillators had some wave shapes that were continuously
>>> variable via a control knob. One example was a rectangular wave,  
>>> think
>>> a square wave but with the high and low sections of the wave having
>>> different lengths.  I believe the other was a variable triangle  
>>> wave.
>>> Is there a Csound opcode for either of these? If not, is there an  
>>> easy
>>> way to create them with existing op codes? Obviously, you could  
>>> change
>>> the wave table every time the wave shape parameter changed, but  
>>> that's
>>> going to be much more effort if the wave shape is changing at a  
>>> rate.
>>> The code to implement them shouldn't be complicated, so if they  
>>> don't
>>> exist I may have to code them up myself, but I'm inclined to think  
>>> I'm
>>> just not seeing them in the Manual.
>>>
>>> Dave Bowen
>>>
>>>
>>> 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"
>>>
>>
>>
>>
>> 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"
>>
>>
>
>
> 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"
>



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"

Date2010-03-19 23:24
FromMichael Gogins
Subject[Csnd] Re: Dynamic wave shapes
The problem here is aliasing... you can't just draw the shape in a
wavetable and be done with it, and for the same exact reason you can't
just draw a sharp shape and be done with it. The shape has to be
smoothed to avoid aliasing, i.e. the square corners have to be curved
or have some sort of sinusoidal component, else the infinite number of
partials implied by the discontinuous click at the sharp corner will
fold over the Nyquist frequency and be heard as things you don't want
to hear.

The bandlimited simple waveforms in Csound are done in different ways
to avoid this, and I frankly don't know if any of them admit of
continuous gradual changes in waveform. I know that it is possible to
continuously vary waveshaping distortion so I think that something
like this probably is possible, but somebody like Victor would know
better than I.

Hope this helps,
Mike

On Fri, Mar 19, 2010 at 5:58 PM, David Bowen  wrote:
> The conversation about analog synths got me looking at the Moog web
> pages and, in particular, the Mini Moog. If I understood the demo
> video the oscillators had some wave shapes that were continuously
> variable via a control knob. One example was a rectangular wave, think
> a square wave but with the high and low sections of the wave having
> different lengths.  I believe the other was a variable triangle wave.
> Is there a Csound opcode for either of these? If not, is there an easy
> way to create them with existing op codes? Obviously, you could change
> the wave table every time the wave shape parameter changed, but that's
> going to be much more effort if the wave shape is changing at a rate.
> The code to implement them shouldn't be complicated, so if they don't
> exist I may have to code them up myself, but I'm inclined to think I'm
> just not seeing them in the Manual.
>
> Dave Bowen
>
>
> 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"
>
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


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"


Date2010-03-19 23:52
FromMalte Steiner
Subject[Csnd] Re: Dynamic wave shapes
vco / vco2 can PWM (changing the Square to Pulse waveform) and Triangle 
to Sawtooth morphing.

Cheers,

Malte

Date2010-03-20 00:52
FromOeyvind Brandtsegg
Subject[Csnd] Re: Re: Dynamic wave shapes
Just a shot in the dark, but since these waveforms are all constructed
by adding sinusoidal harmonic components, wouldn't it be possible to
morph between the waveforms by controlling the amplitude of each
harmonic separately ? Obviously, one would need some of the harmonics
in different phase flavors (as e.g. the triangle wave has every second
component phase inverted), but such a doubling of some harmonics need
not be very expensive CPU-wise? The amplitudes for each harmonic
component could be stored in a table(one control table for each
desired waveform), and then use ftmorf to create the transition
(writing to the table used to actually control the synthesis
parameters). Bandlimiting could be achieved by simply calculating the
available number of harmonics below Nyquist, and since the amplitude
of each harmonic is continuously controlled this would allow for
correct bandlimiting even if the tone has pitch sweeps.
Oh, admittedly it's a "brute force" approach, but some optimization
could be done to not process oscillators with zero amplitude. And of
course PWM effects would need some special handling, I'm not sure but
maybe opcodes like pdhalf could do some of that, or use phase
modulation (synchronized to the base pitch) on all oscillators.

Oeyvind

2010/3/20 Michael Gogins :
> The problem here is aliasing... you can't just draw the shape in a
> wavetable and be done with it, and for the same exact reason you can't
> just draw a sharp shape and be done with it. The shape has to be
> smoothed to avoid aliasing, i.e. the square corners have to be curved
> or have some sort of sinusoidal component, else the infinite number of
> partials implied by the discontinuous click at the sharp corner will
> fold over the Nyquist frequency and be heard as things you don't want
> to hear.
>
> The bandlimited simple waveforms in Csound are done in different ways
> to avoid this, and I frankly don't know if any of them admit of
> continuous gradual changes in waveform. I know that it is possible to
> continuously vary waveshaping distortion so I think that something
> like this probably is possible, but somebody like Victor would know
> better than I.
>
> Hope this helps,
> Mike
>
> On Fri, Mar 19, 2010 at 5:58 PM, David Bowen  wrote:
>> The conversation about analog synths got me looking at the Moog web
>> pages and, in particular, the Mini Moog. If I understood the demo
>> video the oscillators had some wave shapes that were continuously
>> variable via a control knob. One example was a rectangular wave, think
>> a square wave but with the high and low sections of the wave having
>> different lengths.  I believe the other was a variable triangle wave.
>> Is there a Csound opcode for either of these? If not, is there an easy
>> way to create them with existing op codes? Obviously, you could change
>> the wave table every time the wave shape parameter changed, but that's
>> going to be much more effort if the wave shape is changing at a rate.
>> The code to implement them shouldn't be complicated, so if they don't
>> exist I may have to code them up myself, but I'm inclined to think I'm
>> just not seeing them in the Manual.
>>
>> Dave Bowen
>>
>>
>> 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"
>>
>>
>
>
>
> --
> Michael Gogins
> Irreducible Productions
> http://www.michael-gogins.com
> Michael dot Gogins at gmail dot com
>
>
> 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"
>
>


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"


Date2010-03-21 16:28
FromHans Mikelson
Subject[Csnd] Re: Re: Re: Dynamic wave shapes
Hi,

You can do modulate between square and rectangular pulse using vco and vco2.  As far as I can see it should be possible to create code that would also modulate between sawtooth and square wave by gradually changing the components of the pulses.  You could probably do this in Csound code with band limited pulse trains, and working with the leaky integrator and whether or not you subtract the pulse train or not.  Not sure how accurate the waveforms will turn out though.

Regards,
Hans Mikelson



On Mar 19, 2010, at 7:52 PM, Oeyvind Brandtsegg wrote:

> Just a shot in the dark, but since these waveforms are all constructed
> by adding sinusoidal harmonic components, wouldn't it be possible to
> morph between the waveforms by controlling the amplitude of each
> harmonic separately ? Obviously, one would need some of the harmonics
> in different phase flavors (as e.g. the triangle wave has every second
> component phase inverted), but such a doubling of some harmonics need
> not be very expensive CPU-wise? The amplitudes for each harmonic
> component could be stored in a table(one control table for each
> desired waveform), and then use ftmorf to create the transition
> (writing to the table used to actually control the synthesis
> parameters). Bandlimiting could be achieved by simply calculating the
> available number of harmonics below Nyquist, and since the amplitude
> of each harmonic is continuously controlled this would allow for
> correct bandlimiting even if the tone has pitch sweeps.
> Oh, admittedly it's a "brute force" approach, but some optimization
> could be done to not process oscillators with zero amplitude. And of
> course PWM effects would need some special handling, I'm not sure but
> maybe opcodes like pdhalf could do some of that, or use phase
> modulation (synchronized to the base pitch) on all oscillators.
> 
> Oeyvind
> 
> 2010/3/20 Michael Gogins :
>> The problem here is aliasing... you can't just draw the shape in a
>> wavetable and be done with it, and for the same exact reason you can't
>> just draw a sharp shape and be done with it. The shape has to be
>> smoothed to avoid aliasing, i.e. the square corners have to be curved
>> or have some sort of sinusoidal component, else the infinite number of
>> partials implied by the discontinuous click at the sharp corner will
>> fold over the Nyquist frequency and be heard as things you don't want
>> to hear.
>> 
>> The bandlimited simple waveforms in Csound are done in different ways
>> to avoid this, and I frankly don't know if any of them admit of
>> continuous gradual changes in waveform. I know that it is possible to
>> continuously vary waveshaping distortion so I think that something
>> like this probably is possible, but somebody like Victor would know
>> better than I.
>> 
>> Hope this helps,
>> Mike
>> 
>> On Fri, Mar 19, 2010 at 5:58 PM, David Bowen  wrote:
>>> The conversation about analog synths got me looking at the Moog web
>>> pages and, in particular, the Mini Moog. If I understood the demo
>>> video the oscillators had some wave shapes that were continuously
>>> variable via a control knob. One example was a rectangular wave, think
>>> a square wave but with the high and low sections of the wave having
>>> different lengths.  I believe the other was a variable triangle wave.
>>> Is there a Csound opcode for either of these? If not, is there an easy
>>> way to create them with existing op codes? Obviously, you could change
>>> the wave table every time the wave shape parameter changed, but that's
>>> going to be much more effort if the wave shape is changing at a rate.
>>> The code to implement them shouldn't be complicated, so if they don't
>>> exist I may have to code them up myself, but I'm inclined to think I'm
>>> just not seeing them in the Manual.
>>> 
>>> Dave Bowen
>>> 
>>> 
>>> 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"
>>> 
>>> 
>> 
>> 
>> 
>> --
>> Michael Gogins
>> Irreducible Productions
>> http://www.michael-gogins.com
>> Michael dot Gogins at gmail dot com
>> 
>> 
>> 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"
>> 
>> 
> 
> 
> 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"
> 



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"