Home AMX User Forum NetLinx Studio

bell curve for voice switching

Hi all,
I have voice inputs triggering a couple of cpi's.
i was wondering on how to find out the peak of a bell curve used as a sample of the inputs.
sampled value data.

DEFINE_VARIABLE
INTEGER iVoice[20]

// the cpi events turn on/off the bits in the array

// sample of the data of iVoice
1,1,0,0,0,0,1,0,1,0,1,0,0,0,0,1,1,1,1,0

you can see that there are a few voice triggered around iVoice[16] to iVoice[19].
I would like a function that would return either 17 or 18 for this example.

Could this be done?

Regards
Craig
Sign In or Register to comment.