Filtering incoming data to avoid Midi re-triggering....??

Joshua Batty's icon

Hi guys i've run into a little problem. Im using Andrew Benson's camera input patch tracking the X position to trigger midi notes.

I've included a range slider to select which octaves i want to scale the data into. The problem is that if i have the data getting scaled to play 1 octave of the keyboard then from right to left I have 12 notes i want to trigger which is happening. But its triggering each note 12 times and I only want each note to trigger once.

I'm thinking there needs to be some maths in between the receive object (called x2) in my patch and the kslider object. Im really not very good at maths or using expressions yet so any help would be greatly appreciated.

Thanks heaps.

Max Patch
Copy patch and select New From Clipboard in Max.

Josh

Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

try putting a [change] object after [zmap]
also instead of your octaverange subpatch just use [* 12]

Joshua Batty's icon

Thanks heaps Terry,

That change object is exactly what i was after. Saves having to do the maths i was thinking would needed to be done. using * 12 is also a lot better than the sub patch i was using.

Thanks for the reply, appreciate it.

Josh