aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/eg06-fifths.lv2/fifths.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/eg06-fifths.lv2/fifths.c b/plugins/eg06-fifths.lv2/fifths.c
index 13d47f4..c7d12e1 100644
--- a/plugins/eg06-fifths.lv2/fifths.c
+++ b/plugins/eg06-fifths.lv2/fifths.c
@@ -139,10 +139,15 @@ run(LV2_Handle instance,
self->out_port, out_capacity, ev);
const uint8_t note = msg[1];
- if (note < 127 - 7) {
+ if (note <= 127 - 7) {
// Make a note one 5th (7 semitones) higher than input
MIDINoteEvent fifth;
- fifth.event = *ev;
+
+ // Could simply do fifth.event = *ev here instead...
+ fifth.event.time.frames = ev->time.frames; // Same time
+ fifth.event.body.type = ev->body.type; // Same type
+ fifth.event.body.size = ev->body.size; // Same size
+
fifth.msg[0] = msg[0]; // Same status
fifth.msg[1] = msg[1] + 7; // Pitch up 7 semitones
fifth.msg[2] = msg[2]; // Same velocity