Phase delay of one pole filter?

Can anyone tell me how to calculate the phase delay of this simple one pole filter? (I HATE filter math)

Thank you.

class OnePole
{
public:
	OnePole()
	{
		a1 = 1.0f;
		b0 = 0.0f;
		z = 0.0f;
		gain = 1.0f;
	}
	~OnePole(){}
	
	
	inline void setLowPass(float freq, float sampleRate)
	{
		jassert (sampleRate > 0.0);
		jassert (freq > 0.0 && freq <= sampleRate * 0.5);
		
		a1 = std::expf(-2.0f * juce::float_Pi * (freq / sampleRate));
		b0 = 1.0f - a1;
	}
	
	void clear()
	{
		z = 0.0f;
	}
	
	void setGain(float g)
	{
		gain = g;
	}
	
	inline float tick(float in) noexcept
	{
		auto x = in * gain;
		return z = b0 * x + a1 * z;
	}
		
private:
	float a1, b0, z, gain;
};

There you go:
https://ccrma.stanford.edu/~jos/filters/One_Pole.html

Thanks, but I don’t see anything about calculating the phase delay in the paper. But then again, I’m not a filter math guy, so I just might not see (understand) it.


The upper formula is mag response, the lower one phase response :wink:

also

phase_delay = - phase_response / (2 * pi * frequency / sample_rate)