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

jack: add metadata support #1951

Merged
merged 8 commits into from
May 28, 2016
Merged

jack: add metadata support #1951

merged 8 commits into from
May 28, 2016

Conversation

ventosus
Copy link
Contributor

@ventosus ventosus commented Apr 4, 2016

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.

drobilla and others added 7 commits May 3, 2014 03:57
…29234273623ebbefa'

git-subtree-dir: external_libraries/jackey
git-subtree-mainline: 5d1d681
git-subtree-split: c156191
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.
@danstowell
Copy link
Member

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...

@ventosus ventosus changed the title Jack metadata jack: add metadata support Apr 5, 2016
@ventosus
Copy link
Contributor Author

ventosus commented Apr 5, 2016

The description was in the last commit message, have now copied it over, sorry.

@danstowell danstowell added comp: scsynth good first issue indicates issue tickets that are suitable for a new contributor fix proposed waiting for testing comp: supernova labels Apr 5, 2016
@crucialfelix crucialfelix added this to the 3.8 milestone Apr 10, 2016
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")
Copy link
Contributor

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

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've pushed another commit that does that.

@timblechmann
Copy link
Contributor

i'm wondering: how does this relate to the the SC_JACK_DEFAULT_INPUTS environment variable? is this going to break existing code which rely on the current port names or are these metadata orthogonal to the port names?

@timblechmann
Copy link
Contributor

btw, code looks good to me

Switch to 'target_compile_definitions' from 'add_definitions' as it should
be more robust.
@ventosus
Copy link
Contributor Author

ventosus commented Apr 24, 2016

i'm wondering: how does this relate to the the SC_JACK_DEFAULT_INPUTS environment variable?
is this going to break existing code which rely on the current port names or are these metadata
orthogonal to the port names?

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
potentially make the JACK graph more 'documented'.

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 ...

jack_property --port SuperCollider:out_1 --set http://jackaudio.org/metadata/pretty-name Cello

Maybe it would be nice if we could provide JACK port metadata manipulation hooks to sclang in a future step...

@timblechmann
Copy link
Contributor

lgtm

@crucialfelix crucialfelix merged commit 850ce3d into supercollider:master May 28, 2016
@ventosus ventosus deleted the jack_metadata branch May 28, 2016 09:12
@vivid-synth
Copy link
Member

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?

@ventosus
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: scsynth comp: supernova fix proposed good first issue indicates issue tickets that are suitable for a new contributor waiting for testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants