Do filters work on a "per sample basis"? I'm confused because of filter length, whether (such) filters can be used to filter audio on a "per sample basis"?

By per sample basis I mean that I would like to filter audio one sample at a time, but vary the filter parameters even one sample at a time.

What then confuses me is, can the filter have any effect if only one sample is input to it? Or whether the filter needs a longer sample (e.g. that matches the filter length)?



Since the filter type seems crucial, I'm specifically interested in the Parks-Mccellan FIR and the context is dynamic equalization (in which it seems like the parameters such as gain would need to be varied on a close to per sample basis). I.e. I'm interested in whether the PM algorithm can be utilized for dynamic equalization in such way that one recomputes the PM between some samples and then filters those samples, i.e. in a block-like fashion.
Obviously, filters need more than one sample of input – I mean, a single sample is a single number, and how would a single number have something like a frequency? Filtering is something you apply to a digital signal, and signal is defined by being a changing entity – i.e. different samples.

Hence, digital filters always need sequences of samples. The typical (non-rate-changing) filter works in a matter that each time you "push in" a new sample, an output sample "pushes out" of the filter.

You should definitely brush up your knowledge on what a digital filter is, and especially how FIR filters work. The important point here is the understanding that application of a filter to a signal is a discrete convolution. 

You're absolutely free to change the system with which you convolve any time – but you'd break the time-invariance that makes LTI (linear, time invariant) systems such as FIRs so "easy" to handle.

EDIT: with your clarification: 

Yes, any FIR will need "history" of samples. But also, yes, you can recompute the coefficients anytime, and "switch over" to a different FIR. However, you must make sure your new FIR's "delay"/memory elements were already filled with the previous input samples, otherwise you'll get inconsistencies.