-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Real control surface plugin instead of hidden control surface #57
Comments
Yes, it's hidden. I use dogfooding to develop reaper-rs, so I add only the functions that I need for my own projects. Didn't need control surfaces yet that show up in the control surface list. I think if you want it to show up, you need to use "csurf" instead of "csurf_inst" when registering the surface. |
Are you referring to the following section of reaper-rs? reaper-rs/main/medium/src/misc_enums.rs Lines 791 to 794 in 781adc7
Where the string |
Made a first attempt at this, which actually does create an entry in REAPER's control surface plugin list: Schroedingers-Cat@ccb57fe The descriptive name of the entry however is a garbage string, likely caused by uninitialized memory. My guess is that https://github.com/Schroedingers-Cat/reaper-rs/blob/master/main/medium/src/misc_enums.rs#L686 uses https://github.com/Schroedingers-Cat/reaper-rs/blob/ccb57fee694ea451246e00f58b3cf6329b2d0aef/main/low/src/bindings.rs#L1296-L1307 which does not represent the Any idea where I could find it or how I could pass the necessary data struct for properly registering a real control surface? |
You need to add |
I tried that but whenever I run |
Keep in mind you need to do it on Linux or macOS (eventually has to be Linux though, that's my convention). I think I disabled it for Windows. |
If you are on Windows, the easiest thing it to use WSL. |
Oh thanks, I didn't know that. No problem, I have all operating systems, will try it on another one. |
Generating on Linux worked just fine! I also added an alternative constructor to At the moment, an instance of |
Great!
Is it necessary to do that? Usually, I only go to C++ land for two reasons: Either vtables or variadics.
The generated bindings should contain I think the best would be to do this thing in two steps: First, getting the low-level API right (although I think this only involves adding the generated |
You're right. I had wrong assumptions about this that got cleared up by reading some texts about generating bindings with Rust.
I'm struggling with something in between. The bindings are generated (Schroedingers-Cat@4c59b20) and exposed (Schroedingers-Cat@36ecad5). Before trying to add the medium abstraction, I wanted to get a very simple but hacky approach working first, so I added an instance of the csurf_reg_t in a copy of |
I think Just for comparison, there's a struct in |
So the static hash map should happen in reaper-rs high, then.
Sounds like the non-inst version of I'm also struggling with the creation of the |
Restarted this again on a new branch from the current main branch to get a cleaner history. The Creating a non-inst variant of the I guess the non-inst variant of that function would have the same signature but should be restricted to I'm not sure how the Also, the |
@Schroedingers-Cat So sorry, I can't handle larger reaper-rs PRs/questions at the moment. Too much other stuff going on. This topic is unfortunately a bit more time-consuming. I would have to look into it in very much detail but at the same time I don't need that functionality right now so it would be a big deviation from my Playtime/ReaLearn plans. |
The docs from
pub fn plugin_register_add_csurf_inst
state that this command registers ahidden
control surface. I guess that is the reason why the registered control surface isn't being shown in REAPER's control surface preferences.Does
reaper-rs
support registering proper control surfaces or creating proper control surface plugins? If that's not possible ATM, what missing functionality ofreaper-rs
needs to be implemented in order to support proper REAPER control surface plugins?The text was updated successfully, but these errors were encountered: