-
Notifications
You must be signed in to change notification settings - Fork 134
feat: low level byte midi api #495
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
base: main
Are you sure you want to change the base?
Conversation
thank you for creating this PR -- we will review. It might take a little while as our usual "PR team" is scattered to the wind over the summer and we are prepping for the ChucK/ChuGL summer workshop. Just wanted to say thank you and that we will be going over this |
all good @gewang , saw the announcement for the workshop, figured that much. some thoughts for the review, off the top of my head: i think the api design is fine on the chuck side (imo), but maybe the team has better ideas about handling variable sized messages. i would've preferred each message being a vector, it'd have made the very clear and i'd be less worried about read/write head issues. But I thought vectors might have some implications for memory and performance and went with this solution which is closer to the existing buffers. Performance is probably not critical for midi though? i've been running this branch in a midi hub project, routing midi from different sources, including sysex from desktop editors, no problems so far |
This adds support for sysex, mtc and essentially any midi message.
An initial version of this had an extra
.bytes
field added to chuck'sMidiMsg
but that was rather confusing specially for sending out midi, since the same data was represented in multiple places.This seems like a better design choice, keeping
MidiMsg
as a high level convenience api to cover most of the cases and the byte low level functionsmin.recv(int[])
andmout.send(int[])
for covering any case.A variable length buffer has to be added for this, implementation is fairly straightforward and seems to be working fine.