BelaPlatform / supercollider

an environment and programming language for real time audio synthesis and algorithmic composition
GNU General Public License v3.0
14 stars 8 forks source link

Make special BELA pattern for bela-specific command line arguments. #21

Closed sensestage closed 3 years ago

sensestage commented 7 years ago

If we keep adding Bela options to SC we could quickly run out of letters. We could think to redesign the SC Bela-related command line options so that they take something like --bela "-C 8 --pga-left -9 -H 0" so that we do not need to implement that on both sides AND we save letters.

giuliomoro commented 7 years ago

I drafted this in https://github.com/giuliomoro/supercollider/commit/2fd434dc59b7b3c2696454fc187571f706190acb

it is NOT ready to merge, I did not check your default options and you may want to add a bit more logic to check valid combinations of values, requires quite some cleanup, but shows the workflow.

Basically you can set defaults in main(), then pass the command line options straight to Bela's parser, then override/check those values again.

Bad things: 1) I am using a global variable 2) The BelaDriver depends now on what happens in main().

The "advantage" of this approach is that you do not have to implement all of Bela's command-line options every time one is added. The disadvantage is that you depend more on the command line options assigned by Bela, which are slightly more likely to change meaning than the fields of the gBelaSettings structure. As usual, the behaviour of SC heavily depends on the current version of the Bela files. At some point it may be worth adding a Bela subrepo with a tagged version to the SC repo .

Feel free to rearrange as needed (or dump completely) the code in my commit, this shows the path.

sensestage commented 7 years ago

I've started in this branch [1] with porting it, but there still seems to be an issue with starting scsynth from the web IDE.

[1] https://github.com/sensestage/supercollider/commits/bela_hackery_v02-belaoptions

LFSaw commented 7 years ago

there are peeps in the SC community thinking about integrating reading a config.yaml to scsynth. also to replace the (crude) commandline parsing by using a lib... I guess that's help a lot for this issue as well.

giuliomoro commented 7 years ago

Is it related to this? https://github.com/sensestage/supercollider/issues/42

LFSaw commented 7 years ago

not really... there's no issue for this yet. but I can ask around.

LFSaw commented 7 years ago

talked. here are stub issues, will be filled in detail later-ish. But I'd definitely wait before fiddling with the scsynth cli interface, and take part in these discussions.

https://github.com/supercollider/supercollider/issues/3117 https://github.com/supercollider/supercollider/issues/3118

giuliomoro commented 3 years ago

Continues here.