ossia / ossia/libossia

[ossia-max] Avoid creating intermediate nodes

Open
#653 10 comments 0 reactions 2 assignees View on GitHub

@evanmtp is already working on this.

Since Mar 17, 2022.

bug ossia-max question
Dominant language
C++
Stars
231
Forks
35
Avg merge
8h 55m
Merged PRs (30d)
14

Description

When an ossia.parameter with a multi-level address is created, ossia creates intermediate nodes for each level of the hierarchy. For example, if an ossia.parameter is created with the address audio/gain/interpolation, the following nodes are created:

device:/model/audio
device:/model/audio/gain
device:/model/audio/gain/interpolation

If another ossia.parameter is then created with the same name as one of these intermediate parameters (e.g. /out/final), it will wind up with a numerical suffix:

device:/model/audio
device:/model/audio/gain
device:/model/audio/gain.1
device:/model/audio/gain/interpolation

This makes it easy to accidentally create duplicate node names, which can cause some confusion when e.g. retrieving values or storing presets.

Please see these demo patches:

intermediateNodes.zip

My question is: is this auto-creation of intermediate nodes desired or useful behaviour? I don't understand what the purpose of this is, but I may very well be missing something. If it's not necessary for some reason, could this behaviour be prevented?

Possibly related to https://github.com/ossia/libossia/issues/628 and https://github.com/ossia/libossia/issues/559 . Tested with b206e461.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.