Page 1 of 1

Hopefully a simple one...

Posted: 24 Mar 2013 16:52
by electrofux
I have a pad matrix of 96 pads which are supposed to send out Midi Notes. I want to display the last hit notenumber/Padnumber in a Monitor object.

I fiddled around with the firstof function but fail at making this work.

Re: Hopefully a simple one...

Posted: 24 Mar 2013 17:14
by Phil999
firstof() is the right way. First I think I would create an expression in the Pads object, then also a script that writes the pressed pad number to that expression (expression=firstof(Pads.x);). In the Monitor object set Pads.expression.

Re: Hopefully a simple one...

Posted: 24 Mar 2013 17:30
by electrofux
Alright i got it. I made a variable "last" and set it to firstof(Pads.x).

There is still one thing. It doesnt show the last notenumber when i hit more than one pad. Instead it shows the first triggered one until this is released.

So when i hit pad nr 0 and dont release it and then after that hit pad nr 1 the monitor still shows 0 but i would like it to show 1.

Hmm it seems to work when the second hit is a lower number than the first one. I have tried with different trigger setting (down, up etc) but i cant make it work the other way around.

I have attached the file i am working on.

Re: Hopefully a simple one...

Posted: 25 Mar 2013 02:21
by Macciza
For multiples you would probably want to look at 'nonnull()' which will return an array of values rather than just the first of . ..

Re: Hopefully a simple one...

Posted: 25 Mar 2013 08:53
by electrofux
Aaah, makes sense :D