Ok, I have a strange one…
I have a raspberry PI 4 with a usb sound card as in/output and a patch that starts up on boot (via the simple autostart in /etc/xdg/lxsession/LXDE-pi/autostart)
Since I also need graphics from puredata.
Whenever pd is auto-started, it does not get any sound input. As soon as I go to the media -> audio settings menu, I can see that the card is correctly specified. Now a simple “Apply” (without changing anything else) makes the sound work.
Opening a pd patch manually I have correct sound input without going to the menu…
Any tips?
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
Or as a workaround, is there a way to hit that apply button automagically from within a pd patch on loadbang?
On 13 Apr 2023, at 12:36, Simon Iten itensimon@gmail.com wrote:
Ok, I have a strange one…
I have a raspberry PI 4 with a usb sound card as in/output and a patch that starts up on boot (via the simple autostart in /etc/xdg/lxsession/LXDE-pi/autostart)
Since I also need graphics from puredata.
Whenever pd is auto-started, it does not get any sound input. As soon as I go to the media -> audio settings menu, I can see that the card is correctly specified. Now a simple “Apply” (without changing anything else) makes the sound work.
Opening a pd patch manually I have correct sound input without going to the menu…
Any tips?
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
sounds that you have to delay "pd starts up on boot" part. seems Pd is started before the soundcard is ready.
--
Mensaje telepatico asistido por maquinas.
On 13/04/2023 07:39, Simon Iten wrote:
Or as a workaround, is there a way to hit that apply button automagically from within a pd patch on loadbang?
On 13 Apr 2023, at 12:36, Simon Iten itensimon@gmail.com wrote:
Ok, I have a strange one…
I have a raspberry PI 4 with a usb sound card as in/output and a patch that starts up on boot (via the simple autostart in /etc/xdg/lxsession/LXDE-pi/autostart)
Since I also need graphics from puredata.
Whenever pd is auto-started, it does not get any sound input. As soon as I go to the media -> audio settings menu, I can see that the card is correctly specified. Now a simple “Apply” (without changing anything else) makes the sound work.
Opening a pd patch manually I have correct sound input without going to the menu…
Any tips?
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hello, I'm using crontab to load pd, the only way I've found to have sound when pd starts at boot is about adding delay into the script that starts PureData like this:
#!/bin/bash env sleep 10 ,pd -nogui mypatch
on some computer 5s is enough, on some other it's about 10s...
How could we know that soundcard is ready?
I've been reading somewhere that pd needs pulse loaded to get sound working so I've tried this before in the script:
while [ ! -d /run/user/1000/pulse ] do sleep 0.2 done
but it has no effect.
this is happening on raspberryOS lite, and on patchboxOS which have a realtime kernel, the main user added to audio group, same problem...
One thing I didn't try yet is about using this service file provided by Orac:
[Unit] Description=Run Orac at boot DefaultDependencies=no Wants=network-online.target After=network-online.target Conflicts=shutdown.target Before=shutdown.target
[Service] Type=simple User=patch Group=patch Environment=HOME=/home/patch EnvironmentFile=/etc/environment LimitRTPRIO=infinity LimitMEMLOCK=infinity KillMode=process Restart=always WorkingDirectory=/usr/local/orac ExecStart=/usr/bin/pd -rt -alsamidi -nogui -audiobuf 4 mother.pd main.pd
[Install] WantedBy=default.target
I'd be glad to get any hint about what would prevent pd to have audio working at boot.
Maybe there is something to do into PureData for accessing soundcard when it is ready?
Le 13 avr. 2023 à 12:48, Lucas Cordiviola lucarda27@hotmail.com a écrit :
sounds that you have to delay "pd starts up on boot" part. seems Pd is started before the soundcard is ready.
--
Mensaje telepatico asistido por maquinas.
On 13/04/2023 07:39, Simon Iten wrote:
Or as a workaround, is there a way to hit that apply button automagically from within a pd patch on loadbang?
On 13 Apr 2023, at 12:36, Simon Iten itensimon@gmail.com wrote:
Ok, I have a strange one…
I have a raspberry PI 4 with a usb sound card as in/output and a patch that starts up on boot (via the simple autostart in /etc/xdg/lxsession/LXDE-pi/autostart)
Since I also need graphics from puredata.
Whenever pd is auto-started, it does not get any sound input. As soon as I go to the media -> audio settings menu, I can see that the card is correctly specified. Now a simple “Apply” (without changing anything else) makes the sound work.
Opening a pd patch manually I have correct sound input without going to the menu…
Any tips?
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 4/13/23 12:39, Simon Iten wrote:
Or as a workaround, is there a way to hit that apply button automagically from within a pd patch on loadbang?
yes, with the [mediasettings] library.
in RPi, you should be able to install it with $ apt-get install pd-mediasettings
gfmasdr IOhannes
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
Try
[loadbang] --> [del 1000] --> [; pd dsp 0, dsp1(
If the audio device has already been opened (albeit unsuccessfully), you might need to turn DSP off first, so that turning DSP on will reopen the device.
Christof
thanks everybody, a combination of a delayed PD start and a delayed dsp 1 message did the trick!!
On Thu, 13 Apr 2023, 13:39 Christof Ressi, info@christofressi.com wrote:
I tried delaying the dsp 1 message on loadbang by 200ms since I read somewhere this could be the problem.
Try
[loadbang] --> [del 1000] --> [; pd dsp 0, dsp1(
If the audio device has already been opened (albeit unsuccessfully), you might need to turn DSP off first, so that turning DSP on will reopen the device.
Christof _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list