Strange comment in wikipedia about TB303's square waves

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

The 303's square is strange-looking, no doubt about that. I never took a close look at it, but I always assumed its strangeness was probably mostly in the realm of unusually offset phases for the different partials.

However, the other day I was looking at wikipedia's 303 article and saw this:
The TB-303 has a single audio oscillator, which may be configured to produce either a sawtooth wave or a square wave. The square wave is in fact created by flipping every other cycle of the sawtooth wave upside down, giving it a specific, more hollow, sound a bit different from regular square waves[citation needed].
I don't think I believe that. Wouldn't a ramp flipped every other cycle simply be a triangle one octave lower?
Swing is the difference between a drum machine and a sex machine.

Post

Maybe the flip happens every cycle, on the half cycle?

Code: Select all

___|\/|    _____
          |/\|

Post

Naw, seems a strange way of doing things .... to flip a wave, in sync ( or x2)you would almost certainly need a second oscillator, almost certainly a square wave, to do the job.
So why use a second square wav oscillator to flip the waveform of the first oscillator in order to produce a waveform which emulates a square?? ... when you might as well just switch to the output of the second oscillator which is producing an actual square wave??

But even that would be a strange way of going about things .... two oscs, producing two waveforms, and no facilty to mix between them??

I'm not an expert on the 303, but I would guess that the switching between the waveforms is a case of selecting either square or saw from the same osc.

Post

Image

:)

Post

People who have reverse engineered the TB-303 have said a waveshaping circuit is used to convert the saw into a square waveform. But this is performed by an analogue circuit (as the waveform is generated entirely in the analogue domain), so the bit about bit-flipping makes no sense, at least in the context of a real TB-303 rather than an emulation.

Post

Rock Hardbuns wrote:Maybe the flip happens every cycle, on the half cycle?

Code: Select all

___|\/|    _____
          |/\|
I'm not 100% sure I understand your ASCII art. :-)
Swing is the difference between a drum machine and a sex machine.

Post

Gamma-UT wrote:People who have reverse engineered the TB-303 have said a waveshaping circuit is used to convert the saw into a square waveform. But this is performed by an analogue circuit (as the waveform is generated entirely in the analogue domain), so the bit about bit-flipping makes no sense, at least in the context of a real TB-303 rather than an emulation.
Do you have a link to this discussion? I'd love to know what that waveshaper did.

I make square waves (and arbitrary-duty pulses) by subtracting one ramp from another. The idea of waveshaping a ramp into a square is interesting.
Swing is the difference between a drum machine and a sex machine.

Post

mistertoast wrote:
Gamma-UT wrote:People who have reverse engineered the TB-303 have said a waveshaping circuit is used to convert the saw into a square waveform. But this is performed by an analogue circuit (as the waveform is generated entirely in the analogue domain), so the bit about bit-flipping makes no sense, at least in the context of a real TB-303 rather than an emulation.
Do you have a link to this discussion? I'd love to know what that waveshaper did.

I make square waves (and arbitrary-duty pulses) by subtracting one ramp from another. The idea of waveshaping a ramp into a square is interesting.
There is a schematic from the service manual here: http://machines.hyperreal.org/manufactu ... chem-5.gif

There is also this: http://www.ladyada.net/wiki/x0x/voltage ... oscillator
And this: http://www.oakleysound.co.uk/tm3030.pdf

The waveshaper is apparently a single transistor that, I guess, is fed off the sawtooth wave and acts as a kind of threshold detector. Above the threshold, it drives at full power. Once the wave falls below the threshold, it turns off, giving you a square wave. Looking at the voltage graphs, a level shifter must come into play later on.

Post

That's great info, Gamma-UT. But it sounds as if it would make a pretty square-looking square to me. I was under the impression that the 303 square was very weird-looking...

http://www.csounds.com/ezine/spring2000/weekly/
Swing is the difference between a drum machine and a sex machine.

Post

People also keep saying that because of the limited gain from "the shaper", the transition in the middle of the sawtooth is slower than the transition when the saw resets, so you essentially get some even harmonics bleeding through from the saw, especially at higher frequencies.

Ignoring aliasing, you can probably simulate the result by running a saw through a soft-clipper with enough gain.

As for how the thing looks after it comes out of the filter and amplifier, don't forget that any high-pass action going on (which TB supposedly has plenty) will radically change the appearance of a waveform, so you really gotta poke into the circuit and look at the square before it goes through any coupling capacitors.
That's great info, Gamma-UT. But it sounds as if it would make a pretty square-looking square to me. I was under the impression that the 303 square was very weird-looking...

http://www.csounds.com/ezine/spring2000/weekly/
Yeah that's a pretty square looking square to me.. just coming to your through some high-pass and resonant low-pass filtering (with some serious asymmetric non-linearities in the resonance, curious actually).

Post

my square looks almost like this, and when not filtered it looks like a normal square..
damn, i don't have where to upload a damn picture..
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

mystran wrote:People also keep saying that because of the limited gain from "the shaper", the transition in the middle of the sawtooth is slower than the transition when the saw resets, so you essentially get some even harmonics bleeding through from the saw, especially at higher frequencies.
That would make sense, it would look more like an S-curve in the middle but reasonably square at the beginning and end of the cycle.

Post

btw, i don't like some of the statements on the Wikipedia page..
one of them is exactly this, about the square wave "flip every other cycle" wtf?! :nutter: :tantrum:
one thing i am almost sure about, is that the 303 square is not perfect.. (i mean the width of the positive and negative parts are different in length, not exactly 50% : 50% ..)
and this is a little more different in each machine

if we look at it as a PulseWidth value on a Pulse waveform (where the PW parameter is the phase offset between two Saw oscs (one inverted), sort of.. 100% = 0.5 phase offset, 0% = 0.0 phase offset (silence)

then i got some audio material where i match the PW around 86-87%
in another audiomaterial (someone else's TB-303) it's more like 98% (close to perfect square)
/* EDIT: i haven't measured that at different osc pitches, but i think i believe that it is possible for this "PW" value to differe depending on Osc frequency too! EDIT */

i am not sure, but i guess somewhere on the inside of the TB-303, there might be a way to "adjust" this, not sure (but since stuff like the resonance can be adjusted from the inside..)
It doesn't matter how it sounds..
..as long as it has BASS and it's LOUD!

irc.libera.chat >>> #kvr

Post

antto wrote:btw, i don't like some of the statements on the Wikipedia page..
They are degenerating into semi-knowledge and marketing when it comes to synthesizer theory. IMHO.

Post

antto wrote:btw, i don't like some of the statements on the Wikipedia page..
one of them is exactly this, about the square wave "flip every other cycle" wtf?! :nutter: :tantrum:
Wikipedia wrong? Who'da thunk it? I think you can safely ignore the 'flip every other cycle' bit. In fact, I think I might go and edit it. The waveshaper bit is right, at least.

antto wrote:one thing i am almost sure about, is that the 303 square is not perfect.. (i mean the width of the positive and negative parts are different in length, not exactly 50% : 50% ..)
and this is a little more different in each machine

if we look at it as a PulseWidth value on a Pulse waveform (where the PW parameter is the phase offset between two Saw oscs (one inverted), sort of.. 100% = 0.5 phase offset, 0% = 0.0 phase offset (silence)

then i got some audio material where i match the PW around 86-87%
in another audiomaterial (someone else's TB-303) it's more like 98% (close to perfect square)

i am not sure, but i guess somewhere on the inside of the TB-303, there might be a way to "adjust" this, not sure (but since stuff like the resonance can be adjusted from the inside..)
There is a reference to this in one of the docs - I think it's in the Oakley manual. Basically, doing a waveshaper circuit with one transistor is asking for trouble because you are hostage to the minor differences between transistors, even ones cut from the same wafer. Each individual component will saturate at a slightly different point. A nicely balanced circuit will try to organise these components so that these variations cancel out. But there is no such attempt, it seems, in the TB-303.

Given the market for the unit, it probably wasn't worth the expense of doing a more sophisticated design. So, what you'll have is a transistor that switches off at subtly different points of the sawtooth cycle. The bad news is that the only way to adjust this is to replace transistor Q8 with a slightly different one (although I guess that replacing a resistor with a potentiometer at a strategic point could give you the ability to sweep the pulsewidth, up to a limit).
Last edited by Gamma-UT on Wed Aug 26, 2009 6:17 am, edited 3 times in total.

Post Reply

Return to “DSP and Plugin Development”