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