NotePlayHandle: fix broken note detuning feature
Commit884b9ca671completely broke the note detuning feature as the detuning value was not incoorporated into the frequency calculation anymore. Fix this by adding the detuning value to the pitch variable. (cherry picked from commitb30e91042b)
This commit is contained in:
@@ -467,8 +467,11 @@ bool notePlayHandle::operator==( const notePlayHandle & _nph ) const
|
||||
void notePlayHandle::updateFrequency()
|
||||
{
|
||||
const float pitch =
|
||||
( key() - m_instrumentTrack->baseNoteModel()->value() +
|
||||
engine::getSong()->masterPitch() ) / 12.0f;
|
||||
( key() -
|
||||
m_instrumentTrack->baseNoteModel()->value() +
|
||||
engine::getSong()->masterPitch() +
|
||||
m_baseDetuning->value() )
|
||||
/ 12.0f;
|
||||
m_frequency = BaseFreq * powf( 2.0f, pitch +
|
||||
m_instrumentTrack->pitchModel()->value() / ( 100 * 12.0f ) );
|
||||
m_unpitchedFrequency = BaseFreq * powf( 2.0f, pitch );
|
||||
|
||||
Reference in New Issue
Block a user