def get_peak_coeffs(gain, centre, sr, Q):
    A = db2a(gain / 2)
    w0 = 2 * pi * centre / sr
    cw0 = cos(w0)
    sw0 = sin(w0)
    alpha = sw0 / 2 * Q

    a0 = 1 + alpha / A

    b = [(1 + (alpha * A)) / a0, (-2 * cw0) / a0, (1 - alpha * A) / a0]
    a = [1, (-2 * cw0) / a0, (1 - alpha / A) / a0]

    return b, a