-
Notifications
You must be signed in to change notification settings - Fork 757
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
jack: add metadata support #1951
Conversation
JACK patch bays by default order JACK client ports alphabetically. If SuperCollider is run with 10+ input or output ports, patch bays get the port order wrongly. There is a metadata key to manually set the order of JACK ports. This commit sets that key if the JACK metadata API has been detected by CMake (old JACK versions do not ship the needed headers). The commit being about metadata also sets the pretty name metadata which is shown by JACK batch bays instead of the raw port name. This commit adds jackey via 'git subtree' to external_libraries, a public header with JACK metadata keys used by multiple developers of JACK clients and patch bays.
Hi. Thanks for the code. This PR needs a description please, so that people can read and get an idea of what you're aiming to achieve... |
The description was in the last commit message, have now copied it over, sorry. |
CHECK_INCLUDE_FILES("jack/metadata.h" JACK_USE_METADATA_API) | ||
if(${JACK_USE_METADATA_API}) | ||
message(STATUS "using JACK metadata API") | ||
add_definitions("-DSC_JACK_USE_METADATA_API") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use target_compile_definitions
as target scoping is more robust than directory scoping
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've pushed another commit that does that.
i'm wondering: how does this relate to the the |
btw, code looks good to me |
Switch to 'target_compile_definitions' from 'add_definitions' as it should be more robust.
Pretty names are really just metadata and thus indeed orthogonal to and non-interfering with port names, think of it as an alias. Metadata can be defined by JACK clients (like in this patch to have a more human readable alias for scsynth port names), JACK patchbays or manually by the user via 'jack_property'. Metadata is a part of session handling, where the user can attach arbitrary metadata to ports to e.g. the user can change pretty name of 'SuperCollider:out_1' to 'Cello' and a patchbay with support for metadata will show/save that name instead and the user can directly see what that port is meant for, leading to a potentially better user experience ...
Maybe it would be nice if we could provide JACK port metadata manipulation hooks to sclang in a future step... |
lgtm |
To be clear, the URLs in the .h file are just for user documentation -- no web requests are made by jack through this feature, correct? |
Correct. The URLs are the keys to JACKs metadata database. Keys could be any string actually. Using URLs as keys is nice in order to reduce name clashes (e.g. for user defined keys) and may also be used to document the keys with RDF et. al. |
JACK patch bays by default order JACK client ports alphabetically. If
SuperCollider is run with 10+ input or output ports, patch bays get the
port order wrongly.
There is a metadata key to manually set the order of JACK ports. This
commit sets that key if the JACK metadata API has been detected by
CMake (old JACK versions do not ship the needed headers).
The commit being about metadata also sets the pretty name metadata which
is shown by JACK batch bays instead of the raw port name.
This commit adds jackey via 'git subtree' to external_libraries, a
public header with JACK metadata keys used by multiple developers of
JACK clients and patch bays.