Skip to content

Conversation

@wvengen
Copy link
Contributor

@wvengen wvengen commented Jun 12, 2020

Some controllers may need some setup by midi messages.
This adds support for sending this, as defined in the ctlr file, when the port is connected.

Tested on the Launchpad X (#309), where it is used to enable the session mode on connection.

Comment on lines +60 to +63
/// arbitrary-length data (TODO use this instead of data)
unsigned char *dataList;
unsigned int dataListSize;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is still a little ugly, prehaps this could be merged with data. Then all instances of data could receive either a single value or an array.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall I try to combine data, dataList and dataListSize?

When reading data has a single value, it is assumed to be of size one (i.e. "data": 5 is assumed to be equivalent to "data": [5]). When writing, a single element is writting as "data": 5 whereas multiple elements are written as an array.

@wvengen wvengen mentioned this pull request Jun 17, 2020
@wvengen wvengen force-pushed the feature/midi-connect branch from c2895e2 to fca75ce Compare June 17, 2020 19:11
@wvengen wvengen force-pushed the feature/midi-connect branch from e11b03a to 9f13979 Compare November 25, 2021 18:55
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.

1 participant