| 1176 | } |
| 1177 | |
| 1178 | void CVASTSingleNote::doWavetableStep(const int bank, const int currentFrame, const int firstFrame) { |
| 1179 | //CHECK move to wavetable |
| 1180 | //m_currentWTPosFloatPercentage[bank] = m_fOscWTPos_smoothed[bank].getNextValue(); // public due to oscilloscope |
| 1181 | |
| 1182 | //if (m_currentWTPosFloatPercentage[bank] < 0.f) m_currentWTPosFloatPercentage[bank] = 0.f; //safety - unclear where it comes from // TODO |
| 1183 | //if (m_currentWTPosFloatPercentage[bank] > 1.f) m_currentWTPosFloatPercentage[bank] = 1.f; //safety - unclear where it comes from // TODO |
| 1184 | |
| 1185 | //float curWtPosFloat = m_currentWTPosFloatPercentage[bank] * (m_localVoiceBankWavetable[bank]->getNumPositions() - 1); |
| 1186 | //if (m_Poly->m_OscBank[bank].getSoloMode()) { |
| 1187 | //curWtPosFloat = m_localVoiceBankWavetable[bank]->m_iBeginSelectionPosition + m_currentWTPosFloatPercentage[bank] * (m_localVoiceBankWavetable[bank]->m_iEndSelectionPosition - m_localVoiceBankWavetable[bank]->m_iBeginSelectionPosition); |
| 1188 | //} |
| 1189 | |
| 1190 | /* |
| 1191 | //CHECK right here? |
| 1192 | float lPhaseOffsetNext = m_fPhaseOffset_smoothed[bank].getNextValue() * 0.01f; //to singlenote |
| 1193 | if (m_safePhaseFloat[bank] != lPhaseOffsetNext) { |
| 1194 | m_safePhaseFloat[bank] = lPhaseOffsetNext; |
| 1195 | m_Poly->m_OscBank[bank].setChangedFlagOsc(); |
| 1196 | } |
| 1197 | */ |
| 1198 | |
| 1199 | /* |
| 1200 | jassert(curWtPosFloat >= 0.f); |
| 1201 | if (firstFrame) { |
| 1202 | m_iWTPosInt[bank] = int(curWtPosFloat); |
| 1203 | } |
| 1204 | |
| 1205 | if (m_safeWtPosFloat[bank] != curWtPosFloat) { |
| 1206 | m_bWTPos_allSameValues[bank] = false; |
| 1207 | if (m_iWTPosInt[bank] != int(curWtPosFloat)) |
| 1208 | m_bWTPos_allSameInt[bank] = false; |
| 1209 | |
| 1210 | m_safeWtPosFloat[bank] = curWtPosFloat; |
| 1211 | |
| 1212 | //CHECK TODO |
| 1213 | m_Poly->m_OscBank[bank].setChangedFlagOsc(); |
| 1214 | //setChangedFlag(bank); //for oscilloscope only |
| 1215 | } |
| 1216 | |
| 1217 | if (m_safePhaseFloat[bank] != lPhaseOffsetNext) { |
| 1218 | m_safePhaseFloat[bank] = lPhaseOffsetNext; |
| 1219 | |
| 1220 | m_Poly->m_OscBank[bank].setChangedFlagOsc(); |
| 1221 | } |
| 1222 | |
| 1223 | m_wtPosBufferPointer[bank][currentFrame] = curWtPosFloat; //to singlenote |
| 1224 | //m_morphBuffer[bank]->setSample(0, currentFrame, lmorph); //to singlenote |
| 1225 | |
| 1226 | //CVASTWaveTable* l_wavetableSoftFade = m_Poly->m_OscBank[bank].getSoftFadeWavetablePointer(); |
| 1227 | if (m_localVoiceBankWavetableSoftfade[bank] != nullptr) { |
| 1228 | float curWtPosFloatNext = m_currentWTPosFloatPercentage[bank] * (m_localVoiceBankWavetableSoftfade[bank]->getNumPositions() - 1); //positions prepared? |
| 1229 | if (m_Poly->m_OscBank[bank].getSoloMode()) { |
| 1230 | curWtPosFloatNext = m_localVoiceBankWavetableSoftfade[bank]->m_iBeginSelectionPosition + m_currentWTPosFloatPercentage[bank] * (m_localVoiceBankWavetableSoftfade[bank]->m_iEndSelectionPosition - m_localVoiceBankWavetableSoftfade[bank]->m_iBeginSelectionPosition); |
| 1231 | } |
| 1232 | //m_wtPosBufferNext[bank]->setSample(0, currentFrame, curWtPosFloatNext); |
| 1233 | m_wtPosBufferNextPointer[bank][currentFrame] = curWtPosFloatNext; |
| 1234 | |
| 1235 |
nothing calls this directly
no outgoing calls
no test coverage detected