Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
* 'master' of https://github.com/tildearrow/furnace: GUI: sample/macro zoom with ctrl-wheel GUI: prevent division by zero GUI: possibly fix an instrument saving issue GUI: add chip randomizer button update to-do list oops NES: add DMC write effect SoundUnit: implement panning QSound: implement panning macro - PLEASE READ further improve channel allocation update format.md for eventual ExtCh extra systems improvements to swap/stomp channel # Conflicts: # src/gui/insEdit.cpp
This commit is contained in:
commit
72e8bb89a7
20 changed files with 179 additions and 27 deletions
|
|
@ -90,9 +90,9 @@ class DivPlatformES5506: public DivDispatch, public es550x_intf {
|
|||
} envChanged;
|
||||
|
||||
signed int k1Offs, k2Offs;
|
||||
int vol, lVol, rVol;
|
||||
int outVol, outLVol, outRVol;
|
||||
int resLVol, resRVol;
|
||||
unsigned int vol, lVol, rVol;
|
||||
unsigned int outVol, outLVol, outRVol;
|
||||
unsigned int resLVol, resRVol;
|
||||
DivInstrumentES5506::Filter filter;
|
||||
DivInstrumentES5506::Envelope envelope;
|
||||
DivMacroInt std;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ const char** DivPlatformNES::getRegisterSheet() {
|
|||
|
||||
const char* DivPlatformNES::getEffectName(unsigned char effect) {
|
||||
switch (effect) {
|
||||
case 0x11:
|
||||
return "Write to delta modulation counter (0 to 7F)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Set duty cycle/noise mode (pulse: 0 to 3; noise: 0 or 1)";
|
||||
break;
|
||||
|
|
@ -421,6 +424,9 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
|||
}
|
||||
rWrite(0x4001+(c.chan*4),chan[c.chan].sweep);
|
||||
break;
|
||||
case DIV_CMD_NES_DMC:
|
||||
rWrite(0x4011,c.value&0x7f);
|
||||
break;
|
||||
case DIV_CMD_SAMPLE_BANK:
|
||||
sampleBank=c.value;
|
||||
if (sampleBank>(parent->song.sample.size()/12)) {
|
||||
|
|
|
|||
|
|
@ -257,6 +257,9 @@ const char* DivPlatformQSound::getEffectName(unsigned char effect) {
|
|||
case 0x11:
|
||||
return "11xx: Set channel echo level (00 to FF)";
|
||||
break;
|
||||
case 0x12:
|
||||
return "12xx: Toggle QSound algorithm (0: disabled; 1: enabled)";
|
||||
break;
|
||||
default:
|
||||
if ((effect & 0xf0) == 0x30) {
|
||||
return "3xxx: Set echo delay buffer length (000 to AA5)";
|
||||
|
|
@ -335,6 +338,15 @@ void DivPlatformQSound::tick(bool sysTick) {
|
|||
}
|
||||
chan[i].freqChanged=true;
|
||||
}
|
||||
if (chan[i].std.panL.had) { // panning
|
||||
chan[i].panning=chan[i].std.panL.val+16;
|
||||
}
|
||||
if (chan[i].std.panR.had) { // surround
|
||||
chan[i].surround=chan[i].std.panR.val;
|
||||
}
|
||||
if (chan[i].std.panL.had || chan[i].std.panR.had) {
|
||||
immWrite(Q1_PAN+i,chan[i].panning+0x110+(chan[i].surround?0:0x30));
|
||||
}
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
//DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_AMIGA);
|
||||
chan[i].freq=parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2);
|
||||
|
|
@ -429,7 +441,8 @@ int DivPlatformQSound::dispatch(DivCommand c) {
|
|||
return chan[c.chan].outVol;
|
||||
break;
|
||||
case DIV_CMD_PANNING:
|
||||
immWrite(Q1_PAN+c.chan, c.value + 0x110);
|
||||
chan[c.chan].panning=parent->convertPanSplitToLinear(c.value,4,32);
|
||||
immWrite(Q1_PAN+c.chan,chan[c.chan].panning+0x110+(chan[c.chan].surround?0:0x30));
|
||||
break;
|
||||
case DIV_CMD_QSOUND_ECHO_LEVEL:
|
||||
immWrite(Q1_ECHO+c.chan, c.value << 7);
|
||||
|
|
@ -440,6 +453,10 @@ int DivPlatformQSound::dispatch(DivCommand c) {
|
|||
case DIV_CMD_QSOUND_ECHO_DELAY:
|
||||
immWrite(Q1_ECHO_LENGTH, (c.value > 2725 ? 0xfff : 0xfff - (2725 - c.value)));
|
||||
break;
|
||||
case DIV_CMD_QSOUND_SURROUND:
|
||||
chan[c.chan].surround=c.value;
|
||||
immWrite(Q1_PAN+c.chan,chan[c.chan].panning+0x110+(chan[c.chan].surround?0:0x30));
|
||||
break;
|
||||
case DIV_CMD_PITCH:
|
||||
chan[c.chan].pitch=c.value;
|
||||
chan[c.chan].freqChanged=true;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class DivPlatformQSound: public DivDispatch {
|
|||
int sample, wave, ins;
|
||||
int note;
|
||||
int panning;
|
||||
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave;
|
||||
bool active, insChanged, freqChanged, keyOn, keyOff, inPorta, useWave, surround;
|
||||
int vol, outVol;
|
||||
DivMacroInt std;
|
||||
void macroInit(DivInstrument* which) {
|
||||
|
|
@ -57,6 +57,8 @@ class DivPlatformQSound: public DivDispatch {
|
|||
keyOn(false),
|
||||
keyOff(false),
|
||||
inPorta(false),
|
||||
useWave(false),
|
||||
surround(true),
|
||||
vol(255),
|
||||
outVol(255) {}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ int DivPlatformSoundUnit::dispatch(DivCommand c) {
|
|||
break;
|
||||
}
|
||||
case DIV_CMD_PANNING: {
|
||||
chan[c.chan].pan=c.value;
|
||||
chan[c.chan].pan=parent->convertPanSplitToLinear(c.value,4,254)-127;
|
||||
chWrite(c.chan,0x03,chan[c.chan].pan);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue