Cosine modulated filter banks are a well-known signal processing tool whose applicative field ranges from coding, to filtering, to spectral estimation. Because of their peculiar structure (the impulse responses are obtained by modulating a prototype window with trigonometric functions) they are easy to design and have a low computation complexity. Their continuous-time counterpart, local cosine bases, play an important role in the construction of Lemarie-Meyer wavelets. We propose a unified approach to both discrete and continuous time cosine modulated filter banks. The resulting theory offers a single general framework that makes clear the deep similarity between the two cases.