Welcome to %s forums

BrainModular Users Forum

Login Register

How to create a "temporary" logical module?

I need help on a Patch
Post Reply
creal
Member
Posts: 96
Contact:

How to create a "temporary" logical module?

Unread post by creal » 27 Aug 2020, 18:05

Hello everybody,

I'm digging Usine since several weeks now but I sometimes face to a problem which I cannot solve by myself. It seems pretty simple but it's not (at least for me).

I use logical modules a lot (especially the "=" module). If I receive the correct value, I can trigger things, and it works. But sometimes, the value that the module receives is the same and the module does not react since the value has not changed.

Example: I send a value "34" to the A inlet of the logical "=" data module. If B = 34, it sends a 1 value but if the previous value received by the "=" module was still "34", it does not send anything. I would like the module to send a 1 value each time it receives 34, even if it receives 34 34 34 successively.

I tried to "reset" the A inlet with a 0 value after 50ms (with a data count ms module) but I cannot achieve this. I tried to use a display array too (and played with the reset inlet) but without success.

To sum up, I would like a "=" logical module that refreshes itself every X ms. Is that possible, please?

I hope my issue is clear. Don't hesitate to ask me more information.

Thanks in advance,

creal.

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 27 Aug 2020, 18:45

Depending of your source you can use a A&B module for example with MIDI source:
A&B.png
A&B.png (35.05 KiB) Viewed 6028 times
You can also use a clock for the B inlet

creal
Member
Posts: 96
Contact:

Unread post by creal » 27 Aug 2020, 19:01

Thank you nay-seven. Instead of a "MIDI in" module, I connected a "Filter notes" module (set to note ON), with "pass trigger" outlet going to the B inlet of the AND module. It should work but the AND module does not receive anything when I press a note (the pass trigger LED of the Filter Notes module works though). I also tried to put a from 0 to 1, from 1 to 0, has changes modules between but it does not work either.

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 27 Aug 2020, 19:19

Works perfectly here, have you add an oscilloscope to test ? ( trigger is too fast to see in the module)
audio engine is ON ?
A&B 2.png

creal
Member
Posts: 96
Contact:

Unread post by creal » 27 Aug 2020, 19:38

You are right. It receives an impulse. But I tried to set on/off a switch, which is difficult in that state.

Now I use a "from 0 to 1" module between the AND the switch and it works like a charm. I also put a counter and now I can trigger an event if I play 4 specific notes with my MIDI keyboard in less than 200ms :)

Thank you again.

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 27 Aug 2020, 20:12

good news !

Post Reply

Who is online

Users browsing this forum: No registered users and 54 guests