mostly indent
This commit is contained in:
parent
1c3c6adf3c
commit
d07b50491b
@ -163,6 +163,7 @@ Voice::Voice() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Voice::calcPitch() {
|
void Voice::calcPitch() {
|
||||||
|
uint16_t ea;
|
||||||
uint16_t target = note << 8;
|
uint16_t target = note << 8;
|
||||||
|
|
||||||
// Portamento is a linear change of pitch - it'll take twice as long
|
// 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
|
// 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
|
// the desired final pitch. Once that happens the value is clamped to the
|
||||||
// desired pitch.
|
// desired pitch.
|
||||||
/*
|
|
||||||
if (ic29.portaCoeff != 0) {
|
if (ic29.portaCoeff != 0) {
|
||||||
// portamento up
|
// portamento up
|
||||||
if (pitch < target) {
|
if (pitch < target) {
|
||||||
@ -187,20 +188,19 @@ void Voice::calcPitch() {
|
|||||||
pitch = target;
|
pitch = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
pitch += ic29.masterPitch;
|
ea = pitch + ic29.masterPitch;
|
||||||
|
|
||||||
if (pitch < 0x3000) pitch = 0x3000; // lowest note
|
if (ea < 0x3000) ea = 0x3000; // lowest note
|
||||||
if (pitch > 0x9700) pitch = 0x6700; // highest note
|
if (ea > 0x9700) ea = 0x6700; // highest note
|
||||||
|
|
||||||
pitch -= 0x3000;
|
ea -= 0x3000;
|
||||||
|
|
||||||
// interpolate between the two table values
|
// interpolate between the two table values
|
||||||
double o1 = ic29.pitchTable[pitch >> 8];
|
double o1 = ic29.pitchTable[ea >> 8];
|
||||||
double o2 = ic29.pitchTable[(pitch >> 8) + 1];
|
double o2 = ic29.pitchTable[(ea >> 8) + 1];
|
||||||
double frac = (pitch & 0xff) / 256.0f;
|
double frac = (ea & 0xff) / 256.0f;
|
||||||
|
|
||||||
omega = ((o2 - o1) * frac) + o1;
|
omega = ((o2 - o1) * frac) + o1;
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Voice::update() {
|
void Voice::update() {
|
||||||
|
Loading…
Reference in New Issue
Block a user