!XrtRvzcHOrHtSKARne:nixos.org

NixOS Audio

135 Members
34 Servers

Load older messages


SenderMessageTime
1 Apr 2024
@technicus:matrix.orgMiles DysonWhat is the easiest way to install Emacs Live?00:13:24
@technicus:matrix.orgMiles Dysonhttps://overtone.github.io/emacs-live/00:13:26
@fractivore:cyberia.clubSYMYƧI'm a vim person, sorry, no clue about the emacs ecosystem 😅03:42:42
@technicus:matrix.orgMiles DysonThanks, I am a total noob. New to NixOS, New to Emacs, New to Vim, new to live music coding, new to pipewire, new to I3 . . . I am learning everything all at once.05:02:29
@technicus:matrix.orgMiles DysonHow do I use this: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/audio/jack.nix05:36:55
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
Thanks, I am a total noob.

New to NixOS, New to Emacs, New to Vim, new to live music coding, new to pipewire, new to I3 . . . I am learning everything all at once.
Never fear, you've come to the right place 🙂
05:52:18
@fractivore:cyberia.clubSYMYƧ If you're totally new to livecoding, I would suggest checking out sonic-pi! I have found it to be by far the most powerful and practical livecoding language. It's built on SuperCollider (which you can also use directly), but most importantly, it contains integrated tutorials that can get you up and running in a jif and which you can reference easily as you code. 05:53:47
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
How do I use this:

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/audio/jack.nix

Based on what you've said, I'm not entirely sure if you're asking how to use JACK in general or if you're specifically wondering how to use it within NixOS.

To answer the former, there are a wide variety of ways to use JACK. It's kind of an audio routing and syncing swiss army knife. PipeWire was sort of built to replace it, and is a little easier to use, but I've found I still have to use JACK for some edge cases where they haven't worked out the bugs in PipeWire yet.

Most people control JACK with the GUI program qjackctrl, but you can also use it from the command line with jack_control, for example, if you want to write scripts.

As for the latter, how to use JACK on NixOS, check out the options search page: https://search.nixos.org/options?channel=23.11&show=services.jack.jackd.enable&from=0&size=50&sort=relevance&type=packages&query=jack

You can use those options to enable and configure JACK. For example I have:

let 
  jackOn = false; 
  studioConfig = false;
in 
{
  sound.enable = true;
  security.rtkit.enable = true;
...
I have other stuff here that I redacted to save space cuz it's irrelevant to the question.
...
  #Enable jack separately, this configuration may need work
  services.jack = {
    jackd.enable = jackOn;
    jackd.extraOptions = if studioConfig then [ "-dalsa" "--device" "hw:STUDIOCAPTURE,0" ] else [ "-dalsa" "--device" "hw:Generic_1,0" ];
  };
}
06:01:21
@fractivore:cyberia.clubSYMYƧ That's in my file etc/nixos/audio.nix . I import the file into /etc/nixos/configuration.nix . Then activate the configuration with sudo nixos-rebuild boot followed by sudo reboot now. I find you need a reboot for changing audio configurations to work properly, and I have to switch between PipeWire and JACK sometimes because JACK works better with my audio interface. The end result is, the configuration above starts the JACK service when I reboot, configured with some extra options. (I'd like to be able to just choose between my PipeWire and JACK configs from the boot menu, but I don't know how to do that, and it's not a huge deal so I haven't taken the time to learn that) 06:06:32
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
How do I use this:

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/audio/jack.nix
More generally, this is known as a service module. It's NixOS' way of starting programs (services) automatically, using systemd. So in this case, jackd is the service.
06:10:05
@technicus:matrix.orgMiles DysonIs it possible to have pipewire and jack at the same time?06:34:38
@technicus:matrix.orgMiles DysonWhat is the jack module: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/audio/jack.nix06:36:27
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
Is it possible to have pipewire and jack at the same time?
No, it's not. PipeWire runs it's own JACK server thing for compatibility, and the "real" JACK interferes.
07:17:53
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
What is the jack module:

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/audio/jack.nix
I'm not quite sure what you're asking - there are a few different ways to describe what it is depending on context. It's a service module - when you add the relevant options to your configuration (such as, by adding services.jack.jackd.enable = true directly into the main part of your /etc/nixos/configuration.nix), NixOS will start the service on your system when you boot. From another point of view, it's a source code file in nixpkgs. NixOS knows to evaluate that file when you specify any of the services.jack.whatever options. Does that make sense, and does it help? Do you have more questions?
07:23:03
@technicus:matrix.orgMiles DysonI am close to understanding . . . 07:24:27
@technicus:matrix.orgMiles DysonI am not sure what I did, but the audio is clicking, scratching, and popping. 07:25:19
@technicus:matrix.orgMiles DysonI am going to try setting up git repository so you can see what I am doing.07:26:01
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
I am not sure what I did, but the audio is clicking, scratching, and popping.
Those are symptoms of a wide variety of different issues. So that's happening when you play anything back?
07:26:59
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
I am not sure what I did, but the audio is clicking, scratching, and popping.
* Those are symptoms of a wide variety of different issues. So that's happening when you play anything back? Do you hear that instead of, or in addition to, what you expect to hear?
07:27:25
@technicus:matrix.orgMiles DysonYes.07:27:46
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
Yes.

er... Yes you hear it instead of what you expect to hear, or yes you hear it in addition to what you expect to hear?

Like, do you ONLY hear the scratching and popping when you try to play a sound file, but not the sound file itself? OR do you hear the sound file like you'd expect, but there is scratching and popping over the top of it?

07:29:23
@fractivore:cyberia.clubSYMYƧAnd, may I take it that this only started after you made some changes to your configuration? You had clean audio before?07:30:08
@fractivore:cyberia.clubSYMYƧWell some good news with NixOS is, you can roll back to a previous working configuration just by selecting a different generation in the boot menu!07:30:33
@technicus:matrix.orgMiles DysonDamn . . . I was just looking up revision control for the config files . . .07:30:59
@fractivore:cyberia.clubSYMYƧIt's a good idea to have em up on git, but that's one of the big perks of NixOS - it's super easy to roll back!07:31:47
@technicus:matrix.orgMiles Dyson
In reply to @fractivore:cyberia.club

er... Yes you hear it instead of what you expect to hear, or yes you hear it in addition to what you expect to hear?

Like, do you ONLY hear the scratching and popping when you try to play a sound file, but not the sound file itself? OR do you hear the sound file like you'd expect, but there is scratching and popping over the top of it?

I have a Sonic-pi loop running, and it clicks from time to time, same when I play any other media with audio.
07:32:10
@technicus:matrix.orgMiles DysonI was just reading through this thread on different methods people organize the config.07:33:13
@technicus:matrix.orgMiles Dysonhttps://discourse.nixos.org/t/github-strategies-for-configuration-nix/198307:33:16
@technicus:matrix.orgMiles DysonFor now, I just want the simplest way of doing things.07:33:59
@fractivore:cyberia.clubSYMYƧ
In reply to @technicus:matrix.org
I have a Sonic-pi loop running, and it clicks from time to time, same when I play any other media with audio.
This kind of problem is not usually easy to troubleshoot over matrix. There really are a lot of different things that could be causing it, but it's probably not your NixOS config. It's more likely to be an issue with the audio routing in JACK.
07:34:23

Show newer messages


Back to Room ListRoom Version: 9