Spack is a package manager for supercomputers, Linux, & macOS. It makes installing scientific software easy.
https://spack.io/
https://redd.it/co7quh
@r_linux
https://spack.io/
https://redd.it/co7quh
@r_linux
reddit
r/linux - Spack is a package manager for supercomputers, Linux, & macOS. It makes installing scientific software easy.
0 votes and 1 comment so far on Reddit
As a result of Manjaro partnership SoftMaker adds save to DOC, XLS, PPT, ODT feature to FreeOffice
https://twitter.com/softmaker_com/status/1157672676615499776
https://redd.it/co0xg7
@r_linux
https://twitter.com/softmaker_com/status/1157672676615499776
https://redd.it/co0xg7
@r_linux
Twitter
SoftMaker
@Clipsey5 @popey (and 3 others) We have already agreed to add these features (save to DOC, XLS, PPT, ODT) to FreeOffice.
Since Linux Journal is closing down I made a FTP server with the entirety of the site downloaded for archiving sake.
Hey everyone! With the news the Linux Journal is closing and the site going away soon I downloaded the entire website and put it onto a FTP server so we still have access to it and won’t lose a ton of cool Linux history or info.
Videos and podcasts still work since they were not hosted on the site. Also it’s not sorted or anything but I’m working on that in my spare time and will have a table of contents-esque thing in place to help navigate through it. However, if you connect to it through mobile, tried this on Safari mind you, and open an HTML file it’ll act as if you’re on the site and let you interact with it as if it is one. If there’s any issues let me know! Here’s an easy link to it: [Linux Journal Archive](ftp://safetypanda.net) if that goofs up try ftp://45.79.14.179 Enjoy!
https://redd.it/co9kks
@r_linux
Hey everyone! With the news the Linux Journal is closing and the site going away soon I downloaded the entire website and put it onto a FTP server so we still have access to it and won’t lose a ton of cool Linux history or info.
Videos and podcasts still work since they were not hosted on the site. Also it’s not sorted or anything but I’m working on that in my spare time and will have a table of contents-esque thing in place to help navigate through it. However, if you connect to it through mobile, tried this on Safari mind you, and open an HTML file it’ll act as if you’re on the site and let you interact with it as if it is one. If there’s any issues let me know! Here’s an easy link to it: [Linux Journal Archive](ftp://safetypanda.net) if that goofs up try ftp://45.79.14.179 Enjoy!
https://redd.it/co9kks
@r_linux
reddit
r/linux - Since Linux Journal is closing down I made a FTP server with the entirety of the site downloaded for archiving sake.
0 votes and 0 comments so far on Reddit
KDE Plasma used in Gemini Man (Will Smith film)
https://youtu.be/k5y4kxhZIBA?t=166
https://redd.it/coajrf
@r_linux
https://youtu.be/k5y4kxhZIBA?t=166
https://redd.it/coajrf
@r_linux
YouTube
How They Made Me Look 23 in Gemini Man
During a special screening of Gemini Man for influencers, Will gets into the details of how director Ang Lee and WETA managed to create a fully digital versi...
Beginner wanting to learn linux
I would love to learn the essentials of linux as I start to learn Python and development in general. I have a few questions and would love some advice.
Any recommendations on tutorials?
Are there projects that can be done to learn everything you need?
I plan on wiping my computer of windows and installing linux (Ubuntu) just so I can use command line as much as possible, but still use GUI from time to time.
https://redd.it/cob05m
@r_linux
I would love to learn the essentials of linux as I start to learn Python and development in general. I have a few questions and would love some advice.
Any recommendations on tutorials?
Are there projects that can be done to learn everything you need?
I plan on wiping my computer of windows and installing linux (Ubuntu) just so I can use command line as much as possible, but still use GUI from time to time.
https://redd.it/cob05m
@r_linux
reddit
r/linux - Beginner wanting to learn linux
0 votes and 5 comments so far on Reddit
What does /r/linux think of new PolyForm licenses?
https://polyformproject.org/2019/07/09/version-1/
https://redd.it/coazye
@r_linux
https://polyformproject.org/2019/07/09/version-1/
https://redd.it/coazye
@r_linux
reddit
r/linux - What does /r/linux think of new PolyForm licenses?
0 votes and 4 comments so far on Reddit
This professional bass player in one of Davie504's recent videos uses Linux and GNOME.
https://youtu.be/U6Og9wtO9jE?t=644
https://redd.it/coa8ft
@r_linux
https://youtu.be/U6Og9wtO9jE?t=644
https://redd.it/coa8ft
@r_linux
YouTube
I Paid Bassists to Play an IMPOSSIBLE Bassline...
I went on Fiverr again and paid random bass players to play an impossible bass line that I created just for this video... Will they manage to play it? Let's ...
Linux cnc
Hello everyone. I have some doubts about linux and cnc. I’m currently using a windows pc with mach3 but im a long term linux user and i don’t really like windows (only using it on my cnc machine and for gaming). Even tho I use linux on a daily basis I have no idea about linux and cnc. I know about linux cnc (the foss) and astroprint, etc, but i dont really know how it all behaves.
I want to know if there’s any linux based OS specifically for cnc and if it’s actually good. I also want to know if there’s a better alternative to linux CNC that works like mach3.
Also my machine uses a parallel port for communication. Just in case this info helps with anything. I’ll do my own investigation as well of course but I just wanted to ask you guys if you know more about it and your opinions on these kind of things.
Thank you all in advance.
https://redd.it/co4knu
@r_linux
Hello everyone. I have some doubts about linux and cnc. I’m currently using a windows pc with mach3 but im a long term linux user and i don’t really like windows (only using it on my cnc machine and for gaming). Even tho I use linux on a daily basis I have no idea about linux and cnc. I know about linux cnc (the foss) and astroprint, etc, but i dont really know how it all behaves.
I want to know if there’s any linux based OS specifically for cnc and if it’s actually good. I also want to know if there’s a better alternative to linux CNC that works like mach3.
Also my machine uses a parallel port for communication. Just in case this info helps with anything. I’ll do my own investigation as well of course but I just wanted to ask you guys if you know more about it and your opinions on these kind of things.
Thank you all in advance.
https://redd.it/co4knu
@r_linux
reddit
r/linux - Linux cnc
0 votes and 3 comments so far on Reddit
Okay so, I was thinking of switching over to linux for my next computer and I would like some advice from people who know Linux inside and out
Little backstory, about 3 years ago I got my first true taste of Linux, it was on some type of Macbook (the older plastic ones) and it actually ran almost as fast as my computer some how (at least when it came to watching Youtube) and ever sense then I've wanted to try Linux again, now lets get into the questions.
What is the best version of Linux for software (I've heard good things about Ubuntu)
What's the best program for windows compatibility?
What are some reasons that I should upgrade (like, how much better is Linux from windows?)
And one last question, what are some downsides from Linux to windows?
(I didn't know what the proper flair would be for a question so I labeled it as hardware)
https://redd.it/coe6ib
@r_linux
Little backstory, about 3 years ago I got my first true taste of Linux, it was on some type of Macbook (the older plastic ones) and it actually ran almost as fast as my computer some how (at least when it came to watching Youtube) and ever sense then I've wanted to try Linux again, now lets get into the questions.
What is the best version of Linux for software (I've heard good things about Ubuntu)
What's the best program for windows compatibility?
What are some reasons that I should upgrade (like, how much better is Linux from windows?)
And one last question, what are some downsides from Linux to windows?
(I didn't know what the proper flair would be for a question so I labeled it as hardware)
https://redd.it/coe6ib
@r_linux
reddit
r/linux - Okay so, I was thinking of switching over to linux for my next computer and I would like some advice from people who…
0 votes and 10 comments so far on Reddit
Something very odd and funny I found while reading an amazon book review.
>9) Huawei, which in 2016 was responsible for the creation of 17% of the standard distribution of the Linux operating system kernel, has taken over much of the 5G wireless networking systems; Huawei, is well known by Chinese in China, to be a part of the Chinese military, no matter what the public image is to the outer world, non-中国 world. Given those facts, it is possible the Chinese military already has control over most of the computers and phones utilizing Linux and Android operating systems. (Perhaps that is why Google is working with the Chinese military? Most of Google's computers are based on Linux, as well as all Android phones)
https://www.amazon.com/End-Era-Authoritarian-Revival-Undermining/dp/0190672080
https://redd.it/co6xgj
@r_linux
>9) Huawei, which in 2016 was responsible for the creation of 17% of the standard distribution of the Linux operating system kernel, has taken over much of the 5G wireless networking systems; Huawei, is well known by Chinese in China, to be a part of the Chinese military, no matter what the public image is to the outer world, non-中国 world. Given those facts, it is possible the Chinese military already has control over most of the computers and phones utilizing Linux and Android operating systems. (Perhaps that is why Google is working with the Chinese military? Most of Google's computers are based on Linux, as well as all Android phones)
https://www.amazon.com/End-Era-Authoritarian-Revival-Undermining/dp/0190672080
https://redd.it/co6xgj
@r_linux
reddit
r/linux - Something very odd and funny I found while reading an amazon book review.
0 votes and 6 comments so far on Reddit
Your Best Linux Desktop Environment?
[Poll] Lets have a opinion of our beloved linux users. Which desktop environment you like and why ?
https://redd.it/co77ao
@r_linux
[Poll] Lets have a opinion of our beloved linux users. Which desktop environment you like and why ?
https://redd.it/co77ao
@r_linux
reddit
r/linux - Your Best Linux Desktop Environment?
0 votes and 42 comments so far on Reddit
Video call software with screen sharing support
What do you recommend? I have the following requirements:
1. low usage of system resources
2. must work good on DSL (<20 Mbps down, <2 Mbps up)
3. not an enterprise solution, must be usable by two people
4. free of charge
5. self hosting would be nice, but this isn't a requirement
Tried Skype, Discord, Viber. Skype and Discord don't satisfy requirements #1 and #2, Viber constantly drops connection.
https://redd.it/cog5ge
@r_linux
What do you recommend? I have the following requirements:
1. low usage of system resources
2. must work good on DSL (<20 Mbps down, <2 Mbps up)
3. not an enterprise solution, must be usable by two people
4. free of charge
5. self hosting would be nice, but this isn't a requirement
Tried Skype, Discord, Viber. Skype and Discord don't satisfy requirements #1 and #2, Viber constantly drops connection.
https://redd.it/cog5ge
@r_linux
reddit
r/linux - Video call software with screen sharing support
0 votes and 4 comments so far on Reddit
Face it, Arch is easy to install
This is not sarcastic at all, if you can read the wiki, you can install Arch. Gentoo is more complicated than Arch.
I mean Gentoo isn't difficult as well, read the wiki, follow the steps and you installed it! But yet with Gentoo, there are many steps you have to customize to fit your PC / Hardware. If you want to have some difficulty, build your own Gentoo or any other distro with LFS (Linux from Scratch). Also, stop being so fucking close-minded. Look at Void Linux, it's fucking amazing! and XBPS is crazy fast. Slackware is still extremely stable yet *somewhat* outdated ( a worthy trade-off for some). Don't be close-minded when it comes to distros. Of course, someone will love Gentoo for customization and doesn't care for compile times, but some will hate Gentoo cause of compiling time and doesn't care about customization. Give other Distros a try!
​
Also, I had no idea which flair to put. Nothing seems to fit my post.
https://redd.it/co7tx2
@r_linux
This is not sarcastic at all, if you can read the wiki, you can install Arch. Gentoo is more complicated than Arch.
I mean Gentoo isn't difficult as well, read the wiki, follow the steps and you installed it! But yet with Gentoo, there are many steps you have to customize to fit your PC / Hardware. If you want to have some difficulty, build your own Gentoo or any other distro with LFS (Linux from Scratch). Also, stop being so fucking close-minded. Look at Void Linux, it's fucking amazing! and XBPS is crazy fast. Slackware is still extremely stable yet *somewhat* outdated ( a worthy trade-off for some). Don't be close-minded when it comes to distros. Of course, someone will love Gentoo for customization and doesn't care for compile times, but some will hate Gentoo cause of compiling time and doesn't care about customization. Give other Distros a try!
​
Also, I had no idea which flair to put. Nothing seems to fit my post.
https://redd.it/co7tx2
@r_linux
reddit
r/linux - Face it, Arch is easy to install
0 votes and 34 comments so far on Reddit
Samhain : inotify + GrowingLogFiles
Hello,
I would like to integrate Samhain on my OS (Debian stretch) but I have some troubles doing so.
My setup:
I've configured Samhain with Inotify option so that the kernel triggers Samhain directly when a file/dir is modified. Everything works fine.
Then, I would like to handle logs rotation by using GrowingLogFiles option in samhainrc. Without Inotify option, Samhain does not trigger alerts when logrotate does its jobs even after a full scan (thats the normal behaviour). However, using both of these options (inotify and GrowingLogFiles), when logrotate rotates the log file, Samhain notifies that the log file has been removed (Policy Missing) and then has been created (Policy Added) => false positive
My questions: By design, is it possible to make those two options work together ? If so, how can I change my configuration in order not to get those alerts ?
Best regards,
https://redd.it/cohdog
@r_linux
Hello,
I would like to integrate Samhain on my OS (Debian stretch) but I have some troubles doing so.
My setup:
I've configured Samhain with Inotify option so that the kernel triggers Samhain directly when a file/dir is modified. Everything works fine.
Then, I would like to handle logs rotation by using GrowingLogFiles option in samhainrc. Without Inotify option, Samhain does not trigger alerts when logrotate does its jobs even after a full scan (thats the normal behaviour). However, using both of these options (inotify and GrowingLogFiles), when logrotate rotates the log file, Samhain notifies that the log file has been removed (Policy Missing) and then has been created (Policy Added) => false positive
My questions: By design, is it possible to make those two options work together ? If so, how can I change my configuration in order not to get those alerts ?
Best regards,
https://redd.it/cohdog
@r_linux
reddit
r/linux - Samhain : inotify + GrowingLogFiles
0 votes and 0 comments so far on Reddit
PSA: Router is pronounced Root-er, not Raut-er
Routing is a disorderly retreat, whereas Router comes from the word Route, "to direct along a specified course".
https://redd.it/coh6oz
@r_linux
Routing is a disorderly retreat, whereas Router comes from the word Route, "to direct along a specified course".
https://redd.it/coh6oz
@r_linux
reddit
r/linux - PSA: Router is pronounced Root-er, not Raut-er
0 votes and 8 comments so far on Reddit
A complete guide of and debunking of audio on Linux, ALSA and Pulse
Hey fellow penguins,
A few days ago, an user asked about audio quality on Linux, and whether it is worse or better than audio on Windows. The thread became a mess quickly, full of misconceptions and urban myths about Linux. I figured it would be worthwhile to create a complete guide to Linux audio, as well as dispelling some myths and misconceptions.
To all be on the same page, this is going to be thorough, slowly introducing more concepts.
What is sound? How and what can I hear?
---------------------------------------
You might remember from high school that sound is waves traveling through the air. Vibrations of any kind cause molecules in the air to move. When that wave form finds your ears, it causes little hairs in your ear to move. Different hairs are susceptible to different frequencies, and the signals sent by these hairs are turned into sound you hear by your brain.
In reality it is a little more complicated, but for the sake of this post, that's all you need to know.
The pitch of sound comes from its frequency, the 'shorter' the waves are in a waveform, the higher the sound. The volume of sound comes from how 'tall' the waves are. Human hearing sits in a range between 20Hz and 20,000 Hz, though it deviates per person. Being the egocentric species we are, waves below 20 Hz are called 'infrasound' and waves above 20kHz are called 'ultrasound.' Almost no humans can hear beyond ultrasound, you will find that your hearing probably cuts off at 16kHz.
To play around with this, check out this [tone generator](https://www.szynalski.com/tone-generator), you can prove anything above with this yourself. As a fun fact: human hearing is actually really bad, we've among the most limited frequency ranges. A cat can hear up to 40kHz, and dolphins can even hear up to 160kHz!!
How does my computer generate sound?
------------------------------------
To listen to sound, you will probably be using headphones or speakers, inside of them are cones that are driven by an electromagnet, causing them to vibrate at very precise frequencies. This is essentially how sound works, though modern headphones certainly can be pretty complex.
To drive that magnet, an audio source will send an analog signal (a waveform) over a wire to the driver, causing it to move at the frequency of that waveform. This is in essence how audio playback works; and we're not going to get into it much deeper than this.
Computers are digital - which is to say, they don't do analog; processors understand ON and OFF, they do not understand 38.689138% OFF and 78.21156% ON. When converting an analog signal (like sound) to a digital one, we make use of a format called PCM. For PCM to be turned into an analog signal, you need a DAC - or as you probably know it: a sound card. DAC stands for 'Digital to Analog Converter', or some people mistakenly call it "Digital Audio Converter/Chip"
PCM stands for **P**ulse-**c**ode **M**odulation, which is a way to represent sampled analog signals in a digital format. We're not going to get into it too much here, but imagine taking a sample of a waveform at regular intervals and storing the value, and then rounding that value to a nearest 'step' (remember this). That's PCM.
The fidelity of PCM comes from two elements, which we are going to discuss next: **sampling rate** and **bit depth.**
What is sampling rate? Or: HOW SOUND GOOD?
------------------------------------------
Sampling rate is the most important part of making PCM sound good. Remember how humans hear in a range of 20Hz to 20kHz? The sample rate of audio has a lot to do with this. You cannot capture high frequencies if you do not capture samples often enough. Since our ears can hear up to 20 kHz, you would imagine that 20kHz would be ideal for capturing audio; however, a result of sampling is that you actually need twice the sample rate, this is called the (Nyquist-Sannon sampling theorem)[https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem], which is a complicated thing. J
Hey fellow penguins,
A few days ago, an user asked about audio quality on Linux, and whether it is worse or better than audio on Windows. The thread became a mess quickly, full of misconceptions and urban myths about Linux. I figured it would be worthwhile to create a complete guide to Linux audio, as well as dispelling some myths and misconceptions.
To all be on the same page, this is going to be thorough, slowly introducing more concepts.
What is sound? How and what can I hear?
---------------------------------------
You might remember from high school that sound is waves traveling through the air. Vibrations of any kind cause molecules in the air to move. When that wave form finds your ears, it causes little hairs in your ear to move. Different hairs are susceptible to different frequencies, and the signals sent by these hairs are turned into sound you hear by your brain.
In reality it is a little more complicated, but for the sake of this post, that's all you need to know.
The pitch of sound comes from its frequency, the 'shorter' the waves are in a waveform, the higher the sound. The volume of sound comes from how 'tall' the waves are. Human hearing sits in a range between 20Hz and 20,000 Hz, though it deviates per person. Being the egocentric species we are, waves below 20 Hz are called 'infrasound' and waves above 20kHz are called 'ultrasound.' Almost no humans can hear beyond ultrasound, you will find that your hearing probably cuts off at 16kHz.
To play around with this, check out this [tone generator](https://www.szynalski.com/tone-generator), you can prove anything above with this yourself. As a fun fact: human hearing is actually really bad, we've among the most limited frequency ranges. A cat can hear up to 40kHz, and dolphins can even hear up to 160kHz!!
How does my computer generate sound?
------------------------------------
To listen to sound, you will probably be using headphones or speakers, inside of them are cones that are driven by an electromagnet, causing them to vibrate at very precise frequencies. This is essentially how sound works, though modern headphones certainly can be pretty complex.
To drive that magnet, an audio source will send an analog signal (a waveform) over a wire to the driver, causing it to move at the frequency of that waveform. This is in essence how audio playback works; and we're not going to get into it much deeper than this.
Computers are digital - which is to say, they don't do analog; processors understand ON and OFF, they do not understand 38.689138% OFF and 78.21156% ON. When converting an analog signal (like sound) to a digital one, we make use of a format called PCM. For PCM to be turned into an analog signal, you need a DAC - or as you probably know it: a sound card. DAC stands for 'Digital to Analog Converter', or some people mistakenly call it "Digital Audio Converter/Chip"
PCM stands for **P**ulse-**c**ode **M**odulation, which is a way to represent sampled analog signals in a digital format. We're not going to get into it too much here, but imagine taking a sample of a waveform at regular intervals and storing the value, and then rounding that value to a nearest 'step' (remember this). That's PCM.
The fidelity of PCM comes from two elements, which we are going to discuss next: **sampling rate** and **bit depth.**
What is sampling rate? Or: HOW SOUND GOOD?
------------------------------------------
Sampling rate is the most important part of making PCM sound good. Remember how humans hear in a range of 20Hz to 20kHz? The sample rate of audio has a lot to do with this. You cannot capture high frequencies if you do not capture samples often enough. Since our ears can hear up to 20 kHz, you would imagine that 20kHz would be ideal for capturing audio; however, a result of sampling is that you actually need twice the sample rate, this is called the (Nyquist-Sannon sampling theorem)[https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem], which is a complicated thing. J
ust understand that to reproduce a 20kHz frequency, you need a sample rate of 40kHz.
To have a little bit of room and leeway, we settled on a sample rate of 48kHz (a multiple of 8) for playback, and 96kHz for recording. We record at this frequency only to make sure absolutely no data is lost. You might be more familiar with 44.1kHz for audio, which is a standard we settled on for CD playback and NTSC. A lot of scientific research has been done on sound quality, and there is no evidence to suggest people can tell the difference between 48kHz or anything higher.
**MYTH BUST:** Humans cannot hear beyond 20 kHz, period. Anyone who claims to be able to is either supernatural or lying to you - I'll let you choose which.
What is bit-depth? Or: HOW IT MAKE SOUND REALLY NICE?
-----------------------------------------------------
Remember how I told you to remember that PCM rounds values to the nearest step? This has to do with how binary works. The more bits, the bigger the number you can store. In PCM, the bit-depth decides the number of bits of information in each sample. With 16-bit, the range of values that can be stored is 0 to 65535. Going beyond this is pointless for humans, with no scientific research showing any proven benefit, though marketeers would like you to believe there's benefits.
**MYTH BUST:** 24-bit depth is often touted as 'high-resolution audio', claiming benefits of a better sonic experience. Such is nothing more than marketing speech, there is no meaningful data 24-bit can capture that 16-bit cannot.
Channels? Or: HOW IT CAN MAKE SOUND IN LEFT BUT NOT RIGHT?
----------------------------------------------------------
We'll briefly touch on the last part of PCM audio, channels. This is very self explanatory, humans have two ears and can hear separate sounds on both of them, which means we have stereo hearing. As a result, most music is recorded with 2 channels. For some surround settings, you need more channels, this is why you may have heard of 5.1 or 7.1; the first digit is the amount of channels the PCM carries.
For most desktop usage, the only sound we care about is 2-channel PCM.
Recap
-----
So, we've covered all the elements of PCM sound. Let's go over it quickly: sample rate is expressed in Hz and is how often a sample of a waveform is captured, representing the x-axis of a waveform. Bit-depth is the bits of information stored in each sample, and represents the y-axis of the waveform. Channels decide how many simultaneous outputs the PCM can drive separately, since we have 2 ears, you need at least two channels.
As a result, the standard audio playback for both consumers and professionals is 48kHz, 16-bit, 2 channel PCM. This is more than enough to fully represent the full range of human hearing.
How it works in Linux
=====================
So, now that we know how PCM works, how does Linux make sound? How can you make Linux sound great? A few important components come into play here, and we'll need to discuss each of them in some detail.
ALSA
----
ALSA is the interface to the kernel's sound driver. ALSA can take a PCM signal and send it to your hardware by talking to the driver. Something important to know about most DACs is that they can only take one signal at a time, actually. That means that only a single application can send sound to ALSA at once. Long ago, in a darker time, you couldn't watch a movie while listening to music!
However, one day, someone set out to change this rather awkward situation...
PulseAudio
----------
When you think audio on Linux, PulseAudio is probably among the first things you think of. PulseAudio is NOT a driver, nor does it talk to your drivers. Actually, PulseAudio only does two things that we'll discuss in detail later. PulseAudio talks to ALSA, taking control of its single audio stream, and allows other applications to talk to PulseAudio instead. Pulse is an 'audio multiplexer', turning multiple signals into one through a process that is called **mixing.** Mixing is an incredibly complicated subject that we won't talk about here.
To be able to
To have a little bit of room and leeway, we settled on a sample rate of 48kHz (a multiple of 8) for playback, and 96kHz for recording. We record at this frequency only to make sure absolutely no data is lost. You might be more familiar with 44.1kHz for audio, which is a standard we settled on for CD playback and NTSC. A lot of scientific research has been done on sound quality, and there is no evidence to suggest people can tell the difference between 48kHz or anything higher.
**MYTH BUST:** Humans cannot hear beyond 20 kHz, period. Anyone who claims to be able to is either supernatural or lying to you - I'll let you choose which.
What is bit-depth? Or: HOW IT MAKE SOUND REALLY NICE?
-----------------------------------------------------
Remember how I told you to remember that PCM rounds values to the nearest step? This has to do with how binary works. The more bits, the bigger the number you can store. In PCM, the bit-depth decides the number of bits of information in each sample. With 16-bit, the range of values that can be stored is 0 to 65535. Going beyond this is pointless for humans, with no scientific research showing any proven benefit, though marketeers would like you to believe there's benefits.
**MYTH BUST:** 24-bit depth is often touted as 'high-resolution audio', claiming benefits of a better sonic experience. Such is nothing more than marketing speech, there is no meaningful data 24-bit can capture that 16-bit cannot.
Channels? Or: HOW IT CAN MAKE SOUND IN LEFT BUT NOT RIGHT?
----------------------------------------------------------
We'll briefly touch on the last part of PCM audio, channels. This is very self explanatory, humans have two ears and can hear separate sounds on both of them, which means we have stereo hearing. As a result, most music is recorded with 2 channels. For some surround settings, you need more channels, this is why you may have heard of 5.1 or 7.1; the first digit is the amount of channels the PCM carries.
For most desktop usage, the only sound we care about is 2-channel PCM.
Recap
-----
So, we've covered all the elements of PCM sound. Let's go over it quickly: sample rate is expressed in Hz and is how often a sample of a waveform is captured, representing the x-axis of a waveform. Bit-depth is the bits of information stored in each sample, and represents the y-axis of the waveform. Channels decide how many simultaneous outputs the PCM can drive separately, since we have 2 ears, you need at least two channels.
As a result, the standard audio playback for both consumers and professionals is 48kHz, 16-bit, 2 channel PCM. This is more than enough to fully represent the full range of human hearing.
How it works in Linux
=====================
So, now that we know how PCM works, how does Linux make sound? How can you make Linux sound great? A few important components come into play here, and we'll need to discuss each of them in some detail.
ALSA
----
ALSA is the interface to the kernel's sound driver. ALSA can take a PCM signal and send it to your hardware by talking to the driver. Something important to know about most DACs is that they can only take one signal at a time, actually. That means that only a single application can send sound to ALSA at once. Long ago, in a darker time, you couldn't watch a movie while listening to music!
However, one day, someone set out to change this rather awkward situation...
PulseAudio
----------
When you think audio on Linux, PulseAudio is probably among the first things you think of. PulseAudio is NOT a driver, nor does it talk to your drivers. Actually, PulseAudio only does two things that we'll discuss in detail later. PulseAudio talks to ALSA, taking control of its single audio stream, and allows other applications to talk to PulseAudio instead. Pulse is an 'audio multiplexer', turning multiple signals into one through a process that is called **mixing.** Mixing is an incredibly complicated subject that we won't talk about here.
To be able to
mix sounds, one must make sure that all the PCM sources are in the same format (the one that's being sent to ALSA); if the PCM format being sent to Pulse does not match the PCM format being sent to ALSA, pulse does a step before mixing it called **resampling.** Resampling is another very complicated subject that can turn a 8kHz, 4-bit, 1-channel PCM stream into a 24kHz, 24-bit, 2-channel PCM stream.
These two things allow you to play a game, listen to music and watch YouTube, and notifications to produce a sound all at the same time. PulseAudio is the most critical element of the Linux sound stack.
**FACT:** PulseAudio is a contentious subject, many people have a dislike for this particular bit of software. In all honesty, PulseAudio was brought to the general public in a bit of a premature state, breaking audio for many people. PulseAudio these days is a very stable, solid piece of software. If you have audio issues these days, it's usually a problem in ALSA or your driver.
What is resampling?
-------------------
Resampling is the process of turning a PCM stream into another PCM stream of a different resolution. Your DAC only accepts a limited range of PCM signals, and it is up to the software to make sure the PCM stream is compatible. There is almost no DAC out there that doesn't support 44.1kHz, 16-bit, 2-channel PCM, so this tends to be the default. When you play an audio source (like an OggVorbis file), the PCM stream might be 96kHz, 24-bit, 2-channel PCM.
To fix that, PulseAudio will use a **resampling algorithm**. There are two kinds of resampling methods: upsampling and downsampling. Upsamling is lossless, since you can always represent less data with more data. Downsampling is lossy by definition, you cannot represent 24-bit PCM with 16-bit PCM.
**MYTH: Downsampling is a loss in quality!** This is only true in a technical sense, or if you are downsampling to less than 48kHz, 16-bit PCM. When you downsample a 96kHz, 24-bit PCM stream to a 48kHz, 16-bit stream, no meaningful data is lost in the process; because the discarded data lies outside of the human ear's hearing range.
**FACT: Resampling is expensive.** Good quality resampling algorithms actually take a non-trivial amount of processing power. PulseAudio defaults to a resampling method with a good balance between CPU time used and quality.
What is mixing?
---------------
Mixing is the process of taking two PCM streams and combining them into one. This is extremely complicated and not something we're going to discuss at length. It is not important to understand how this works, only to understand that it exists. Without mixing, you wouldn't be able to hear sounds from multiple sources. This is true not just for PulseAudio and computer sound, this is true for anything. In real life, you might use an A/V receiver to accept sound from your TV and music player at once, the receiver then mixes the signals and plays it through your speakers.
What is encoding?
-----------------
Finally we can talk a little about encoding. Encoding is the process of taking a PCM stream and writing it to a permanent format, two types exist. You have *lossy* encoding and *lossless* encoding. Lossy encoding removes data from the PCM stream to safe space. Usually the discarded data is useless to you, and will not make a difference in sound quality; examples of lossy encoding are *MP3*, *AAC* and *Ogg Vorbis*. *Lossless* encoding takes a PCM stream and encodes it in such a way that no data is lost, examples of lossless encodings are *FLAC*, *ALAC* and *WAV.*
Note that lossy and lossless do not mean compressed and uncompressed. A lossless format can be compressed and usually is, as uncompressed lossless encoding would be very large; it would just be the raw PCM stream. An example of lossless uncompressed audio is *WAV*.
A new element encodings bring is their *bit rate*, not to be confused with samplerate and bit depth. Bit rate has to do with how much data is stored in every second of audio. For a lossless, uncompressed PCM stream this is easy to calculate with the formula `bi
These two things allow you to play a game, listen to music and watch YouTube, and notifications to produce a sound all at the same time. PulseAudio is the most critical element of the Linux sound stack.
**FACT:** PulseAudio is a contentious subject, many people have a dislike for this particular bit of software. In all honesty, PulseAudio was brought to the general public in a bit of a premature state, breaking audio for many people. PulseAudio these days is a very stable, solid piece of software. If you have audio issues these days, it's usually a problem in ALSA or your driver.
What is resampling?
-------------------
Resampling is the process of turning a PCM stream into another PCM stream of a different resolution. Your DAC only accepts a limited range of PCM signals, and it is up to the software to make sure the PCM stream is compatible. There is almost no DAC out there that doesn't support 44.1kHz, 16-bit, 2-channel PCM, so this tends to be the default. When you play an audio source (like an OggVorbis file), the PCM stream might be 96kHz, 24-bit, 2-channel PCM.
To fix that, PulseAudio will use a **resampling algorithm**. There are two kinds of resampling methods: upsampling and downsampling. Upsamling is lossless, since you can always represent less data with more data. Downsampling is lossy by definition, you cannot represent 24-bit PCM with 16-bit PCM.
**MYTH: Downsampling is a loss in quality!** This is only true in a technical sense, or if you are downsampling to less than 48kHz, 16-bit PCM. When you downsample a 96kHz, 24-bit PCM stream to a 48kHz, 16-bit stream, no meaningful data is lost in the process; because the discarded data lies outside of the human ear's hearing range.
**FACT: Resampling is expensive.** Good quality resampling algorithms actually take a non-trivial amount of processing power. PulseAudio defaults to a resampling method with a good balance between CPU time used and quality.
What is mixing?
---------------
Mixing is the process of taking two PCM streams and combining them into one. This is extremely complicated and not something we're going to discuss at length. It is not important to understand how this works, only to understand that it exists. Without mixing, you wouldn't be able to hear sounds from multiple sources. This is true not just for PulseAudio and computer sound, this is true for anything. In real life, you might use an A/V receiver to accept sound from your TV and music player at once, the receiver then mixes the signals and plays it through your speakers.
What is encoding?
-----------------
Finally we can talk a little about encoding. Encoding is the process of taking a PCM stream and writing it to a permanent format, two types exist. You have *lossy* encoding and *lossless* encoding. Lossy encoding removes data from the PCM stream to safe space. Usually the discarded data is useless to you, and will not make a difference in sound quality; examples of lossy encoding are *MP3*, *AAC* and *Ogg Vorbis*. *Lossless* encoding takes a PCM stream and encodes it in such a way that no data is lost, examples of lossless encodings are *FLAC*, *ALAC* and *WAV.*
Note that lossy and lossless do not mean compressed and uncompressed. A lossless format can be compressed and usually is, as uncompressed lossless encoding would be very large; it would just be the raw PCM stream. An example of lossless uncompressed audio is *WAV*.
A new element encodings bring is their *bit rate*, not to be confused with samplerate and bit depth. Bit rate has to do with how much data is stored in every second of audio. For a lossless, uncompressed PCM stream this is easy to calculate with the formula `bi
t rate = sample rate * bit depth * channels`, for 16-bit, 48kHz, 2 channel PCM this is 1,5 Mbit. To get the value in bytes, divide by 8, thus 192kB per second.
The bit rate of an encoder means how much the audio will be compressed. PCM compression is super complicated, but it generally involves discarding silence, cutting off frequencies you cannot hear, and so forth. Radio encoding has a bit rate of roughly 128 Kbps, while most CDs have a bit rate of 170kBps~ (yes, bytes!)
Lastly, there is the concept of VBR and CBR. VBR stands for **V**ariable **B**it **R**ate, which CBR stands for **C**onstant Bit Rate. In a VBR encoding, the encoder aim for a target bit rate that you set, but it can deviate if it thinks it needs more or less. CBR will encode a constant bit rate, and will never deviate.
**MYTH: Lossless sounds better than lossy.** This is blatantly untrue, lossless audio formats were created for perservation and archival reasons. When you encode a lossy file from a lossless source, and you make sure that it's a 48kHz, 16-bit PCM encoding, you will not lose any important information. What is enough depends on the quality of the encoder. For OggVorbis, 192kbps is sufficient, for MP3, 256kbps should be preferred. 320kbps is excessive and the highest quality supported by MP3. In general, 256kbps does the trick, but with storage being abundant these days, you can play it safe and use 320kbps if it makes you feel better.
**MYTH: CBR is better than VBR.** There is no reason not to use VBR at all, there is no point in writing 256Kbps of data if there is only silence or a constant tone. Let your encoder do what it does best!
**FACT: Never encode a lossy format to another format.** You will compress data that is already compressed. This will always result in a further loss of data, even if the target format is a higher bit rate.
TL;DR, I JUST WANT THE BEST SOUND QUALITY
=========================================
Here is a quick guide to achieving great sound quality on Linux with the above in mind.
* When you want to encode audio, prefer open, free formats like Ogg Vorbis. MP3 is not your friend.
* Never encode a lossy format to another lossy format. Always try to encode from a 96kHz, 24-bit FLAC if you can.
* Generally you won't have to touch PulseAudio, but there are a few things you can change in the `/etc/pulse/daemon.conf` file.
* You can pick a different resampling method, see the manual for your options.
* You should probably match the `default-sample-*` settings to your sound card.
* Generally you shouldn't touch this file unless you are experiencing sound issues.
* Do not set `avoid-resampling` to `true`, this is a huge misconception, this does not improve sound quality at best, and in the worst case, can actually break things.
As you can see, there's little you can do in Linux in the first place, so what can you do if you want better sound?
* Buy a good external DAC, turning a digital signal into analog inside of a PC case is a bad idea due to electromagnetic interference. Ever plugged your headphones into the front audio jack of your case? You will hear the noise. A good DAC will make a meaningful improvement your listening experience.
* Your headphones and amplifier really make the biggest difference. Having a good pair of headphones paired with a good headphone amplifier ten times more important than whatever chip you got in your PC.
**MYTH: Linux sound quality is worse than Windows.** They are exactly the same, Pulse doesn't work that different from how Windows does mixing and resampling.
**MYTH: Linux sound quality can be better than Windows.** They are exactly the same. All improvements in quality come from the driver and your DAC, not the sound server. Pulse and ALSA do not touch the PCM beyond moving it around and resampling it.
I hope this (long) guide was of help to you, and helped to dispell some myths. Did I miss anything? Ask or let me know, and I'll answer the best I can. Did I make any factual errors? Please correct me with a source and I'll amend the post immediately.
htt
The bit rate of an encoder means how much the audio will be compressed. PCM compression is super complicated, but it generally involves discarding silence, cutting off frequencies you cannot hear, and so forth. Radio encoding has a bit rate of roughly 128 Kbps, while most CDs have a bit rate of 170kBps~ (yes, bytes!)
Lastly, there is the concept of VBR and CBR. VBR stands for **V**ariable **B**it **R**ate, which CBR stands for **C**onstant Bit Rate. In a VBR encoding, the encoder aim for a target bit rate that you set, but it can deviate if it thinks it needs more or less. CBR will encode a constant bit rate, and will never deviate.
**MYTH: Lossless sounds better than lossy.** This is blatantly untrue, lossless audio formats were created for perservation and archival reasons. When you encode a lossy file from a lossless source, and you make sure that it's a 48kHz, 16-bit PCM encoding, you will not lose any important information. What is enough depends on the quality of the encoder. For OggVorbis, 192kbps is sufficient, for MP3, 256kbps should be preferred. 320kbps is excessive and the highest quality supported by MP3. In general, 256kbps does the trick, but with storage being abundant these days, you can play it safe and use 320kbps if it makes you feel better.
**MYTH: CBR is better than VBR.** There is no reason not to use VBR at all, there is no point in writing 256Kbps of data if there is only silence or a constant tone. Let your encoder do what it does best!
**FACT: Never encode a lossy format to another format.** You will compress data that is already compressed. This will always result in a further loss of data, even if the target format is a higher bit rate.
TL;DR, I JUST WANT THE BEST SOUND QUALITY
=========================================
Here is a quick guide to achieving great sound quality on Linux with the above in mind.
* When you want to encode audio, prefer open, free formats like Ogg Vorbis. MP3 is not your friend.
* Never encode a lossy format to another lossy format. Always try to encode from a 96kHz, 24-bit FLAC if you can.
* Generally you won't have to touch PulseAudio, but there are a few things you can change in the `/etc/pulse/daemon.conf` file.
* You can pick a different resampling method, see the manual for your options.
* You should probably match the `default-sample-*` settings to your sound card.
* Generally you shouldn't touch this file unless you are experiencing sound issues.
* Do not set `avoid-resampling` to `true`, this is a huge misconception, this does not improve sound quality at best, and in the worst case, can actually break things.
As you can see, there's little you can do in Linux in the first place, so what can you do if you want better sound?
* Buy a good external DAC, turning a digital signal into analog inside of a PC case is a bad idea due to electromagnetic interference. Ever plugged your headphones into the front audio jack of your case? You will hear the noise. A good DAC will make a meaningful improvement your listening experience.
* Your headphones and amplifier really make the biggest difference. Having a good pair of headphones paired with a good headphone amplifier ten times more important than whatever chip you got in your PC.
**MYTH: Linux sound quality is worse than Windows.** They are exactly the same, Pulse doesn't work that different from how Windows does mixing and resampling.
**MYTH: Linux sound quality can be better than Windows.** They are exactly the same. All improvements in quality come from the driver and your DAC, not the sound server. Pulse and ALSA do not touch the PCM beyond moving it around and resampling it.
I hope this (long) guide was of help to you, and helped to dispell some myths. Did I miss anything? Ask or let me know, and I'll answer the best I can. Did I make any factual errors? Please correct me with a source and I'll amend the post immediately.
htt