they did the Dance
and now you can do it too
This commit is contained in:
parent
35316910be
commit
2d73e45e0f
|
@ -169,6 +169,11 @@ void FurnaceGUI::drawChanOsc() {
|
||||||
if (ImGui::Checkbox("Center waveform",&chanOscWaveCorr)) {
|
if (ImGui::Checkbox("Center waveform",&chanOscWaveCorr)) {
|
||||||
centerSettingReset=true;
|
centerSettingReset=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
if (ImGui::Checkbox("Randomize phase on note",&chanOscRandomPhase)) {
|
||||||
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,7 +518,7 @@ void FurnaceGUI::drawChanOsc() {
|
||||||
phase=(0.5+(atan2(dft[1],dft[0])/(2.0*M_PI)));
|
phase=(0.5+(atan2(dft[1],dft[0])/(2.0*M_PI)));
|
||||||
|
|
||||||
if (fft->waveCorr) {
|
if (fft->waveCorr) {
|
||||||
fft->needle-=phase*fft->waveLen;
|
fft->needle-=(phase+(fft->phaseOff*2))*fft->waveLen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -775,6 +780,10 @@ void FurnaceGUI::drawChanOsc() {
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
chanOscOptions=!chanOscOptions;
|
chanOscOptions=!chanOscOptions;
|
||||||
}
|
}
|
||||||
|
if (ImGui::IsItemHovered() && CHECK_LONG_HOLD) {
|
||||||
|
NOTIFY_LONG_HOLD;
|
||||||
|
chanOscOptions=!chanOscOptions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6513,6 +6513,7 @@ bool FurnaceGUI::init() {
|
||||||
chanOscWaveCorr=e->getConfBool("chanOscWaveCorr",true);
|
chanOscWaveCorr=e->getConfBool("chanOscWaveCorr",true);
|
||||||
chanOscOptions=e->getConfBool("chanOscOptions",false);
|
chanOscOptions=e->getConfBool("chanOscOptions",false);
|
||||||
chanOscNormalize=e->getConfBool("chanOscNormalize",false);
|
chanOscNormalize=e->getConfBool("chanOscNormalize",false);
|
||||||
|
chanOscRandomPhase=e->getConfBool("chanOscRandomPhase",false);
|
||||||
chanOscTextFormat=e->getConfString("chanOscTextFormat","%c");
|
chanOscTextFormat=e->getConfString("chanOscTextFormat","%c");
|
||||||
chanOscColor.x=e->getConfFloat("chanOscColorR",1.0f);
|
chanOscColor.x=e->getConfFloat("chanOscColorR",1.0f);
|
||||||
chanOscColor.y=e->getConfFloat("chanOscColorG",1.0f);
|
chanOscColor.y=e->getConfFloat("chanOscColorG",1.0f);
|
||||||
|
@ -7066,6 +7067,7 @@ void FurnaceGUI::commitState() {
|
||||||
e->setConf("chanOscWaveCorr",chanOscWaveCorr);
|
e->setConf("chanOscWaveCorr",chanOscWaveCorr);
|
||||||
e->setConf("chanOscOptions",chanOscOptions);
|
e->setConf("chanOscOptions",chanOscOptions);
|
||||||
e->setConf("chanOscNormalize",chanOscNormalize);
|
e->setConf("chanOscNormalize",chanOscNormalize);
|
||||||
|
e->setConf("chanOscRandomPhase",chanOscRandomPhase);
|
||||||
e->setConf("chanOscTextFormat",chanOscTextFormat);
|
e->setConf("chanOscTextFormat",chanOscTextFormat);
|
||||||
e->setConf("chanOscColorR",chanOscColor.x);
|
e->setConf("chanOscColorR",chanOscColor.x);
|
||||||
e->setConf("chanOscColorG",chanOscColor.y);
|
e->setConf("chanOscColorG",chanOscColor.y);
|
||||||
|
@ -7563,6 +7565,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
updateChanOscGradTex(true),
|
updateChanOscGradTex(true),
|
||||||
chanOscUseGrad(false),
|
chanOscUseGrad(false),
|
||||||
chanOscNormalize(false),
|
chanOscNormalize(false),
|
||||||
|
chanOscRandomPhase(false),
|
||||||
chanOscTextFormat("%c"),
|
chanOscTextFormat("%c"),
|
||||||
chanOscColor(1.0f,1.0f,1.0f,1.0f),
|
chanOscColor(1.0f,1.0f,1.0f,1.0f),
|
||||||
chanOscTextColor(1.0f,1.0f,1.0f,0.75f),
|
chanOscTextColor(1.0f,1.0f,1.0f,0.75f),
|
||||||
|
|
|
@ -2130,7 +2130,7 @@ class FurnaceGUI {
|
||||||
// per-channel oscilloscope
|
// per-channel oscilloscope
|
||||||
int chanOscCols, chanOscAutoColsType, chanOscColorX, chanOscColorY;
|
int chanOscCols, chanOscAutoColsType, chanOscColorX, chanOscColorY;
|
||||||
float chanOscWindowSize, chanOscTextX, chanOscTextY, chanOscAmplify;
|
float chanOscWindowSize, chanOscTextX, chanOscTextY, chanOscAmplify;
|
||||||
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad, chanOscNormalize;
|
bool chanOscWaveCorr, chanOscOptions, updateChanOscGradTex, chanOscUseGrad, chanOscNormalize, chanOscRandomPhase;
|
||||||
String chanOscTextFormat;
|
String chanOscTextFormat;
|
||||||
ImVec4 chanOscColor, chanOscTextColor;
|
ImVec4 chanOscColor, chanOscTextColor;
|
||||||
Gradient2D chanOscGrad;
|
Gradient2D chanOscGrad;
|
||||||
|
@ -2151,7 +2151,7 @@ class FurnaceGUI {
|
||||||
double inBufPosFrac;
|
double inBufPosFrac;
|
||||||
double waveLen;
|
double waveLen;
|
||||||
int waveLenBottom, waveLenTop, relatedCh;
|
int waveLenBottom, waveLenTop, relatedCh;
|
||||||
float pitch, windowSize;
|
float pitch, windowSize, phaseOff;
|
||||||
unsigned short needle;
|
unsigned short needle;
|
||||||
bool ready, loudEnough, waveCorr;
|
bool ready, loudEnough, waveCorr;
|
||||||
fftw_plan plan;
|
fftw_plan plan;
|
||||||
|
@ -2169,6 +2169,7 @@ class FurnaceGUI {
|
||||||
relatedCh(0),
|
relatedCh(0),
|
||||||
pitch(0.0f),
|
pitch(0.0f),
|
||||||
windowSize(1.0f),
|
windowSize(1.0f),
|
||||||
|
phaseOff(0.0f),
|
||||||
needle(0),
|
needle(0),
|
||||||
ready(false),
|
ready(false),
|
||||||
loudEnough(false),
|
loudEnough(false),
|
||||||
|
|
|
@ -550,6 +550,13 @@ void FurnaceGUI::drawPattern() {
|
||||||
|
|
||||||
if (e->keyHit[i]) {
|
if (e->keyHit[i]) {
|
||||||
keyHit1[i]=1.0f;
|
keyHit1[i]=1.0f;
|
||||||
|
|
||||||
|
if (chanOscRandomPhase) {
|
||||||
|
chanOscChan[i].phaseOff=(float)rand()/(float)RAND_MAX;
|
||||||
|
} else {
|
||||||
|
chanOscChan[i].phaseOff=0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
if (settings.channelFeedbackStyle==1) {
|
if (settings.channelFeedbackStyle==1) {
|
||||||
keyHit[i]=0.2;
|
keyHit[i]=0.2;
|
||||||
if (!muted) {
|
if (!muted) {
|
||||||
|
|
Loading…
Reference in a new issue