Is there a way to control the JACK Output volume via terminal or get a PulseAudio Input?Bash script to backkup/clone Ubuntu to another partitionHow do I change the way Ubuntu adjusts my volume mixer levels?How can I control the volume of the line-in input + normal output at the same time?Two microphones listed in the input section of Pulseaudio, “Internal microphone” and “Microphone” but the problem is thatLooking the modifications to disable capture for alsa driverBoosting low volume on 16.04No audio output from laptop (or headphone jack) if TV connected via HDMIUbuntu Studio Keyboard Shortcuts Audio Volume

Fivefold division of the whole tone - What does it mean?

CO₂ level is high enough that it reduces cognitive ability. Isn't that a reason to worry?

Is it possible to keep cat litter on balcony during winter (down to -10°C)

How to get the address of a C++ lambda function within itself?

Converting large amount of points to polygons with QGIS

Why did Leia not want to tell Han about Luke being her twin brother?

Printing the bits of an integer using bitfields and union

Why do airports in the UK have so few runways?

Improving the observation skill & making less blunders

Can we rotate symbols in LaTeX? How should we make this diagram?

Fantasy movie with magical cliffs that crush a ship

What would make the internet go away?

Implement the Max-Pooling operation from Convolutional Neural Networks

Do modern jet engines need igniters?

Why are Democrats mostly focused on increasing healthcare spending, rarely mentioning any proposals for decreasing the costs of healthcare services?

How do I find the unknown program enabled during Start-Up?

What is a good way to challenge a Warlock with the Agonizing Blast invocation?

When should we use "Got it?" and "Get it?"

Is it possible to write a short story in 500 words?

Why is it so important for the party to acquire the Tome of Strahd?

I'm being blamed for not responding to an email from a client

Fermat's Last Theorem, mod n

Well-known American figure with Roman numerals

What are these criss-cross patterns close to Cambridge Airport (UK)?



Is there a way to control the JACK Output volume via terminal or get a PulseAudio Input?


Bash script to backkup/clone Ubuntu to another partitionHow do I change the way Ubuntu adjusts my volume mixer levels?How can I control the volume of the line-in input + normal output at the same time?Two microphones listed in the input section of Pulseaudio, “Internal microphone” and “Microphone” but the problem is thatLooking the modifications to disable capture for alsa driverBoosting low volume on 16.04No audio output from laptop (or headphone jack) if TV connected via HDMIUbuntu Studio Keyboard Shortcuts Audio Volume






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









6

















I have a bit of a specific question:



Being a musician, I use Ubuntu for software monitoring and I would like to control my output master volume with my mouse wheel.



For this purpose, I currently use EasyStroke with the commands amixer -D pulse sset Master 5%+ (Mouse wheel up) and amixer -D pulse sset Master 5%- (Mouse wheel down), which works fine.



The problem is that I use some programs that have a direct JACK output, such as Reaper, my DAW, and also some media players.



As long as the software uses the PulseAudio JACK Sink output, I can control the output volume via mouse wheel, but when the software does not use PulseAudio, it is directly connected to JACK and always at max volume.



If you refer to the screenshot: I am able to manipulate the master volume of the red-marked output (PulseAudio JACK Sink), but I actually need to access the one marked green to control all sound (system out).



Unfortunately, I can not control my ALSA master volume via amixer -q sset Master X, because ALSA does not offer any controls for my only USB sound card.



Is there any way to control the JACK Output volume via terminal that I could replace my mouse button commands with?



Or alternatively, is there a way to add a PulseAudio input module to the right side of the JACK connections to connect Reaper and all other JACK software and route them through the PulseAudio JACK Sink?
(PulseAudio JACK Source is only used for microphones and won't play back the input.)



enter image description here










share|improve this question


























  • As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

    – mook765
    Jul 16 at 13:47











  • Just to clarify, you want pulse audio and jack to play nice with each other, right?

    – BJsgoodlife
    Jul 19 at 7:59












  • @mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

    – Prototype700
    Jul 20 at 11:45











  • @BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

    – Prototype700
    Jul 20 at 11:47






  • 1





    I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

    – mook765
    Jul 21 at 4:16

















6

















I have a bit of a specific question:



Being a musician, I use Ubuntu for software monitoring and I would like to control my output master volume with my mouse wheel.



For this purpose, I currently use EasyStroke with the commands amixer -D pulse sset Master 5%+ (Mouse wheel up) and amixer -D pulse sset Master 5%- (Mouse wheel down), which works fine.



The problem is that I use some programs that have a direct JACK output, such as Reaper, my DAW, and also some media players.



As long as the software uses the PulseAudio JACK Sink output, I can control the output volume via mouse wheel, but when the software does not use PulseAudio, it is directly connected to JACK and always at max volume.



If you refer to the screenshot: I am able to manipulate the master volume of the red-marked output (PulseAudio JACK Sink), but I actually need to access the one marked green to control all sound (system out).



Unfortunately, I can not control my ALSA master volume via amixer -q sset Master X, because ALSA does not offer any controls for my only USB sound card.



Is there any way to control the JACK Output volume via terminal that I could replace my mouse button commands with?



Or alternatively, is there a way to add a PulseAudio input module to the right side of the JACK connections to connect Reaper and all other JACK software and route them through the PulseAudio JACK Sink?
(PulseAudio JACK Source is only used for microphones and won't play back the input.)



enter image description here










share|improve this question


























  • As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

    – mook765
    Jul 16 at 13:47











  • Just to clarify, you want pulse audio and jack to play nice with each other, right?

    – BJsgoodlife
    Jul 19 at 7:59












  • @mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

    – Prototype700
    Jul 20 at 11:45











  • @BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

    – Prototype700
    Jul 20 at 11:47






  • 1





    I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

    – mook765
    Jul 21 at 4:16













6












6








6








I have a bit of a specific question:



Being a musician, I use Ubuntu for software monitoring and I would like to control my output master volume with my mouse wheel.



For this purpose, I currently use EasyStroke with the commands amixer -D pulse sset Master 5%+ (Mouse wheel up) and amixer -D pulse sset Master 5%- (Mouse wheel down), which works fine.



The problem is that I use some programs that have a direct JACK output, such as Reaper, my DAW, and also some media players.



As long as the software uses the PulseAudio JACK Sink output, I can control the output volume via mouse wheel, but when the software does not use PulseAudio, it is directly connected to JACK and always at max volume.



If you refer to the screenshot: I am able to manipulate the master volume of the red-marked output (PulseAudio JACK Sink), but I actually need to access the one marked green to control all sound (system out).



Unfortunately, I can not control my ALSA master volume via amixer -q sset Master X, because ALSA does not offer any controls for my only USB sound card.



Is there any way to control the JACK Output volume via terminal that I could replace my mouse button commands with?



Or alternatively, is there a way to add a PulseAudio input module to the right side of the JACK connections to connect Reaper and all other JACK software and route them through the PulseAudio JACK Sink?
(PulseAudio JACK Source is only used for microphones and won't play back the input.)



enter image description here










share|improve this question















I have a bit of a specific question:



Being a musician, I use Ubuntu for software monitoring and I would like to control my output master volume with my mouse wheel.



For this purpose, I currently use EasyStroke with the commands amixer -D pulse sset Master 5%+ (Mouse wheel up) and amixer -D pulse sset Master 5%- (Mouse wheel down), which works fine.



The problem is that I use some programs that have a direct JACK output, such as Reaper, my DAW, and also some media players.



As long as the software uses the PulseAudio JACK Sink output, I can control the output volume via mouse wheel, but when the software does not use PulseAudio, it is directly connected to JACK and always at max volume.



If you refer to the screenshot: I am able to manipulate the master volume of the red-marked output (PulseAudio JACK Sink), but I actually need to access the one marked green to control all sound (system out).



Unfortunately, I can not control my ALSA master volume via amixer -q sset Master X, because ALSA does not offer any controls for my only USB sound card.



Is there any way to control the JACK Output volume via terminal that I could replace my mouse button commands with?



Or alternatively, is there a way to add a PulseAudio input module to the right side of the JACK connections to connect Reaper and all other JACK software and route them through the PulseAudio JACK Sink?
(PulseAudio JACK Source is only used for microphones and won't play back the input.)



enter image description here







sound pulseaudio alsa volume-control jack






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked Jul 16 at 12:07









Prototype700Prototype700

4224 gold badges12 silver badges36 bronze badges




4224 gold badges12 silver badges36 bronze badges















  • As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

    – mook765
    Jul 16 at 13:47











  • Just to clarify, you want pulse audio and jack to play nice with each other, right?

    – BJsgoodlife
    Jul 19 at 7:59












  • @mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

    – Prototype700
    Jul 20 at 11:45











  • @BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

    – Prototype700
    Jul 20 at 11:47






  • 1





    I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

    – mook765
    Jul 21 at 4:16

















  • As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

    – mook765
    Jul 16 at 13:47











  • Just to clarify, you want pulse audio and jack to play nice with each other, right?

    – BJsgoodlife
    Jul 19 at 7:59












  • @mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

    – Prototype700
    Jul 20 at 11:45











  • @BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

    – Prototype700
    Jul 20 at 11:47






  • 1





    I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

    – mook765
    Jul 21 at 4:16
















As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

– mook765
Jul 16 at 13:47





As far as I understand jack doesn't perform any signal processing, it only manages connections, so there is no existing command out of the box which would do what you want. But you may check github.com/voidseg/jack-volume , it looks at this might be a solution. I haven't tried it though, but it looks promising.

– mook765
Jul 16 at 13:47













Just to clarify, you want pulse audio and jack to play nice with each other, right?

– BJsgoodlife
Jul 19 at 7:59






Just to clarify, you want pulse audio and jack to play nice with each other, right?

– BJsgoodlife
Jul 19 at 7:59














@mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

– Prototype700
Jul 20 at 11:45





@mook765 I'm a little reluctant to build & install two old repositories on my production machine at the moment, especially since the libOSC it's based on removed all binaries and build files for some reason. Thank you for the suggestion, but I'll see if somebody has a more "native" solution first.

– Prototype700
Jul 20 at 11:45













@BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

– Prototype700
Jul 20 at 11:47





@BJsgoodlife I'm not sure what that implies? Is there something unclear about the problem?

– Prototype700
Jul 20 at 11:47




1




1





I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

– mook765
Jul 21 at 4:16





I found this and follwed the instructions. I was able to create a control which appeared in alsamixer, but I couldn't get it to override the "Master" control and gave up. But I don't have a sound-card like the one you use, so maybe you are successful with that, take a look and try.

– mook765
Jul 21 at 4:16










3 Answers
3






active

oldest

votes


















1







+100











Based on this example
we can solve the problem.



If your sound card can't control the volume on the hardware side or the driver
doesn't support this feature of your sound card, a possible workaround is to
define a new virtual pcm device in the ~/.asoundrc file, which controls the volume
on the software side.



First we need to know the name of our soundcard, thus



 aplay -L


is the helpful command here. The actual card name will be displayed after CARD= and the device name (number) after DEV=.



We can test the device with



speaker-test -D <card name> -c <channel count> -twav


Now we create a new softvol device by adding



pcm.softvol 
type softvol
slave
pcm "<card name>,<device name>"

control
name "<control name>"
card "<card name>"




to ~/.asoundrc. (If the file doesn't exist, we have to create the file)



In this case should be Master, please see additional information on control names in the link above.



Now we test the new device with



speaker-test -D softvol -c <channel count> -twav


Open alsamixer, you should see the new control Master now and should be able to change
the volume using alsamixer.



It may be necessary to additionally set the device as default in /etc/asound.conf with:



pcm.!default 
type hw
card <card name>

ctl.!default
type hw
card <card name>



Note that this is different from the suggestion in the link above, but that's what OP reported to work.



Now we need to set Jack interface device to softvol and can use e.g.



amixer -q sset Master 5%+
amixer -q sset Master 5%-
amixer -q sset Master 50%


to increase or decrease the output volume by 5% respectively or set to 50%, fixed.



Since amixer needs to "open" the device first before the Master volume commands are accessible, add aplay -D softvol ~/softvol-wakeup.wav & to your JACK pre-start script (the WAV-file can be a second of silence).






share|improve this answer




























  • Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

    – Prototype700
    Jul 23 at 19:14











  • @Prototype700 That's beautiful!

    – mook765
    Jul 23 at 19:27


















2


















Update July 21, 2019



From a professional music website for Linux:



  • Jack Master Volume?


Sorry for posting non-ardour question but I need your guidance. When
Jack takes control over audio, many apps, including flashplayer, act
very loud i.e in VLC I have volume set to 5%. I would like to control
the master volume like in alsamixer instead of setting levels for each
app individually. How can I do that?




There are two answers posted and this one is the most helpful:




there is no such concept. JACK is designed for pro-audio and music
creation workflows. Its not a desktop sound server, even though some
of use it in that way. If you need such a thing, you will need to
route all your JACK clients via a mixing client which could be
something as simply as JackMix or as complex as Ardour. JACK itself
does not provide this facility, and its totally out of the scope of
its design.




The simplest solution then is to install JackMix:



"Ever struggled with a number of jack applications on your desktop everyone using its own master volume-fader but not one common place for all the volumes directly accessible?"



"The solution to your problem is JackMix, a mixer app for jack that looks exactly like the mixer you would use if you had to connect your analog equipment."



There are other applications for Jack which you can find listed here.




Original answer



I must confess to be musically-challenged but I think this script is where you are heading:




You can get a list of all sinks with pacmd list-sinks, and set the
volume with
pacmd set-sink-volume`, so you need to do something like



VOLUME='+5%'
for SINK in `pacmd list-sinks | grep 'index:' | cut -b12-`
do
pacmd set-sink-volume $SINK $VOLUME
done


where $VOLUME can be absolute (150%) or relative (+5%, -5%), and
possibly other formats, too.



Most window managers can be configured to launch scripts or programs,
complete with arguments, when you press keys. That's the best method,
but if your WM doesn't, there are tools like xbindkeys. So you can
customize in any way you want.



Note that Pulseaudio will start using hardware mixers if the sink
volume goes over 100%, and that can distort the sound.



Also note that Pulseaudio allows to set the volume for each
application ("audio stream") with pamcd set-sink-input-volume. You can
list them with pacmd list-sink-inputs and set them in a similar way.



That allows you have the sink volumes at a fixed level so they are
about equal, without using hardware mixers, and when you switch sinks,
it will automatically have the "right" volume. That's the setup I
prefer.







share|improve this answer




























  • And how does this control the output volume of jackd? That's the problem in this case.

    – mook765
    Jul 21 at 4:08











  • @mook765 Thanks for pointing that out. I've revised the answer.

    – WinEunuuchs2Unix
    Jul 21 at 15:55











  • @WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

    – Prototype700
    Jul 22 at 11:03











  • Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

    – Prototype700
    Jul 22 at 11:18











  • If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

    – WinEunuuchs2Unix
    Jul 22 at 16:34



















1


















UPDATE 1



Just so I can give a quick explanation before a longer write up.



Even If PCM is not available (not just invisible in amixer) then we can still use PulseAudio to manage JACK because dbus will discover it.



Before anything else make sure you have the kernel modules loaded for your usb sound card with:



sudo modprobe snd-usb-audio



because this might be why your sound card controls are not showing up in amixer. Just to confirm please execute aplay -l and aplay -L and post the output of these two commands.



Next, we start by installing the corresponding pulseaudio packages:



sudo apt-get update && sudo apt-get install pulseaudio-module-jack



and then loading its corresponding module:



pactl load-module module-jack-sink channels=2



and finally setting the default sink to JACK



pacmd set-default-sink jack_out




As far as sudo pactl load-module module-alsa-sink control=PCM, this line enables pulseaudio to create a new sink-source that handles the pulse code modulation volume level at the ALSA API sound card level. OP's sound card has to be capable of converting the digital audio stream to an analog one through pulse modulation, as there is audio coming out of the system and through the speakers.




You should first add a sink that controls the pcm device as an output with:



sudo pactl load-module module-alsa-sink control=PCM



then (just to double-check, see if you see the new output visible through the pavucontrol i.e. pulseaudio volume control GUI)



you can control PCM sink output volume directly with



pactl set-sink-volume [pcm-sink-name likely something along the lines of alsa.default] 50%






share|improve this answer




























  • This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

    – mook765
    Jul 22 at 1:48











  • Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

    – BarBar1234
    Jul 22 at 2:27











  • @BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

    – Prototype700
    Jul 22 at 10:54






  • 1





    I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

    – mook765
    Jul 22 at 12:58












  • Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

    – mook765
    Jul 22 at 13:55













Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158652%2fis-there-a-way-to-control-the-jack-output-volume-via-terminal-or-get-a-pulseaudi%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown


























3 Answers
3






active

oldest

votes








3 Answers
3






active

oldest

votes









active

oldest

votes






active

oldest

votes









1







+100











Based on this example
we can solve the problem.



If your sound card can't control the volume on the hardware side or the driver
doesn't support this feature of your sound card, a possible workaround is to
define a new virtual pcm device in the ~/.asoundrc file, which controls the volume
on the software side.



First we need to know the name of our soundcard, thus



 aplay -L


is the helpful command here. The actual card name will be displayed after CARD= and the device name (number) after DEV=.



We can test the device with



speaker-test -D <card name> -c <channel count> -twav


Now we create a new softvol device by adding



pcm.softvol 
type softvol
slave
pcm "<card name>,<device name>"

control
name "<control name>"
card "<card name>"




to ~/.asoundrc. (If the file doesn't exist, we have to create the file)



In this case should be Master, please see additional information on control names in the link above.



Now we test the new device with



speaker-test -D softvol -c <channel count> -twav


Open alsamixer, you should see the new control Master now and should be able to change
the volume using alsamixer.



It may be necessary to additionally set the device as default in /etc/asound.conf with:



pcm.!default 
type hw
card <card name>

ctl.!default
type hw
card <card name>



Note that this is different from the suggestion in the link above, but that's what OP reported to work.



Now we need to set Jack interface device to softvol and can use e.g.



amixer -q sset Master 5%+
amixer -q sset Master 5%-
amixer -q sset Master 50%


to increase or decrease the output volume by 5% respectively or set to 50%, fixed.



Since amixer needs to "open" the device first before the Master volume commands are accessible, add aplay -D softvol ~/softvol-wakeup.wav & to your JACK pre-start script (the WAV-file can be a second of silence).






share|improve this answer




























  • Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

    – Prototype700
    Jul 23 at 19:14











  • @Prototype700 That's beautiful!

    – mook765
    Jul 23 at 19:27















1







+100











Based on this example
we can solve the problem.



If your sound card can't control the volume on the hardware side or the driver
doesn't support this feature of your sound card, a possible workaround is to
define a new virtual pcm device in the ~/.asoundrc file, which controls the volume
on the software side.



First we need to know the name of our soundcard, thus



 aplay -L


is the helpful command here. The actual card name will be displayed after CARD= and the device name (number) after DEV=.



We can test the device with



speaker-test -D <card name> -c <channel count> -twav


Now we create a new softvol device by adding



pcm.softvol 
type softvol
slave
pcm "<card name>,<device name>"

control
name "<control name>"
card "<card name>"




to ~/.asoundrc. (If the file doesn't exist, we have to create the file)



In this case should be Master, please see additional information on control names in the link above.



Now we test the new device with



speaker-test -D softvol -c <channel count> -twav


Open alsamixer, you should see the new control Master now and should be able to change
the volume using alsamixer.



It may be necessary to additionally set the device as default in /etc/asound.conf with:



pcm.!default 
type hw
card <card name>

ctl.!default
type hw
card <card name>



Note that this is different from the suggestion in the link above, but that's what OP reported to work.



Now we need to set Jack interface device to softvol and can use e.g.



amixer -q sset Master 5%+
amixer -q sset Master 5%-
amixer -q sset Master 50%


to increase or decrease the output volume by 5% respectively or set to 50%, fixed.



Since amixer needs to "open" the device first before the Master volume commands are accessible, add aplay -D softvol ~/softvol-wakeup.wav & to your JACK pre-start script (the WAV-file can be a second of silence).






share|improve this answer




























  • Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

    – Prototype700
    Jul 23 at 19:14











  • @Prototype700 That's beautiful!

    – mook765
    Jul 23 at 19:27













1







+100







1







+100



1






+100





Based on this example
we can solve the problem.



If your sound card can't control the volume on the hardware side or the driver
doesn't support this feature of your sound card, a possible workaround is to
define a new virtual pcm device in the ~/.asoundrc file, which controls the volume
on the software side.



First we need to know the name of our soundcard, thus



 aplay -L


is the helpful command here. The actual card name will be displayed after CARD= and the device name (number) after DEV=.



We can test the device with



speaker-test -D <card name> -c <channel count> -twav


Now we create a new softvol device by adding



pcm.softvol 
type softvol
slave
pcm "<card name>,<device name>"

control
name "<control name>"
card "<card name>"




to ~/.asoundrc. (If the file doesn't exist, we have to create the file)



In this case should be Master, please see additional information on control names in the link above.



Now we test the new device with



speaker-test -D softvol -c <channel count> -twav


Open alsamixer, you should see the new control Master now and should be able to change
the volume using alsamixer.



It may be necessary to additionally set the device as default in /etc/asound.conf with:



pcm.!default 
type hw
card <card name>

ctl.!default
type hw
card <card name>



Note that this is different from the suggestion in the link above, but that's what OP reported to work.



Now we need to set Jack interface device to softvol and can use e.g.



amixer -q sset Master 5%+
amixer -q sset Master 5%-
amixer -q sset Master 50%


to increase or decrease the output volume by 5% respectively or set to 50%, fixed.



Since amixer needs to "open" the device first before the Master volume commands are accessible, add aplay -D softvol ~/softvol-wakeup.wav & to your JACK pre-start script (the WAV-file can be a second of silence).






share|improve this answer
















Based on this example
we can solve the problem.



If your sound card can't control the volume on the hardware side or the driver
doesn't support this feature of your sound card, a possible workaround is to
define a new virtual pcm device in the ~/.asoundrc file, which controls the volume
on the software side.



First we need to know the name of our soundcard, thus



 aplay -L


is the helpful command here. The actual card name will be displayed after CARD= and the device name (number) after DEV=.



We can test the device with



speaker-test -D <card name> -c <channel count> -twav


Now we create a new softvol device by adding



pcm.softvol 
type softvol
slave
pcm "<card name>,<device name>"

control
name "<control name>"
card "<card name>"




to ~/.asoundrc. (If the file doesn't exist, we have to create the file)



In this case should be Master, please see additional information on control names in the link above.



Now we test the new device with



speaker-test -D softvol -c <channel count> -twav


Open alsamixer, you should see the new control Master now and should be able to change
the volume using alsamixer.



It may be necessary to additionally set the device as default in /etc/asound.conf with:



pcm.!default 
type hw
card <card name>

ctl.!default
type hw
card <card name>



Note that this is different from the suggestion in the link above, but that's what OP reported to work.



Now we need to set Jack interface device to softvol and can use e.g.



amixer -q sset Master 5%+
amixer -q sset Master 5%-
amixer -q sset Master 50%


to increase or decrease the output volume by 5% respectively or set to 50%, fixed.



Since amixer needs to "open" the device first before the Master volume commands are accessible, add aplay -D softvol ~/softvol-wakeup.wav & to your JACK pre-start script (the WAV-file can be a second of silence).







share|improve this answer















share|improve this answer




share|improve this answer








edited Jul 23 at 19:20









Prototype700

4224 gold badges12 silver badges36 bronze badges




4224 gold badges12 silver badges36 bronze badges










answered Jul 23 at 14:03









mook765mook765

6,8083 gold badges18 silver badges39 bronze badges




6,8083 gold badges18 silver badges39 bronze badges















  • Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

    – Prototype700
    Jul 23 at 19:14











  • @Prototype700 That's beautiful!

    – mook765
    Jul 23 at 19:27

















  • Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

    – Prototype700
    Jul 23 at 19:14











  • @Prototype700 That's beautiful!

    – mook765
    Jul 23 at 19:27
















Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

– Prototype700
Jul 23 at 19:14





Hi, thank you for your answer. I've submitted some minor edit suggestions, because I couldn't explain myself clearly in the comments (I used ; as a line break, which should not actually be in the code). I've also rewritten the parts from the guide slightly to make it clearer which names must be placed where, because I've spent the most time finding out what exactly the card/device name is and where it needs to go and where it doesn't. I hope you agree with the changes, else feel free to reject or edit them.

– Prototype700
Jul 23 at 19:14













@Prototype700 That's beautiful!

– mook765
Jul 23 at 19:27





@Prototype700 That's beautiful!

– mook765
Jul 23 at 19:27













2


















Update July 21, 2019



From a professional music website for Linux:



  • Jack Master Volume?


Sorry for posting non-ardour question but I need your guidance. When
Jack takes control over audio, many apps, including flashplayer, act
very loud i.e in VLC I have volume set to 5%. I would like to control
the master volume like in alsamixer instead of setting levels for each
app individually. How can I do that?




There are two answers posted and this one is the most helpful:




there is no such concept. JACK is designed for pro-audio and music
creation workflows. Its not a desktop sound server, even though some
of use it in that way. If you need such a thing, you will need to
route all your JACK clients via a mixing client which could be
something as simply as JackMix or as complex as Ardour. JACK itself
does not provide this facility, and its totally out of the scope of
its design.




The simplest solution then is to install JackMix:



"Ever struggled with a number of jack applications on your desktop everyone using its own master volume-fader but not one common place for all the volumes directly accessible?"



"The solution to your problem is JackMix, a mixer app for jack that looks exactly like the mixer you would use if you had to connect your analog equipment."



There are other applications for Jack which you can find listed here.




Original answer



I must confess to be musically-challenged but I think this script is where you are heading:




You can get a list of all sinks with pacmd list-sinks, and set the
volume with
pacmd set-sink-volume`, so you need to do something like



VOLUME='+5%'
for SINK in `pacmd list-sinks | grep 'index:' | cut -b12-`
do
pacmd set-sink-volume $SINK $VOLUME
done


where $VOLUME can be absolute (150%) or relative (+5%, -5%), and
possibly other formats, too.



Most window managers can be configured to launch scripts or programs,
complete with arguments, when you press keys. That's the best method,
but if your WM doesn't, there are tools like xbindkeys. So you can
customize in any way you want.



Note that Pulseaudio will start using hardware mixers if the sink
volume goes over 100%, and that can distort the sound.



Also note that Pulseaudio allows to set the volume for each
application ("audio stream") with pamcd set-sink-input-volume. You can
list them with pacmd list-sink-inputs and set them in a similar way.



That allows you have the sink volumes at a fixed level so they are
about equal, without using hardware mixers, and when you switch sinks,
it will automatically have the "right" volume. That's the setup I
prefer.







share|improve this answer




























  • And how does this control the output volume of jackd? That's the problem in this case.

    – mook765
    Jul 21 at 4:08











  • @mook765 Thanks for pointing that out. I've revised the answer.

    – WinEunuuchs2Unix
    Jul 21 at 15:55











  • @WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

    – Prototype700
    Jul 22 at 11:03











  • Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

    – Prototype700
    Jul 22 at 11:18











  • If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

    – WinEunuuchs2Unix
    Jul 22 at 16:34
















2


















Update July 21, 2019



From a professional music website for Linux:



  • Jack Master Volume?


Sorry for posting non-ardour question but I need your guidance. When
Jack takes control over audio, many apps, including flashplayer, act
very loud i.e in VLC I have volume set to 5%. I would like to control
the master volume like in alsamixer instead of setting levels for each
app individually. How can I do that?




There are two answers posted and this one is the most helpful:




there is no such concept. JACK is designed for pro-audio and music
creation workflows. Its not a desktop sound server, even though some
of use it in that way. If you need such a thing, you will need to
route all your JACK clients via a mixing client which could be
something as simply as JackMix or as complex as Ardour. JACK itself
does not provide this facility, and its totally out of the scope of
its design.




The simplest solution then is to install JackMix:



"Ever struggled with a number of jack applications on your desktop everyone using its own master volume-fader but not one common place for all the volumes directly accessible?"



"The solution to your problem is JackMix, a mixer app for jack that looks exactly like the mixer you would use if you had to connect your analog equipment."



There are other applications for Jack which you can find listed here.




Original answer



I must confess to be musically-challenged but I think this script is where you are heading:




You can get a list of all sinks with pacmd list-sinks, and set the
volume with
pacmd set-sink-volume`, so you need to do something like



VOLUME='+5%'
for SINK in `pacmd list-sinks | grep 'index:' | cut -b12-`
do
pacmd set-sink-volume $SINK $VOLUME
done


where $VOLUME can be absolute (150%) or relative (+5%, -5%), and
possibly other formats, too.



Most window managers can be configured to launch scripts or programs,
complete with arguments, when you press keys. That's the best method,
but if your WM doesn't, there are tools like xbindkeys. So you can
customize in any way you want.



Note that Pulseaudio will start using hardware mixers if the sink
volume goes over 100%, and that can distort the sound.



Also note that Pulseaudio allows to set the volume for each
application ("audio stream") with pamcd set-sink-input-volume. You can
list them with pacmd list-sink-inputs and set them in a similar way.



That allows you have the sink volumes at a fixed level so they are
about equal, without using hardware mixers, and when you switch sinks,
it will automatically have the "right" volume. That's the setup I
prefer.







share|improve this answer




























  • And how does this control the output volume of jackd? That's the problem in this case.

    – mook765
    Jul 21 at 4:08











  • @mook765 Thanks for pointing that out. I've revised the answer.

    – WinEunuuchs2Unix
    Jul 21 at 15:55











  • @WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

    – Prototype700
    Jul 22 at 11:03











  • Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

    – Prototype700
    Jul 22 at 11:18











  • If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

    – WinEunuuchs2Unix
    Jul 22 at 16:34














2














2










2









Update July 21, 2019



From a professional music website for Linux:



  • Jack Master Volume?


Sorry for posting non-ardour question but I need your guidance. When
Jack takes control over audio, many apps, including flashplayer, act
very loud i.e in VLC I have volume set to 5%. I would like to control
the master volume like in alsamixer instead of setting levels for each
app individually. How can I do that?




There are two answers posted and this one is the most helpful:




there is no such concept. JACK is designed for pro-audio and music
creation workflows. Its not a desktop sound server, even though some
of use it in that way. If you need such a thing, you will need to
route all your JACK clients via a mixing client which could be
something as simply as JackMix or as complex as Ardour. JACK itself
does not provide this facility, and its totally out of the scope of
its design.




The simplest solution then is to install JackMix:



"Ever struggled with a number of jack applications on your desktop everyone using its own master volume-fader but not one common place for all the volumes directly accessible?"



"The solution to your problem is JackMix, a mixer app for jack that looks exactly like the mixer you would use if you had to connect your analog equipment."



There are other applications for Jack which you can find listed here.




Original answer



I must confess to be musically-challenged but I think this script is where you are heading:




You can get a list of all sinks with pacmd list-sinks, and set the
volume with
pacmd set-sink-volume`, so you need to do something like



VOLUME='+5%'
for SINK in `pacmd list-sinks | grep 'index:' | cut -b12-`
do
pacmd set-sink-volume $SINK $VOLUME
done


where $VOLUME can be absolute (150%) or relative (+5%, -5%), and
possibly other formats, too.



Most window managers can be configured to launch scripts or programs,
complete with arguments, when you press keys. That's the best method,
but if your WM doesn't, there are tools like xbindkeys. So you can
customize in any way you want.



Note that Pulseaudio will start using hardware mixers if the sink
volume goes over 100%, and that can distort the sound.



Also note that Pulseaudio allows to set the volume for each
application ("audio stream") with pamcd set-sink-input-volume. You can
list them with pacmd list-sink-inputs and set them in a similar way.



That allows you have the sink volumes at a fixed level so they are
about equal, without using hardware mixers, and when you switch sinks,
it will automatically have the "right" volume. That's the setup I
prefer.







share|improve this answer
















Update July 21, 2019



From a professional music website for Linux:



  • Jack Master Volume?


Sorry for posting non-ardour question but I need your guidance. When
Jack takes control over audio, many apps, including flashplayer, act
very loud i.e in VLC I have volume set to 5%. I would like to control
the master volume like in alsamixer instead of setting levels for each
app individually. How can I do that?




There are two answers posted and this one is the most helpful:




there is no such concept. JACK is designed for pro-audio and music
creation workflows. Its not a desktop sound server, even though some
of use it in that way. If you need such a thing, you will need to
route all your JACK clients via a mixing client which could be
something as simply as JackMix or as complex as Ardour. JACK itself
does not provide this facility, and its totally out of the scope of
its design.




The simplest solution then is to install JackMix:



"Ever struggled with a number of jack applications on your desktop everyone using its own master volume-fader but not one common place for all the volumes directly accessible?"



"The solution to your problem is JackMix, a mixer app for jack that looks exactly like the mixer you would use if you had to connect your analog equipment."



There are other applications for Jack which you can find listed here.




Original answer



I must confess to be musically-challenged but I think this script is where you are heading:




You can get a list of all sinks with pacmd list-sinks, and set the
volume with
pacmd set-sink-volume`, so you need to do something like



VOLUME='+5%'
for SINK in `pacmd list-sinks | grep 'index:' | cut -b12-`
do
pacmd set-sink-volume $SINK $VOLUME
done


where $VOLUME can be absolute (150%) or relative (+5%, -5%), and
possibly other formats, too.



Most window managers can be configured to launch scripts or programs,
complete with arguments, when you press keys. That's the best method,
but if your WM doesn't, there are tools like xbindkeys. So you can
customize in any way you want.



Note that Pulseaudio will start using hardware mixers if the sink
volume goes over 100%, and that can distort the sound.



Also note that Pulseaudio allows to set the volume for each
application ("audio stream") with pamcd set-sink-input-volume. You can
list them with pacmd list-sink-inputs and set them in a similar way.



That allows you have the sink volumes at a fixed level so they are
about equal, without using hardware mixers, and when you switch sinks,
it will automatically have the "right" volume. That's the setup I
prefer.








share|improve this answer















share|improve this answer




share|improve this answer








edited Jul 21 at 15:54

























answered Jul 20 at 18:18









WinEunuuchs2UnixWinEunuuchs2Unix

60.5k18 gold badges122 silver badges236 bronze badges




60.5k18 gold badges122 silver badges236 bronze badges















  • And how does this control the output volume of jackd? That's the problem in this case.

    – mook765
    Jul 21 at 4:08











  • @mook765 Thanks for pointing that out. I've revised the answer.

    – WinEunuuchs2Unix
    Jul 21 at 15:55











  • @WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

    – Prototype700
    Jul 22 at 11:03











  • Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

    – Prototype700
    Jul 22 at 11:18











  • If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

    – WinEunuuchs2Unix
    Jul 22 at 16:34


















  • And how does this control the output volume of jackd? That's the problem in this case.

    – mook765
    Jul 21 at 4:08











  • @mook765 Thanks for pointing that out. I've revised the answer.

    – WinEunuuchs2Unix
    Jul 21 at 15:55











  • @WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

    – Prototype700
    Jul 22 at 11:03











  • Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

    – Prototype700
    Jul 22 at 11:18











  • If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

    – WinEunuuchs2Unix
    Jul 22 at 16:34

















And how does this control the output volume of jackd? That's the problem in this case.

– mook765
Jul 21 at 4:08





And how does this control the output volume of jackd? That's the problem in this case.

– mook765
Jul 21 at 4:08













@mook765 Thanks for pointing that out. I've revised the answer.

– WinEunuuchs2Unix
Jul 21 at 15:55





@mook765 Thanks for pointing that out. I've revised the answer.

– WinEunuuchs2Unix
Jul 21 at 15:55













@WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

– Prototype700
Jul 22 at 11:03





@WinEunuuchs2Unix Hi, thanks! I'm going to comment on both your answers: First, I tried to change the volume of the "alsa_output" sink (0, in my case), however changing the value does not change the volume at all, unfortunately. I can change the volume of the "jack_out" sink (1), but that only changes the volume of the programs that have a PulseAudio sound output set, which I was able to do previously as well.

– Prototype700
Jul 22 at 11:03













Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

– Prototype700
Jul 22 at 11:18





Regarding your second solution with JackMix: If I understand it correctly, it works as a JACK plugin to route all connections through? This would be fine, however is there a way to control it via bash commands so I can assign hotkeys to the volume controls? I already route all my connections through the Calf EQ plugin, but I can't control it with bash commands. I could change the master volume with the plugin GUI, but I'd have to leave it open at all times and can't do it quickly. Unfortunately, I can't risk breaking my production PC, so I'd have to set up another system first to test JackMix.

– Prototype700
Jul 22 at 11:18













If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

– WinEunuuchs2Unix
Jul 22 at 16:34






If you have the disk space you can clone your current system and have a "test system" on your grub menu where you can safely destroy things and reclone later: askubuntu.com/questions/1028604/… I've searched for JackMix command line interface but came up empty. You could try linuxmusicians.com for more assistance on anything professionally music related.

– WinEunuuchs2Unix
Jul 22 at 16:34












1


















UPDATE 1



Just so I can give a quick explanation before a longer write up.



Even If PCM is not available (not just invisible in amixer) then we can still use PulseAudio to manage JACK because dbus will discover it.



Before anything else make sure you have the kernel modules loaded for your usb sound card with:



sudo modprobe snd-usb-audio



because this might be why your sound card controls are not showing up in amixer. Just to confirm please execute aplay -l and aplay -L and post the output of these two commands.



Next, we start by installing the corresponding pulseaudio packages:



sudo apt-get update && sudo apt-get install pulseaudio-module-jack



and then loading its corresponding module:



pactl load-module module-jack-sink channels=2



and finally setting the default sink to JACK



pacmd set-default-sink jack_out




As far as sudo pactl load-module module-alsa-sink control=PCM, this line enables pulseaudio to create a new sink-source that handles the pulse code modulation volume level at the ALSA API sound card level. OP's sound card has to be capable of converting the digital audio stream to an analog one through pulse modulation, as there is audio coming out of the system and through the speakers.




You should first add a sink that controls the pcm device as an output with:



sudo pactl load-module module-alsa-sink control=PCM



then (just to double-check, see if you see the new output visible through the pavucontrol i.e. pulseaudio volume control GUI)



you can control PCM sink output volume directly with



pactl set-sink-volume [pcm-sink-name likely something along the lines of alsa.default] 50%






share|improve this answer




























  • This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

    – mook765
    Jul 22 at 1:48











  • Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

    – BarBar1234
    Jul 22 at 2:27











  • @BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

    – Prototype700
    Jul 22 at 10:54






  • 1





    I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

    – mook765
    Jul 22 at 12:58












  • Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

    – mook765
    Jul 22 at 13:55
















1


















UPDATE 1



Just so I can give a quick explanation before a longer write up.



Even If PCM is not available (not just invisible in amixer) then we can still use PulseAudio to manage JACK because dbus will discover it.



Before anything else make sure you have the kernel modules loaded for your usb sound card with:



sudo modprobe snd-usb-audio



because this might be why your sound card controls are not showing up in amixer. Just to confirm please execute aplay -l and aplay -L and post the output of these two commands.



Next, we start by installing the corresponding pulseaudio packages:



sudo apt-get update && sudo apt-get install pulseaudio-module-jack



and then loading its corresponding module:



pactl load-module module-jack-sink channels=2



and finally setting the default sink to JACK



pacmd set-default-sink jack_out




As far as sudo pactl load-module module-alsa-sink control=PCM, this line enables pulseaudio to create a new sink-source that handles the pulse code modulation volume level at the ALSA API sound card level. OP's sound card has to be capable of converting the digital audio stream to an analog one through pulse modulation, as there is audio coming out of the system and through the speakers.




You should first add a sink that controls the pcm device as an output with:



sudo pactl load-module module-alsa-sink control=PCM



then (just to double-check, see if you see the new output visible through the pavucontrol i.e. pulseaudio volume control GUI)



you can control PCM sink output volume directly with



pactl set-sink-volume [pcm-sink-name likely something along the lines of alsa.default] 50%






share|improve this answer




























  • This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

    – mook765
    Jul 22 at 1:48











  • Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

    – BarBar1234
    Jul 22 at 2:27











  • @BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

    – Prototype700
    Jul 22 at 10:54






  • 1





    I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

    – mook765
    Jul 22 at 12:58












  • Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

    – mook765
    Jul 22 at 13:55














1














1










1









UPDATE 1



Just so I can give a quick explanation before a longer write up.



Even If PCM is not available (not just invisible in amixer) then we can still use PulseAudio to manage JACK because dbus will discover it.



Before anything else make sure you have the kernel modules loaded for your usb sound card with:



sudo modprobe snd-usb-audio



because this might be why your sound card controls are not showing up in amixer. Just to confirm please execute aplay -l and aplay -L and post the output of these two commands.



Next, we start by installing the corresponding pulseaudio packages:



sudo apt-get update && sudo apt-get install pulseaudio-module-jack



and then loading its corresponding module:



pactl load-module module-jack-sink channels=2



and finally setting the default sink to JACK



pacmd set-default-sink jack_out




As far as sudo pactl load-module module-alsa-sink control=PCM, this line enables pulseaudio to create a new sink-source that handles the pulse code modulation volume level at the ALSA API sound card level. OP's sound card has to be capable of converting the digital audio stream to an analog one through pulse modulation, as there is audio coming out of the system and through the speakers.




You should first add a sink that controls the pcm device as an output with:



sudo pactl load-module module-alsa-sink control=PCM



then (just to double-check, see if you see the new output visible through the pavucontrol i.e. pulseaudio volume control GUI)



you can control PCM sink output volume directly with



pactl set-sink-volume [pcm-sink-name likely something along the lines of alsa.default] 50%






share|improve this answer
















UPDATE 1



Just so I can give a quick explanation before a longer write up.



Even If PCM is not available (not just invisible in amixer) then we can still use PulseAudio to manage JACK because dbus will discover it.



Before anything else make sure you have the kernel modules loaded for your usb sound card with:



sudo modprobe snd-usb-audio



because this might be why your sound card controls are not showing up in amixer. Just to confirm please execute aplay -l and aplay -L and post the output of these two commands.



Next, we start by installing the corresponding pulseaudio packages:



sudo apt-get update && sudo apt-get install pulseaudio-module-jack



and then loading its corresponding module:



pactl load-module module-jack-sink channels=2



and finally setting the default sink to JACK



pacmd set-default-sink jack_out




As far as sudo pactl load-module module-alsa-sink control=PCM, this line enables pulseaudio to create a new sink-source that handles the pulse code modulation volume level at the ALSA API sound card level. OP's sound card has to be capable of converting the digital audio stream to an analog one through pulse modulation, as there is audio coming out of the system and through the speakers.




You should first add a sink that controls the pcm device as an output with:



sudo pactl load-module module-alsa-sink control=PCM



then (just to double-check, see if you see the new output visible through the pavucontrol i.e. pulseaudio volume control GUI)



you can control PCM sink output volume directly with



pactl set-sink-volume [pcm-sink-name likely something along the lines of alsa.default] 50%







share|improve this answer















share|improve this answer




share|improve this answer








edited Jul 22 at 3:40

























answered Jul 21 at 23:27









BarBar1234BarBar1234

5232 silver badges6 bronze badges




5232 silver badges6 bronze badges















  • This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

    – mook765
    Jul 22 at 1:48











  • Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

    – BarBar1234
    Jul 22 at 2:27











  • @BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

    – Prototype700
    Jul 22 at 10:54






  • 1





    I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

    – mook765
    Jul 22 at 12:58












  • Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

    – mook765
    Jul 22 at 13:55


















  • This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

    – mook765
    Jul 22 at 1:48











  • Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

    – BarBar1234
    Jul 22 at 2:27











  • @BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

    – Prototype700
    Jul 22 at 10:54






  • 1





    I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

    – mook765
    Jul 22 at 12:58












  • Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

    – mook765
    Jul 22 at 13:55

















This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

– mook765
Jul 22 at 1:48





This looks quite mystic. The sound card OP uses does not have any controls, so how should that work. And how does this control the output volume of jack? Please elaborate.

– mook765
Jul 22 at 1:48













Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

– BarBar1234
Jul 22 at 2:27





Ok, gfive me a few minutes, and I will try to write up how the whole audio management more or less works in linux and update my answer.

– BarBar1234
Jul 22 at 2:27













@BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

– Prototype700
Jul 22 at 10:54





@BarBar1234 Thank you for your answer. The snd-usb-audio module is loaded and aplay does show my sound card "card 1: Track [Fast Track], device 0: USB Audio [USB Audio]". However, alsamixer does not have any controls, as seen in the screenshot. I was hoping I could route my JACK connections into the ALSA Sink module you suggested, but when I try to add it via 'sudo pactl load-module module-alsa-sink', I just get the output 'Failure: Module initialisation failed' and no module is added, the package is installed, however. Any idea why that could be the case? There is no other info...

– Prototype700
Jul 22 at 10:54




1




1





I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

– mook765
Jul 22 at 12:58






I tried that too, sometimes pactl load-module module-alsa-sink control=PCM doesn't work, sometimes it does. If prepended with sudo I get error no home directory. pactl shouldn't need sudo in normal configuration as pulseaudio runs in user space.

– mook765
Jul 22 at 12:58














Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

– mook765
Jul 22 at 13:55






Ah, I see, pactl load-module module-alsa-sink control=PCM fails if jack is running and works when jack is stopped.

– mook765
Jul 22 at 13:55



















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158652%2fis-there-a-way-to-control-the-jack-output-volume-via-terminal-or-get-a-pulseaudi%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown









Popular posts from this blog

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?