summaryrefslogtreecommitdiff
path: root/quantum/sequencer
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/sequencer')
-rw-r--r--quantum/sequencer/sequencer.c2
-rw-r--r--quantum/sequencer/sequencer.h2
-rw-r--r--quantum/sequencer/tests/sequencer_tests.cpp26
3 files changed, 15 insertions, 15 deletions
diff --git a/quantum/sequencer/sequencer.c b/quantum/sequencer/sequencer.c
index 0eaf3a17aa..18a83661ec 100644
--- a/quantum/sequencer/sequencer.c
+++ b/quantum/sequencer/sequencer.c
@@ -211,7 +211,7 @@ void sequencer_phase_pause(void) {
sequencer_internal_state.phase = SEQUENCER_PHASE_ATTACK;
}
-void matrix_scan_sequencer(void) {
+void sequencer_task(void) {
if (!sequencer_config.enabled) {
return;
}
diff --git a/quantum/sequencer/sequencer.h b/quantum/sequencer/sequencer.h
index aeca7a1e9b..4017ae764e 100644
--- a/quantum/sequencer/sequencer.h
+++ b/quantum/sequencer/sequencer.h
@@ -119,4 +119,4 @@ uint16_t sequencer_get_step_duration(void);
uint16_t get_beat_duration(uint8_t tempo);
uint16_t get_step_duration(uint8_t tempo, sequencer_resolution_t resolution);
-void matrix_scan_sequencer(void);
+void sequencer_task(void);
diff --git a/quantum/sequencer/tests/sequencer_tests.cpp b/quantum/sequencer/tests/sequencer_tests.cpp
index e81984e5b5..290605a52a 100644
--- a/quantum/sequencer/tests/sequencer_tests.cpp
+++ b/quantum/sequencer/tests/sequencer_tests.cpp
@@ -386,7 +386,7 @@ void setUpMatrixScanSequencerTest(void) {
TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep) {
setUpMatrixScanSequencerTest();
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, MI_C);
EXPECT_EQ(last_noteoff, 0);
}
@@ -394,7 +394,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep)
TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackSecondTrackAfterFirstTrackOfFirstStep) {
setUpMatrixScanSequencerTest();
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -409,7 +409,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotAttackInactiveTrackFirstSt
// Wait some time after the first track has been attacked
advance_time(SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -423,7 +423,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackThirdTrackAfterSecondTr
// Wait some time after the second track has been attacked
advance_time(2 * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 2);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -438,7 +438,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterReleasePhaseAfterLastTra
// Wait until all notes have been attacked
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
EXPECT_EQ(sequencer_internal_state.current_step, 0);
@@ -458,7 +458,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseBackwards) {
// + the release timeout
advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, SEQUENCER_TRACKS - 2);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_RELEASE);
@@ -476,7 +476,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotReleaseInactiveTrackFirstS
// + the release timeout
advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -495,7 +495,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseFirstTrackFirstStep) {
// + all the other notes have been released
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, MI_C);
}
@@ -514,7 +514,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterPausePhaseAfterRelease)
// + all the other notes have been released
advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 0);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_PAUSE);
@@ -536,7 +536,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessFirstTrackOfSecondStep
// + the step duration (one 16th at tempo=120 lasts 125ms)
advance_time(125);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 1);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);
@@ -548,7 +548,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackTooEarly) {
sequencer_internal_state.current_step = 2;
sequencer_internal_state.current_track = 1;
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, 0);
EXPECT_EQ(last_noteoff, 0);
}
@@ -562,7 +562,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackOnTime) {
// Wait until first track has been attacked
advance_time(SEQUENCER_TRACK_THROTTLE);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(last_noteon, MI_D);
EXPECT_EQ(last_noteoff, 0);
}
@@ -583,7 +583,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldLoopOnceSequenceIsOver) {
// + the step duration (one 16th at tempo=120 lasts 125ms)
advance_time(125);
- matrix_scan_sequencer();
+ sequencer_task();
EXPECT_EQ(sequencer_internal_state.current_step, 0);
EXPECT_EQ(sequencer_internal_state.current_track, 1);
EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK);