24 August 2020

665. Dealing with low gain/low volume in Samson XPD2 by boosting the gain in pulseaudio

I've 'solved' this now. See bottom of post.

Old post:

 Got the Samson XPD2 now, and it's ... interesting.

Even if I crank everything up to the max in linux, I can barely hear what I record in audacity (or anywhere -- it's a linux thing).

But if I hook up headphones to the headphone jack on the USB dongle the sound is great.

What figures?

As usual the first port of call is always dmesg:

[Sun Aug 23 05:18:02 2020] usb 2-11: new full-speed USB device number 22 using xhci_hcd
[Sun Aug 23 05:18:02 2020] usb 2-11: New USB device found, idVendor=17a0, idProduct=1616, bcdDevice= 1.00
[Sun Aug 23 05:18:02 2020] usb 2-11: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Sun Aug 23 05:18:02 2020] usb 2-11: Product: Samson RXD wireless receiver
[Sun Aug 23 05:18:02 2020] usb 2-11: Manufacturer: Samson Technologies
[Sun Aug 23 05:18:02 2020] usb 2-11: Warning! Unlikely big volume range (=496), cval->res is probably wrong.
[Sun Aug 23 05:18:02 2020] usb 2-11: [50] FU [Mic Capture Volume] ch = 1, val = 0/7936/16
[Sun Aug 23 05:18:02 2020] input: Samson Technologies Samson RXD wireless receiver as /devices/pci0000:00/0000:00:14.0/usb2/2-11/2-11:1.2/0003:17A0:1616.0012/input/input58
[Sun Aug 23 05:18:02 2020] hid-generic 0003:17A0:1616.0012: input,hidraw7: USB HID v1.00 Device [Samson Technologies Samson RXD wireless receiver] on usb-0000:00:14.0-11/input2


Linux is normally PnP, but here there seems to be an issue. Time to start reading. Found a similar issue here: https://bugzilla.redhat.com/show_bug.cgi?id=1070706

Will update as/if I fix this.

Also, I got a female 3.5 mm to female XLR connector so that I can use a better lavalier mic. The connector should be mini-XLR -- a full-size XLR is way too big. 

Solution:

What I do now is set the input volume in the terminal using pulseaudio (pacmd/pactl).

By default you can only set the input volume to 150%, but using the command line you can go as crazy as you like.

First identify the card index number: 

pacm list-sources|egrep "name|index"

    index: 26
   name: <alsa_input.usb-Samson_Technologies_Samson_RXD_wireless_receiver-00.analog-mono>
      alsa.name = "USB Audio"
      alsa.subdevice_name = "subdevice #0"
      alsa.card_name = "Samson RXD wireless receiver"
      alsa.long_card_name = "Samson Technologies Samson RXD wireless receiver at usb-0000:00:14.0-2, full sp"
      alsa.driver_name = "snd_usb_audio"
      device.vendor.name = "Samson Technologies Corp."
      device.product.name = "Samson RXD wireless receiver"
      device.profile.name = "analog-mono"
      alsa.mixer_name = "USB Mixer"
      device.icon_name = "audio-card-usb"

Then do (for index 26):

pactl set-source-volume 26 270%

Works great! Of course you can't touch the input slider in the pulseaudio GUI at this point. The next project is to change the pulseaudio source code to allow a higher max volume.

New microphone

I also bought a new microphone to use with the Samson: https://www.amazon.de/-/en/gp/product/B071937RZZ/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1

The sound is subjectively a lot better and I feel that it has better dynamic range, than with the stock microphone.

22 August 2020

664. Capturing sound when recording/streaming lectures/videos. A few devices.

 I'm interested in capturing sound, either during on-campus lectures, or when recording videos, or when lecturing over zoom.

Here are some of the devices that I own, and what I think:

Logitech C920 webcam with integrated microphone:

C920 HD Pro Webcam 1

The sound is ... fine. Even at a few metres distance, actually.  Nothing like a proper, dedicated microphone, but way beyond e.g. the microphone you'd find in a laptop.

BlueParrot B350-XT bluetootch headset:

Jabra Evolve 75

It's absolutely bloody awful as a sound source. Absolutely fine for listening to music with, but as a headset for recording sound it stinks. The sound during phone calls is fine, but expectations aren't generally very high. Bloody expensive too.

Logitech G930 wireless gaming headset:

Decent sound, but lacks dynamic range in terms of the microphone. Won't work well during a live lecture since it covers both ears. Great at keeping sound out, so very good as a headset for listening to music.

Samson XPD2 wireless lavalier microphone:

Have ordered, but not yet received. You can use it as a lav mic, but I'm going to experiment with using the Zoom H1n below as the input (via a 2x 3.5 mm cable plus a 3.55 mm female -> XLR converter), so that I can record on the H1n simultaneously as I live-stream. We'll see how it works out.

I also bought what is supposed to be a better Lavalier mic (J-082S 044) and a 3.5 mm/XLR adapter:


Blue Yeti microphone:

Yeti microphone image

This is my default microphone for video conferencing and recording videos. It's a great microphone. Cheaper than the crappy B350-XT above. Has several different pickup patterns. I love it. 

I'm using it together with a boom arm I got off of Amazon ('Neuma Professional Microphone Stand with Pop Protection').

Zom Handy H1n sound recorder:
Zoom H1n 2-Input / 2-Track Portable Handy Recorder ZH1N B&HZoom APH1N Accessory Pack for H1N Handy Recorder | Recorders - Store DJ

This is my favoure toy though. It's small, light and have great sound. It's a stereo microphone when use as a sound recorded. You can also hook it up via USB (and have it powered via USB) and use it as a high-quality MONO microphone when recording videos or video conferencing. You can NOT record at the same time as you're using it as a USB microphone. I also got the Zoom APH 1 N/GE Accessories Bundle.

The portability makes it great for a number of uses. You can pass it between lecturers that want to record good-quality sound for lecture videos, and it's easy to take home (the Blue Yeti is a heavy beast).

You can also stick it the podium when giving a lecture and it will capture surprisingly good sound. You can record sound and replace webcam sound in post using e.g. KDENLive. You can attach a lavalier mic and use it to record sound during a live lecture and replace webcam sound in post. And more.

It has a 3.5 mm mic input and a 3.5 mm headphone output. I'm planning on experimenting with recording on the H1n at the same time as I've got the headphone output connected to the Samson (above) so that I can stream the sound to my laptop, and share it via zoo, since wireless technologies can be unstable in a lecture hall with lots of phones with wifi running (anywhere you have students). We'll see how it works out.


----------------
Once the audio is taken care of, I plan on using the following for the visual, and use OBS Studio to tie it all together.

Document camera JOURIST DC80

H1n Audio Recorder front viewH1n Audio Recorder front viewWebcam Logitech C920

H1n Audio Recorder front viewC920 HD Pro Webcam 1


I've also ordered a chromakey set for fancier video production. Will be interesting to see how it turns out.

663. Giving a zoom + on-campus lecture (on linux, win and mac)

Preamble:

The uni admins aren't making it easy for us. 

I can handle doing everything on-campus, giving good, or occasionally very good, lectures using the white board and making it dynamic by actually engaging with the target, the students. I can often get them to share my excitement over the amazing stuff we're discussing (especially MO theory -- it's my favourite topic, and my favourite lecture). 

I can handle doing everything online if necessary, optimising my lectures to work through zoom or, even better, do away with lectures completely and rely on pre-recorded videos that take advantage of the video format, and use them to flip the class. We can then meet up on zoom to discuss the topics.

But what we're being asked to do is to focus on on-campus teaching, while making sure that everything is being streamed live online to avoid students from showing up to class when infectious.

Note that in our lecture halls we don't have computers. We're expected to bring our own, and we use single projectors. We also don't get any help from IT. Nothing is ever recorded here.

This is incredibly primitive and unprofessional compared to how things were done back in Australia.

What I will show here:

A few approaches to making a lecture work OK for both on-campus and online students simultaneously, and easily. The solutions assume that there's no competency, interest or support from IT.

1. The Basic
The easiest approach is to start zoom on your laptop, share a set of slides and stream it. You need to think about audio though, and there are a number of wireless solutions.

We've been told to use bluetooth headsets, but bluetooth has poor audio. Using 2.4 GHz wireless headsets, like my old logitech G930, gives better audio, but then you can't hear the local audience properly. 

My preferred solution is to use a Samson XPD2: 
http://www.samsontech.com/samson/products/wireless-systems/xpd-series/xpd2lav/

It's not a headset -- sound won't come out of it, but you can crank up the sound on your computer (or even use external speakers -- I have a very old HP USB speakers that are just about loud enough for a lecture hall (https://support.hp.com/ca-en/document/c02574017)

You can obviously switch input to webcam/document cam etc., but it's pretty basic.

If you have a document camera you can use this just like a webcam. Or you use e.g. https://gitlab.com/docphees/doccam to manage your document camera, and then use the window as input to zoom through share screen.

2. With a bit of Flair

This is a somewhat technical solution on linux, but I think it's easier on win/mac. What we can do is to set up a virtual webcam. The contents of the virtual webcam will be supplied by obs-studio

We then use obs-studio -- in studio mode no less -- to switch between different types of views.

virtual webcam: If you're on linux you need to install v4l2loopback (either as the dkms in the deb repo, or by a very simple compile), and if you're on linux you need the v4lsink. If you're on win/mac you can simply install the virtual camera plug-in for obs-studio.

On linux you need to create a virtual webcam:
sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps=1

In obs-studio you then choose Tools/V4L2 Video Output and choose /dev/video10

obs-studio
Once that's up and running, set up at least two scenes in obs-studio, and pick studio mode.

I've set up one scene with a lion and a styracosaurus on a webcam, with the background chromakeyed out* over a molecular simulations video, and another one showing the guardian website, but one could've been the window with your slides, and another could be a document camera.


I've then set up ctrl+shift+alt+5 to switch between them:


You can even have different audio input depending on the scene. Useful if you're using wired microphones and moving between different stations in your lecture hall.

In zoom: now all you need to do is to pick the virtual webcam device as your input in zoom. There is a CPU overhead to using obs-studio, so expect the laptop to keep the fan on throughout the lecture.

*The chromakey background is the blue cover of an Office Depot notebook :)