Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following up on #523. You asked what the shape would be, so here it is in code.
I work on OpenMixer, a Linux mixing console that hosts CLAP and LV2 plugins without opening their GUIs. The case that started this is simple: someone loads a convolution reverb on a channel and wants to pick a different impulse response from the console. Today that path lives only inside the plugin's state, which the host can't read or change, so the only way is to open the plugin's own window. On a console without a screen for plugin GUIs, there's no way at all.
LV2 has this already: a
patch:writableproperty with rangeatom:Path, set withpatch:Set. A plugin ported or wrapped from LV2 to CLAP loses it today.This adds
clap.file-paths/1. The plugin side has:count()andget_info(), giving each path's id and name;get()andset()for the absolute path;get_display(), a short text for the current value, usually the file name, while the value itself stays the full path.The host side has
changed()when the list changes, andvalue_changed(id)when the plugin changes a path on its own.Everything runs on the main thread. These aren't parameters: no range, no automation, no events.
On your questions in #523:
set(), the host already knows its project changed. When the plugin changes a path itself, it callsvalue_changed()andmark_dirty().get_display(), kept separate from the value.We use this shape in omx-clap-core's LV2 adapter today, as a private call that reaches the plugin as a
patch:Set:I kept it narrow on purpose. There are no free-text values, since #326 settled that strings aren't parameters and I don't have a real case for them without a GUI. There are also no directories, no file-type filters, and nothing about collecting or relinking files, which resource-directory already covers.
The compile tests (
src/main.c,src/main.cc) pass as C11, C17 and C++11 to C++20 with-Wall -Wextra -pedantic -Werror.What I'd like your opinion on:
get_info()list the file extensions a plugin accepts, so a host can filter its file browser?get_display()worth its own call, or should hosts just show the file name?file-paths, or something closer to LV2's "path properties"?