RndNote fix

This commit is contained in:
Jack Andersen
2016-05-16 14:41:44 -10:00
parent a7df18f8d3
commit 91344aa917
2 changed files with 8 additions and 3 deletions

View File

@@ -572,7 +572,11 @@ bool SoundMacroState::advance(Voice& vox, double dt)
noteLo *= 100;
noteHi *= 100;
m_curPitch = vox.getEngine().nextRandom() % ((noteHi - noteLo) + noteLo);
if (noteHi == noteLo)
m_curPitch = noteHi;
else
m_curPitch = (vox.getEngine().nextRandom() % (noteHi - noteLo)) + noteLo;
if (!free)
m_curPitch = m_curPitch / 100 * 100 + detune;