helgoboss / helgobox

Helgobox: ReaLearn & Playtime
https://www.helgoboss.org/projects/helgobox
GNU General Public License v3.0
204 stars 20 forks source link

Documentation of ReaLearn's internal design #102

Closed helgoboss closed 2 years ago

helgoboss commented 3 years ago

For potential contributors and the forgetful self.

jackmau commented 3 years ago

sounds good. I'd like to contribute more actively but I am bit lost coming from EEL/Python (I'd really like to work on issue #12 and other features I built around realearn in my custom scripts)

helgoboss commented 3 years ago

I commented on #12.

GavinRay97 commented 3 years ago

Hopefully this falls under this issue, but I'm curious about the id parameter of a controller mapping JSON file. It looks like a standard UUIDv4, is that the case? It can be any value, as long as it doesn't conflict with other ID's?

I would love to contribute controller mappings for Push 1 and Arturia Minilab MkII, but just attempting to figure out what all of the properties are.

Also, if it's helpful, I have created a (draft) JSON Schema which can be used to have IDE provide type-checking + documentation-on-hover realtime when writing mappings:

In VS Code, to configure type providers for JSON schema, in .vscode/settings.json, assuming the JSON schema is placed at .vscode/schemas/ReaLearnControllerMapping.schema.json add:

{
  "json.schemas": [
    {
      "fileMatch": ["./resources/controllers/**.json"],
      "url": "./.vscode/schemas/ReaLearnControllerMapping.schema.json"
    }
  ]
}

(If you can comment on what each property in the JSON does with a description, and list the possible value for enum-type fields, then I can manually alter the JSON to add the description and then it can be published and shared 😃)

Additionally, I gave the Rust serializers/deserializers a go, not sure if these are useful at all:

I know for sure it's missing values for the enums.

image

helgoboss commented 3 years ago

Nice. There's also issue #62 which is exactly about JSON schema. I'll help with enriching the schema soon, hopefully. I was once considering deriving the JSON schema via schemars but I'm not sure if this leads to good results.

Is the purpose of the Rust serializers/deserializers to let 3rd-party Rust apps generate/parse ReaLearn presets? If yes, a more DRY/maintainable way might be to factor out ReaLearn's internal data classes, which look very similar.

GavinRay97 commented 3 years ago

Oh that macro for the JSON schema is probably a much better approach then, since you'd just annotate the existing classes

patmaddox commented 3 years ago

I've built ReaLearn and successfully loaded it in to REAPER!

I just want to double-check with you @helgoboss, when you're making changes to the code, is the process:

I'm guessing there's not a faster way to reload the plugin than to simply restart REAPER... but figured I'd ask just in case.

helgoboss commented 3 years ago

I always restart REAPER. Checking "Allow complete unload of VST plug-ins" in the REAPER VST preferences might open up a way in which you only need to remove the last ReaLearn instance and add it again, but I didn't check.

helgoboss commented 2 years ago

Architecture of ReaLearn is now documented, including some pretty diagrams (of course a work in progress): https://github.com/helgoboss/realearn/blob/master/ARCHITECTURE.adoc

vonglan commented 2 years ago

Very nice!