mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-07 05:15:05 +00:00
PCE: finally fix LFO
This commit is contained in:
parent
91e19b864e
commit
c167066296
2 changed files with 10 additions and 6 deletions
|
@ -252,6 +252,11 @@ void DivPlatformPCE::tick(bool sysTick) {
|
|||
chan[i].freqChanged=false;
|
||||
}
|
||||
}
|
||||
if (updateLFO) {
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
updateLFO=false;
|
||||
}
|
||||
}
|
||||
|
||||
int DivPlatformPCE::dispatch(DivCommand c) {
|
||||
|
@ -389,13 +394,11 @@ int DivPlatformPCE::dispatch(DivCommand c) {
|
|||
} else {
|
||||
lfoMode=c.value;
|
||||
}
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
updateLFO=true;
|
||||
break;
|
||||
case DIV_CMD_PCE_LFO_SPEED:
|
||||
lfoSpeed=255-c.value;
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
updateLFO=true;
|
||||
break;
|
||||
case DIV_CMD_NOTE_PORTA: {
|
||||
int destFreq=NOTE_PERIODIC(c.value2);
|
||||
|
@ -525,8 +528,7 @@ void DivPlatformPCE::reset() {
|
|||
rWrite(0,0);
|
||||
rWrite(0x01,0xff);
|
||||
// set LFO
|
||||
rWrite(0x08,lfoSpeed);
|
||||
rWrite(0x09,lfoMode);
|
||||
updateLFO=true;
|
||||
// set per-channel initial panning
|
||||
for (int i=0; i<6; i++) {
|
||||
chWrite(i,0x05,isMuted[i]?0:chan[i].pan);
|
||||
|
@ -588,6 +590,7 @@ int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate, const DivConfi
|
|||
parent=p;
|
||||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
updateLFO=false;
|
||||
for (int i=0; i<6; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
|
|
|
@ -76,6 +76,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
DivDispatchOscBuffer* oscBuf[6];
|
||||
bool isMuted[6];
|
||||
bool antiClickEnabled;
|
||||
bool updateLFO;
|
||||
struct QueuedWrite {
|
||||
unsigned char addr;
|
||||
unsigned char val;
|
||||
|
|
Loading…
Reference in a new issue