absolute C64 filter macros!
exclusive to .fur format
This commit is contained in:
parent
9f6bb570c9
commit
5bcc3d5d6d
|
@ -26,9 +26,13 @@ void DivPlatformC64::tick() {
|
||||||
if (chan[i].std.hadVol) {
|
if (chan[i].std.hadVol) {
|
||||||
DivInstrument* ins=parent->getIns(chan[i].ins);
|
DivInstrument* ins=parent->getIns(chan[i].ins);
|
||||||
if (ins->c64.volIsCutoff) {
|
if (ins->c64.volIsCutoff) {
|
||||||
|
if (ins->c64.filterIsAbs) {
|
||||||
|
filtCut=chan[i].std.vol;
|
||||||
|
} else {
|
||||||
filtCut-=((signed char)chan[i].std.vol-18)*7;
|
filtCut-=((signed char)chan[i].std.vol-18)*7;
|
||||||
if (filtCut>2047) filtCut=2047;
|
if (filtCut>2047) filtCut=2047;
|
||||||
if (filtCut<0) filtCut=0;
|
if (filtCut<0) filtCut=0;
|
||||||
|
}
|
||||||
updateFilter();
|
updateFilter();
|
||||||
} else {
|
} else {
|
||||||
vol=chan[i].std.vol;
|
vol=chan[i].std.vol;
|
||||||
|
|
|
@ -751,7 +751,11 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
// volume macro
|
// volume macro
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
if (ins->type==DIV_INS_C64 && ins->c64.volIsCutoff) {
|
if (ins->type==DIV_INS_C64 && ins->c64.volIsCutoff) {
|
||||||
|
if (ins->c64.filterIsAbs) {
|
||||||
|
ImGui::Text("Absolute Cutoff Macro");
|
||||||
|
} else {
|
||||||
ImGui::Text("Relative Cutoff Macro");
|
ImGui::Text("Relative Cutoff Macro");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ImGui::Text("Volume Macro");
|
ImGui::Text("Volume Macro");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -770,7 +774,7 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<ins->std.volMacroLen; i++) {
|
for (int i=0; i<ins->std.volMacroLen; i++) {
|
||||||
if (ins->type==DIV_INS_C64 && ins->c64.volIsCutoff) {
|
if (ins->type==DIV_INS_C64 && ins->c64.volIsCutoff && !ins->c64.filterIsAbs) {
|
||||||
asFloat[i]=ins->std.volMacro[i]-18;
|
asFloat[i]=ins->std.volMacro[i]-18;
|
||||||
} else {
|
} else {
|
||||||
asFloat[i]=ins->std.volMacro[i];
|
asFloat[i]=ins->std.volMacro[i];
|
||||||
|
@ -782,10 +786,14 @@ void FurnaceGUI::drawInsEdit() {
|
||||||
int volMin=0;
|
int volMin=0;
|
||||||
if (ins->type==DIV_INS_C64) {
|
if (ins->type==DIV_INS_C64) {
|
||||||
if (ins->c64.volIsCutoff) {
|
if (ins->c64.volIsCutoff) {
|
||||||
|
if (ins->c64.filterIsAbs) {
|
||||||
|
volMax=2047;
|
||||||
|
} else {
|
||||||
volMin=-18;
|
volMin=-18;
|
||||||
volMax=18;
|
volMax=18;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ImGui::PlotHistogram("##IVolMacro",asFloat,ins->std.volMacroLen,0,NULL,volMin,volMax,ImVec2(400.0f*dpiScale,200.0f*dpiScale));
|
ImGui::PlotHistogram("##IVolMacro",asFloat,ins->std.volMacroLen,0,NULL,volMin,volMax,ImVec2(400.0f*dpiScale,200.0f*dpiScale));
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Left)) {
|
||||||
macroDragStart=ImGui::GetItemRectMin();
|
macroDragStart=ImGui::GetItemRectMin();
|
||||||
|
|
Loading…
Reference in a new issue