Resolving the envelope and fine-structure debate in hearing, with further applications to cochlear implants