[sdiy] XOR as 'digital' ring modulator

Tim Ressel madhun2001 at yahoo.com
Wed Nov 10 21:27:53 CET 2010


As a hopefully interesting side note, there are 2 ways to obtain the  "ring 
modulator" function. The popular one for the synth crowd is a  linear multiplier 
like the AD633. The other way is by polarity reversal.  This is how true "ring 
modulators" work: the carrier signal goes  through an amplifier that has a 
selectable gain of + or - 1.  The  modulation signal's sign determines the gain 
polarity: when the mod  signal is positive the gain is +1, when negative, -1. 


This is of course not nearly as clean as the linear multiplier, but hey, clean 
is over-rated. 


The XOR ring mod works as a true ring mod, as an XOR gate is a 
digitally-controlled inverter.

We return you now to your regularly scheduled programming.

--TimR


----- Original Message ----
From: cheater cheater <cheater00 at gmail.com>
To: "Speth, John" <John.Speth at coherent.com>
Cc: Dave Leith <dave.leith at gmail.com>; SDIY <synth-diy at dropmix.xs4all.nl>
Sent: Wed, November 10, 2010 11:02:43 AM
Subject: Re: [sdiy] XOR as 'digital' ring modulator

Hi John,
a typical multiplier works like this:

z = x * y

Now if you expand this to show the signs, it looks like this:

z = sgn(x) * |x| * sgn(y) * |y|
= sgn(x)*sgn(y) * |xy|

the xor table is as follows:

F \/ F == F
F \/ T == T
T \/ F == T
T \/ T == F

The table of sgn(x) * sgn(y) is as follows:

-1 * -1 = 1
-1 * 1 = -1
1 * -1 = -1
1 * 1 = 1
-1 * 0 = 0
1 * 0 = 0
0 * 1 = 0
0 * -1 = 0

So, if False is represented by 1 and True is represented by -1, then
we have a match for the first 4 rows of the table. However there is a
third item here. Of course to represent the whole function of a ring
modulator you'll at least need an operator that works in ternary
logic. Those are, from what I understand, possible to wire using
binary gates.

It appears this can be achieved in the ternary logic with null. See
the table here:

http://www.comsci.us/db/sqlnotes/sql03.html

Binary Ternary Logic Operators
Operands   AND OR XOR
null    null     null    null    null
null    false     false    null    null
null    true     null    true    null
false    null     false    null    null
false    false     false    false    false
false    true     false    true    true
true    null     null    true    null
true    false     false    true    true
true    true     true    true    false

As you can see, the value combinations are the same as sgn(x) * sgn(y).

A ternary logic XOR can be created in this way: two signals are
ternary and encoded with -5V = False, 5V = True, 0V = Null.

Because the ternary logic XOR operator is an extension of the binary
logic XOR operator, we can use the usual XOR circuit in a very
specific monad; that means a circuit like this:

1. either signal gets checked for being 0 (Null). There is a wire that
shoots off to the side and bypasses the xor circuit completely, and
then goes to a multiplier, say an AND gate or transistor or op-amp. If
that bypass wire signals 0, then the AND outputs 0. If it doesn't
signal 0, the AND outputs what it gets from the XOR circuit. This wire
is our monad sub-channel.

2. After the signals got checked for being 0 with the special wire
coming off, there is a level shift to convert the signal to binary
logic. We ignore Null and replace it with e.g. False, or True, it
doesn't matter. Then we send that converted signal to the XOR block
which is able to process it. This is our converter, and we're "in the
monad" now.

3. After the signals have been processed in the monad by the XOR
block, we up-convert them to the ternary signal again. True gets
converted to 5V, False gets converted to -5V.

4. After this up-conversion we go to the multiplier which checks the
sub-channel. When the sub-channel says 0, the multiplier outputs 0V
(which is Null).

This should produce the behavior that you are looking for.

HTH,
D.

On 10/11/2010, Speth, John <John.Speth at coherent.com> wrote:
> Of course, it's the good sound we're after when all is said and done.  The
> MOTM-120 (http://www.synthtech.com/motm120.html) features a digital
> ring-mod.  I socketed the digital chip in my M120 so I could experiment with
> XOR vs NOR easily.
>
> To my ears they both sounded the same when two waveforms were driven into
> it.  The XOR will sound the squared wave version of the sounding input if
> the other input is silent (IOW, out = in).
>
> It was my opinion that a ring-mod should be silent when one of the inputs is
> silent so I left the NOR chip installed.  I still like it that way.  I
> wouldn't say a digital ring-mod is any kind of sub for the analog version.
> It just sounds too different.
>
> John Speth
> mailto:john.speth at coherent.com
>
> The information contained in this communication is confidential and may be
> legally privileged. It is intended solely for the use of the individual or
> entity to whom it is addressed and others authorized to receive it. If you
> are not the intended recipient you are hereby (a) notified that any
> disclosure, copying, distribution or taking any action with respect to the
> content of this information is strictly prohibited and may be unlawful, and
> (b) kindly requested to inform the sender immediately and delete any copies.
> Coherent is neither liable for the proper and complete transmission of the
> information contained in this communication nor for any delay in its
> receipt.
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
>
_______________________________________________
Synth-diy mailing list
Synth-diy at dropmix.xs4all.nl
http://dropmix.xs4all.nl/mailman/listinfo/synth-diy




More information about the Synth-diy mailing list