mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-31 20:11:29 +00:00
parent
3379e8b380
commit
2a15673610
2 changed files with 10 additions and 3 deletions
|
@ -4749,9 +4749,14 @@ int DivEngine::calcBaseFreq(double clock, double divider, int note, bool period)
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivEngine::calcFreq(int base, int pitch, bool period) {
|
int DivEngine::calcFreq(int base, int pitch, bool period) {
|
||||||
|
if (song.linearPitch) {
|
||||||
|
return period?
|
||||||
|
int(base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0):
|
||||||
|
(int(base*pow(2,(double)pitch/(12.0*128.0))*(98+globalPitch*6))/98);
|
||||||
|
}
|
||||||
return period?
|
return period?
|
||||||
int(base*pow(2,-(double)pitch/(12.0*128.0))/(98.0+globalPitch*6.0)*98.0):
|
base-pitch:
|
||||||
(int(base*pow(2,(double)pitch/(12.0*128.0))*(98+globalPitch*6))/98);
|
base+pitch;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivEngine::play() {
|
void DivEngine::play() {
|
||||||
|
|
|
@ -830,7 +830,9 @@ bool DivEngine::nextTick(bool noAccum) {
|
||||||
if (--ticks<=0) {
|
if (--ticks<=0) {
|
||||||
ret=endOfSong;
|
ret=endOfSong;
|
||||||
if (endOfSong) {
|
if (endOfSong) {
|
||||||
playSub(true);
|
if (song.loopModality!=2) {
|
||||||
|
playSub(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
endOfSong=false;
|
endOfSong=false;
|
||||||
nextRow();
|
nextRow();
|
||||||
|
|
Loading…
Reference in a new issue