  Consider a reductive $p$-adic group $G$, its (complex-valued) Hecke algebra
$H(G)$ and the Harish-Chandra--Schwartz algebra $S(G)$. We compute the
Hochschild homology groups of $H(G)$ and of $S(G)$, and we describe the
outcomes in several ways.
  Our main tools are algebraic families of smooth $G$-representations. With
those we construct maps from $HH_n (H(G))$ and $HH_n (S(G))$ to modules of
differential $n$-forms on affine varieties. For $n = 0$ this provides a
description of the cocentres of these algebras in terms of nice linear
functions on the Grothendieck group of finite length (tempered)
$G$-representations.
  It is known from earlier work that every Bernstein ideal $H(G)^s$ of $H(G)$
is closely related to a crossed product algebra of the from $O(T) \rtimes W$.
Here $O(T)$ denotes the regular functions on the variety $T$ of unramified
characters of a Levi subgroup $L$ of $G$, and $W$ is a finite group acting on
$T$. We make this relation even stronger by establishing an isomorphism between
$HH_* (H(G)^s)$ and $HH_* (O(T) \rtimes W)$, although we have to say that in
some cases it is necessary to twist $C[W]$ by a 2-cocycle.
  Similarly we prove that the Hochschild homology of the two-sided ideal
$S(G)^s$ of $S(G)$ is isomorphic to $HH_* (C^\infty (T_u) \rtimes W)$, where
$T_u$ denotes the Lie group of unitary unramified characters of $L$. In these
pictures of $HH_* (H(G))$ and $HH_* (S(G))$ we also show how the Bernstein
centre of $H(G)$ acts.
  Finally, we derive similar expressions for the (periodic) cyclic homology
groups of $H(G)$ and of $S(G)$ and we relate that to topological K-theory.
