Dear Mr. Enquist,
I want to give your beautiful gift a try - I will eventually figure out how to do it.
One question - excuse my limited understanding of computers - but can you think of any reason camillaDSP would not work with a dante pci-e card? Want to be sure before I begin. I plan on using a variant of DEBIAN - Dietpi but on an X86 computer since I do not think there is any way to use dante with a raspberry pi.
Thanks,
I want to give your beautiful gift a try - I will eventually figure out how to do it.
One question - excuse my limited understanding of computers - but can you think of any reason camillaDSP would not work with a dante pci-e card? Want to be sure before I begin. I plan on using a variant of DEBIAN - Dietpi but on an X86 computer since I do not think there is any way to use dante with a raspberry pi.
Thanks,
This depends on what drivers are available. As long as the card presents itself like a normal Alsa playback device it should work fine. You can try it with the "aplay -l" command that lists all playback devices. If that looks good, the next step is to figure out what parameters (sample rate and format etc) to use. You can use aplay for that too, see here: https://github.com/HEnquist/camilla...md#find-valid-playback-and-capture-parameterscan you think of any reason camillaDSP would not work with a dante pci-e card?
I haven't used Dietpi but I know it's a quite minimal distribution. It's possible that the kernel ships with fewer modules to save space, so if you don't see the card with aplay you could try normal Debian just to see if it makes a difference.Dietpi but on an X86 computer
CamillaDSP should work fine on dietpi, but you may need to install som packages that are installed by default on normal sized distros. Post any errors you get and we'll figure out what to install. I think some others here are using dietpi and maybe already know what is needed.
This message comes from line 122 in alsadevice.rs. You can change that warn! to debug! and compile a custom version to get rid of it. For the next version I'll see if I can reproduce the behavior and make it behave a bit nicer. This unexpected paused state doesn't seem to cause any trouble, so probably not worth a warning.WARN [src/alsadevice.rs:122] PB: device is in an unexpected state: SND_PCM_STATE_PAUSED, Paused
I confirm that CamillaDSP works great on a Raspberry Pi 4 running DietPi. However, beware that alsa is not installed by default in DietPi. You can do that with the toolCamillaDSP should work fine on dietpi, but you may need to install som packages that are installed by default on normal sized distros. Post any errors you get and we'll figure out what to install. I think some others here are using dietpi and maybe already know what is needed.
dietpi-software
.mevang,
Checked on the install I am using for computer audio - I used the command aplay -l and it comes back listing my MUTEC.
Can I assume this means my Dietpi does have aplay installed? Sorry to be such a dunce! I do have alsa installed and will install it for my camillaDSP computer.
Thanks,
Checked on the install I am using for computer audio - I used the command aplay -l and it comes back listing my MUTEC.
Can I assume this means my Dietpi does have aplay installed? Sorry to be such a dunce! I do have alsa installed and will install it for my camillaDSP computer.
Thanks,
This proves that alsa and alsa utilities, including aplay, are already installed.Checked on the install I am using for computer audio - I used the command aplay -l and it comes back listing my MUTEC.
Can I assume this means my Dietpi does have aplay installed?
Hi Henrik, thanks for the v3 release. Is it possible to adjust shortcuts via the pycamilladsp interface?
I'm currently using the python interface to adjust volume, mute, config changes etc via simple python scripts I trigger with a remote control, but can't work out how to do the equivalent of what the custom shortcuts section is achieving in the GUI.
I'm currently using the python interface to adjust volume, mute, config changes etc via simple python scripts I trigger with a remote control, but can't work out how to do the equivalent of what the custom shortcuts section is achieving in the GUI.
I reckon it would be useful to script this instead of manually clicking on the shortcup each time I change listening position e.g.Is it possible to adjust shortcuts via the pycamilladsp interface?
Code:
$ cat .screenlayout/tv.sh
#!/bin/sh
# watching/listening on tv
xrandr --output DVI-D-0 --off --output VGA-0 --primary --mode 1360x768 --pos 0x0 --rotate normal --output HDMI-A-0 --off
$ cat .screenlayout/pc.sh
#!/bin/sh
# watching/listening at computer screen at keyboard.
xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA-0 --off --output HDMI-A-0 --off
==>
Code:
$ cat .screenlayout/tv.sh
#!/bin/sh
# watching/listening on tv
xrandr --output DVI-D-0 --off --output VGA-0 --primary --mode 1360x768 --pos 0x0 --rotate normal --output HDMI-A-0 --off
# audio on LHS speakers
camillaconfigswitcher 90deg-D1.yml
$ cat .screenlayout/pc.sh
#!/bin/sh
# watching/listening at computer screen at keyboard.
xrandr --output DVI-D-0 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output VGA-0 --off --output HDMI-A-0 --off
# audio on main speakers
camillaconfigswitcher 6chan-D1.yml
What is smallest Raspberry Pi memory config that I would still most probable not have any problems with?
2GB? ... 4?
//
2GB? ... 4?
//
I reckon it would be useful to script this instead of manually clicking on the shortcup each time I change listening position e.g.
Here's the current state of my python script. (I'm not a programmer, please excuse any errors or poor practices). Usage per your example sh script would be
python3 CDSPremote.py -c "6chan-D1.yml"
Ensure you have entered the correct config_dir for the location of your config files.
Python:
import syslog
import argparse
import time
import json
from camilladsp import CamillaClient, CamillaError
config_dir = "/home/cdsp_user/camilladsp/configs/"
cdsp = CamillaClient("127.0.0.1", 1234)
cdsp.connect()
parser = argparse.ArgumentParser()
parser.add_argument("-v", "--volume", type=float, help="Main volume increment/decrement by n")
parser.add_argument("-m", "--mute", type=int, help="Toggle mute; optionally set mute(1)/not mute(0)", nargs='?', const=2, default=-1)
parser.add_argument("-c", "--config", type=str, help="Filename of config in directory to load", default="")
args = parser.parse_args()
#syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Initiated with arguments: {args}')
def main():
if not cdsp.is_connected():
syslog.syslog(syslog.LOG_ERR, 'Remote Receiver Py Script: CamillaDSP backend not connected, attempting to connect')
for attempt in range(3):
try:
connectCSDP()
except:
syslog.syslog(syslog.LOG_ERR, 'Remote Receiver Py Script: CamillaDSP backend connection failed, waiting 1s to retry')
time.sleep(1)
else:
syslog.syslog(syslog.LOG_ERR, 'Remote Receiver Py Script: CamillaDSP backend connected')
break
if args.volume:
for attempt in range(3):
try:
cdsp.volume.adjust_volume(0, args.volume, -60, 0) # fader, volume delta, min, max
except:
syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Set volume attempt {attempt} failed, retrying')
else:
break
else: # triggered on didn't break
pass
if args.mute == 2:
for attempt in range(3):
try:
cdsp.volume.set_main_mute(not cdsp.volume.main_mute())
except:
syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Set mute attempt {attempt} failed, retrying')
else:
break
else: # triggered on didn't break
pass
elif args.mute == 0 or args.mute == 1:
for attempt in range(3):
try:
cdsp.volume.set_main_mute(args.mute)
except:
syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Set mute attempt {attempt} failed, retrying')
else:
break
else: # triggered on didn't break
pass
if args.config:
for attempt in range (3):
try:
cdsp.config.set_file_path(f'{config_dir}{args.config}')
except:
syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Failed to load config:{config_dir}{args.config}')
else:
try:
cdsp.general.reload()
except:
syslog.syslog(syslog.LOG_ERR, f'Remote Receiver Py Script: Failed to load config:{config_dir}{args.config}')
else:
break
else: # triggered on didn't break
pass
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
pass
finally:
pass
CamillaDSP doesn't need much, 1GB should be plenty unless you want to run a graphical desktopWhat is smallest Raspberry Pi memory config that I would still most probable not have any problems with?
2GB? ... 4?
//
Would you please care to describe this in more of a context of a complete solution. Will it work on a Pi? How to install? What kind "remote" - the same apple one? Consider me a noob 😉Here's the current state of my python script.
//
Happy to provide more detail / assistance when I have time, but for now:Would you please care to describe this in more of a context of a complete solution. Will it work on a Pi? How to install? What kind "remote" - the same apple one? Consider me a noob 😉
Should work on a Pi, however I haven't tested this. To my knowledge the main pre-requisites are a working camilladsp install (update the details in this line if you're not using the default localhost/port:
cdsp = CamillaClient("127.0.0.1", 1234)
), and the pycamilladsp python library (on my Fedora machine I was able to install this by doing: pip3 install pycamilladsp
, however there is a chance you will need to use a venv command similar to the instructions used to install camillagui in mdsimon's guide: https://github.com/mdsimon2/RPi-CamillaDSPThe remote I use is a Logitech Harmony Hub based remote, unfortunately no longer sold. It connects to the computer via bluetooth and sends keyboard shortcut commands. I have setup the keyboard shortcuts to run the script using the Gnome Desktop keyboard shortcut settings - this won't work if you're not using a desktop environment on your Pi. If using an IR remote there are methods using FLIRC to trigger commands (again, can reference mdsimon's excellent guide on github).
My script is intended to be triggered separately each time an action is required (whereas mdsimon's FLIRC script runs as a service that constantly monitors for triggers). Each command sent to camilladsp is attempted a maximum of 3 times.
Example for switch to config 'max-bass.yml', trigger unmute:
python3 CDSPremote.py -c "max-bass.yml" -m 0
Example for trigger mute:
python3 CDSPremote.py -m 1
Example for toggle mute:
python3 CDSPremote.py -m
Example for decrement main volume by 2.5 db:
python3 CDSPremote.py -v -2.5
Coming back to this, I had somehow overlooked pyinstaller. It can make a complete bundle of a python program, including the python interpreter and all needed libraries. It works quite well for the gui backend. I'm adding this to the GitHub actions, to build this for all the common systems with every release. There is a test run here, see the build artifacts:There would be several options to enforce consistency between the various packages:
https://github.com/HEnquist/camillagui-backend/actions/runs/13062211624
Please give them a try 🙂
The backend config is in the _internal/config dir, just edit it as usual.
Thanks so much. I see now that this is above my skills in the area... I simply cannot grasp all this....Happy to provide more detail / assistance when I have time, but for now:
I would like to add a remote to a Pi CDSP install so that I could
- change volume, Mute
- change config file
- alter a PEQ.
Thats it really.
Well, Play/Pause and Next song for Squeezeplay would be nice also 🙂 but thats an other matter...
Volume is prio 1 and the rest not so....
//
A few questions:I would like to add a remote to a Pi CDSP install so that I could
- Are you running CamillaGUI?
- What operating system are you running on the Pi, and do you set it up via a mouse/keyboard/screen, via another computer, or via SD card?
- What remote control do you have (or want to use)?
Thanks - use PicorePlayer installed via SD card. I'd like to use the small Apple remote but as I think about it I do use an AppleTV right beside this so probably something similar - preferable using radio instead of IR so to not interfere...
//
//
There are a couple of different ways to add a remote to PCP. I'd suggest using the LIRC method to trigger a script that communicates with Camilla through the websocket.use PicorePlayer installed via SD card. I'd like to use the small Apple remote
- Home
- Source & Line
- PC Based
- CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc