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

TODO: Roadmap to baseline #69

Open
31 of 56 tasks
nathanjhood opened this issue Dec 1, 2024 · 5 comments · Fixed by #218
Open
31 of 56 tasks

TODO: Roadmap to baseline #69

nathanjhood opened this issue Dec 1, 2024 · 5 comments · Fixed by #218
Assignees
Labels
build system Changes or improvements to the project build system dependecies Changes or improvements to project dependencies and management deployment Changes which affect deployment, such as CI/CD design system Changes to the component library, design system, or global panel code documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed module Related to a new or existing VCV Rack 2 module tests Improvements or additions to Catch2 unit tests and CTest

Comments

@nathanjhood
Copy link
Member

nathanjhood commented Dec 1, 2024

Chore

Describe the chore

Outstanding tasks before we can commit to incrementing the plugin version number to indicate an official baseline release version.

@nathanjhood nathanjhood added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed tests Improvements or additions to Catch2 unit tests and CTest build system Changes or improvements to the project build system dependecies Changes or improvements to project dependencies and management module Related to a new or existing VCV Rack 2 module labels Dec 1, 2024
@nathanjhood nathanjhood self-assigned this Dec 1, 2024
@nathanjhood nathanjhood moved this to In Progress in StoneyDSP Dec 1, 2024
@nathanjhood
Copy link
Member Author

nathanjhood commented Dec 1, 2024

Some notes:

  • Module/Widget/ModuleWidget struct initializer lists and deconstructors:

Tough call here. The rack structs Module/Widget/ModuleWidget all define virtual deconstructors, which iteratively call delete on certain resources. Overriding the deconstructor without a safe release pattern causes VCV Rack projects to crash when re-opening them with a faulty module instance pre-loaded. On the other hand, I'm not keen on the sight of calling new to assign to struct members in constructors. without seeing the delete. Problem: if we override deconstructors and call delete things will work as of Rack 2.5.2 - but since we'd not using the deconstructor from the API, we wouldn't know what we might be breaking in future Rack release compatibility by doing this. I don't doubt that the developers of VCV Rack are very well aware of safe release patterns, and their design choice has probably enabled more developers than it has hindered. I need to consider this one carefully - initializer lists in the constructors seems like a given though, can't see why this isn't the suggested pattern in the Rack docs?

  • Module props (members):

There's a fine line here: we only need to test things which are specific to that module, such as box.size (seems a great idea to have this test residing over git branch protections), we do not need to test every available method and member since we trust these are tested by the VCV Rack devs before deploying. Our tests should not target "general" Module/Widget/ModuleWidget props and behaviours, but should target the specifics of our modules.

  • Global design system/component library

This will need a feature branch. The eventual intention is to offer an open-sourced design system/component library that can be shared with others, separately from the plugin modules. Some aspects of this might end up in the StoneyDSP library, while rack-specific stuff would be in StoneyVCV.

I intend to use the contents of res/colors.json to populate some kind of templated struct or union data type, to carry aliases which I can use globally for visual theme, look and feel... there will be SVG-based widgets as well.

One thought I'm having is to use some custom data type to hold either RGB or hex color values (possibly in the StoneyDSP lib/namespace); then, in the StoneyVCV namespace, provide a function which accepts this data type as the input argument, and returns an NVGcolor to use in the Module/Widget/ModuleWidget....

auto black = {43, 43, 43, 255}; // RGBA

const NVGcolor bgBlack = createNVGcolor(black);
  • Embedded resources/CMakeRC

I'll likely use CMakeRC or some hack on it to create char pointer arrays containing resource data encoded as bytes. This will enable me to re-use the tonnes of existing image resources I already have which are in other formats besides SVG. It isn't inconceivable to use this for other things too, like audio files...

@nathanjhood nathanjhood pinned this issue Dec 6, 2024
@nathanjhood
Copy link
Member Author

Ok.... I think this remote repo is finally up to date with my local, for the first time. All branched and versioned now.

I think it's time to figure out this GUI stuff.

@nathanjhood nathanjhood added documentation Improvements or additions to documentation design system Changes to the component library, design system, or global panel code deployment Changes which affect deployment, such as CI/CD labels Dec 13, 2024
@nathanjhood nathanjhood linked a pull request Dec 17, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in StoneyDSP Dec 17, 2024
@nathanjhood nathanjhood moved this from Done to In Progress in StoneyDSP Dec 17, 2024
@nathanjhood nathanjhood reopened this Dec 17, 2024
@nathanjhood
Copy link
Member Author

nathanjhood commented Dec 27, 2024

Problem

I don't like having so many different value ranges in the codebase. Specifically, voltages from 0 to 10, audio from -1 to 1, and parameters doing whatever ranges they like.

It tends for some very messy DSP with much more allocation and logic than necessary.

Idea

Use abstract classes to seperate DSP-based processing from VCV Rack SDK stuff

  • The former shall process samples within an audio-like range of 0..1 or -1..+1
  • The latter shall process, and convert where necessary, voltage standard ranges of 0..10 or -10..+10
  • The DSP parts can be shareable and inheritable, as well as eligible for array/vector based processing, to allow for SIMD instructions
  • The widget parts should be final as these pertain to our plugin, specifically

I propose everything on the panel should be viewed as analogous, as in, represents a real-world electrical voltage value. So, knobs as well as ports have a scale from 0 to 10, or from -10 to +10.

A lot of params will require scaling internally to behave as desired: all part of the plan, and a chance to do things like insert test points, clippers, scalars, and smoothers.

In terms of "safety" and headroom: clipping at 12v (including -12v) is an idea I like. It allows for "+12 above 0dBfs", with a "nominal" voltage of 10v (0dBfs)...

The actual limits may be hard-coded as a set of static, namespaced global variables which can be referenced in class methods. This saves some allocations. We may think of these as our plugin's "power supply".

@nathanjhood
Copy link
Member Author

In terms of "safety" and headroom: clipping at 12v (including -12v) is an idea I like. It allows for "+12 above 0dBfs", with a "nominal" voltage of 10v (0dBfs)...

The actual limits may be hard-coded as a set of static, namespaced global variables which can be referenced in class methods. This saves some allocations. We may think of these as our plugin's "power supply".

It's far too expensive to do these comparisons on every audio tick. In the case of the VCA module, which is probably the most minimal audio processor I have planned, that's 4 calls to clamp() per tick, which is throwing the baby out with the bathwater 👶

There are certain things I do wish to clamp: unipolar inputs, particularly. Those are within reason. Vetoing the previous idea of clipping and clamping on the audio thread in any case which is not necessary.

@nathanjhood
Copy link
Member Author

nathanjhood commented Jan 6, 2025

If knew then what I know now... this is what I would do differently

Sub-class basically all of the factory component library namespace into my own component library, and sub-class those to create my modules and module widgets.

Also wrap some of the factory functions in my own...

EDIT: ...and use more managed pointers-to-members with getter/setter functions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Changes or improvements to the project build system dependecies Changes or improvements to project dependencies and management deployment Changes which affect deployment, such as CI/CD design system Changes to the component library, design system, or global panel code documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed module Related to a new or existing VCV Rack 2 module tests Improvements or additions to Catch2 unit tests and CTest
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant