Commuting nonselfadjoint operators and a unified theory of waves and corpuscles