Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
This commit is contained in:
commit
dd79ae401b
52 changed files with 578 additions and 329 deletions
|
|
@ -103,9 +103,8 @@ const char* cmdName[]={
|
|||
"FM_AM_DEPTH",
|
||||
"FM_PM_DEPTH",
|
||||
|
||||
"GENESIS_LFO",
|
||||
|
||||
"ARCADE_LFO",
|
||||
"FM_LFO2",
|
||||
"FM_LFO2_WAVE",
|
||||
|
||||
"STD_NOISE_FREQ",
|
||||
"STD_NOISE_MODE",
|
||||
|
|
@ -227,6 +226,9 @@ const char* cmdName[]={
|
|||
|
||||
"SURROUND_PANNING",
|
||||
|
||||
"FM_AM2_DEPTH",
|
||||
"FM_PM2_DEPTH",
|
||||
|
||||
"ALWAYS_SET_VOLUME"
|
||||
};
|
||||
|
||||
|
|
@ -699,6 +701,13 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
// - then a volume slide down starts to the low boundary, and then when this is reached a volume slide up begins
|
||||
// - this process repeats until 0700 or 0Axy are found
|
||||
// - note that a volume value does not stop tremolo - instead it glitches this whole thing up
|
||||
if (chan[i].tremoloDepth==0) {
|
||||
chan[i].tremoloPos=0;
|
||||
}
|
||||
chan[i].tremoloDepth=effectVal&15;
|
||||
chan[i].tremoloRate=effectVal>>4;
|
||||
// tremolo and vol slides are incompatiblw
|
||||
chan[i].volSpeed=0;
|
||||
break;
|
||||
case 0x0a: // volume ramp
|
||||
// TODO: non-0x-or-x0 value should be treated as 00
|
||||
|
|
@ -708,6 +717,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
} else {
|
||||
chan[i].volSpeed=(effectVal>>4)*64;
|
||||
}
|
||||
// tremolo and vol slides are incompatible
|
||||
chan[i].tremoloDepth=0;
|
||||
chan[i].tremoloRate=0;
|
||||
} else {
|
||||
chan[i].volSpeed=0;
|
||||
}
|
||||
|
|
@ -848,10 +860,16 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
if (!song.arpNonPorta) dispatchCmd(DivCommand(DIV_CMD_PRE_PORTA,i,false,0));
|
||||
break;
|
||||
case 0xf3: // fine volume ramp up
|
||||
// tremolo and vol slides are incompatible
|
||||
chan[i].tremoloDepth=0;
|
||||
chan[i].tremoloRate=0;
|
||||
chan[i].volSpeed=effectVal;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
||||
break;
|
||||
case 0xf4: // fine volume ramp down
|
||||
// tremolo and vol slides are incompatible
|
||||
chan[i].tremoloDepth=0;
|
||||
chan[i].tremoloRate=0;
|
||||
chan[i].volSpeed=-effectVal;
|
||||
dispatchCmd(DivCommand(DIV_CMD_HINT_VOL_SLIDE,i,chan[i].volSpeed));
|
||||
break;
|
||||
|
|
@ -878,6 +896,9 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
} else {
|
||||
chan[i].volSpeed=(effectVal>>4)*256;
|
||||
}
|
||||
// tremolo and vol slides are incompatible
|
||||
chan[i].tremoloDepth=0;
|
||||
chan[i].tremoloRate=0;
|
||||
} else {
|
||||
chan[i].volSpeed=0;
|
||||
}
|
||||
|
|
@ -1249,6 +1270,10 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
} else {
|
||||
dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
|
||||
}
|
||||
} else if (chan[i].tremoloDepth>0) {
|
||||
chan[i].tremoloPos+=chan[i].tremoloRate;
|
||||
chan[i].tremoloPos&=127;
|
||||
dispatchCmd(DivCommand(DIV_CMD_VOLUME,i,MAX(0,chan[i].volume-(tremTable[chan[i].tremoloPos]*chan[i].tremoloDepth))>>8));
|
||||
}
|
||||
}
|
||||
if (chan[i].vibratoDepth>0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue