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

The labels Going from CSV to generated JSON are probably different! #22

Open
1 task done
Itaborala opened this issue Aug 17, 2024 · 4 comments
Open
1 task done
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Itaborala
Copy link
Collaborator

Itaborala commented Aug 17, 2024

When changing the labels in the h_setup_rt.csv files, the generated son_data.json does not copy the same labels.
This is either:

  • Hardcoded through the core [EDIT: not in core]
  • Reading from the old h_setup.csv file instead. [EDIT: not the culprit]
  • Hardcoded by the MIDI reader [EDIT: It is here! control_to_setup2.py and similar]
@Itaborala Itaborala added the bug Something isn't working label Aug 17, 2024
@Itaborala Itaborala added this to the v0.3.0 milestone Aug 17, 2024
@Itaborala Itaborala self-assigned this Aug 17, 2024
@Itaborala
Copy link
Collaborator Author

Itaborala commented Aug 21, 2024

@omarcostahamido
A problem:
Supercollider JSON module does not write the dictionary key following the same order written down (it is not a sorted dict). It is arbitrary.
The hardcode made in control_to_setup2.py was also about sorting the labels as required.

Some solutions:

  1. Make a requirement or state that the labels have to be sortable as desired, or that they will be sorted (not pretty).
  2. Fix the labels completely [s0, s1, s2...] (I'm not sure how well this translates for new problems....).
  3. Make dev and user defined dictionaries on how your labels should be sorted.

Since this is getting too specific for now, my say is that we go for something between 1. and 2. There is a specific requirement that the parameter labels of a problem should be a combination of a fixed string ended by an sorting index starting from 0: foo0,foo1,foo2.

I'll commit this approach to fix the bug, but in case there is a need for another solution, it can happily be discussed here. The issue will be left open,

@omarcostahamido
Copy link
Collaborator

@Itaborala why that requirement of string plus number? It would be simpler to be just number.

@Itaborala
Copy link
Collaborator Author

@omarcostahamido Because you can then define different labels for different problems. In the OSC mapping (5), I could make it so that the address of the OSC changes with the label. (or this could be a brand new mapping in the library

@omarcostahamido
Copy link
Collaborator

Need an example and/or a reference to file and lines to be able to follow

Itaborala added a commit that referenced this issue Sep 30, 2024
…s not update vqe_conf but effectively works with MIDI control #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants