assert(N == signal length)