Skip to content

Conversation

cviejo
Copy link
Contributor

@cviejo cviejo commented May 5, 2025

This adds support for sysex, mtc and essentially any midi message.

An initial version of this had an extra .bytes field added to chuck's MidiMsg 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 functions min.recv(int[]) and mout.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.

@cviejo cviejo marked this pull request as draft May 5, 2025 11:38
@cviejo cviejo marked this pull request as ready for review May 10, 2025 23:37
@gewang
Copy link
Member

gewang commented Jul 24, 2025

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

@cviejo
Copy link
Contributor Author

cviejo commented Aug 11, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants