What does IIR and FIR filter are used for in embedded

I was thinking about same solution to give the detector threshold value by going in field and calculating the threshold, but the thing is I need to create sound like VCO I mean as the target gets closer and closer to metal detector the sound increases, do u get what I mean.