Skip to content
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

Add midi connect controller action #311

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

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.

None yet

1 participant