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

Include classes for projects #42

Open
sensestage opened this issue Jul 17, 2017 · 4 comments
Open

Include classes for projects #42

sensestage opened this issue Jul 17, 2017 · 4 comments

Comments

@sensestage
Copy link

It would be good for each project to have:

  • an optional folder classes
  • which is added to a local sclang_config.yaml file
  • which is then passed onto the startup of sclang

This config-file can also be used for including downloaded quarks.
This would also fix #38

@sensestage
Copy link
Author

sensestage commented Jul 18, 2017

example of the format of the yaml file

includePaths:
    - /root/.local/share/SuperCollider/downloaded-quarks/arduino
    - /root/Bela/projects/myproject/classes
excludePaths:
    []
postInlineWarnings: false

@sensestage
Copy link
Author

Startup sclang with:

sclang -l /root/Bela/Projects/myproject/sclang_config.yaml

@sensestage
Copy link
Author

Suggested fix:

Default sclang_config.yaml-file in SuperCollider project (so template should have this in addition to _main.scd) with contents:

includePaths:
    []
excludePaths:
    []
postInlineWarnings: false

Change line 80 of Bela Makefile to:
RUN_COMMAND?=sclang -l sclang_conf.yaml $(SUPERCOLLIDER_FILE)
This will use the language configuration.

Then users can add to compile their own classes with SuperCollider code like this:

LanguageConfig.addIncludePath( File.getcwd ); // add the local directory to the language configuration.
LanguageConfig.store( "sclang_conf.yaml"); // store in the local directory

Note that the program has to run once to make the change to the language config file. Then the second time the program is run, the folder will be compiled.

It would be more elegant if Bela projects support subfolders from the Web IDE, then users can keep their class files nicely in folders.

This solution will also allow for Quarks to be installed via the SuperCollider interface for Quarks installation. (Although you may want to have internet access enabled for the Bela then to fetch quarks).
Again, allowing for uploading folders will make usage easier. Then users can just add the folders with the Quarks they want to use from their laptop to the project, add them to the LanguageConfig like above, and keep it contained like that.

@sensestage
Copy link
Author

same as #71

giuliomoro added a commit to BelaPlatform/Bela that referenced this issue May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant