I’ve been playing with SND-FFT, which requires the “length” parameter to be a power of 2 http://www.cs.cmu.edu/~rbd/doc/nyquist/part10.html#index828

This is a little snippet for calculating the largest power of 2 less than a given number:

```
(defun highest-power-of-2 (val)
(do ((n 2 (* n 2)))
((> n (/ val 2)) n)))
```