mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-29 02:51:24 +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) {
|
||||
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?
|
||||
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);
|
||||
base-pitch:
|
||||
base+pitch;
|
||||
}
|
||||
|
||||
void DivEngine::play() {
|
||||
|
|
|
@ -830,7 +830,9 @@ bool DivEngine::nextTick(bool noAccum) {
|
|||
if (--ticks<=0) {
|
||||
ret=endOfSong;
|
||||
if (endOfSong) {
|
||||
playSub(true);
|
||||
if (song.loopModality!=2) {
|
||||
playSub(true);
|
||||
}
|
||||
}
|
||||
endOfSong=false;
|
||||
nextRow();
|
||||
|
|
Loading…
Reference in a new issue