Skip to content

Commit

Permalink
Fix check for duplicate note assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
x42 committed Aug 20, 2017
1 parent 4234fd1 commit f8f0881
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/stepseq.c
Expand Up @@ -289,7 +289,6 @@ beat_machine (StepSeq* self, uint32_t ts, uint32_t step)

if (NSET (n, step) && ACTV (note) && self->drum_mode) {
/* retrigger */
const uint8_t note = NOTE (n);
if (ts > 0) {
forge_note_event (self, ts - 1, note, 0);
forge_note_event (self, ts, note, NVEL(n, step));
Expand All @@ -316,7 +315,6 @@ beat_machine (StepSeq* self, uint32_t ts, uint32_t step)
}
}
if (retriger) {
const uint8_t note = NOTE (n);
if (ts > 0) {
forge_note_event (self, ts - 1, note, 0);
forge_note_event (self, ts, note, NVEL(n, step));
Expand Down Expand Up @@ -470,7 +468,7 @@ run (LV2_Handle instance, uint32_t n_samples)
if (self->notes[n] == note) {
continue;
}
if (ACTV (NOTE (n))) {
if (NOTE (n) < 128 && ACTV (NOTE (n))) {
forge_note_event (self, 0, NOTE (n), 0);
}
bool in_use = false;
Expand Down

0 comments on commit f8f0881

Please sign in to comment.