scope-tui icon indicating copy to clipboard operation
scope-tui copied to clipboard

Output Audio?

Open linuxmobile opened this issue 1 year ago • 3 comments

First of all, good morning, thank you for the tool, it is very nice and interesting.

Following this, I wanted to ask you why you only capture the input audio. Contrary to what cava does.

I'm working on creating the flake so people can install/use it on NixOS, and then do the PR for you, but I couldn't really make sense of it only capturing the input audio, and not the output.

linuxmobile avatar Mar 19 '24 00:03 linuxmobile

hi! thanks for your interest

scope-tui doesn't pick any specific audio device and works with both input and output sources! upon starting it up, you can pass an audio device as argument: for example, I use scope-tui pulse pipewire.monitor to attach to my master audio monitor.

when started without arguments, it will choose your default audio device, which usually is your mic

it's possible to re-route audio at runtime freely, for example i use Helvum to connect different input channels to different output sources and compare their waveforms

currently it only supports pulseaudio because its Simple Api is, well, easy! but it's not really super friendly to work with, i'm probably switching to cpal soon:tm: and then i may add some better controls to manage inputs directly from scope-tui

alemidev avatar Mar 21 '24 22:03 alemidev

Sorry for responding too late. Even adding the monitor with "pipewire.monitor" I can't get it to work!

image

linuxmobile avatar Apr 20 '24 02:04 linuxmobile

hey! i'm also keen on responding late, no worries and thanks for waiting! (: i have some solutions to propose:


the audio source doesn't yet support choosing which device it should get attached to. if your system has pipewire and pipewire-pulse you can compile scope-tui with the pulseaudio feature flag (cargo build --release --features=pulseaudio) and then change audio for pulse in your command:

$ ./scope-tui pulse pipewire.monitor

this is kind of a workaround, the pulseaudio is not great, but it will allow you to control the mapping directly from scope-tui


you can rewire scope-tui audio manually. i'm not sure if there's a simple way to do it on bare pulseaudio (maybe with pavucontrol?) but if you're running the pipewire audio server you can use helvum to rewire audio accordingly: first disconnect whatever scope-tui attached to by default (by dragging the wires), and then connect it to your main audio monitor (again by dragging). iirc there's a ~60s timeout on CPAL, so you have to be not too slow otherwise scope-tui will close!


last is the real solution: waiting (sorry!). the audio source is still experimental, i'm trying to get it to feature parity with the pulseaudio source (to support multiple platforms and setups) but windows is giving me a huge headache! it doesn't respect my buffer size, but i digress. right now i'm very focused on another project of mine which really caught my interest. it's starting to fade away and in the upcoming month i'd like to look back into scope-tui, and get this feature properly adapted


so TLDR, either:

  • temporarily switch to pulseaudio source
  • temporarily re-wire scope-tui sources inside your audio server config
  • wait for me to fix the audio source

sorry for the inconvenience and thanks for your interest!

alemidev avatar Apr 28 '24 15:04 alemidev