mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
GUI: a few more visualizer tweaks
This commit is contained in:
parent
7540f12596
commit
2d90881a55
3 changed files with 20 additions and 1 deletions
|
@ -2865,6 +2865,7 @@ void FurnaceGUI::doRedo() {
|
|||
|
||||
void FurnaceGUI::play(int row) {
|
||||
e->walkSong(loopOrder,loopRow,loopEnd);
|
||||
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
||||
if (row>0) {
|
||||
e->playToRow(row);
|
||||
} else {
|
||||
|
@ -5797,4 +5798,5 @@ FurnaceGUI::FurnaceGUI():
|
|||
|
||||
memset(patChanX,0,sizeof(float)*(DIV_MAX_CHANS+1));
|
||||
memset(patChanSlideY,0,sizeof(float)*(DIV_MAX_CHANS+1));
|
||||
memset(lastIns,-1,sizeof(int)*DIV_MAX_CHANS);
|
||||
}
|
||||
|
|
|
@ -622,6 +622,7 @@ class FurnaceGUI {
|
|||
std::deque<UndoStep> redoHist;
|
||||
|
||||
float keyHit[DIV_MAX_CHANS];
|
||||
int lastIns[DIV_MAX_CHANS];
|
||||
|
||||
void drawAlgorithm(unsigned char alg, FurnaceGUIFMAlgs algType, const ImVec2& size);
|
||||
void drawFMEnv(unsigned char ar, unsigned char dr, unsigned char d2r, unsigned char rr, unsigned char sl, const ImVec2& size);
|
||||
|
|
|
@ -597,7 +597,6 @@ void FurnaceGUI::drawPattern() {
|
|||
//if (i.cmd==DIV_CMD_NOTE_ON) continue;
|
||||
if (i.cmd==DIV_CMD_PRE_PORTA) continue;
|
||||
if (i.cmd==DIV_CMD_PRE_NOTE) continue;
|
||||
if (i.cmd==DIV_CMD_INSTRUMENT) continue;
|
||||
if (i.cmd==DIV_CMD_SAMPLE_BANK) continue;
|
||||
if (i.cmd==DIV_CMD_GET_VOLUME) continue;
|
||||
if (i.cmd==DIV_ALWAYS_SET_VOLUME) continue;
|
||||
|
@ -646,6 +645,23 @@ void FurnaceGUI::drawPattern() {
|
|||
color=volGrad;
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_INSTRUMENT: {
|
||||
if (lastIns[i.chan]==i.value) {
|
||||
num=0;
|
||||
break;
|
||||
}
|
||||
lastIns[i.chan]=i.value;
|
||||
speedX=0.0f;
|
||||
speedY=0.0f;
|
||||
grav=0.0f;
|
||||
frict=0.98;
|
||||
spread=30.0f;
|
||||
life=128.0f;
|
||||
lifeSpeed=6.0f;
|
||||
color=insGrad;
|
||||
num=7+pow(i.value,0.6);
|
||||
break;
|
||||
}
|
||||
case DIV_CMD_PANNING: {
|
||||
if (i.value==0) {
|
||||
num=0;
|
||||
|
|
Loading…
Reference in a new issue