mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 06:53:01 +00:00
keyOffAffectsArp is now per-channel
This commit is contained in:
parent
5fbaf71105
commit
65ab3a2b5d
13 changed files with 19 additions and 9 deletions
|
@ -99,7 +99,7 @@ class DivDispatch {
|
|||
virtual void tick();
|
||||
|
||||
virtual bool isStereo();
|
||||
virtual bool keyOffAffectsArp();
|
||||
virtual bool keyOffAffectsArp(int ch);
|
||||
|
||||
/**
|
||||
* initialize this DivDispatch.
|
||||
|
|
|
@ -14,7 +14,7 @@ bool DivDispatch::isStereo() {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool DivDispatch::keyOffAffectsArp() {
|
||||
bool DivDispatch::keyOffAffectsArp(int ch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -344,6 +344,10 @@ bool DivPlatformGenesis::isStereo() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool DivPlatformGenesis::keyOffAffectsArp(int ch) {
|
||||
return (ch>5);
|
||||
}
|
||||
|
||||
int DivPlatformGenesis::init(DivEngine* p, int channels, int sugRate) {
|
||||
parent=p;
|
||||
rate=213068;
|
||||
|
|
|
@ -52,6 +52,7 @@ class DivPlatformGenesis: public DivDispatch {
|
|||
int dispatch(DivCommand c);
|
||||
void tick();
|
||||
bool isStereo();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
int init(DivEngine* parent, int channels, int sugRate);
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -254,6 +254,10 @@ void DivPlatformGenesisExt::tick() {
|
|||
}
|
||||
}
|
||||
|
||||
bool DivPlatformGenesisExt::keyOffAffectsArp(int ch) {
|
||||
return (ch>8);
|
||||
}
|
||||
|
||||
int DivPlatformGenesisExt::init(DivEngine* parent, int channels, int sugRate) {
|
||||
DivPlatformGenesis::init(parent,channels,sugRate);
|
||||
|
||||
|
|
|
@ -17,5 +17,6 @@ class DivPlatformGenesisExt: public DivPlatformGenesis {
|
|||
public:
|
||||
int dispatch(DivCommand c);
|
||||
void tick();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
int init(DivEngine* parent, int channels, int sugRate);
|
||||
};
|
||||
|
|
|
@ -270,7 +270,7 @@ int DivPlatformNES::dispatch(DivCommand c) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool DivPlatformNES::keyOffAffectsArp() {
|
||||
bool DivPlatformNES::keyOffAffectsArp(int ch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ class DivPlatformNES: public DivDispatch {
|
|||
void acquire(short* bufL, short* bufR, size_t start, size_t len);
|
||||
int dispatch(DivCommand c);
|
||||
void tick();
|
||||
bool keyOffAffectsArp();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
int init(DivEngine* parent, int channels, int sugRate);
|
||||
};
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ bool DivPlatformPCE::isStereo() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool DivPlatformPCE::keyOffAffectsArp() {
|
||||
bool DivPlatformPCE::keyOffAffectsArp(int ch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class DivPlatformPCE: public DivDispatch {
|
|||
int dispatch(DivCommand c);
|
||||
void tick();
|
||||
bool isStereo();
|
||||
bool keyOffAffectsArp();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
int init(DivEngine* parent, int channels, int sugRate);
|
||||
};
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ int DivPlatformSMS::dispatch(DivCommand c) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool DivPlatformSMS::keyOffAffectsArp() {
|
||||
bool DivPlatformSMS::keyOffAffectsArp(int ch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class DivPlatformSMS: public DivDispatch {
|
|||
void acquire(short* bufL, short* bufR, size_t start, size_t len);
|
||||
int dispatch(DivCommand c);
|
||||
void tick();
|
||||
bool keyOffAffectsArp();
|
||||
bool keyOffAffectsArp(int ch);
|
||||
int init(DivEngine* parent, int channels, int sugRate);
|
||||
};
|
||||
|
||||
|
|
|
@ -300,7 +300,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
|
|||
} else if (!(pat->data[whatRow][0]==0 && pat->data[whatRow][1]==0)) {
|
||||
chan[i].note=pat->data[whatRow][0]+pat->data[whatRow][1]*12;
|
||||
if (!chan[i].keyOn) {
|
||||
if (dispatch->keyOffAffectsArp()) {
|
||||
if (dispatch->keyOffAffectsArp(i)) {
|
||||
chan[i].arp=0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue