Thursday, March 24, 2022

Recording audio that is playing

I sometimes want to record what is playing on my system. Not from the microphone, but what is playing to the headphones or speakers.

I am running Debian  Bullseye. It has a particular configuration of ALSA and PulseAudio that makes it easy.

The command 'pactl list' lists pulse audio devices, including all the sources.

On my system, one of those sources has the name 'alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor' with description 'Monitor of Tiger Lake-LP Smart Sound Technology Audio Controller Speaker + Headphones'. I see this description on the mixer Input Devices tab and it seems to correspond to what is playing on the headphones or speakers.

 arecord -f cd -t wav --max-file-time 3600 --device=pulse:alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink.monitor mon.wav

I suspect that the form of device name (`pulse:xxx`) depends on the configuration in /etc/alsa/conf.d/50-pulseaudio.conf:

# Add a specific named PulseAudio pcm and ctl (typically useful for testing)

pcm.pulse {
    @args [ DEVICE ]
    @args.DEVICE {
        type string
        default ""
    }
    type pulse
    device $DEVICE
    hint {
        show {
            @func refer
            name defaults.namehint.basic
        }
        description "PulseAudio Sound Server"
    }
}

ctl.pulse {
    @args [ DEVICE ]
    @args.DEVICE {
        type string
        default ""
    }
    type pulse
    device $DEVICE
}


I think this takes the xxx from 'pulse:xxx' as a parameter and allows access to the PulseAudio device by name.



Wednesday, March 16, 2022

Thunderbird keyboard shortcut customization

I am running Thunderbird 91.4.

I don't like the default Ctrl-V pasting formatting.

I installed the tbkeys-lite add-on and searched for two hours for any examples of configuration of the compose section. Didn't find a single example, and very few examples for the main section.

Issue 80 asked for examples and there was 1 reply.

http://kv5r.com/computers/thunderbird-paste-without-formatting/

Thunderbird Paste Without Formatting looks like it's relevant, but it is for an old version of Thunderbird - the files it references don't exist in my installation.

Finally, I tried the following and, fortunately, it worked:

{
  "ctrl+v": "cmd:cmd_pasteNoFormatting",
  "ctrl+shift+v": "cmd:cmd_paste"
}

With this, Ctrl-V pastes without formatting and Ctrl-Shift-V pastes with formatting.

Labels