Welcome to %s forums

BrainModular Users Forum

Login Register

Multiplying Arrays.

I need help on a Patch
Post Reply
AndrewChi
Member
Posts: 62
Location: Belgium
Contact:

Unread post by AndrewChi » 02 Feb 2011, 20:41

Hi, I am trying to multiply an array.
I want values from a SeqSwitch
to feed a SeqStep.

The Seqswitch outputs values from 0 to 1,
my Seqswitch has values from 0 to 9.

So, if the SeqSwitch gives value 1,
I want to multiply the Array so that the SeqSwitch reads a 9...

I think thought this could be easily done in a script, but I am a complete dummy in command line programming.

Any ideas of a simple fix?

Thanks so much for your help!

UsineFan



BTW: what is a good starting place to learn scripting? I have a Reaktor background and am willing to start coding myself, but I don't know where to start...


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

Unread post by nay-seven » 02 Feb 2011, 20:53

a simple multiply module can do the job...?

about scripts, you can, check the wiki :
http://www.sensomusic.com/wiki/doku.php ... de:scripts

AndrewChi
Member
Posts: 62
Location: Belgium
Contact:

Unread post by AndrewChi » 02 Feb 2011, 21:52

Wow,
indeed,
what a stupid guy I am.
I was supposing Multiply modules didn't work for those red cabled Arrays... :/

Anyway! thx for your reply, it helped a lot :-)

At least it got me interested in scripting (reading wiki)!

woodslanding
Member
Posts: 1327
Contact:

Unread post by woodslanding » 02 Feb 2011, 23:26

usine does so much automatic converting for you, sometimes it's hard to keep up!!

And other times, you just have to hook it up to see how the conversion works....
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 03 Feb 2011, 01:34

yup all match operaion, inculding logical modules work with array and that's really cool.

bsork
Site Admin
Posts: 1334
Location: Asker, Norway
Contact:

Unread post by bsork » 03 Feb 2011, 08:37

If you do math on an array - say multiplying array A with single value B - the output will have the same length as array A where each element in A gets multiplied by B. However, if you have two arrays of size > 1 (a single value is in fact an array of size 1), the single elements get calculated - eg A[0]*B[0]=Out[0], A[1]*B[1]=Out[1] etc - while the length of the output array will be the shortest length of the two inputs.

The easiest way to get the hang of it, is just to hook up some modules and mess around a little with different math modules, different lengths and so forth.
Bjørn S

AndrewChi
Member
Posts: 62
Location: Belgium
Contact:

Unread post by AndrewChi » 03 Feb 2011, 15:52

Interesting. Experimenting with it now. It's indeed very interesting to do math on arrays like that without having to script :-).

While trying to implement my idea with the above tips, I encountered another related problem regarding the data flow of arrays.

What I'm in fact trying to do, is to link 2 arrays together:
A step sequencer on the IB programs let's say a bassdrum. Values from 0-1.
I want another sequencer with switches from 0-9 values, to also get this values.
This part works by multiplying the SeqStep by factor 9 and feed the array-out*9 to the SeqSwitch. Great.
But now I want to add some values to the SeqSwitch and when this added value is 9, I want it to display a 1 on the SeqStep.
So I want to LINK them somehow.

I will have to make a feedbackloop I suppose, which only works if I put a data delay module (I think), but then it doesn't seem to work...

If it's not clear, I will try to upload a patch screenshot soon, but I don't have my patch here right now...

Any help warmly appreciated!

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

Unread post by nay-seven » 03 Feb 2011, 16:03

i suppose you have to play with logic and event control modules
first an A=B ( if A=9 in your case ) linked to a pass inlet of a pass event flow module, this way the 1 value pass only when 9 is reach..?

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests