Welcome to %s forums

BrainModular Users Forum

Login Register

create a module of n input via iml

I need help on a Patch
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 02 Jun 2010, 00:34

Ive just tested the arg thing, very nice. I wanted to make kind of custom matrix that would work with any item.

I successfully managed to make a script that creates kind of matrix with any of the modules (fader,butt) well aligned,size adjustable on X and Y with selectable nb of rows/cols ultra cool, Xfaders strong aligned in few clics, set all size ect.

but then I would like to route the outputs of the modules to an array, ie to collect mouse down/values and reroute the array to the script for process. Pb i got is if i create an Array using moduleid 92, the inputs are limited to 16. if I putid 260 i can get the query, but the time user set the nb of faders, the script "wires in the wind".

is it somehow possible to create an array of n input without query, or use kind of query pulse to retrigg iml when user as set,
or any other ideas, launch another script creation of xin to array, or any other ideas if some see what i mean?

first thought would be simpler to create n inputs on the script, but im affraid of mess in/outs if chging nb of items, and ideally arrays are more convenient cause i risk end up with toomuch wire/in/outs. Any master have any sugg/trick?

well in that case i could just create manually the array first so not a big deal, still would be very cool to somehow automatize the
process, ie for some custom MondoComboBox or faders,xy,listboxes matrix, or other..

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

Unread post by bsork » 02 Jun 2010, 08:13

I'm not very good with templates, so maybe there's a way of select the correct version directly. However, from your description it seems that you are running the IML in one go(?). What about splitting it in two - first create the switches or whatever and get the query box. When that's finished, run part two to connect everything up.
Bjørn S

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 02 Jun 2010, 12:21

bsork wrote:IWhat about splitting it in two - first create the switches or whatever and get the query box. When that's finished, run part two to connect everything up.
i made another way, in fact recreated a 'array'script of n inputs, output one array, but im interested in that tech
but i didn't catch, how do we know the query have been done, how can i catch the info?
i don't catch, is there some iml listener or something like that?

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

Unread post by bsork » 02 Jun 2010, 12:59

Not that I'm aware of. I was just thinking you could trigger the first part, wait a few seconds till it's finished, then trigger the second part. Not usable for "live patching" if that's what you're aiming for, but a simple solution for speeding up patching. You could of course delay the second part by some time within the script if that's acceptable(?).

I'm curious of how your array script is created? Is it just a script you put into the patch and manually edit before running the IML stuff, or have you managed to automate this is in some way?

(The only way I can think of of automating things inside a script before loading, would be to do something to the script file itself, but I don't think that's worth the trouble unless it's going to be used a lot.)
Bjørn S

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 02 Jun 2010, 18:56

yup time delay could be the way to go, pb is i would need to say in the query choose fast!!!! ;) so i went temp for the scriptArray. for time trigger ya right, that what i did finally,

I first had tried to directlly send from the script to test new args, and that work like a charm for many things but not module creation if too much,and i can totally understand that, So Ive finnaly launch a counting blocs procedure and trig one after the other delayed procedures that goes to sendMsg module with the good olds trickys '"""+' ' + manual concat for now, and then i will take one after the other and check if can reconvert back to new internal with args for more clearness.

for the array script: in fact i just created a new script, with a fixedconst for MAX_ins for the array of Tparamer creation,, and a "size" inlet. so the array has a fix nb of INs, ie 64. the first script create all the modules dpending on nb of row/cols, wire them to each of the in of arrayscript and set the size input so array out is the size of good nb of items, not maxIns. I could have done directly on first script, but I plan to have severals (one for msdwn, one for values, colors, ect..) so it's seems a not that bad solution. At some point I was locked with auto gestion of ins, that would need to be have a way to flush,then recreate ins, or that first script feed the text of the script, that would then recompile. I couldn' find ..do ya know if there is a way to force a recompile? or delete someTparameters?, or feed the coreTXt of a script before it init? mm mabe some writeTxt to disk...
anyway for know my workaround is cool for me , but i would love to better handle a modulable in/outs creation/delete system

i work a bit on it but i ll try too post it as addon as i find its really cool for ie custom grid/combo box.
basically I have two faders for rows, cols, and sizeX, sizeY, it auto create the modules, collect mouse downs, Once the 'matrix'
is build, it can spread incoming comma/colorArray in to the items, kind of matrix with colors and captions, but with fixed on init size. that allowed me to have a nice customizable comboBox, it also handles pages if comma is longer than nb-items...
and it teorically could work with any module, could replace my buttons by panels or faders ect...with a bit of input change but hopefully olivier did a good job and 'mouse dwn' is always called 'mouse dwn', and the main value out is always first...
so back to it ;)

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

Unread post by bsork » 02 Jun 2010, 23:08

23fx23 wrote:.do ya know if there is a way to force a recompile? or delete someTparameters?, or feed the coreTXt of a script before it init? mm mabe some writeTxt to disk...
The only way I can think of would be to manipulate the text of the script file before loading it, but I think it wouldn't be worth the bother. Your solution is as good as anything, Another solution would be to load up a big enough array before running the IML stuff , then you could always update the array size as part of the script.
Bjørn S

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests