Re: [pulseaudio-discuss] How to control the right and left channel for a specific application using CLI ?

2020-11-04 Thread 01ivier

Le 2020-11-04 18:28, Tanu Kaskinen a écrit :

On Wed, 2020-11-04 at 14:56 +0100, 01iv...@labomedia.org wrote:

Le 2020-11-04 01:17, Arun Raghavan a écrit :
> On Tue, 3 Nov 2020, at 7:09 PM, 01iv...@labomedia.org wrote:
> > Le 2020-11-03 23:49, Arun Raghavan a écrit :
> > > On Tue, 3 Nov 2020, at 5:28 PM, 01iv...@labomedia.org wrote:
> > > > Hello again,
> > > >
> > > > I want to know if there is a way, still in command line, to control
> > > > the
> > > > right and left volumes of an application.
> > > > With Pulseaudio Volume Control, you can click on the lock icon related
> > > > to a launched application, and two sliders appear to do so.
> > > > Is it possible in CLI ?
> > > >
> > > > My goal is to run two applications on the same card, but to assign
> > > > right
> > > > channel for one and left for the other.
> > > >
> > > > Possible complication : the output of my application is in mono and
> > > > with
> > > > Pulseaudio Volume Control I don't get the two sliders if I click on
> > > > the
> > > > lock icon.
> > >
> > > You can use pactl to do this:
> > >
> > >   pactl set-sink-input  
> > >  ...
> > >
> > > You can look up the sink input index and channel map for channel order
> > > with:
> > >
> > >   pactl list sink-inputs
> > >
> > > -- Arun
> >
> > Hello Arun and thanks for the quick answer.
> >
> > It's exactly the command I was looking for.
> > Unfortunately, as I thought, it doesn't work in my case because my
> > output is in mono.
> > Here's what I get:
> > Failed to set volume: You tried to set volumes for 2 channels, whereas
> > channel(s) supported = 1
> >
> > I can't change the output of the software.
> > Is there possibly a way to create a virtual stereo output from the
> > mono
>
> Yup, check out module-remap-sink:
> 
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-remap-sink
>
> -- Arun

Thank you,

Your answer is good... I just asked the wrong question... Sorry...

What could help me, in my case, is to remap the mono sink-input (the
ouput of my application) into a stereo one, so that I could control 
the

volume of each channel with set-sink-input.
Maybe I missed something but module-remap-sink doesn't like to do it.

I tried to use module-remap-source but "Name or index of the master
source" seems to concern sink listed with "pacmd list-sinks" not 
"pactl

list sink-inputs".

Is there a solution to get a stereo sink-input from a mono one ?


There's no way to change the channel map of a sink input. It sounds
like you could load one remap-sink for the left channel and one remap-
sink for the right channel, and point the application to the
appropriate remap-sink.


A BIG THANK YOU !
It perfectly works !

I'm going to try in few days with many more sound cards but is there a 
known limit to the number of sink which can be create this way ?

Is 40 something completely crazy to think about ?

Thanks again for your helps.

°1ivier





___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] How to control the right and left channel for a specific application using CLI ?

2020-11-04 Thread 01ivier

Le 2020-11-04 01:17, Arun Raghavan a écrit :

On Tue, 3 Nov 2020, at 7:09 PM, 01iv...@labomedia.org wrote:

Le 2020-11-03 23:49, Arun Raghavan a écrit :
> On Tue, 3 Nov 2020, at 5:28 PM, 01iv...@labomedia.org wrote:
>> Hello again,
>>
>> I want to know if there is a way, still in command line, to control
>> the
>> right and left volumes of an application.
>> With Pulseaudio Volume Control, you can click on the lock icon related
>> to a launched application, and two sliders appear to do so.
>> Is it possible in CLI ?
>>
>> My goal is to run two applications on the same card, but to assign
>> right
>> channel for one and left for the other.
>>
>> Possible complication : the output of my application is in mono and
>> with
>> Pulseaudio Volume Control I don't get the two sliders if I click on
>> the
>> lock icon.
>
> You can use pactl to do this:
>
>   pactl set-sink-input  
>  ...
>
> You can look up the sink input index and channel map for channel order
> with:
>
>   pactl list sink-inputs
>
> -- Arun

Hello Arun and thanks for the quick answer.

It's exactly the command I was looking for.
Unfortunately, as I thought, it doesn't work in my case because my
output is in mono.
Here's what I get:
Failed to set volume: You tried to set volumes for 2 channels, whereas
channel(s) supported = 1

I can't change the output of the software.
Is there possibly a way to create a virtual stereo output from the 
mono


Yup, check out module-remap-sink:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#module-remap-sink

-- Arun


Thank you,

Your answer is good... I just asked the wrong question... Sorry...

What could help me, in my case, is to remap the mono sink-input (the 
ouput of my application) into a stereo one, so that I could control the 
volume of each channel with set-sink-input.

Maybe I missed something but module-remap-sink doesn't like to do it.

I tried to use module-remap-source but "Name or index of the master 
source" seems to concern sink listed with "pacmd list-sinks" not "pactl 
list sink-inputs".


Is there a solution to get a stereo sink-input from a mono one ?

Thank you.

°1ivier
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] How to control the right and left channel for a specific application using CLI ?

2020-11-03 Thread 01ivier

Le 2020-11-03 23:49, Arun Raghavan a écrit :

On Tue, 3 Nov 2020, at 5:28 PM, 01iv...@labomedia.org wrote:

Hello again,

I want to know if there is a way, still in command line, to control 
the

right and left volumes of an application.
With Pulseaudio Volume Control, you can click on the lock icon related
to a launched application, and two sliders appear to do so.
Is it possible in CLI ?

My goal is to run two applications on the same card, but to assign 
right

channel for one and left for the other.

Possible complication : the output of my application is in mono and 
with
Pulseaudio Volume Control I don't get the two sliders if I click on 
the

lock icon.


You can use pactl to do this:

  pactl set-sink-input  
 ...

You can look up the sink input index and channel map for channel order 
with:


  pactl list sink-inputs

-- Arun


Hello Arun and thanks for the quick answer.

It's exactly the command I was looking for.
Unfortunately, as I thought, it doesn't work in my case because my 
output is in mono.

Here's what I get:
Failed to set volume: You tried to set volumes for 2 channels, whereas 
channel(s) supported = 1


I can't change the output of the software.
Is there possibly a way to create a virtual stereo output from the mono 
?


Thank you.

°1ivier



___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] How to control the right and left channel for a specific application using CLI ?

2020-11-03 Thread 01ivier

Hello again,

I want to know if there is a way, still in command line, to control the 
right and left volumes of an application.
With Pulseaudio Volume Control, you can click on the lock icon related 
to a launched application, and two sliders appear to do so.

Is it possible in CLI ?

My goal is to run two applications on the same card, but to assign right 
channel for one and left for the other.


Possible complication : the output of my application is in mono and with 
Pulseaudio Volume Control I don't get the two sliders if I click on the 
lock icon.


Thank you.


°1ivier
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] How to choose the sound card for an application using CLI ?

2020-11-03 Thread 01ivier

It works !

For the record, it works too with the index value gived with :
pacmd list-sinks | egrep 'index|name:'

I prefer this way because, as I've got multiple times the same card, the 
name (which depends on how many card I've got) could change if I remove 
one of them. The index is fixed in that case.


Thanks a lot.

°1ivier


Le 2020-11-03 10:39, Tanu Kaskinen a écrit :

On Tue, 2020-11-03 at 02:25 +0100, 01iv...@labomedia.org wrote:

Hello,

I want to run applications with specifics sound cards in command line 
on

Ubuntu 20.04.
I know it is graphically possible with Pulseaudio Volume Control which
let me choose the card in a menu after the application is launched.
But I want to use command lines so that I can automatize the process 
in

a bash file (I've got ten sound cards and more to come).

I've tried "pactl set-default-sink" but it changes the card for all 
the

applications.
I've looked in "man pulse-cli-syntax" but I didn't find what I'm 
looking

for.

I've also tried to use environment variables such as ALSA_CARD= and
ALSA_PCM_CARD= without success.

Is there a way to do what I want ?


Maybe the PULSE_SINK environment variable will do the trick. The
variable value is a sink name (to get a list of names, run "pactl list
sinks | grep Name").

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] How to choose the sound card for an application using CLI ?

2020-11-02 Thread 01ivier

Hello,

I want to run applications with specifics sound cards in command line on 
Ubuntu 20.04.
I know it is graphically possible with Pulseaudio Volume Control which 
let me choose the card in a menu after the application is launched.
But I want to use command lines so that I can automatize the process in 
a bash file (I've got ten sound cards and more to come).


I've tried "pactl set-default-sink" but it changes the card for all the 
applications.
I've looked in "man pulse-cli-syntax" but I didn't find what I'm looking 
for.


I've also tried to use environment variables such as ALSA_CARD= and 
ALSA_PCM_CARD= without success.


Is there a way to do what I want ?

Thank you.


°1ivier
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss