Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Sat Dec 23, 2006 7:54 am Post subject:
Voltage controlled waveform symmetry, request for advice
Hello all,
My first post here...
I really wanted a voltage controlled "triangular" wave symmetry, that is, from falling sawtooth to triangle to raising sawtooth. So I designed one from scratch, and was happy to discover it was very similar to the ones from Achim Gratz, Don Tillman or Osamu Hoshuyama. It is not waveshape morphing, only hardware waveshaping.
Attached are a few examples of what I manage to obtain (don't worry about the time scale, it is just for convenience -- BTW it is just LTSpice simulation, not real breadboarding).
As you can see I still have a horrible glitch at every cycle transition. Of course I can filter it out, but then it rounds the corners of the waveshape... I could see that similr topics have been discussed here, but I'd like soeme advice about switching voltages with (hopefully) no glitch at all...
Funny thing with the glitches is that the first full period seems OK. Can't really comment on it as the schematics are too small for me to read, but you should be nearly there
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 12:13 am Post subject:
Thank you Jan (& Merry Christmas BTW ),
Sorry for the schematics, these are LTSpice hardcopies and I didn't suspect they would come out so badly...
Some thought and experiment made me realize that the glitch occurred at the transition between cycles, not at the switching between raising and falling segments... Hence it is likely that it is in fact due to the end-of-cycle (reset) of the original ramp waveform.
That the first period seems OK is probably dur to LTSpice performing transient analysis, generally the initial conditions do have some impact on the first few periods... nice to understand why that $*@& oscillator will latch up and never actually start oscillating.
I keep digging that... I'm trying to post a clearer schematics as well as some more detailed explanation & maybe a demo .wav file.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 12:23 am Post subject:
Hi again,
Here is a "demo" sound of the waveshaper in action... Just the plain output wave (no filtering nor envelope, just to hear what it sounds like). About 400Hz (IIRC) modulated by a 1Hz sine wave between -4.5V and +4.5V.
The full range (-5V => falling ramp, +5V => rainsing ramp) is about as meaningless as a 0% or 100% duty cycle PWM...
Similar to PWM but harsher. Considering the complexity of the circuit I doubt its musical interest... maybe for a LFO ?
Variable ramp LFO's are fun. I love the one on the MS20, but it had no voltage control of shape.
The G2 has a variable ramp oscillator but I find it less useful than I imagined due to the perceived loudness increase as it gets closer to a sawtooth.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 1:53 am Post subject:
Hello g2ian,
I do agree. The MS-20 LFO was really useful (& fun). For a VCO (I mean at audio frequencies) I think that waveshape modulation should be kept quite low (say, 10%, 20% max) precisely for the reason you state.
I found the attached schemo on some Japanese SDIY site, I think it comes from Mike Irwin. It is a VC-LFO with VC wave symmetry, but I don't like this two-slope integrator. As mentioned on the schemo, probably very unstable in frequency.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 2:42 am Post subject:
Hello, back to it...
Aaaaaarghhh... I got it at last !
The glitch comes from the waveshaper itself, I mean intrinsically... When fed a symmetric triangle waveform instead of a rising ramp, you get two asymmetric ramps, kind of mirror images (see first attached curves -- top pane is the input signal, bottom is the resulting output).
Now feed it an asymmetric triangle waveform -- second curves are what you get... See it ? What happens is that the reset of the input ramp is not instantaneous. It is "understood" as a extremely fast falling ramp.
So this is not a good idea for waveshaping -- at least not the way it was intended. Still usable, but the result is more like a waveclipper... And filtering the "glitch" out doesn't seem a suitable solution.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 6:19 am Post subject:
Hello Jan,
Blue Hell wrote:
I had expected problems near the -5V level of the ramp signals due to cliping of the divider output(s) ...
The dividers do indeed clip. But only the part of their outputs between 0V and +10V is used, so this should not be a problem... I did expect some glitch at the commutation point, and it does not occur... Glad I made a simulation, not a real breadboard !
Blue Hell wrote:
Still the graphs shown using an asymetric triangle as the input seem to indicate the circuit might have some purpose for waveshaping after all.
Sure. But now, how do I get an asymmetric triangle to feed the waveshaper ? Another VC waveshaper ?
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Wed Dec 27, 2006 7:21 am Post subject:
After all, filtering the "glitch" with a single RC cell at about 15kHz cutoff seems to work fine... cancels the glitch, does not round the corners too much, and preserves the waveforms obtained with asymmetric triangle inputs... I might keep this one after all, though mostly as a curiosity.
Here is a ‘switch less’ technique to do a triangle to sawtooth morph. It requires a quadrature sine VCO, or a self oscillating multimode filter.
Basically cross fading between the sine and cosine gives a smooth phase shift from 0-90 deg. Convert the two sine waves into parabolic waves with full wave rectifiers, then just sum the zero phase parabolic wave with the inverted variable phase parabolic wave.
The level drops to zero as the wave approaches the true sawtooth but in a way, this compensates for the increase in perceived loudness due to extra harmonics.
This G2 patch should load into the free G2 demo software and illustrates the idea. The G2 does not have a true quadrature sine but this patch uses the BP out of a multimode filter with resonance to get a tracking cosine. The oscillator and filter must track frequency to maintain the correct phase and level relationship.
Tri2Saw.pch2
Description:
morph from saw to triangle, might be doable on analog modular.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Fri Dec 29, 2006 4:27 am Post subject:
Thank you g2ian for this nice patch,
It sounds as I expected. But I still have to understand how you get a "tri to saw" morph from sine waves... a pity there is no oscilloscope on the G2!
In fact I don't really like these software synths, otherwise I would not be designing analog modules. Yes, I do realize that Spice-simulating modules is exactly the same thing as softsynths (albeit far less powerful). But these simulated circuits will have real existence some day.
On the other hand I have (access to) software Arp-2600, Moog Modular, Vaz Modular and now G2 demo (I thought some DSP hardware was a requirement) and I admit they do a good job. Only it is not the same as a real analog... oh, well, they sound about the same, okay.
About the perceived loudness of a tri-to-sine morph. I prefer to have constant signal levels at the oscillators' outputs, but clearly a sine wave will sound much dimmer than a sawtooth. The Elektor Formant had different levels for different waveshapes. I just don't like it, probably because I tend to think more in terms of electronics & math than in musical ones...
Yes, I have the G2 hardware so I can use VA ( a very nice free software scope).
There is a noticable curve on one flank of the sawtooth but I assume this is because a full wave rectified sine is not a true parabolic wave.
I assume it would be not too difficult to scale the output level based on the CV to flatten out the results.
The G2 patch is only an illustration, the G2 itself allready has a tri-saw (ShapeOscA option 5, LFOshpA). Interestingly, these fall short of 100% sawtooths as well.
I was thinking that the patch showed how to add a usefull wave shapeing option to an analog quadrature oscillator, a nice side effect is that the triangle/saw is twice the frequency of the sine allowing for a true sine suboctave.
Interesting about the quadrature triangle, I thought that would give a trapezoid wave.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Fri Dec 29, 2006 2:41 pm Post subject:
g2ian wrote:
Yes, I have the G2 hardware so I can use VA ( a very nice free software scope).
Unfortunately I would need $$$ (or in my case €€€) for that... and the most urgent need is to re-install a real lab, and build modules instead of simulate them...
g2ian wrote:
There is a noticable curve on one flank of the sawtooth but I assume this is because a full wave rectified sine is not a true parabolic wave.
True enough. A rectified sine remains sine-shaped, which is (mathematically speaking) far from a parabola. But that doesn't really matter for these purposes...
g2ian wrote:
The G2 patch is only an illustration, the G2 itself allready has a tri-saw (ShapeOscA option 5, LFOshpA). Interestingly, these fall short of 100% sawtooths as well.
Yes, I did notice this module. And as I mentioned in one of my first posts on this topic, a 100% sawtooth (obtained by morphing) is about as meaningless as a 100% duty cycle pulse wave.
g2ian wrote:
I was thinking that the patch showed how to add a usefull wave shapeing option to an analog quadrature oscillator, a nice side effect is that the triangle/saw is twice the frequency of the sine allowing for a true sine suboctave.
There are plenty of ways to obtain sub- and sup-octaves from triangles or sawtooths... more difficult with sines.
g2ian wrote:
Interesting about the quadrature triangle, I thought that would give a trapezoid wave.
In fact, not quite that. I simulated quadrature triangle and rectifiers with LTSpice (very easy thing to do) and the resulting wave is more like... er... say, half a sawtooth. If you imagine an original sawtooth from -5V to +5V, it is the positive part of it, same as half-wave rectification.
The G2 has a variable ramp oscillator but I find it less useful than I imagined due to the perceived loudness increase as it gets closer to a sawtooth.
Joined: Dec 23, 2006 Posts: 139 Location: Paris (France)
Audio files: 1
Posted: Mon Jan 01, 2007 6:15 am Post subject:
Hello and happy new year to all !
Very nice sample, Jari.
I expected to use my "waveshaper" to implement pulse position modulation (PPM) as well as pulse width modulation (PWM). While PPM is strictly speaking phase modulation, it is not equivalent to the classic phase-lag networks because it introduces the same delay at all frequencies. And PWM is more like filtering...
There are many easier ways to implement simultaneous PPM/PWM (a window comparator does the job when fed a ramp or a triangle) so I am experimenting with it. The first results are not that impressive however...
Joined: May 04, 2007 Posts: 1734 Location: NM USA
Audio files: 54
Posted: Fri May 11, 2007 10:07 am Post subject:
Well, I'm a bit late to this party, but I have a totally new way to do this ... using a saturating negative impedance converter. (Wha...???)
Check out the SNICster on my website:
http://home.comcast.net/~ijfritz/sy_cir10.htm
Oh, it does some other stuff too.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum