### Start server in Python environment Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Start the server from a Python environment using the main.py script. ```sh python main.py ``` -------------------------------- ### Start server on Windows Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Run the bundled server executable on Windows. It can also be started by double-clicking the .exe-file. ```sh camillagui_backend.exe ``` -------------------------------- ### Start server on Linux and macOS Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Run the bundled server executable on Linux and macOS. The server is started from the directory containing the executable. ```sh ./camillagui_backend ``` -------------------------------- ### Run tests with pytest Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Executes the test suite. Requires the pytest-aiohttp plugin to be installed. ```sh python -m pytest ``` -------------------------------- ### camillagui.yml configuration example Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Default backend configuration file. Optional keys are marked with (*); if omitted, the listed defaults are used. The backend binds to all interfaces by default, which may be insecure; change bind_address or firewall settings to restrict access. ssl_certificate and ssl_private_key enable HTTPS and both are required unless combined in a single file. ```yaml --- camilla_host: "0.0.0.0" camilla_port: 1234 bind_address: "0.0.0.0" port: 5005 ssl_certificate: null (*) ssl_private_key: null (*) gui_config_file: null (*) config_dir: "~/camilladsp/configs" coeff_dir: "~/camilladsp/coeffs" default_config: "~/camilladsp/default_config.yml" statefile_path: "~/camilladsp/statefile.yml" log_file: "~/camilladsp/camilladsp.log" (*, defaults to null) on_set_active_config: null (*) on_get_active_config: null (*) supported_capture_types: null (*) supported_playback_types: null (*) ``` -------------------------------- ### Start CamillaDSP with statefile for active config tracking Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Run CamillaDSP with the -s parameter pointing to the same statefile path as in camillagui.yml. This enables the GUI to memorize the active config file path via the statefile. ```sh camilladsp -p 1234 -w -s /path/to/statefile.yml ``` -------------------------------- ### GUI config syntax check error message Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Example log message produced when the GUI config is invalid, such as when range_from is not a number. The config is checked at backend startup and problems are logged. ```text ERROR:root:Parameter 'custom_shortcuts/0/shortcuts/1/range_from': 'hello' is not of type 'number' ``` -------------------------------- ### Set active config via custom script Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Configure on_set_active_config to run a shell script when the active config changes. The filename is inserted into the command surrounded by quotes. Example is for Linux. ```yaml on_set_active_config: my_updater_script.sh {} ``` -------------------------------- ### Get active config filename from a text file Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Configure on_get_active_config to read the active config filename from a text file. The command must return the filename on stdout. ```yaml on_get_active_config: "cat myconfig.txt" ``` -------------------------------- ### View command line help Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Display the built-in help for the server, showing all available command line arguments. The output lists options for config file path, logging level, and AIOHTTP logging level. ```text > python main.py --help usage: python main.py [-h] [-c CONFIG] [-l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}] [-a {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}] Backend for the CamillaDSP web GUI options: -h, --help show this help message and exit -c CONFIG, --config CONFIG Provide a path to a backend config file to use instead of the default -l {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}, --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET} Logging level -a {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}, --aiohttp-log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET} AIOHTTP logging level ``` -------------------------------- ### Render environment files with render_env_files.py Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Renders Jinja templates from release_automation/templates/ to create Python environment files. Requires PyYAML and jinja2; versions come from release_automation/versions.yml and the backend version from backend/version.py. ```sh python -m release_automation.render_env_files ``` -------------------------------- ### Generate self-signed SSL certificate with openssl Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Creates a self-signed certificate and private key for enabling HTTPS. Both files are required for SSL configuration; the certificate and key can also be combined into a single file. ```sh openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout my_private_key.key -out my_certificate.crt ``` -------------------------------- ### Custom shortcut configuration in gui-config.yml Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Adds a custom section with a slider controlling the gain of two filters. The first element controls the slider position and must exist in the config; if other elements are missing or at unexpected values, the GUI shows a warning. For type 'number', range_from, range_to, and step are required; type can also be 'boolean' for a checkbox. ```yaml custom_shortcuts: - section: "My custom section" description: | Optional description for the section. Omit this attribute, if unwanted. The text will be shown in the gui with line breaks. shortcuts: - name: "My filter gain" description: | Optional description for the setting. Omit this attribute, if unwanted. config_elements: - path: ["filters", "MyFilter", "parameters", "gain"] reverse: false - path: ["filters", "MyOtherFilter", "parameters", "gain"] reverse: true range_from: -10 range_to: 0 step: 0.1 type: "number" ``` -------------------------------- ### Hide GUI options in gui-config.yml Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Sets which GUI options or sections are hidden from users. Each option defaults to false if omitted; setting any to true hides the corresponding option or section. ```yaml hide_capture_samplerate: false hide_silence: false hide_capture_device: false hide_playback_device: false hide_rate_monitoring: false hide_multithreading: false ``` -------------------------------- ### Save active config filename to a text file Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Use on_set_active_config with echo to write the active config filename to a text file. The backend runs the command with the filename inserted in quotes. ```yaml on_set_active_config: echo {} > active_configname.txt ``` -------------------------------- ### Limit supported device types in camillagui.yml Source: https://github.com/henquist/camillagui-backend/blob/master/README.md Restrict the config validator to only allow the listed capture and playback device types. Replace the lists with the types supported on your system. ```yaml supported_capture_types: ["Alsa", "File", "Stdin"] supported_playback_types: ["Alsa", "File", "Stdout"] ```