Merge branch 'master' into preset1
This commit is contained in:
commit
0c1a8bc001
33 changed files with 1595 additions and 322 deletions
|
|
@ -83,7 +83,7 @@ struct DivChannelState {
|
|||
int note, oldNote, lastIns, pitch, portaSpeed, portaNote;
|
||||
int volume, volSpeed, cut, rowDelay, volMax;
|
||||
int delayOrder, delayRow, retrigSpeed, retrigTick;
|
||||
int vibratoDepth, vibratoRate, vibratoPos, vibratoDir, vibratoFine;
|
||||
int vibratoDepth, vibratoRate, vibratoPos, vibratoPosGiant, vibratoDir, vibratoFine;
|
||||
int tremoloDepth, tremoloRate, tremoloPos;
|
||||
unsigned char arp, arpStage, arpTicks, panL, panR;
|
||||
bool doNote, legato, portaStop, keyOn, keyOff, nowYouCanStop, stopOnOff;
|
||||
|
|
@ -112,6 +112,7 @@ struct DivChannelState {
|
|||
vibratoDepth(0),
|
||||
vibratoRate(0),
|
||||
vibratoPos(0),
|
||||
vibratoPosGiant(0),
|
||||
vibratoDir(0),
|
||||
vibratoFine(15),
|
||||
tremoloDepth(0),
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ void DivPlatformBubSysWSG::reset() {
|
|||
for (int i=0; i<2; i++) {
|
||||
chan[i]=DivPlatformBubSysWSG::Channel();
|
||||
chan[i].std.setEngine(parent);
|
||||
chan[i].ws.setEngine(parent);
|
||||
chan[i].ws.setEngine(parent,8);
|
||||
chan[i].ws.init(NULL,32,15,false);
|
||||
}
|
||||
if (dumpWrites) {
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ void DivPlatformMSM6258::setFlags(unsigned int flags) {
|
|||
chipClock=4000000;
|
||||
break;
|
||||
}
|
||||
rate=chipClock/128;
|
||||
rate=chipClock/256;
|
||||
for (int i=0; i<1; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -682,6 +682,9 @@ void DivPlatformOPL::muteChannel(int ch, bool mute) {
|
|||
fm.channel[outChanMap[ch]].muted=mute;
|
||||
}
|
||||
int ops=(slots[3][ch]!=255 && chan[ch].state.ops==4 && oplType==3)?4:2;
|
||||
if (ch&1 && ch<12) {
|
||||
if (chan[ch-1].fourOp) return;
|
||||
}
|
||||
chan[ch].fourOp=(ops==4);
|
||||
update4OpMask=true;
|
||||
for (int i=0; i<ops; i++) {
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ void DivPlatformSCC::reset() {
|
|||
for (int i=0; i<5; i++) {
|
||||
chan[i]=DivPlatformSCC::Channel();
|
||||
chan[i].std.setEngine(parent);
|
||||
chan[i].ws.setEngine(parent);
|
||||
chan[i].ws.setEngine(parent,128);
|
||||
chan[i].ws.init(NULL,32,255,false);
|
||||
chan[i].vol=15;
|
||||
chan[i].outVol=15;
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ int DivPlatformSwan::dispatch(DivCommand c) {
|
|||
case DIV_CMD_VOLUME:
|
||||
if (chan[c.chan].vol!=c.value) {
|
||||
chan[c.chan].vol=c.value;
|
||||
if (!chan[c.chan].std.vol.had) {
|
||||
if (!chan[c.chan].std.vol.has) {
|
||||
calcAndWriteOutVol(c.chan,15);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ int DivPlatformVIC20::dispatch(DivCommand c) {
|
|||
case DIV_CMD_VOLUME:
|
||||
if (chan[c.chan].vol!=c.value) {
|
||||
chan[c.chan].vol=c.value;
|
||||
if (!chan[c.chan].std.vol.had) {
|
||||
if (!chan[c.chan].std.vol.has) {
|
||||
calcAndWriteOutVol(c.chan,15);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -988,6 +988,10 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
if (chan[i].vibratoDepth>0) {
|
||||
chan[i].vibratoPos+=chan[i].vibratoRate;
|
||||
if (chan[i].vibratoPos>=64) chan[i].vibratoPos-=64;
|
||||
|
||||
chan[i].vibratoPosGiant+=chan[i].vibratoRate;
|
||||
if (chan[i].vibratoPos>=512) chan[i].vibratoPos-=512;
|
||||
|
||||
switch (chan[i].vibratoDir) {
|
||||
case 1: // up
|
||||
dispatchCmd(DivCommand(DIV_CMD_PITCH,i,chan[i].pitch+(MAX(0,(chan[i].vibratoDepth*vibTable[chan[i].vibratoPos]*chan[i].vibratoFine)>>4)/15)));
|
||||
|
|
|
|||
|
|
@ -243,8 +243,13 @@ void DivWaveSynth::changeWave2(int num) {
|
|||
first=true;
|
||||
}
|
||||
|
||||
void DivWaveSynth::setEngine(DivEngine* engine) {
|
||||
void DivWaveSynth::setEngine(DivEngine* engine, int waveFloor) {
|
||||
e=engine;
|
||||
memset(wave1,waveFloor,256);
|
||||
memset(wave2,waveFloor,256);
|
||||
for (int i=0; i<256; i++) {
|
||||
output[i]=waveFloor;
|
||||
}
|
||||
}
|
||||
|
||||
void DivWaveSynth::init(DivInstrument* which, int w, int h, bool insChanged) {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class DivWaveSynth {
|
|||
* @param insChanged whether the instrument has changed.
|
||||
*/
|
||||
void init(DivInstrument* which, int width, int height, bool insChanged=false);
|
||||
void setEngine(DivEngine* engine);
|
||||
void setEngine(DivEngine* engine, int waveFloor=0);
|
||||
DivWaveSynth():
|
||||
e(NULL),
|
||||
pos(0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue