   Delaying controls and using transfer functions?
  I'm geting control parameters from gamepad and i need to delay them for 40ms. I think i can delay buttons, since its simple. But how do i delay axis position? I thought of buffering it in array, but is there a better way?Is there a way to apply transfer function to gamepad controls data stream,like if i want to add aperiodic transfer function to it or a delay transfer function?I know how to apply tf to defined functions like sin, but how do you apply it to data you get in real time?   
  Your array method is the right approach.  One might call it a delay line.  I'd implement it with a circular buffer.In general, the way that you apply a transfer function in real time is to represent it by a state-space realization -- and this is what your array method actually is.The issue with the transfer function representation is that it works on the Laplace Transform of signals -- something whose value at any frequency depends on the behavior of the signal at all times, including the past and the future.   