Timing and pitch fixes

This commit is contained in:
Jack Andersen
2016-05-19 00:12:32 -10:00
parent 93b9c93ea4
commit 5245a41567
11 changed files with 45 additions and 13 deletions

View File

@@ -224,7 +224,8 @@ bool Voice::_advanceSample(int16_t& samp, int32_t& newPitch)
}
/* Factor in ADSR envelope state */
float totalVol = m_userVol * m_curVol * m_volAdsr.nextSample(m_sampleRate) * (m_state.m_curVel / 127.f);
float adsr = m_volAdsr.nextSample(m_sampleRate);
float totalVol = m_userVol * m_curVol * adsr * (m_state.m_curVel / 127.f);
/* Apply tremolo */
if (m_state.m_tremoloSel && (m_tremoloScale || m_tremoloModScale))