more special waves, more inst editor UI, implement all mixmodes
This commit is contained in:
parent
46e41b5fb4
commit
d0a990dcfa
|
@ -264,6 +264,7 @@ bool DivInstrumentSID3::operator==(const DivInstrumentSID3& other) {
|
|||
_C(ring_mod_source) &&
|
||||
_C(sync_source) &&
|
||||
_C(specialWaveOn) &&
|
||||
_C(oneBitNoise) &&
|
||||
_C(special_wave) &&
|
||||
_C(filter_matrix) &&
|
||||
_C(filt[0]) &&
|
||||
|
|
|
@ -869,6 +869,7 @@ struct DivInstrumentSID3
|
|||
bool phase_mod;
|
||||
unsigned char phase_mod_source, ring_mod_source, sync_source;
|
||||
bool specialWaveOn;
|
||||
bool oneBitNoise;
|
||||
unsigned char special_wave;
|
||||
|
||||
unsigned int filter_matrix;
|
||||
|
@ -910,6 +911,7 @@ struct DivInstrumentSID3
|
|||
ring_mod_source(0),
|
||||
sync_source(0),
|
||||
specialWaveOn(false),
|
||||
oneBitNoise(false),
|
||||
special_wave(0),
|
||||
filter_matrix(0) {}
|
||||
};
|
||||
|
|
|
@ -153,18 +153,19 @@ void DivPlatformSID3::tick(bool sysTick)
|
|||
rWrite(9 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].special_wave); //special wave
|
||||
|
||||
rWrite(13 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].outVol); //set volume
|
||||
rWrite(14 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].mix_mode); //mixmode
|
||||
|
||||
updateEnvelope(i);
|
||||
|
||||
chan[i].duty = 0x1000;
|
||||
//chan[i].duty = 0x1000;
|
||||
updateDuty(i);
|
||||
|
||||
rWrite(i * SID3_REGISTERS_PER_CHANNEL, 0); //gate off TODO: make it properly?
|
||||
rWrite(i * SID3_REGISTERS_PER_CHANNEL, SID3_CHAN_ENABLE_GATE); //gate on
|
||||
rWrite(i * SID3_REGISTERS_PER_CHANNEL, 0 | (chan[i].oneBitNoise ? SID3_CHAN_1_BIT_NOISE : 0)); //gate off TODO: make it properly?
|
||||
rWrite(i * SID3_REGISTERS_PER_CHANNEL, SID3_CHAN_ENABLE_GATE | (chan[i].oneBitNoise ? SID3_CHAN_1_BIT_NOISE : 0)); //gate on
|
||||
}
|
||||
if (chan[i].keyOff)
|
||||
{
|
||||
rWrite(i*SID3_REGISTERS_PER_CHANNEL,0);
|
||||
rWrite(i * SID3_REGISTERS_PER_CHANNEL, 0 | (chan[i].oneBitNoise ? SID3_CHAN_1_BIT_NOISE : 0));
|
||||
}
|
||||
|
||||
if (chan[i].freq<0) chan[i].freq=0;
|
||||
|
@ -197,7 +198,7 @@ int DivPlatformSID3::dispatch(DivCommand c) {
|
|||
chan[c.chan].keyOn=true;
|
||||
|
||||
if (chan[c.chan].insChanged || chan[c.chan].resetDuty || ins->std.waveMacro.len>0) {
|
||||
chan[c.chan].duty=ins->c64.duty;
|
||||
//chan[c.chan].duty=ins->c64.duty;
|
||||
//rWrite(c.chan*7+2,chan[c.chan].duty&0xff);
|
||||
//rWrite(c.chan*7+3,(chan[c.chan].duty>>8) | (chan[c.chan].outVol << 4));
|
||||
}
|
||||
|
@ -222,6 +223,12 @@ int DivPlatformSID3::dispatch(DivCommand c) {
|
|||
chan[c.chan].sustain=ins->c64.s;
|
||||
chan[c.chan].sr=ins->sid3.sr;
|
||||
chan[c.chan].release=ins->c64.r;
|
||||
|
||||
chan[c.chan].duty=ins->c64.duty;
|
||||
|
||||
chan[c.chan].oneBitNoise = ins->sid3.oneBitNoise;
|
||||
|
||||
chan[c.chan].mix_mode = ins->sid2.mixMode;
|
||||
}
|
||||
if (chan[c.chan].insChanged || chan[c.chan].resetFilter) {
|
||||
/*chan[c.chan].filter=ins->c64.toFilter;
|
||||
|
|
|
@ -29,7 +29,7 @@ class DivPlatformSID3: public DivDispatch {
|
|||
int prevFreq;
|
||||
unsigned char wave, special_wave, attack, decay, sustain, sr, release;
|
||||
short duty;
|
||||
bool resetMask, resetFilter, resetDuty, gate, ring, sync, phase;
|
||||
bool resetMask, resetFilter, resetDuty, gate, ring, sync, phase, oneBitNoise;
|
||||
unsigned char vol;
|
||||
unsigned char noise_mode;
|
||||
unsigned char mix_mode;
|
||||
|
@ -52,6 +52,7 @@ class DivPlatformSID3: public DivDispatch {
|
|||
ring(false),
|
||||
sync(false),
|
||||
phase(false),
|
||||
oneBitNoise(false),
|
||||
vol(SID3_MAX_VOL),
|
||||
noise_mode(0),
|
||||
mix_mode(0),
|
||||
|
|
|
@ -2222,20 +2222,76 @@ uint8_t wave8580_PST[] =
|
|||
/* 0xff8: */ 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
};
|
||||
|
||||
inline uint16_t sid3_pulse(uint32_t acc, uint16_t pw) // 0-FFFF pulse width range
|
||||
{
|
||||
return (((acc >> ((SID3_ACC_BITS - 16))) >= ((pw == 0xffff ? pw + 1 : pw)) ? (0xffff) : 0));
|
||||
}
|
||||
|
||||
inline uint16_t sid3_saw(uint32_t acc)
|
||||
{
|
||||
return (acc >> (SID3_ACC_BITS - 16)) & (0xffff);
|
||||
}
|
||||
|
||||
inline uint16_t sid3_triangle(uint32_t acc)
|
||||
{
|
||||
return (((acc > (1 << (SID3_ACC_BITS - 1))) ? ~acc : acc) >> (SID3_ACC_BITS - 17));
|
||||
}
|
||||
|
||||
void sid3_clock_lfsr(sid3_channel* ch)
|
||||
{
|
||||
uint32_t feedback = ch->lfsr & 1;
|
||||
ch->lfsr >>= 1;
|
||||
|
||||
if (feedback)
|
||||
{
|
||||
ch->lfsr ^= ch->lfsr_taps;
|
||||
}
|
||||
}
|
||||
|
||||
inline uint16_t sid3_noise(uint32_t lfsr, bool one_bit)
|
||||
{
|
||||
return one_bit ? ((lfsr & 1) ? 0xffff : 0) : (lfsr & 0xffff);
|
||||
}
|
||||
|
||||
inline uint16_t sid3_special_wave(SID3* sid3, uint32_t acc, uint8_t wave)
|
||||
{
|
||||
return sid3->special_waves[wave][acc >> (SID3_ACC_BITS - 14)];
|
||||
}
|
||||
|
||||
SID3* sid3_create()
|
||||
{
|
||||
SID3* sid3 = (SID3*)malloc(sizeof(SID3));
|
||||
|
||||
memset(sid3, 0, sizeof(SID3));
|
||||
|
||||
for(int32_t i = 0; i < SID3_NUM_SPECIAL_WAVES; i++)
|
||||
for(int32_t i = 0; i < SID3_NUM_UNIQUE_SPECIAL_WAVES; i++)
|
||||
{
|
||||
for(int32_t j = 0; j < SID3_SPECIAL_WAVE_LENGTH; j++)
|
||||
{
|
||||
sid3->special_waves[i][j] = (uint16_t)(waveFuncs[i]((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff + (double)0x7fff);
|
||||
|
||||
int32_t clipped = ((int32_t)sid3->special_waves[i][j] - 0x7fff) * 2;
|
||||
if (clipped < -0x7fff) clipped = -0x7fff;
|
||||
if (clipped > 0x7fff) clipped = 0x7fff;
|
||||
sid3->special_waves[i + SID3_NUM_UNIQUE_SPECIAL_WAVES][j] = clipped + 0x7fff;
|
||||
}
|
||||
}
|
||||
|
||||
for (int32_t j = 0; j < SID3_SPECIAL_WAVE_LENGTH; j++)
|
||||
{
|
||||
int32_t clipped = (int32_t)(triangle((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff) * 2;
|
||||
|
||||
if (clipped < -0x7fff) clipped = -0x7fff;
|
||||
if (clipped > 0x7fff) clipped = 0x7fff;
|
||||
sid3->special_waves[SID3_NUM_UNIQUE_SPECIAL_WAVES * 2][j] = clipped + 0x7fff;
|
||||
|
||||
clipped = (int32_t)(saw((double)j * 2.0 * M_PI / (double)SID3_SPECIAL_WAVE_LENGTH) * (double)0x7fff) * 2;
|
||||
|
||||
if (clipped < -0x7fff) clipped = -0x7fff;
|
||||
if (clipped > 0x7fff) clipped = 0x7fff;
|
||||
sid3->special_waves[SID3_NUM_UNIQUE_SPECIAL_WAVES * 2 + 1][j] = clipped + 0x7fff;
|
||||
}
|
||||
|
||||
return sid3;
|
||||
}
|
||||
|
||||
|
@ -2635,49 +2691,23 @@ void sid3_write(SID3* sid3, uint8_t address, uint8_t data)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 14:
|
||||
{
|
||||
if(channel != SID3_NUM_CHANNELS - 1)
|
||||
{
|
||||
sid3->chan[channel].mix_mode = data;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
inline uint16_t sid3_pulse(uint32_t acc, uint16_t pw) // 0-FFFF pulse width range
|
||||
int32_t sid3_get_waveform(SID3* sid3, sid3_channel* ch)
|
||||
{
|
||||
return (((acc >> ((SID3_ACC_BITS - 16))) >= ((pw == 0xffff ? pw + 1 : pw)) ? (0xffff) : 0));
|
||||
}
|
||||
if(ch->waveform == 0) return 0;
|
||||
|
||||
inline uint16_t sid3_saw(uint32_t acc)
|
||||
{
|
||||
return (acc >> (SID3_ACC_BITS - 16)) & (0xffff);
|
||||
}
|
||||
|
||||
inline uint16_t sid3_triangle(uint32_t acc)
|
||||
{
|
||||
return (((acc < (1 << (SID3_ACC_BITS - 1))) ? ~acc : acc) >> (SID3_ACC_BITS - 17));
|
||||
}
|
||||
|
||||
void sid3_clock_lfsr(sid3_channel* ch)
|
||||
{
|
||||
uint32_t feedback = ch->lfsr & 1;
|
||||
ch->lfsr >>= 1;
|
||||
|
||||
if (feedback)
|
||||
{
|
||||
ch->lfsr ^= ch->lfsr_taps;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t sid3_noise(uint32_t lfsr, bool one_bit)
|
||||
{
|
||||
return one_bit ? ((lfsr & 1) ? 0xffff : 0) : (lfsr & 0xffff);
|
||||
}
|
||||
|
||||
inline uint16_t sid3_special_wave(SID3* sid3, uint32_t acc, uint8_t wave)
|
||||
{
|
||||
return sid3->special_waves[wave][acc >> (SID3_ACC_BITS - 14)];
|
||||
}
|
||||
|
||||
uint16_t sid3_get_waveform(SID3* sid3, sid3_channel* ch)
|
||||
{
|
||||
if(ch->waveform == 0) return 0x8000;
|
||||
int32_t wave = 0;
|
||||
|
||||
switch(ch->mix_mode)
|
||||
{
|
||||
|
@ -2687,35 +2717,277 @@ uint16_t sid3_get_waveform(SID3* sid3, sid3_channel* ch)
|
|||
{
|
||||
case SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
return sid3_triangle(ch->accumulator);
|
||||
wave = sid3_triangle(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SAW:
|
||||
{
|
||||
return sid3_saw(ch->accumulator);
|
||||
wave = sid3_saw(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8;
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_PULSE:
|
||||
{
|
||||
return sid3_pulse(ch->accumulator, ch->pw);
|
||||
wave = sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_PULSE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE:
|
||||
{
|
||||
return sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_triangle(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_saw(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = (wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_PULSE:
|
||||
{
|
||||
wave = sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL:
|
||||
{
|
||||
return sid3_special_wave(sid3, ch->accumulator, ch->special_wave);
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_triangle(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_saw(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8;
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_triangle(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_saw(ch->accumulator);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580__ST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) & sid3_pulse(ch->accumulator, ch->pw);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_P_T[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PS_[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
case SID3_WAVE_SPECIAL | SID3_WAVE_NOISE | SID3_WAVE_PULSE | SID3_WAVE_SAW | SID3_WAVE_TRIANGLE:
|
||||
{
|
||||
wave = sid3_special_wave(sid3, ch->accumulator, ch->special_wave) & (wave8580_PST[ch->accumulator >> (SID3_ACC_BITS - 12)] << 8) & sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
wave -= 0x8000;
|
||||
break;
|
||||
}
|
||||
case SID3_MIX_AND:
|
||||
{
|
||||
wave = 0xffff;
|
||||
|
||||
if(ch->waveform & SID3_WAVE_TRIANGLE)
|
||||
{
|
||||
wave &= sid3_triangle(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SAW)
|
||||
{
|
||||
wave &= sid3_saw(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_PULSE)
|
||||
{
|
||||
wave &= sid3_pulse(ch->accumulator, ch->pw);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_NOISE)
|
||||
{
|
||||
wave &= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SPECIAL)
|
||||
{
|
||||
wave &= sid3_special_wave(sid3, ch->accumulator, ch->special_wave);
|
||||
}
|
||||
|
||||
wave -= 0x8000;
|
||||
break;
|
||||
}
|
||||
case SID3_MIX_OR:
|
||||
{
|
||||
uint16_t wave_16 = 0;
|
||||
|
||||
if(ch->waveform & SID3_WAVE_TRIANGLE)
|
||||
{
|
||||
wave_16 |= sid3_triangle(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SAW)
|
||||
{
|
||||
wave_16 |= sid3_saw(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_PULSE)
|
||||
{
|
||||
wave_16 |= sid3_pulse(ch->accumulator, ch->pw);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_NOISE)
|
||||
{
|
||||
wave_16 |= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SPECIAL)
|
||||
{
|
||||
wave_16 |= sid3_special_wave(sid3, ch->accumulator, ch->special_wave);
|
||||
}
|
||||
|
||||
wave = wave_16 - 0x8000;
|
||||
break;
|
||||
}
|
||||
case SID3_MIX_XOR:
|
||||
{
|
||||
uint16_t wave_16 = 0;
|
||||
|
||||
if(ch->waveform & SID3_WAVE_TRIANGLE)
|
||||
{
|
||||
wave_16 ^= sid3_triangle(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SAW)
|
||||
{
|
||||
wave_16 ^= sid3_saw(ch->accumulator);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_PULSE)
|
||||
{
|
||||
wave_16 ^= sid3_pulse(ch->accumulator, ch->pw);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_NOISE)
|
||||
{
|
||||
wave_16 ^= sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE);
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SPECIAL)
|
||||
{
|
||||
wave_16 ^= sid3_special_wave(sid3, ch->accumulator, ch->special_wave);
|
||||
}
|
||||
|
||||
wave = wave_16 - 0x8000;
|
||||
break;
|
||||
}
|
||||
case SID3_MIX_SUM:
|
||||
{
|
||||
if(ch->waveform & SID3_WAVE_TRIANGLE)
|
||||
{
|
||||
wave += (int32_t)sid3_triangle(ch->accumulator) - 0x8000;
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SAW)
|
||||
{
|
||||
wave += (int32_t)sid3_saw(ch->accumulator) - 0x8000;
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_PULSE)
|
||||
{
|
||||
wave += (int32_t)sid3_pulse(ch->accumulator, ch->pw) - 0x8000;
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_NOISE)
|
||||
{
|
||||
wave += (int32_t)sid3_noise(ch->lfsr, ch->flags & SID3_CHAN_1_BIT_NOISE) - 0x8000;
|
||||
}
|
||||
if(ch->waveform & SID3_WAVE_SPECIAL)
|
||||
{
|
||||
wave += (int32_t)sid3_special_wave(sid3, ch->accumulator, ch->special_wave) - 0x8000;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
return wave;
|
||||
}
|
||||
|
||||
void sid3_clock(SID3* sid3)
|
||||
|
@ -2749,7 +3021,6 @@ void sid3_clock(SID3* sid3)
|
|||
//todo: phase mod
|
||||
|
||||
int32_t waveform = sid3_get_waveform(sid3, ch);
|
||||
waveform -= 0x7fff;
|
||||
|
||||
sid3_adsr_clock(&ch->adsr);
|
||||
sid3->output_l += sid3_adsr_output(&ch->adsr, waveform);
|
||||
|
|
|
@ -18,7 +18,10 @@ extern "C" {
|
|||
|
||||
#define SID3_WAVETABLE_LENGTH 256
|
||||
|
||||
#define SID3_NUM_SPECIAL_WAVES 28
|
||||
#define SID3_NUM_WAVEFORM_BITS 5
|
||||
|
||||
#define SID3_NUM_UNIQUE_SPECIAL_WAVES 28
|
||||
#define SID3_NUM_SPECIAL_WAVES (SID3_NUM_UNIQUE_SPECIAL_WAVES * 2 + 2) /* usual and 2x vol clipped + 2x vol clipped tri and saw... */
|
||||
#define SID3_SPECIAL_WAVE_LENGTH 16384
|
||||
|
||||
#define SID3_ACC_BITS 30
|
||||
|
@ -48,11 +51,10 @@ enum Waveforms
|
|||
enum Mixmodes
|
||||
{
|
||||
SID3_MIX_8580 = 0,
|
||||
SID3_MIX_8580_WITH_NOISE = 1,
|
||||
SID3_MIX_AND = 2,
|
||||
SID3_MIX_OR = 3,
|
||||
SID3_MIX_XOR = 4,
|
||||
SID3_MIX_SUM = 5,
|
||||
SID3_MIX_AND = 1,
|
||||
SID3_MIX_OR = 2,
|
||||
SID3_MIX_XOR = 3,
|
||||
SID3_MIX_SUM = 4,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -2696,6 +2696,7 @@ class FurnaceGUI {
|
|||
|
||||
void drawSSGEnv(unsigned char type, const ImVec2& size);
|
||||
void drawWaveform(unsigned char type, bool opz, const ImVec2& size);
|
||||
void drawWaveformSID3(unsigned char type, const ImVec2& size);
|
||||
void drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size);
|
||||
void drawESFMAlgorithm(DivInstrumentESFM& esfm, const ImVec2& size);
|
||||
void drawFMEnv(unsigned char tl, unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, unsigned char sus, unsigned char egt, unsigned char algOrGlobalSus, float maxTl, float maxArDr, float maxRr, const ImVec2& size, unsigned short instType);
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <fmt/printf.h>
|
||||
#include <imgui.h>
|
||||
#include "plot_nolerp.h"
|
||||
#include "util.h"
|
||||
|
||||
extern "C" {
|
||||
#include "../../extern/Nuked-OPLL/opll.h"
|
||||
|
@ -229,7 +230,7 @@ const char* esfmNoiseModeDescriptions[4]={
|
|||
};
|
||||
|
||||
const char* sid2WaveMixModes[5]={
|
||||
_N("Normal"),
|
||||
_N("8580 SID"),
|
||||
_N("Bitwise AND"),
|
||||
_N("Bitwise OR"),
|
||||
_N("Bitwise XOR"),
|
||||
|
@ -243,6 +244,92 @@ const char* sid2ControlBits[4]={
|
|||
NULL
|
||||
};
|
||||
|
||||
const char* sid3WaveMixModes[6]={
|
||||
_N("8580 SID"),
|
||||
_N("Bitwise AND"),
|
||||
_N("Bitwise OR"),
|
||||
_N("Bitwise XOR"),
|
||||
_N("Sum of the signals"),
|
||||
NULL
|
||||
};
|
||||
|
||||
const char* sid3Waveforms[] = {
|
||||
_N("Sine"),
|
||||
_N("Rect. Sine"),
|
||||
_N("Abs. Sine"),
|
||||
_N("Quart. Sine"),
|
||||
_N("Squish. Sine"),
|
||||
_N("Abs. Squish. Sine"),
|
||||
|
||||
_N("Rect. Saw"),
|
||||
_N("Abs. Saw"),
|
||||
|
||||
_N("Cubed Saw"),
|
||||
_N("Rect. Cubed Saw"),
|
||||
_N("Abs. Cubed Saw"),
|
||||
|
||||
_N("Cubed Sine"),
|
||||
_N("Rect. Cubed Sine"),
|
||||
_N("Abs. Cubed Sine"),
|
||||
_N("Quart. Cubed Sine"),
|
||||
_N("Squish. Cubed Sine"),
|
||||
_N("Squish. Abs. Cub. Sine"),
|
||||
|
||||
_N("Rect. Triangle"),
|
||||
_N("Abs. Triangle"),
|
||||
_N("Quart. Triangle"),
|
||||
_N("Squish. Triangle"),
|
||||
_N("Abs. Squish. Triangle"),
|
||||
|
||||
_N("Cubed Triangle"),
|
||||
_N("Rect. Cubed Triangle"),
|
||||
_N("Abs. Cubed Triangle"),
|
||||
_N("Quart. Cubed Triangle"),
|
||||
_N("Squish. Cubed Triangle"),
|
||||
_N("Squish. Abs. Cub. Triangle"),
|
||||
|
||||
// clipped
|
||||
|
||||
_N("Clipped Sine"),
|
||||
_N("Clipped Rect. Sine"),
|
||||
_N("Clipped Abs. Sine"),
|
||||
_N("Clipped Quart. Sine"),
|
||||
_N("Clipped Squish. Sine"),
|
||||
_N("Clipped Abs. Squish. Sine"),
|
||||
|
||||
_N("Clipped Rect. Saw"),
|
||||
_N("Clipped Abs. Saw"),
|
||||
|
||||
_N("Clipped Cubed Saw"),
|
||||
_N("Clipped Rect. Cubed Saw"),
|
||||
_N("Clipped Abs. Cubed Saw"),
|
||||
|
||||
_N("Clipped Cubed Sine"),
|
||||
_N("Clipped Rect. Cubed Sine"),
|
||||
_N("Clipped Abs. Cubed Sine"),
|
||||
_N("Clipped Quart. Cubed Sine"),
|
||||
_N("Clipped Squish. Cubed Sine"),
|
||||
_N("Clipped Squish. Abs. Cub. Sine"),
|
||||
|
||||
_N("Clipped Rect. Triangle"),
|
||||
_N("Clipped Abs. Triangle"),
|
||||
_N("Clipped Quart. Triangle"),
|
||||
_N("Clipped Squish. Triangle"),
|
||||
_N("Clipped Abs. Squish. Triangle"),
|
||||
|
||||
_N("Clipped Cubed Triangle"),
|
||||
_N("Clipped Rect. Cubed Triangle"),
|
||||
_N("Clipped Abs. Cubed Triangle"),
|
||||
_N("Clipped Quart. Cubed Triangle"),
|
||||
_N("Clipped Squish. Cubed Triangle"),
|
||||
_N("Clipped Squish. Abs. Cub. Triangle"),
|
||||
|
||||
// two clipped simple waves
|
||||
|
||||
_N("Clipped Triangle"),
|
||||
_N("Clipped Saw")
|
||||
};
|
||||
|
||||
const bool opIsOutput[8][4]={
|
||||
{false,false,false,true},
|
||||
{false,false,false,true},
|
||||
|
@ -925,6 +1012,127 @@ void FurnaceGUI::drawWaveform(unsigned char type, bool opz, const ImVec2& size)
|
|||
}
|
||||
}
|
||||
|
||||
typedef double (*WaveFunc) (double a);
|
||||
|
||||
WaveFunc waveFuncsIns[]={
|
||||
sinus,
|
||||
rectSin,
|
||||
absSin,
|
||||
quartSin,
|
||||
squiSin,
|
||||
squiAbsSin,
|
||||
|
||||
rectSaw,
|
||||
absSaw,
|
||||
|
||||
cubSaw,
|
||||
rectCubSaw,
|
||||
absCubSaw,
|
||||
|
||||
cubSine,
|
||||
rectCubSin,
|
||||
absCubSin,
|
||||
quartCubSin,
|
||||
squishCubSin,
|
||||
squishAbsCubSin,
|
||||
|
||||
rectTri,
|
||||
absTri,
|
||||
quartTri,
|
||||
squiTri,
|
||||
absSquiTri,
|
||||
|
||||
cubTriangle,
|
||||
cubRectTri,
|
||||
cubAbsTri,
|
||||
cubQuartTri,
|
||||
cubSquiTri,
|
||||
absCubSquiTri
|
||||
};
|
||||
|
||||
void FurnaceGUI::drawWaveformSID3(unsigned char type, const ImVec2& size)
|
||||
{
|
||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
ImGuiWindow* window=ImGui::GetCurrentWindow();
|
||||
|
||||
ImVec2 waveform[65];
|
||||
const size_t waveformLen=64;
|
||||
|
||||
ImVec2 minArea=window->DC.CursorPos;
|
||||
ImVec2 maxArea=ImVec2(
|
||||
minArea.x+size.x,
|
||||
minArea.y+size.y
|
||||
);
|
||||
ImRect rect=ImRect(minArea,maxArea);
|
||||
ImGuiStyle& style=ImGui::GetStyle();
|
||||
ImU32 color=ImGui::GetColorU32(uiColors[GUI_COLOR_FM_WAVE]);
|
||||
ImGui::ItemSize(size,style.FramePadding.y);
|
||||
if (ImGui::ItemAdd(rect,ImGui::GetID("SID3wsDisplay")))
|
||||
{
|
||||
ImGui::RenderFrame(rect.Min,rect.Max,ImGui::GetColorU32(ImGuiCol_FrameBg),true,style.FrameRounding);
|
||||
|
||||
if(type < SID3_NUM_UNIQUE_SPECIAL_WAVES)
|
||||
{
|
||||
for (size_t i=0; i<=waveformLen; i++)
|
||||
{
|
||||
float x=(float)i/(float)waveformLen;
|
||||
float y= waveFuncsIns[type](x*2.0*M_PI);
|
||||
waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.4));
|
||||
}
|
||||
}
|
||||
else if(type >= SID3_NUM_UNIQUE_SPECIAL_WAVES && type < SID3_NUM_UNIQUE_SPECIAL_WAVES * 2)
|
||||
{
|
||||
for (size_t i=0; i<=waveformLen; i++)
|
||||
{
|
||||
float x=(float)i/(float)waveformLen;
|
||||
float y= waveFuncsIns[type - SID3_NUM_UNIQUE_SPECIAL_WAVES](x*2.0*M_PI);
|
||||
|
||||
y *= 2.0f; //clipping
|
||||
|
||||
if(y > 1.0f) y = 1.0f;
|
||||
if(y < -1.0f) y = -1.0f;
|
||||
|
||||
waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.48));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(type == SID3_NUM_UNIQUE_SPECIAL_WAVES * 2)
|
||||
{
|
||||
for (size_t i=0; i<=waveformLen; i++)
|
||||
{
|
||||
float x=(float)i/(float)waveformLen;
|
||||
float y=triangle(x*2.0*M_PI);
|
||||
|
||||
y *= 2.0f; //clipping
|
||||
|
||||
if(y > 1.0f) y = 1.0f;
|
||||
if(y < -1.0f) y = -1.0f;
|
||||
|
||||
waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.4));
|
||||
}
|
||||
}
|
||||
if(type == SID3_NUM_UNIQUE_SPECIAL_WAVES * 2 + 1)
|
||||
{
|
||||
for (size_t i=0; i<=waveformLen; i++)
|
||||
{
|
||||
float x=(float)i/(float)waveformLen;
|
||||
float y=saw(x*2.0*M_PI);
|
||||
|
||||
y *= 2.0f; //clipping
|
||||
|
||||
if(y > 1.0f) y = 1.0f;
|
||||
if(y < -1.0f) y = -1.0f;
|
||||
|
||||
waveform[i]=ImLerp(rect.Min,rect.Max,ImVec2(x,0.5-y*0.4));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dl->AddPolyline(waveform,waveformLen+1,color,ImDrawFlags_None,dpiScale);
|
||||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size) {
|
||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||
ImGuiWindow* window=ImGui::GetCurrentWindow();
|
||||
|
@ -5313,43 +5521,63 @@ void FurnaceGUI::drawInsSID3(DivInstrument* ins)
|
|||
{
|
||||
if (ImGui::BeginTabItem("SID3"))
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("Waveform"));
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.triOn);
|
||||
if (ImGui::Button(_("tri"))) { PARAMETER
|
||||
ins->c64.triOn=!ins->c64.triOn;
|
||||
if (ImGui::BeginTable("sid3Waves",2,0))
|
||||
{
|
||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,0.0f);
|
||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,0.0f);
|
||||
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("Waveform"));
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.triOn);
|
||||
if (ImGui::Button(_("tri"))) { PARAMETER
|
||||
ins->c64.triOn=!ins->c64.triOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.sawOn);
|
||||
if (ImGui::Button(_("saw"))) { PARAMETER
|
||||
ins->c64.sawOn=!ins->c64.sawOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.pulseOn);
|
||||
if (ImGui::Button(_("pulse"))) { PARAMETER
|
||||
ins->c64.pulseOn=!ins->c64.pulseOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.noiseOn);
|
||||
if (ImGui::Button(_("noise"))) { PARAMETER
|
||||
ins->c64.noiseOn=!ins->c64.noiseOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
|
||||
P(ImGui::Checkbox(_("1-bit noise"),&ins->sid3.oneBitNoise));
|
||||
ImGui::SameLine();
|
||||
|
||||
pushToggleColors(ins->sid3.specialWaveOn);
|
||||
if (ImGui::Button(_("special"))) { PARAMETER
|
||||
ins->sid3.specialWaveOn=!ins->sid3.specialWaveOn;
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
P(CWSliderScalar(_("Special wave"),ImGuiDataType_U8,&ins->sid3.special_wave,&_ZERO,&_SID3_SPECIAL_WAVES,sid3Waveforms[ins->sid3.special_wave % SID3_NUM_SPECIAL_WAVES])); rightClickable
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
drawWaveformSID3(ins->sid3.special_wave,ImVec2(80.0f * dpiScale, 60.0f * dpiScale));
|
||||
|
||||
ImGui::EndTable();
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.sawOn);
|
||||
if (ImGui::Button(_("saw"))) { PARAMETER
|
||||
ins->c64.sawOn=!ins->c64.sawOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.pulseOn);
|
||||
if (ImGui::Button(_("pulse"))) { PARAMETER
|
||||
ins->c64.pulseOn=!ins->c64.pulseOn;
|
||||
}
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->c64.noiseOn);
|
||||
if (ImGui::Button(_("noise"))) { PARAMETER
|
||||
ins->c64.noiseOn=!ins->c64.noiseOn;
|
||||
}
|
||||
popToggleColors();
|
||||
popToggleColors();
|
||||
ImGui::SameLine();
|
||||
pushToggleColors(ins->sid3.specialWaveOn);
|
||||
if (ImGui::Button(_("special"))) { PARAMETER
|
||||
ins->sid3.specialWaveOn=!ins->sid3.specialWaveOn;
|
||||
}
|
||||
popToggleColors();
|
||||
|
||||
ImVec2 sliderSize=ImVec2(30.0f*dpiScale,256.0*dpiScale);
|
||||
|
||||
if (ImGui::BeginTable("FZTEnvParams",6,ImGuiTableFlags_NoHostExtendX))
|
||||
if (ImGui::BeginTable("SID3EnvParams",6,ImGuiTableFlags_NoHostExtendX))
|
||||
{
|
||||
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,sliderSize.x);
|
||||
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,sliderSize.x);
|
||||
|
@ -5395,6 +5623,9 @@ void FurnaceGUI::drawInsSID3(DivInstrument* ins)
|
|||
ImGui::EndTable();
|
||||
}
|
||||
|
||||
P(CWSliderScalar(_("Wave Mix Mode"),ImGuiDataType_U8,&ins->sid2.mixMode,&_ZERO,&_FOUR,sid3WaveMixModes[ins->sid2.mixMode % 5]));
|
||||
P(CWSliderScalar(_("Duty"),ImGuiDataType_U16,&ins->c64.duty,&_ZERO,&_SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE)); rightClickable
|
||||
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
#include "intConst.h"
|
||||
|
||||
#include "../engine/platform/sound/sid3.h"
|
||||
|
||||
const int _ZERO=0;
|
||||
const int _ONE=1;
|
||||
const int _THREE=3;
|
||||
|
@ -41,3 +43,5 @@ const int _SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE=65535;
|
|||
const int _MINUS_TWENTY_FOUR=-24;
|
||||
const int _MINUS_ONE_HUNDRED_TWENTY_SEVEN=-127;
|
||||
const int _MINUS_ONE_HUNDRED_TWENTY_EIGHT=-128;
|
||||
|
||||
const int _SID3_SPECIAL_WAVES=SID3_NUM_SPECIAL_WAVES - 1;
|
|
@ -43,3 +43,5 @@ extern const int _SIXTY_FIVE_THOUSAND_FIVE_HUNDRED_THIRTY_FIVE;
|
|||
extern const int _MINUS_TWENTY_FOUR;
|
||||
extern const int _MINUS_ONE_HUNDRED_TWENTY_SEVEN;
|
||||
extern const int _MINUS_ONE_HUNDRED_TWENTY_EIGHT;
|
||||
|
||||
extern const int _SID3_SPECIAL_WAVES;
|
||||
|
|
|
@ -30,4 +30,37 @@
|
|||
#endif
|
||||
|
||||
String getHomeDir();
|
||||
String getKeyName(int key, bool emptyNone=false);
|
||||
String getKeyName(int key, bool emptyNone=false);
|
||||
|
||||
double sinus(double x);
|
||||
double rectSin(double x);
|
||||
double absSin(double x);
|
||||
double square(double x);
|
||||
double rectSquare(double x);
|
||||
double quartSin(double x);
|
||||
double squiSin(double x);
|
||||
double squiAbsSin(double x);
|
||||
double saw(double x);
|
||||
double rectSaw(double x);
|
||||
double absSaw(double x);
|
||||
double cubSaw(double x);
|
||||
double rectCubSaw(double x);
|
||||
double absCubSaw(double x);
|
||||
double cubSine(double x);
|
||||
double rectCubSin(double x);
|
||||
double absCubSin(double x);
|
||||
double quartCubSin(double x);
|
||||
double squishCubSin(double x);
|
||||
double squishAbsCubSin(double x);
|
||||
double triangle(double x);
|
||||
double rectTri(double x);
|
||||
double absTri(double x);
|
||||
double quartTri(double x);
|
||||
double squiTri(double x);
|
||||
double absSquiTri(double x);
|
||||
double cubTriangle(double x);
|
||||
double cubRectTri(double x);
|
||||
double cubAbsTri(double x);
|
||||
double cubQuartTri(double x);
|
||||
double cubSquiTri(double x);
|
||||
double absCubSquiTri(double x);
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#define _USE_MATH_DEFINES
|
||||
#include "gui.h"
|
||||
#include "util.h"
|
||||
#include "plot_nolerp.h"
|
||||
#include "IconsFontAwesome4.h"
|
||||
#include "misc/cpp/imgui_stdlib.h"
|
||||
|
|
Loading…
Reference in a new issue