[PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Roman Haefeli
On Don, 2013-01-31 at 13:12 -0500, Hans-Christoph Steiner wrote:
 Does it happen with Pd-vanilla 0.43.4 or 0.44?  I just take that code directly
 from Miller since I've never done anything with programming audio interfaces.
  Pd definitely does not place nice with pulseaudio,

Pd 0.44 _does_ play nice with pulseaudio (input and output) when using
portaudio as backend and pulse as devcice. 
One can also launch Pd with the option '-pa'.
N.B.: '-pa' stands for portaudio which is not to be confused with
pulseaudio.

  so make sure its not
 running when using Pd.  I use this to temporarily suspend pulse:
 
 pasuspender pd-extended
 
 Many people who use Pd a lot uninstall pulseaudio entirely.

Ok, let's clear some dust here. There seems a strong notion that
pulseaudio is interfering a lot with other audio applications and is
causing lots of troubles. Let me point out a few facts from a standard
Ubuntu 12.04 installation:

* When no pulseaudio client is playing, the sound device is not occupied
and thus non-compliant applications like Pd are _not_ blocked from
accessing the device. This is even the case when you pause a Youtube
movie in the browser. 

* pasuspender is actually not necessary in most cases. Only when some
pulseaudio client is actually playing, you may want to use pasuspender.
However, using pasuspender does not harm, even if it is not necessary

* Use pasuspender -- pd-extended instead of pasuspender pd-extended,
so that options passed to pd-extended are bypassed by pasuspender.

* Uninstalling pulseaudio is completely unnecessary, as it doesn't solve
any problem. OTOH, it also doesn't harm. However, when pulseaudio is
installed and Firefox is playing some Youtube movie, you still are able
to grant Pd access to the sound device by using pasuspender. With no
pulseaudio installed, the flash-plugin might use ALSA directly and there
is no other way to stop it from blocking the sound device than to stop
firefox. If you don't know which application is currently using the
device, good luck with hunting. 
My point is: With pulseaudio it is actually easier to guarantee Pd
access to the sound device.

* Jackd (qjackctl, respectively) behaves similar to Pd: When no pulse
client is playing, you can just start it without any troubles.

  
Roman



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread Hans-Christoph Steiner
On 02/01/2013 06:29 AM, Roman Haefeli wrote:
 On Don, 2013-01-31 at 13:12 -0500, Hans-Christoph Steiner wrote:
 Does it happen with Pd-vanilla 0.43.4 or 0.44?  I just take that code 
 directly
 from Miller since I've never done anything with programming audio interfaces.
  Pd definitely does not place nice with pulseaudio,
 
 Pd 0.44 _does_ play nice with pulseaudio (input and output) when using
 portaudio as backend and pulse as devcice. 
 One can also launch Pd with the option '-pa'.
 N.B.: '-pa' stands for portaudio which is not to be confused with
 pulseaudio.

The situation is improved, but not quite usable on my machine.  I'm on Linux
Mint Maya amd64 (Ubuntu/precise).  Many other apps are happy to play at the
same time, like Youtube, browser+flash, Twinkle voip phone, skype, mumble,
etc.  If I have rhythmbox playing music, and start 'pd -pa', Pd outputs chunky
audio and I get tons of these in the console:

ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred

After 10ish seconds, it settles in and works decently.  Until I close the Test
Audio patch, then I get tons of these again until I turn off DSP:

ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred



  so make sure its not
 running when using Pd.  I use this to temporarily suspend pulse:

 pasuspender pd-extended

 Many people who use Pd a lot uninstall pulseaudio entirely.
 
 Ok, let's clear some dust here. There seems a strong notion that
 pulseaudio is interfering a lot with other audio applications and is
 causing lots of troubles. Let me point out a few facts from a standard
 Ubuntu 12.04 installation:
 
 * When no pulseaudio client is playing, the sound device is not occupied
 and thus non-compliant applications like Pd are _not_ blocked from
 accessing the device. This is even the case when you pause a Youtube
 movie in the browser. 
 
 * pasuspender is actually not necessary in most cases. Only when some
 pulseaudio client is actually playing, you may want to use pasuspender.
 However, using pasuspender does not harm, even if it is not necessary
 
 * Use pasuspender -- pd-extended instead of pasuspender pd-extended,
 so that options passed to pd-extended are bypassed by pasuspender.
 
 * Uninstalling pulseaudio is completely unnecessary, as it doesn't solve
 any problem. OTOH, it also doesn't harm. However, when pulseaudio is
 installed and Firefox is playing some Youtube movie, you still are able
 to grant Pd access to the sound device by using pasuspender. With no
 pulseaudio installed, the flash-plugin might use ALSA directly and there
 is no other way to stop it from blocking the sound device than to stop
 firefox. If you don't know which application is currently using the
 device, good luck with hunting. 
 My point is: With pulseaudio it is actually easier to guarantee Pd
 access to the sound device.
 
 * Jackd (qjackctl, respectively) behaves similar to Pd: When no pulse
 client is playing, you can just start it without any troubles.


Yeah, that sounds like my experience as well.  One thing I've heard is that
pulseaudio can use jack as the backend instead of ALSA.  That sounds like an
ideal situation.  Anyone messed with that?

.hc

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Miller Puckette
Just to comment on why I ended up un-installing portaudio: I booted my
Pi with a clean new Raspbian distro, compiled Pd (after installing some
packages like git and alsa libs), ran it and found that pulseaudio was
running.  So I exit Pd and likk pulseaudio via pulseaudio -kill.  Then start
Pd and find it _still_ can't open audio.  Why? ell, looking back I found that
pulseaudio was running again!  So I re-killed it and tried a third time.
Same result: for some reason, the mere act of starting Pd was causing
pulseaudio to start itself up and grab the audio device so that Pd couldn't
get it.  There are similar plot sequences in old Three Stooges and Marx
Brothers movies, but I wasn't exactly laughing.  What if I were about to 
have to walk on stage with this thing?  So I googled around and read through
the many-page man page for pulseaudio and found no explanation of why this
was happening, nor any suggestions for how to disable pulseaudio other than
the -kill command I had already tried.  After a while I lost patience and
uninstalled pulse and I suggest that everyone else do so as well.

cheers
Miller

  Many people who use Pd a lot uninstall pulseaudio entirely.
 
 Ok, let's clear some dust here. There seems a strong notion that
 pulseaudio is interfering a lot with other audio applications and is
 causing lots of troubles. Let me point out a few facts from a standard
 Ubuntu 12.04 installation:
 
 * When no pulseaudio client is playing, the sound device is not occupied
 and thus non-compliant applications like Pd are _not_ blocked from
 accessing the device. This is even the case when you pause a Youtube
 movie in the browser. 
 
 * pasuspender is actually not necessary in most cases. Only when some
 pulseaudio client is actually playing, you may want to use pasuspender.
 However, using pasuspender does not harm, even if it is not necessary
 
 * Use pasuspender -- pd-extended instead of pasuspender pd-extended,
 so that options passed to pd-extended are bypassed by pasuspender.
 
 * Uninstalling pulseaudio is completely unnecessary, as it doesn't solve
 any problem. OTOH, it also doesn't harm. However, when pulseaudio is
 installed and Firefox is playing some Youtube movie, you still are able
 to grant Pd access to the sound device by using pasuspender. With no
 pulseaudio installed, the flash-plugin might use ALSA directly and there
 is no other way to stop it from blocking the sound device than to stop
 firefox. If you don't know which application is currently using the
 device, good luck with hunting. 
 My point is: With pulseaudio it is actually easier to guarantee Pd
 access to the sound device.
 
 * Jackd (qjackctl, respectively) behaves similar to Pd: When no pulse
 client is playing, you can just start it without any troubles.
 
   
 Roman
 
 
 
 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Kaj Ailomaa

On Fri, 01 Feb 2013 18:29:15 +0100, Miller Puckette m...@ucsd.edu wrote:


Just to comment on why I ended up un-installing portaudio: I booted my
Pi with a clean new Raspbian distro, compiled Pd (after installing some
packages like git and alsa libs), ran it and found that pulseaudio was
running.  So I exit Pd and likk pulseaudio via pulseaudio -kill.  Then  
start
Pd and find it _still_ can't open audio.  Why? ell, looking back I found  
that

pulseaudio was running again!  So I re-killed it and tried a third time.
Same result: for some reason, the mere act of starting Pd was causing
pulseaudio to start itself up and grab the audio device so that Pd  
couldn't

get it.  There are similar plot sequences in old Three Stooges and Marx
Brothers movies, but I wasn't exactly laughing.  What if I were about to
have to walk on stage with this thing?  So I googled around and read  
through
the many-page man page for pulseaudio and found no explanation of why  
this
was happening, nor any suggestions for how to disable pulseaudio other  
than
the -kill command I had already tried.  After a while I lost patience  
and

uninstalled pulse and I suggest that everyone else do so as well.

cheers
Miller



Pulseaudio respawns itself, unless you've configured it not to. You can  
disable it temporarily with the tool pasuspender.

The syntax would be:
pasuspender -- pd

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread IOhannes zmölnig

On 02/01/2013 06:29 PM, Miller Puckette wrote:

Just to comment on why I ended up un-installing portaudio: I booted my
Pi with a clean new Raspbian distro, compiled Pd (after installing some
packages like git and alsa libs), ran it and found that pulseaudio was
running.  So I exit Pd and likk pulseaudio via pulseaudio -kill.  Then start
Pd and find it _still_ can't open audio.  Why? ell, looking back I found that
pulseaudio was running again!  So I re-killed it and tried a third time.
Same result: for some reason, the mere act of starting Pd was causing
pulseaudio to start itself up and grab the audio device so that Pd couldn't
get it.  There are similar plot sequences in old Three Stooges and Marx
Brothers movies, but I wasn't exactly laughing.  What if I were about to
have to walk on stage with this thing?  So I googled around and read through
the many-page man page for pulseaudio and found no explanation of why this
was happening, nor any suggestions for how to disable pulseaudio other than
the -kill command I had already tried.  After a while I lost patience and
uninstalled pulse and I suggest that everyone else do so as well.




since i was just playing around with pulseaudio recently, here some hints:

- in /etc/pulse/client.conf, you can set autospawn = no to prevent 
pulseaudio from starting again and again.


- you can run pulseaudio on top of jack, which means that those 
applications that want to use pulseaudio can use it, but others are not 
effected. (i recently decided to make this my default configuration on 
desktop machines: it allows me to watch vimeo and at the same time 
fuddle with Pd :-))


fgamsdr
IOhannes

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Kaj Ailomaa
On Fri, 01 Feb 2013 18:34:49 +0100, Kaj Ailomaa zeque...@mousike.me  
wrote:



On Fri, 01 Feb 2013 18:29:15 +0100, Miller Puckette m...@ucsd.edu wrote:


Just to comment on why I ended up un-installing portaudio: I booted my
Pi with a clean new Raspbian distro, compiled Pd (after installing some
packages like git and alsa libs), ran it and found that pulseaudio was
running.  So I exit Pd and likk pulseaudio via pulseaudio -kill.   
Then start
Pd and find it _still_ can't open audio.  Why? ell, looking back I  
found that

pulseaudio was running again!  So I re-killed it and tried a third time.
Same result: for some reason, the mere act of starting Pd was causing
pulseaudio to start itself up and grab the audio device so that Pd  
couldn't

get it.  There are similar plot sequences in old Three Stooges and Marx
Brothers movies, but I wasn't exactly laughing.  What if I were about to
have to walk on stage with this thing?  So I googled around and read  
through
the many-page man page for pulseaudio and found no explanation of why  
this
was happening, nor any suggestions for how to disable pulseaudio other  
than
the -kill command I had already tried.  After a while I lost patience  
and

uninstalled pulse and I suggest that everyone else do so as well.

cheers
Miller



Pulseaudio respawns itself, unless you've configured it not to. You can  
disable it temporarily with the tool pasuspender.

The syntax would be:
pasuspender -- pd



..ah, sorry, Didn't read through the previous posts very carefully.  
Anyway, you can turn off PA autospawning in a configuration file.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Miller Puckette
 
 Pulseaudio respawns itself, unless you've configured it not to. You
 can disable it temporarily with the tool pasuspender.
 The syntax would be:
 pasuspender -- pd
 
Good to know - but even though I now theoretically know how to deal with this,
the whole thing gives me the creeps - what if some update changes the rules and
pulse starts re-spawning itself again?  I'll feel safer with it uninstalled -
then it will have a much harder time restarting itself on my machine.

cheers
Miller

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management - 
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio (was: ALSA output error (restart failed): Broken pipe)

2013-02-01 Thread Pierre Massat
I think I read somewhere that Romero intends to make a film about this ;)

Cheers,
Pierre.

2013/2/1 Miller Puckette m...@ucsd.edu

 
  Pulseaudio respawns itself, unless you've configured it not to. You
  can disable it temporarily with the tool pasuspender.
  The syntax would be:
  pasuspender -- pd
 
 Good to know - but even though I now theoretically know how to deal with
 this,
 the whole thing gives me the creeps - what if some update changes the
 rules and
 pulse starts re-spawning itself again?  I'll feel safer with it
 uninstalled -
 then it will have a much harder time restarting itself on my machine.

 cheers
 Miller

  ___
  Pd-list@iem.at mailing list
  UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

 ___
 Pd-list@iem.at mailing list
 UNSUBSCRIBE and account-management -
 http://lists.puredata.info/listinfo/pd-list

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread Roman Haefeli
On Fre, 2013-02-01 at 18:43 +0100, IOhannes zmölnig wrote:
 On 02/01/2013 06:29 PM, Miller Puckette wrote:
  Just to comment on why I ended up un-installing portaudio: I booted my
  Pi with a clean new Raspbian distro, compiled Pd (after installing some
  packages like git and alsa libs), ran it and found that pulseaudio was
  running.  So I exit Pd and likk pulseaudio via pulseaudio -kill.  Then 
  start
  Pd and find it _still_ can't open audio.  Why? ell, looking back I found 
  that
  pulseaudio was running again!  So I re-killed it and tried a third time.
  Same result: for some reason, the mere act of starting Pd was causing
  pulseaudio to start itself up and grab the audio device so that Pd couldn't
  get it.  There are similar plot sequences in old Three Stooges and Marx
  Brothers movies, but I wasn't exactly laughing.  What if I were about to
  have to walk on stage with this thing?  So I googled around and read through
  the many-page man page for pulseaudio and found no explanation of why this
  was happening, nor any suggestions for how to disable pulseaudio other than
  the -kill command I had already tried.  After a while I lost patience and
  uninstalled pulse and I suggest that everyone else do so as well.
 
 
 
 since i was just playing around with pulseaudio recently, here some hints:
 
 - in /etc/pulse/client.conf, you can set autospawn = no to prevent 
 pulseaudio from starting again and again.

Alternatively, one can put that into ~/.pulse/client.conf which doesn't
require root and does not get overwritten by any future package updates.

Roman



___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread Roman Haefeli
On Fre, 2013-02-01 at 10:37 -0500, Hans-Christoph Steiner wrote:

[...]

 Yeah, that sounds like my experience as well.  One thing I've heard is that
 pulseaudio can use jack as the backend instead of ALSA.  That sounds like an
 ideal situation.  Anyone messed with that?

Yeah, there are some tutorials around about how to install the jack-sink
plugin for pulseaudio. It worked well for me. But it had the side-effect
that  the volume control keys didn't work anymore. 

Roman




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread Kaj Ailomaa
On Fri, 01 Feb 2013 19:45:12 +0100, Roman Haefeli reduz...@gmail.com  
wrote:



On Fre, 2013-02-01 at 10:37 -0500, Hans-Christoph Steiner wrote:

[...]

Yeah, that sounds like my experience as well.  One thing I've heard is  
that
pulseaudio can use jack as the backend instead of ALSA.  That sounds  
like an

ideal situation.  Anyone messed with that?


Yeah, there are some tutorials around about how to install the jack-sink
plugin for pulseaudio. It worked well for me. But it had the side-effect
that  the volume control keys didn't work anymore.

Roman




___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -  
http://lists.puredata.info/listinfo/pd-list


Just install pulseaudio-module-jack
Use jackdbus instead of jackd (jackd2 in Debian based) to have the module  
activate jack sink and source automatically when starting jackdbus.
Some jack control apps will want to start jackdbus. jack_control is a  
command line tool for starting jackdbus. Just do:

jack_control start|stop

If using qjackctl, make sure dbus is enabled in Setup - Misc

Restart PA after installing the module. Written by David Henningson as a  
starting point for integrating jack with PA.


jack is able to grab the audio device from PA, but this feature is a  
little buggy, so it won't work every time. It happens through dbus, and  
it's some code that the author Poettering implemented in both PA and jack.  
jack is set to have higher priority, and PA is supposed to let go of the  
card, and let jack grab it.


___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list


Re: [PD] Pd and pulseaudio

2013-02-01 Thread IOhannes zmölnig

On 02/01/2013 07:25 PM, Roman Haefeli wrote:


since i was just playing around with pulseaudio recently, here some hints:

- in /etc/pulse/client.conf, you can set autospawn = no to prevent
pulseaudio from starting again and again.


Alternatively, one can put that into ~/.pulse/client.conf which doesn't
require root


true.
but otoh, putting it into /etc will make it apply to *all* users (which 
might be desired or not)



and does not get overwritten by any future package updates.



if a package update overwrites configuration in /etc/ then it is broken.
at least it should ask.

gfmadr
IOhannes

___
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management - 
http://lists.puredata.info/listinfo/pd-list