How to invert gates only when flip-flop gate is mixed

Cwejman, Livewire, TipTop Audio, Doepfer etc... Get your euro on!

Moderators: Kent, luketeaford, Joe.

Post Reply
HS_Modular
Learning to Wiggle
Posts: 16
Joined: Mon Oct 12, 2020 8:59 am

How to invert gates only when flip-flop gate is mixed

Post by HS_Modular » Thu Feb 18, 2021 11:46 am

I am struggling with varying constant beat pattern using constant gates, polarizer and flip-flop/logic modules.
This is what I am doing as of now:

A: Original pattern
x-x-x-x-x-x-x-x

B: Inverted pattern
-x-x-x-x-x-x-x-x

This is quite easy to make it, just feeding A to polarizer to invert it.

C: Desired pattern (combination of A and B)
x-x-x-x--x-x-x-x

The first half of the pattern is from A and the latter half is from B.
It is easy to do so by preparing A and B independently and feed them into sequential switch, then put triggers to swith A and B repeatedly.
However, what I want to do is, transforming A into B and B into A repeatedly without splitting the signals independently to save space of my rack (no space for more switch module) as well as to play with signals from one module.

I presumed this can be done by using another logic/flip-flop module (Intellijel Plog) and polarizer (MI Blinds) that I already own.
The pattern A is fed into Blinds signal input, then, flip-flop signal from Plog is fed into the modulation input of Blinds.
In the latter part of the pattern (inverted pattern), flip-flop goes HIGH (by feeding other triggers to Plog), attenuverter is set CCW to multiply the original gates and inverted flip-flop gates so that the original HIGH signals goes LOW and LOW signals goes HIGH to invert the A only the time of HIGH flip-flop. Offset is adjusted to run the output signals for drum voices.

However, the resulted pattern is:

D: wrong pattern
---------x-x-x-x

I am struggling with making the pattern C but could not reach the desired result.
I can use logic module but not sure how this function can help (it is the first time for me to try to modulate gate signals).
It is highly appreciated if you provide any suggestions to support learning modular!

User avatar
XODES
Common Wiggler
Posts: 129
Joined: Wed Nov 06, 2019 2:32 pm
Location: France

Re: How to invert gates only when flip-flop gate is mixed

Post by XODES » Thu Feb 18, 2021 12:11 pm

If you always want the inversion to happen at the middle of your pattern (or should I say after 4 steps), you should be able to get the desired result with the pattern A divided by 4 (could be done with 2 flip-flops), with the divided result going to an XNOR logic gate.

The other input of the XNOR should be the pattern A itself, as in your example, pattern B is only an inversion of A.

If you use a XOR instead, you'll have to invert the output.

Edit : if you want the inversion to always happen at the middle of your pattern, better feed your clock to the divider, so that you can vary the pattern, and not be forced to program 4 active steps.
Image   Image   Image   Image

flashheart
Super Deluxe Wiggler
Posts: 1860
Joined: Mon Jun 01, 2009 7:58 am

Re: How to invert gates only when flip-flop gate is mixed

Post by flashheart » Thu Feb 18, 2021 5:32 pm

XODES wrote:
Thu Feb 18, 2021 12:11 pm
If you always want the inversion to happen at the middle of your pattern (or should I say after 4 steps), you should be able to get the desired result with the pattern A divided by 4 (could be done with 2 flip-flops), with the divided result going to an XNOR logic gate.

The other input of the XNOR should be the pattern A itself, as in your example, pattern B is only an inversion of A.

If you use a XOR instead, you'll have to invert the output.

Edit : if you want the inversion to always happen at the middle of your pattern, better feed your clock to the divider, so that you can vary the pattern, and not be forced to program 4 active steps.
If the divided clock starts low using an XOR will leave the original pattern intact, once it goes high the pattern will be inverted, that's my interpretation of XOR.
I'm not buying a maths though, not my idea of fun...

User avatar
XODES
Common Wiggler
Posts: 129
Joined: Wed Nov 06, 2019 2:32 pm
Location: France

Re: How to invert gates only when flip-flop gate is mixed

Post by XODES » Fri Feb 19, 2021 3:00 am

flashheart wrote:
Thu Feb 18, 2021 5:32 pm
If the divided clock starts low using an XOR will leave the original pattern intact, once it goes high the pattern will be inverted, that's my interpretation of XOR.
Usually dividers start high, as the changes are on the rising edge of the input signal, so it somewhat stays in phase with the original one.

Where I was wrong was about the division : I said 4 while it should actually be 8, so possibly 3 flip-flops used as divide-by-2 in series, yet it might be better to go with a dedicated "frequency dividing" module.

The XOR function can indeed be seen as a "digitally controlled inverter".

If you want to go for a XOR instead of XNOR, and use a divider that would have a high state first, you'll whether need to invert the output of the divider, or the output of the XOR, the result being the same.

Using the XNOR with a non-inverted divider might save some patching.
Image   Image   Image   Image

HS_Modular
Learning to Wiggle
Posts: 16
Joined: Mon Oct 12, 2020 8:59 am

Re: How to invert gates only when flip-flop gate is mixed

Post by HS_Modular » Fri Feb 19, 2021 11:11 am

XODES and flashheart, thank you for your suggestions!!
It was quite easy to make it thanks to your suggestions which reduces patching than my original idea.
yet it might be better to go with a dedicated "frequency dividing" module.
Yes, actually I do want to control the timing of changing the patterns not to repeatedly make it happen.
As the pattern C (inverted pattern of pattern A) can be generated by simply feeding HIGH gate to logic module in conjunction with pattern A, it is simply depends on how often it happens.

I understand that after dividing the original triggers from a sequencer (specifically MI Grids in my case), the output signals will be converted from triggers into gate signals.

Actually I was searching for some modules which can convert simple trigger from sequencers to gate signals.
Anyway MI Grids has an option to switch the output signals between triggers and gates. I do not have an osilloscope to check it but will try if it works well.

Pulse width modulation seems to be interesting to vary beat patterns.
I have 4ms QCD and its expander will be interesting as the modulation source.

Thank you for your help!!

User avatar
XODES
Common Wiggler
Posts: 129
Joined: Wed Nov 06, 2019 2:32 pm
Location: France

Re: How to invert gates only when flip-flop gate is mixed

Post by XODES » Fri Feb 19, 2021 12:17 pm

HS_Modular wrote:
Fri Feb 19, 2021 11:11 am
I understand that after dividing the original triggers from a sequencer (specifically MI Grids in my case), the output signals will be converted from triggers into gate signals.

Actually I was searching for some modules which can convert simple trigger from sequencers to gate signals.
Anyway MI Grids has an option to switch the output signals between triggers and gates. I do not have an osilloscope to check it but will try if it works well.

Pulse width modulation seems to be interesting to vary beat patterns.
I have 4ms QCD and its expander will be interesting as the modulation source.

Thank you for your help!!
I'm not sure I get your question about the gate signal. Say your original signal is a simple straight clock, like the first line below, the divider output should look like the second line.

͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞ ͟ ͞

͟ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͞ ͟ ͟ ͟ ͟ ͟ ͟ ͟ ͟ ͞

About the trig/gate question, from MI's Grids page, you can read :

"By default, Grids produces trigger signals (short 1ms pulses). This behavior - which is recommended for 808 or 909-like sound modules - can be changed in order to produce gate signals more suitable for controlling envelopes or other modules’ CV inputs. In this case, the output stays high for the whole duration of the clock’s positive cycle. It is thus possible to alter the gate length by driving Grids from a clock module with a duty cycle parameter (or from a square VCO with pulse-width control). The internal clock has a fixed 50% duty cycle. To change the trig/gate configuration, turn C2 (MAP Y)."

So you should be able to vary the duration of your steps if you feed it with a "clock" source with a variable pulse width.
Image   Image   Image   Image

HS_Modular
Learning to Wiggle
Posts: 16
Joined: Mon Oct 12, 2020 8:59 am

Re: How to invert gates only when flip-flop gate is mixed

Post by HS_Modular » Mon Feb 22, 2021 9:11 pm

Thank you for the explanation. Currently I am using VCV rack to test the logic modules with simple LFOs and oscilloscopes so that I can visually confirm how it works. On the other hand, I cannot see the signals in the actual modules as I do not have an oscilloscoe, thus I was wondering how to check gate signals. Anyway Grids has an option to switch between triggers and gates as you mentioned.

I am searching for the ways to vary basic beat patterns into different ones to generate complex beats.
4ms QCD expander has gate delay and pulse width modulation options, so I thought this module, especially PWM function, can be used to make different pulse width under the same gate patterns which may result in a different beat patterns in combination with logic module.

User avatar
Yes Powder
Powder that makes you say "Yes"
Posts: 1804
Joined: Thu Sep 03, 2015 2:23 am
Location: Albany, New York
Contact:

Re: How to invert gates only when flip-flop gate is mixed

Post by Yes Powder » Thu Feb 25, 2021 8:22 am

I'm just seeing this now, but I'm bored at work and wanted to think of a way I would do this is:
Instead of starting with:
+-+-+-+-
and
-+-+-+-+
I'd start with
+-+-+-+-
and
----++++

Feed both of those to your logic gate and you'll get
XOR: +-+-----
and
NAND: ++++-+-+

In addition to feeding the ----++++ to a logic input, also mult it into the CV input of a Blinds channel (I'd use Channel 2), set to close when the CV is low.
Send the XOR out to Blinds channel 1 set fully open, and send the NAND to Blinds channel 2, only opening when ----++++ is high.
The mix output of Blinds should now be +-+--+-+

User avatar
BaloErets
Super Deluxe Wiggler
Posts: 1215
Joined: Sat Jul 30, 2016 7:00 pm
Location: Montreal, Quebec
Contact:

Re: How to invert gates only when flip-flop gate is mixed

Post by BaloErets » Thu Feb 25, 2021 5:25 pm

I'm probably missing something here, but as you mentioned using the PLOG, couldn't you CV the logic type with an attenuated/offset clock at 1/2 your original tempo to modulate between AND and NAND which should allow you to swap between the original and inverted pattern within one channel of the PLOG itself?

flashheart
Super Deluxe Wiggler
Posts: 1860
Joined: Mon Jun 01, 2009 7:58 am

Re: How to invert gates only when flip-flop gate is mixed

Post by flashheart » Thu Feb 25, 2021 7:20 pm

Yes Powder wrote:
Thu Feb 25, 2021 8:22 am
I'm just seeing this now, but I'm bored at work and wanted to think of a way I would do this is:
Instead of starting with:
+-+-+-+-
and
-+-+-+-+
I'd start with
+-+-+-+-
and
----++++

Feed both of those to your logic gate and you'll get
XOR: +-+-----
and
NAND: ++++-+-+

In addition to feeding the ----++++ to a logic input, also mult it into the CV input of a Blinds channel (I'd use Channel 2), set to close when the CV is low.
Send the XOR out to Blinds channel 1 set fully open, and send the NAND to Blinds channel 2, only opening when ----++++ is high.
The mix output of Blinds should now be +-+--+-+
Your XOR logic is wrong. (Yes I'm bored too...)
Just an XOR actually gives the OP what they want in terms of gates. XOR with 1 input high inverts the other input.
WIth
+-+-+-+-
and
----++++
XOR gives you
+-+--+-+
So you're correct, you only need the original gate pattern and your 'swap' pattern, then just the XOR.
I'm not buying a maths though, not my idea of fun...

User avatar
Yes Powder
Powder that makes you say "Yes"
Posts: 1804
Joined: Thu Sep 03, 2015 2:23 am
Location: Albany, New York
Contact:

Re: How to invert gates only when flip-flop gate is mixed

Post by Yes Powder » Thu Feb 25, 2021 7:36 pm

flashheart wrote:
Thu Feb 25, 2021 7:20 pm
text
Ack, you're right :doh:
I never was very good at solving math-type problems. Should've just waited til I got home instead of trying to do it on paper when I should've been working.

Post Reply

Return to “Eurorack Modules”