Page 1 of 1

Posted: 02 Mar 2016, 00:41
by oli_lab
Hi,

in my last module, I use an array input that is supposed to take 0 to 255 integers in a table that has a size of 256.

I did this :

// frequency
else if (ParamIndex == 1) {
pParamInfo->ParamType = ptArray;
pParamInfo->Caption = "wave shape";
pParamInfo->MinValue = 0;
pParamInfo->MaxValue = 256;
pParamInfo->DefaultValue = 127;
pParamInfo->Format = DEFAULT_FORMAT_INTEGER;
pParamInfo->IsInput = TRUE;
pParamInfo->IsOutput = FALSE;
pParamInfo->CallBackType = ctImmediate;
}

as well as setting the size of the event in the initialisation :
sdkSetEvtSize(shape, 256);

But, when I pull a wire out of the array input, I get an array of size 16 with 0 to 1 integers...

thanx for your help

Posted: 02 Mar 2016, 17:07
by sm_jamieson
Which module are you selecting when you pull out the wire ?

I think the "pull out a wire" function only uses the information in the ParamInfo data, so it does not know about the sdkSetEvtSize() on the event.
Anyway arrays are variable size - the array get and set modules ask you how many parameters / faders you want since it does not know.

Regarding the min/max value - I would have thought that should be used with the "pull out a wire" function, but it might depend what option you are selected on the "pull out a wire" menu.

Simon.

Posted: 02 Mar 2016, 22:36
by oli_lab
I select "array display or set"

Posted: 03 Mar 2016, 20:58
by oli_lab
I solved my problem in making my module compatible with any size array from 1 to 1024 !
sonically, it is even more interesting !:)