Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: 9.1.0 CamillaGUI
#1
Just noticed that on a fresh install of 9.1.0 the CamillaDSP UI no longer displays any content under the shortcuts tab or on the minimal UI / "compact view" page.
Based on my limited understanding this may have something to to with the content of gui-config.yml.
Reply
#2
It looks like there are errors in the Browser console output for those two options.

Compact mode
   

Shortcuts
   

Here is the dir listing for camillagui/config
Code:
pi@moode9:~ $ ls -l /opt/camillagui/config/
total 8
-rw-r--r-- 1 root root 496 Sep  6 11:14 camillagui.yml
-rw-r--r-- 1 root root 158 Sep  6 11:14 gui-config.yml.disabled

camillagui.yml
Code:
pi@moode9:~ $ cat /opt/camillagui/config/camillagui.yml
---
camilla_host: "0.0.0.0"
camilla_port: 1234
bind_address: "0.0.0.0"
port: 15000
config_dir: "/usr/share/camilladsp/configs"
coeff_dir: "/usr/share/camilladsp/coeffs"
default_config: "/usr/share/camilladsp/working_config.yml"
active_config: "/usr/share/camilladsp/working_config.yml"
backup_camilla_path: "/usr/local/bin/camilladsp"
backup_camilla_port: 1235
log_file: "/var/log/mpd/log"
active_config_txt: "/usr/share/camilladsp/active_config.txt"
statefile_path: "/var/lib/cdsp/statefile.yml"

gui-config.yml.disabled
Code:
pi@moode9:~ $ cat /opt/camillagui/config/gui-config.yml.disabled
hide_capture_samplerate: true
hide_silence: true
hide_capture_device: true
hide_playback_device: true
applyConfigAutomatically: false
hide_file_manager: true
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
Thanks.
I restored the functions by creating a gui-config.yml file in /opt/camillagui/config containing the code below:



Code:
---
# hide_capture_samplerate: false
# hide_silence: false
# hide_capture_device: false
# hide_playback_device: false
# hide_rate_monitoring: false
# apply_config_automatically: false
# status_update_interval: 100
custom_shortcuts:
- section: "Equalizer"
  description: "To use the EQ, add filters named \"Bass\" and \"Treble\" to the pipeline.<br/>Recommented settings: <br/>Bass: Biquad Lowshelf freq=85 q=0.9<br/>Treble: Biquad Highshelf freq=6500 q=0.7"
  shortcuts:
    - name: "Treble (dB)"
      path_in_config: ["filters", "Treble", "parameters", "gain"]
      range_from: -12
      range_to: 12
      step: 0.5
    - name: "Bass (dB)"
      path_in_config: ["filters", "Bass", "parameters", "gain"]
      range_from: -12
      range_to: 12
      step: 0.5
Reply
#4
Having had a bit more time to look into this I think part of the problem may stem from the "Expert Mode" function in /var/www/inc/cdsp.php

PHP Code:
function getGuiExpertMode() {
 
       return file_exists('/opt/camillagui/config/gui-config.yml') == true;
 
   }

 
   function setGuiExpertMode($mode) {
 
       if ($mode == true
           
&& file_exists('/opt/camillagui/config/gui-config.yml')
 
          && file_exists('/opt/camillagui/config/gui-config.yml.disabled') == false) {
 
           sysCmd('sudo mv /opt/camillagui/config/gui-config.yml /opt/camillagui/config/gui-config.yml.disabled');
 
       } else if ($mode == false 
            
&& file_exists('/opt/camillagui/config/gui-config.yml.disabled')
 
           && file_exists('/opt/camillagui/config/gui-config.yml') == false) {
 
           sysCmd('sudo mv /opt/camillagui/config/gui-config.yml.disabled /opt/camillagui/config/gui-config.yml');
 
       }
 
   
Reply
#5
I'll investigate today.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(09-26-2024, 12:16 AM)soma909 Wrote: Having had a bit more time to look into this I think part of the problem may stem from the "Expert Mode" function in /var/www/inc/cdsp.php

PHP Code:
function getGuiExpertMode() {
 
       return file_exists('/opt/camillagui/config/gui-config.yml') == true;
 
   }

 
   function setGuiExpertMode($mode) {
 
       if ($mode == true
           
&& file_exists('/opt/camillagui/config/gui-config.yml')
 
          && file_exists('/opt/camillagui/config/gui-config.yml.disabled') == false) {
 
           sysCmd('sudo mv /opt/camillagui/config/gui-config.yml /opt/camillagui/config/gui-config.yml.disabled');
 
       } else if ($mode == false 
            
&& file_exists('/opt/camillagui/config/gui-config.yml.disabled')
 
           && file_exists('/opt/camillagui/config/gui-config.yml') == false) {
 
           sysCmd('sudo mv /opt/camillagui/config/gui-config.yml.disabled /opt/camillagui/config/gui-config.yml');
 
       }
 
   

The code looks ok to me. It just toggles the config file name to cause CamillaGUI to show or hide certain elements.

Code:
# Expert mode on: 
pi@moode9:~ $ ls -1 /opt/camillagui/config/gui-config.*
gui-config.yml.disabled

# Expert mode off
pi@moode9:~ $ ls -1 /opt/camillagui/config/gui-config.*
/opt/camillagui/config/gui-config.yml

As far as the content of the gui-config.yml file goes, adding in the "Shortcuts" section and commenting out the other settings does restore the Bass/Treble Shortcuts and Compact mode but then it creates breakage for example Shortcuts > Quick Config switching stops playback which sort of makes it unusable, and commenting out the settings breaks the "Expert mode" option.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
What is shortcuts used for? I don't recall even noticing it before this thread came up.
----------------
Robert
Reply
#8
When I implemented the gui config switching code above, it was allowed to don't have gui-config.yml at all. It then used the default values.
Now this has changed to a not optional presence of this file. Without a custom_shortcuts the frontend will give errors and will not show compact view and shortcuts.

But changes to camillagui are not really strong documented ... especially the breaking ones haha. In the past already noticed the hardway that camilladsp and related don't make sure that a release is backwards compatible.

As @Tim Curtis mentioned the Quick Config at the compact view will break the active configuration. The integration with moode is made with the intention that moode is in control over the active configuration (long before camillagui could even switch config file or had compact moode) . In that way the correct audio device is always automatically patched.

Solution direction:

1. To make sure without gui config stuff keeps working, also need to default values for the custom_shortcuts in the camillagui backend code
2. And make also a gui config config for when when the expert mode is off, so you can customize it.
3. We can fix active config breakages in several ways:
  1. hide the compact and shortcuts view (like with the filemanager if not in expert mode)
  2. hide the quick config switch from the compact view
  3. implement the CamillaDSP 2.0 new API for config switching so moode is aware that from within camillagui an other config is selected. But for new config by passes the automatic patching by moode.
Probally for the time being I can create a quick fix that use option 1 or 2. And later maybe implement option 3.
Reply
#9
(09-26-2024, 03:43 PM)the_bertrum Wrote: What is shortcuts used for?  I don't recall even noticing it before this thread came up.

The custom shortcuts allow for a certain amount of control over some active filters. In my case I use the shortcuts to adjust the gain on the low shelf & high shelf filters (Bass/Treble).

[Image: kLlR6zT.png]
Reply


Forum Jump: