Detecting the frequency distribution of signals, e.g. detecting delta, theta, alpha, beta or gamma waves