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

Update CLAP libs and support preset-load extension #141

Merged
merged 11 commits into from
Jan 22, 2024

Conversation

jatinchowdhury18
Copy link
Collaborator

@jatinchowdhury18 jatinchowdhury18 commented Dec 20, 2023

The main idea here is to support the preset-load extension. However, to do that properly, I had to update clap-helpers (see free-audio/clap-helpers#19). I ended up just pulling both the clap-helpers and clap submodules up to their HEADs. If folks aren't comfortable with that, I'd be happy to back out to an earlier version, so long as it contains the relevant changes.

I also made a tweak to the CMake so that various global CLAP definitions (e.g. CLAP_ID, CLAP_FEATURES, etc) are exposed to the plugin code, since I found CLAP_ID to be useful in my own implementation of preset-load. Again, we might not want to make all of these definitions public, so that's maybe something we should talk about.

The preset-load changes themselves are pretty straightforward, and follow the pattern that we've used for the other CLAP "extended" capabilities. BYOD has supported preset-load using this branch since version 1.2.0, so that might be a useful example for folks.

@baconpaul
Copy link
Collaborator

This looks good except for the ci errors. But two thoughts

  1. Alex wants to de draft this with clap 1.2 around Jan 1. Maybe we push this right afterwards?
  2. I thought there was a preset discovery component also which you had to implement. Do you just do that as your own factory separate from this?

@jatinchowdhury18
Copy link
Collaborator Author

Yeah, I can fix the Projucer errors.

  1. Alex wants to de draft this with clap 1.2 around Jan 1. Maybe we push this right afterwards?

Sounds good to me!

  1. I thought there was a preset discovery component also which you had to implement. Do you just do that as your own factory separate from this?

Yeah, for preset discovery I implement my own factory (as we discussed in #125). I had thought about trying to add a "generic" implementation to CJE, but the only way I could think to do that would be through the juce::AudioProcessor::getProgram*() interface, which would require creating an instance of the plugin in the preset discovery factory. I think leaving at something for users to implement (at least for now) is fine.

@baconpaul
Copy link
Collaborator

Ok 100% agree. So then let’s wait for 1.2, fix ci, and then merge this. Then I can implement the non draft discovery and load in surge!

@baconpaul
Copy link
Collaborator

Oh the other thing I would add once we do the 1.2 then merge plan is: a function pointer for the host loaded operation https://github.com/free-audio/clap/blob/e292447bd0dbb265ef091178bfed9e29617ebb5b/include/clap/ext/draft/preset-load.h#L41

I think Alex is tagging 1.2 on monday so we can do all of that then!

- include a check in clap wrappers to make sure we are there
@baconpaul baconpaul merged commit 087dd16 into free-audio:main Jan 22, 2024
19 checks passed
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.

2 participants