-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Add support for pitch bend #6
Comments
Once support is added to the engine, it can be easily supported in the LV2 plugin with: diff --git a/lv2/sfizz.c b/lv2/sfizz.c
index 87c0923..2f30a92 100644
--- a/lv2/sfizz.c
+++ b/lv2/sfizz.c
@@ -434,6 +434,15 @@ sfizz_lv2_process_midi_event(sfizz_plugin_t *self, const LV2_Atom_Event *ev)
(int)msg[1],
msg[2]);
break;
+ case LV2_MIDI_MSG_BENDER:
+ // lv2_log_note(&self->logger,
+ // "[process_midi] Received pitch bend %d/%d at time %d\n", msg[0], msg[1], ev->time.frames);
+ sfizz_send_pitch_wheel(self->synth,
+ (int)ev->time.frames,
+ (int)MIDI_CHANNEL(msg[0]) + 1,
+ (int)msg[1],
+ (int)msg[2]);
+ break;
default:
break;
} |
Thanks! I have this planned short term. I'll find a keyboard near my workdesk to test it out :D |
It's there now in the develop branch if you want to test it and tell me if the behavior looks fine on patches you know! I'm moving around alot and rarely have a keyboard with a pitch bend to test this kind of thing out... |
I tested this just now, and it works ok most of the time, but sometimes the pitch doesn't completely return to the center note, even though I can see that the last pitch bend message form the controller was 0. The pitch stays slightly sharp or flattened until I retrigger the note. I'm using Sherlock MIDI Inspector to monitor the MIDI messages coming form my controller, connected to the same MIDI port as the sfizz lv2 plugin. |
@alcomposer had a similar problem apparently. This happened on a simple *sine wave file or a sample based instrument? I will try to replicate it at home if I can but the pitch bend on my keyboard seems super verbose and sensitive :D Apparently I can also play with a virtual keyboard in Ardour for this so I will check that out too! |
It was a sample based SFZ, namely this one here: http://www.fiedler-audio.de/cc-sounds/mf-tin-whistle2-ogg.zip |
I have been checking with many SFZ files from https://github.com/sgossner/VSCO-2-CE and also simple debug style Sine instruments: Sine SFZ
|
Is it better with 6c2f5b5? |
Yes, now it seems to work perfectly. Tested it with several sample based SFZs and the Sine SFZ posted above (the latter with different bend ranges - +/-700, +/-1200, +200/-1200 ct). Sorry, that it took a while to test, Happy Christmas! |
No problem :) I will close this then! Merry Christmas to you too! |
Relevant opcodes:
The text was updated successfully, but these errors were encountered: