News for hackers. Stuff that matters.
Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nullifidian on Tuesday January 29, 2019 @05:12PM (#19030339)
>Have you tried recording with ffmpeg

Just tried ffmpeg -f pulse -i default output.wav

No issues observed.

>Although isn't that resetting the rate back to 96000 when you want it to be 44100?

Yeah, I just noticed that too. I inherited 96000 since before I resorted to using 44100, so... It just works, too lazy to change it.

As for alsa without pulse, I tried using ardour with jack year or two ago, and no issues either.

arecord --device=default --format=S32_LE -r44100 -c2 -t raw | aplay -r44100 -c2 --format=S32_LE --device=default -

works too.

So it's either software, or something else in your system is affecting it. As someone said in this thread, debugging such an issue could get very arcane.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nickjj on Tuesday January 29, 2019 @05:18PM (#19030388)
Could you try ffmpeg using aac instead of wave? I think it would involve adding only `-c:a aac` to the command.

I'm curious now. Did you ever notice any type of pops and cracks during normal system usage? Not even recording. Just going to Youtube or any page that happens to interface with your sound card. pavucontrol was notoriously bad for triggering it.

It sounds like you have a very clean connection.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nullifidian on Tuesday January 29, 2019 @05:37PM (#19030539)
>Could you try ffmpeg using aac instead of wave? I think it would involve adding only `-c:a aac` to the command.

ffmpeg -f pulse -i default -c:a aac -strict -2 output2.m4a

ffmpeg -f alsa -i default -c:a aac -strict -2 output2.m4a

no issues. alsa one through pulse too of course. -strict -2 is because distro's ffmpeg is old.

>Did you ever notice any type of pops and cracks during normal system usage? Not even recording.

If I remember correctly, yes. When I had crack/pop issue playing youtube videos or music I would occasionally hear this. But again, it fixed itself.

My general advice is to not use Debian unstable, and if you want a stable working enviroment avoid rolling release distros generally. When I tried living with Debian unstable 10+ years ago someting would constantly break on a apt-get upgrade. Not sure how it is now.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nickjj on Tuesday January 29, 2019 @05:47PM (#19030621)
Thanks for the replies. I really appreciate it. I'm assuming you're recording at least 2 minutes worth of audio in each of these tests?

Although in your case it really sounds like the only thing you did was set 44100 and are using Ubuntu instead of Debian.

I mainly went for unstable to get more up to date packages, and didn't want to mess around with adding a billion PPAs with Ubuntu or compile from source for everything, but maybe I will give Ubuntu a shot the next time around.

I did install apt-listbugs and yeah it was scary. I didn't notice anything specifically audio related but seeing multiple critical / severe bugs like "may cause machine to lock" isn't what you want to see heh.

By the way, how sturdy is your Scarlett's USB connection in the back? Do you hear distortion and cracks if you touch it with headphones on? You don't need to wiggle it hard. Just basically touching it with the lightest amount of force possible within reason.

Also, does your motherboard happen to have an ALC892 based sound card as its built in sound device?

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nullifidian on Tuesday January 29, 2019 @06:18PM (#19030886)
>I'm assuming you're recording at least 2 minutes worth of audio in each of these tests?

Occasionally I record hours of audio with Audacity without an issue, and don't hear any cracks pops, when I listen to it, and I certainly would have noticed absent words. So I'm pretty sure the issue is either not present or extremely rare.

You can hear for yourself http://s000.tinyupload.com/?file_id=08701491608992765221 Sorry, it requires amplification, and I clean in the background.

>Do you hear distortion and cracks if you touch it with headphones on?

Since I don't hear anything wrong with audio, I assume it's pretty sturdy. But I'm pretty sure your issues are not caused by the connection. Digital stuff either works or not.

Around the time it fixed itself I bought a new power supply. But I don't remember if it affected anything. I higly doubt it. What I remember distinctly is how I was amazed at the lack of latency/delay in Audacity after an upgrade to 16.04 from 14.04.

>Ubuntu or compile from source for everything

You can just try installing a different distro onto a spare drive to test if the issue goes away.

As for compiling everything from source -- how many super fresh dependencies do you really need for development 5? 10? IMHO it's reasonably tolerable with manually built libraries in a custom prefix. And programming languages have their own package managers pip, cargo etc.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nickjj on Tuesday January 29, 2019 @07:31PM (#19031412)
It sounds clean here. Some ambient room hiss but that is unrelated to pops and cracks.

I do notice a crazy amount of pops and cracks if I touch that cable by the way. That's only why I asked. It's mainly around touching it near the Scarlett side of the connection.

Super fresh dependencies would mainly be for things like nvidia drivers, i3, compton, ffmpeg, obs, maybe pulseaudio / alsa-utils, vim, xterm, maim, kdenlive (for editing videos until I get a GPU pass through working so I can use Camtasia), gimp, pass, vlc, tmux, weechat, ranger, sxiv, dunst, kvm/qemu/virt-manager. That's 20ish and that's only things I managed to discover after using Linux for about 3 days.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nullifidian on Tuesday January 29, 2019 @08:33PM (#19031760)
>Scarlett side of the connection.

I touched both sides. Nothing.

>nvidia drivers

for nvidia drivers I use official nvidia debs for that. There is a cuda.list in my sources.list.d with

deb http://developer.download.nvidia.com/compute/cuda/repos/ubun... /

inside. It has the latest versions. There is an instruction somewhere on nvidia.com on how to get the keys for that.

As for the other things on your list, you really need to ask yourself if you really need the latest version. I remember my younger linux newbie self also desiring the lastest thing as soon as possible, but now I apply effort only if there is a specific feature I need, or something is not right with the easiliy available version.

For example both vim and xterm are very very old and don't change fundamentally from year to year. Same for weechat, pulseaudio, alsa-utils. I can understand the need for a fresh ffmpeg or a video player - I have a custom built newish ffmpeg and an mpv player, for reasons of better h265 encoding support and better HDR video support in mpv in the recent versions, but for most of the stuff one can live without the latest version. And some of the packages are simply buggy on the freshest point release - RHEL has older software for a reason.

Ubuntu 18.04 is only a year old in terms of software versions presently. It's not THAT outdated.

I'm kinda stuck with 16.04 because I have a rather involved encrypted zfs root mirror setup, that requires a manual installation of the os (with chroot and all) and I have no desire to touch this stuff again until 0.8.xxx zfs release is included in an LTS release. But it's pretty livable still. Sometimes yes, system packages are SO old that it would require me to build literally tens of dependencies manually to build something fresh from source. (So I don't do it) But that happens only if I want something very new and involved. Sometimes you can transplant debs from newer ubuntu releases painlessly, but that takes some experience...

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nickjj on Wednesday January 30, 2019 @07:53AM (#19034623)
Thanks.

Vim is still actively developed btw. The latest version has added a bunch of new things that are very useful.

I guess I just didn't want to get into a loop of having to read every changelog in detail for every package I install, then compile from source for all of these packages (or use the default distro's version if it's ok). That just seems like a lot of extra work. Manually hunting around and installing dependencies isn't fun at all, and third party PPAs aren't necessarily going to be around for everything.

I'm also used to the Windows world where you would typically download the latest stable release of a program. Of course on a Linux server, I'm always reaching for Debian stable or Ubuntu LTS but that's a different story.

First things first. I need to test Ubuntu 18.04 with the Scarlett and see how it goes.

Re:I Tried Linux as My Main Dev Environment but Was Forced B... by ubertakter on Wednesday January 30, 2019 @11:50AM (#19036722)
Late to the party here, but if touching the cable introduces noise no matter which software you run, maybe you have a ground loop problem or a really poorly shielded cable. You might try a different, decent quality cable. If that doesn't make a difference try connecting the cases of the Scarlett and the computer. It might be enough to set the Scarlett on the computer case.
Re:I Tried Linux as My Main Dev Environment but Was Forced B... by nickjj on Thursday January 31, 2019 @11:20AM (#19045861)
Thanks, yes it happens in all environments. But this specific model (2i2) is notorious for having a poor USB port but I don't think all of them are afflicted with the issue.

I was using the cable that comes with it, but I could try a spare. Good idea on touching the cases too. Right now they are apart. I didn't even think about it being related to that.