mostly indent

This commit is contained in:
Gordon JC Pearce 2024-12-31 15:13:28 +00:00
parent 1c3c6adf3c
commit d07b50491b

View File

@ -163,6 +163,7 @@ Voice::Voice() {
}
void Voice::calcPitch() {
uint16_t ea;
uint16_t target = note << 8;
// Portamento is a linear change of pitch - it'll take twice as long
@ -171,7 +172,7 @@ void Voice::calcPitch() {
// This is implemented here by adding on a step value until you pass
// the desired final pitch. Once that happens the value is clamped to the
// desired pitch.
/*
if (ic29.portaCoeff != 0) {
// portamento up
if (pitch < target) {
@ -187,20 +188,19 @@ void Voice::calcPitch() {
pitch = target;
}
pitch += ic29.masterPitch;
ea = pitch + ic29.masterPitch;
if (pitch < 0x3000) pitch = 0x3000; // lowest note
if (pitch > 0x9700) pitch = 0x6700; // highest note
if (ea < 0x3000) ea = 0x3000; // lowest note
if (ea > 0x9700) ea = 0x6700; // highest note
pitch -= 0x3000;
ea -= 0x3000;
// interpolate between the two table values
double o1 = ic29.pitchTable[pitch >> 8];
double o2 = ic29.pitchTable[(pitch >> 8) + 1];
double frac = (pitch & 0xff) / 256.0f;
double o1 = ic29.pitchTable[ea >> 8];
double o2 = ic29.pitchTable[(ea >> 8) + 1];
double frac = (ea & 0xff) / 256.0f;
omega = ((o2 - o1) * frac) + o1;
*/
}
void Voice::update() {