## rate of change question

Apr 15 2007 | 7:49 pm
i am using photocells hooked up to the analogue input of a game controller which is being recognized as an hi device. i am trying to figure out a way to record when the amount of light being picked up is changing faster or slower, as in when the output of hi is changing faster i want i higher value, and a lower value when the output is changing more slowly. Basically i need a good way to track the rate of change of a signal. I have tried using the counter object and reseting at set intervals. I have also tried using the count function of the capture object. Neither of these have worked well enough. Any suggestions?

• Apr 15 2007 | 8:25 pm
you could use a way of calculating a mean value over a certain amount of time (read number of values) and compare this to the new incoming values Of course this can only be achieved when doing a little bit slower then realtime I'm also pretty sure that pmpd would be a great way to look at it, reading in basicly acceleration or decelaration.
If you would share the whole concept of the projec I would be more then happy to help you out
best
pieter
On 15 Apr 2007, at 21:49, glong wrote:
> > i am using photocells hooked up to the analogue input of a game > controller which is being recognized as an hi device. i am trying > to figure out a way to record when the amount of light being picked > up is changing faster or slower, as in when the output of hi is > changing faster i want i higher value, and a lower value when the > output is changing more slowly. Basically i need a good way to > track the rate of change of a signal. I have tried using the > counter object and reseting at set intervals. I have also tried > using the count function of the capture object. Neither of these > have worked well enough. Any suggestions? >
• Apr 15 2007 | 9:23 pm
Do you mean signal, as in msp signal? I'm guessing you don't - if so, there's an object called tl.velocity by Trond Lossius that should do what you want.
Alternatively, you could roll your own on the basis that rate of change is (change in x) / (change in y) - in this case the difference between two successive sensor readings divided by the amount of time between them (which you can find out using the timer object).
-- Owen
glong wrote: > Basically i need a good way to track the rate > of change of a signal. I have tried using the counter object and > reseting at set intervals. I have also tried using the count function > of the capture object. Neither of these have worked well enough. Any > suggestions? _______________________________________________ maxmsp >