SN: address easy noise feedback, part 1
This commit is contained in:
parent
6750a8ef6a
commit
a7dfe6534d
|
@ -126,14 +126,14 @@ double DivPlatformSMS::NOTE_SN(int ch, int note) {
|
||||||
return NOTE_PERIODIC(note);
|
return NOTE_PERIODIC(note);
|
||||||
}
|
}
|
||||||
if (note>easyThreshold) {
|
if (note>easyThreshold) {
|
||||||
return MAX(0,8-easyThreshold);
|
return MAX(0,easyStartingPeriod-easyThreshold);
|
||||||
}
|
}
|
||||||
return NOTE_PERIODIC(note);
|
return NOTE_PERIODIC(note);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DivPlatformSMS::snCalcFreq(int ch) {
|
int DivPlatformSMS::snCalcFreq(int ch) {
|
||||||
if (parent->song.linearPitch==2 && easyNoise && chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2>(easyThreshold<<7)) {
|
if (parent->song.linearPitch==2 && easyNoise && chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2>(easyThreshold<<7)) {
|
||||||
int ret=(0x440-(chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2-(easyThreshold<<7)))>>7;
|
int ret=(((easyStartingPeriod<<7)+0x40)-(chan[ch].baseFreq+chan[ch].pitch+chan[ch].pitch2-(easyThreshold<<7)))>>7;
|
||||||
if (ret<0) ret=0;
|
if (ret<0) ret=0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -489,6 +489,7 @@ void DivPlatformSMS::setFlags(const DivConfig& flags) {
|
||||||
default:
|
default:
|
||||||
chipClock=COLOR_NTSC;
|
chipClock=COLOR_NTSC;
|
||||||
easyThreshold=92;
|
easyThreshold=92;
|
||||||
|
easyStartingPeriod=8;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
resetPhase=!flags.getBool("noPhaseReset",false);
|
resetPhase=!flags.getBool("noPhaseReset",false);
|
||||||
|
|
|
@ -66,6 +66,7 @@ class DivPlatformSMS: public DivDispatch {
|
||||||
double toneDivider=64.0;
|
double toneDivider=64.0;
|
||||||
double noiseDivider=64.0;
|
double noiseDivider=64.0;
|
||||||
int easyThreshold;
|
int easyThreshold;
|
||||||
|
int easyStartingPeriod;
|
||||||
bool updateSNMode;
|
bool updateSNMode;
|
||||||
bool resetPhase;
|
bool resetPhase;
|
||||||
bool isRealSN;
|
bool isRealSN;
|
||||||
|
|
Loading…
Reference in New Issue