A changing threshold ?

Dec 4, 2009 at 11:50am

A changing threshold ?

I have a project where one touches very different materials, all linked to the computer through audio cables. This way i can trigger sounds with the value changing(up) when there’s a contact. The difference in the two values i obtain is quite small.

The thing is, the (no contact) values are always changing, so my threshold should be changing as well. For example, at the beginning my value would be 0.000234, but 10 minutes after it can be 0.000629.
I tried different ways for my threshold to change also, like putting a very short pipe and adding a small value to the original one, but it is not fine.

Would someone have an idea of a way to “real-time” change this threshold ?
Hope this question isn’t too vague …

#47014
Dec 5, 2009 at 9:28am

have a look at sensor-tamer in the extras menu (examples overview, latest); that should give you a starting point
T

#169030
Dec 5, 2009 at 4:52pm

Hello maxers,

hope that help :

– Pasted Max Patch, click to expand. –
#169031
Dec 7, 2009 at 4:20pm

Thanks a lot to both of you, wasn’t expecting so much !!

#169032
Dec 7, 2009 at 7:46pm

I’ve sometimes found it helpful to compare the moment-to-moment value changes to the standard deviation of the last 10 or 20 input values. If instantaneous change is greater than standard deviation (or some percentage or multiple, thereof) then you’ve found a significant change. This technique can scale based on context–useful when your input values change dramatically. This technique has worked for me when trying to determine a significant melodic leap in an improvisation, for example.

#169033
Dec 8, 2009 at 9:21am

As the “sensors” I am using have resistor values which change all the time, I will use make a “mix” between Vanille Bechamel’s technique the use of a derivative which i’m currently working on.
These two scalable results react a bit differently, as Vanille Bechamel’s one is perfect for “triggering”, whereas the derivative (scalable too) thing will give rather a “memory” result and so, the general direction, which will act like a control.

i’m glad, these cheap audio-cable controls work fine now.

#169034

You must be logged in to reply to this topic.