Skip to content

Commit da8c672

Browse files
committed
Phythm Visualizer small fix
1 parent 0ec52dc commit da8c672

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

Applications/Note/Arpeggiator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,4 +737,8 @@ void Arpeggiator::SetDivision(ArpDivision div) {
737737
// Note: We can't call StepArpeggiator here since we don't have output queue
738738
// The force start will happen on the next Tick()
739739
}
740+
}
741+
742+
bool Arpeggiator::Active(){
743+
return enabled && division != DIV_OFF && !notePool.empty();
740744
}

Applications/Note/Arpeggiator.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,6 @@ class Arpeggiator : public MidiEffect {
138138

139139
// Division control
140140
void SetDivision(ArpDivision div);
141+
142+
bool Active();
141143
};

Applications/Note/RhythmVisualizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RhythmVisualizer : public UIComponent {
2424
uint8_t x = i % 8;
2525
uint8_t y = i / 8;
2626

27-
if(arp-> division != DIV_OFF && arp->euclideanIndex == i)
27+
if(arp->Active() && arp->euclideanIndex == i)
2828
{
2929
MatrixOS::LED::SetColor(origin + Point(x, y), Color::White);
3030
}

0 commit comments

Comments
 (0)