add filter matrix to UI, add arp & pitch macros
This commit is contained in:
parent
2d97316322
commit
8cd045b04a
|
|
@ -168,6 +168,23 @@ void DivPlatformSID3::tick(bool sysTick)
|
||||||
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&255,MIN(255,chan[i].std.vol.val),255);
|
chan[i].outVol=VOL_SCALE_LINEAR(chan[i].vol&255,MIN(255,chan[i].std.vol.val),255);
|
||||||
rWrite(13 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].outVol);
|
rWrite(13 + i * SID3_REGISTERS_PER_CHANNEL, chan[i].outVol);
|
||||||
}
|
}
|
||||||
|
if (NEW_ARP_STRAT) {
|
||||||
|
chan[i].handleArp();
|
||||||
|
} else if (chan[i].std.arp.had) {
|
||||||
|
if (!chan[i].inPorta) {
|
||||||
|
chan[i].baseFreq=NOTE_FREQUENCY(parent->calcArp(chan[i].note,chan[i].std.arp.val));
|
||||||
|
}
|
||||||
|
chan[i].freqChanged=true;
|
||||||
|
}
|
||||||
|
if (chan[i].std.pitch.had) {
|
||||||
|
if (chan[i].std.pitch.mode) {
|
||||||
|
chan[i].pitch2+=chan[i].std.pitch.val;
|
||||||
|
CLAMP_VAR(chan[i].pitch2,-65535,65535);
|
||||||
|
} else {
|
||||||
|
chan[i].pitch2=chan[i].std.pitch.val;
|
||||||
|
}
|
||||||
|
chan[i].freqChanged=true;
|
||||||
|
}
|
||||||
|
|
||||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff)
|
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5665,6 +5665,11 @@ void FurnaceGUI::drawInsSID3(DivInstrument* ins)
|
||||||
{
|
{
|
||||||
DivInstrumentSID3::Filter* filt = &ins->sid3.filt[i];
|
DivInstrumentSID3::Filter* filt = &ins->sid3.filt[i];
|
||||||
|
|
||||||
|
if(filt->enabled)
|
||||||
|
{
|
||||||
|
ImGui::Separator();
|
||||||
|
}
|
||||||
|
|
||||||
bool enable=filt->enabled;
|
bool enable=filt->enabled;
|
||||||
snprintf(buffer, 40, _("Enable filter %d"), i + 1);
|
snprintf(buffer, 40, _("Enable filter %d"), i + 1);
|
||||||
if (ImGui::Checkbox(buffer,&enable)) { PARAMETER
|
if (ImGui::Checkbox(buffer,&enable)) { PARAMETER
|
||||||
|
|
@ -5732,6 +5737,90 @@ void FurnaceGUI::drawInsSID3(DivInstrument* ins)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
if (ImGui::BeginTable("SID3filtmatrix",1))
|
||||||
|
{
|
||||||
|
if (waveGenVisible) ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthFixed,250.0f*dpiScale);
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
CENTER_TEXT(_("Filters connection matrix"));
|
||||||
|
ImGui::Text(_("Filters connection matrix"));
|
||||||
|
|
||||||
|
if (ImGui::BeginTable("SID3checkboxesmatrix",3 + SID3_NUM_FILTERS))
|
||||||
|
{
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text(">>");
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text(_("In"));
|
||||||
|
|
||||||
|
for(int i = 0; i < SID3_NUM_FILTERS; i++)
|
||||||
|
{
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("%d", i + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text(_("Out"));
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
|
||||||
|
for(int i = 0; i < SID3_NUM_FILTERS; i++)
|
||||||
|
{
|
||||||
|
DivInstrumentSID3::Filter* filt = &ins->sid3.filt[i];
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
ImGui::Text("%d", i + 1);
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
snprintf(buffer, 40, "##filtmatrixin%d", i + 1);
|
||||||
|
bool toInput=filt->mode & SID3_FILTER_CHANNEL_INPUT;
|
||||||
|
if (ImGui::Checkbox(buffer,&toInput)) { PARAMETER
|
||||||
|
filt->mode ^= SID3_FILTER_CHANNEL_INPUT;
|
||||||
|
}
|
||||||
|
if (ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
ImGui::SetTooltip(_("Feed signal from channel to filter %d input"), i + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int j = 0; j < SID3_NUM_FILTERS; j++)
|
||||||
|
{
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
snprintf(buffer, 40, "##filtmatrix%d%d", i + 1, j + 1);
|
||||||
|
|
||||||
|
bool enable=filt->filter_matrix & (1 << j);
|
||||||
|
if (ImGui::Checkbox(buffer,&enable)) { PARAMETER
|
||||||
|
filt->filter_matrix ^= (1 << j);
|
||||||
|
}
|
||||||
|
if (ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
ImGui::SetTooltip(_("Feed signal from filter %d output to filter %d input"), j + 1, i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
snprintf(buffer, 40, "##filtmatrixout%d", i + 1);
|
||||||
|
bool toOutput=filt->mode & SID3_FILTER_OUTPUT;
|
||||||
|
if (ImGui::Checkbox(buffer,&toOutput)) { PARAMETER
|
||||||
|
filt->mode ^= SID3_FILTER_OUTPUT;
|
||||||
|
}
|
||||||
|
if (ImGui::IsItemHovered())
|
||||||
|
{
|
||||||
|
ImGui::SetTooltip(_("Feed signal from filter %d output to channel output"), i + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue