flatmax@674: flatmax@598: // Author Matt Flax flatmax@598: // flatmax@598: // This C++ file is part of an implementation of Lyon's cochlear model: flatmax@598: // "Cascade of Asymmetric Resonators with Fast-Acting Compression" flatmax@598: // to supplement Lyon's upcoming book "Human and Machine Hearing" flatmax@598: // flatmax@598: // Licensed under the Apache License, Version 2.0 (the "License"); flatmax@598: // you may not use this file except in compliance with the License. flatmax@598: // You may obtain a copy of the License at flatmax@598: // flatmax@598: // http://www.apache.org/licenses/LICENSE-2.0 flatmax@598: // flatmax@598: // Unless required by applicable law or agreed to in writing, software flatmax@598: // distributed under the License is distributed on an "AS IS" BASIS, flatmax@598: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. flatmax@598: // See the License for the specific language governing permissions and flatmax@598: // limitations under the License. flatmax@598: #include "PsychoAcoustics.H" flatmax@598: flatmax@598: /** flatmax@598: \author {Matt Flax } flatmax@598: \date 2013.02.08 flatmax@598: */ flatmax@598: flatmax@598: FP_TYPE PsychoAcoustics::Hz2ERB(FP_TYPE CFHz, FP_TYPE ERBBreakFreq, FP_TYPE ERBQ){ flatmax@598: return (ERBBreakFreq + CFHz) / ERBQ; flatmax@598: } flatmax@598: flatmax@598: Array PsychoAcoustics::Hz2ERB(Array &CFHz, FP_TYPE ERBBreakFreq, FP_TYPE ERBQ){ flatmax@598: return (ERBBreakFreq + CFHz) / ERBQ; flatmax@598: }