27 October 2020

667. XP PEN/virtual whiteboard during a lecture -- mirroring an application window on linux

The situation:

We're allowed to teach on campus at the moment, but we're also strongly encouraged to adopt a hybrid model where we stream everything via zoom so that students don't show up if they have flu/cold-like symptoms.

We've spent the past few years killing off ppt and transitioning to whiteboard/chalk-and-talk. The students love it -- the pace is better, and the lectures become more interactive since we can adjust our teaching to the students' learning. Good stuff. But horrible for streaming -- you can't just point a webcam at a whiteboard and expect a good outcome (although if need be, it can be done -- just use a good camera and write large with a dark pen).

I have an XP Pen Artist 13.3 Pro (https://www.parkablogs.com/content/review-xp-pen-artist-133-pro-pen-display ) which is fantastic for drawing. A lot of fun, and a potential solution to the whiteboard quandary.

The Problem:

Both the students in the class room and those following the lecture on zoom need to be able to see what you're doing. And since the pen display is a DISPLAY, you need to have your drawing program open on the pen display, and not on the projector (which is also a display).

The Solution:

1. Open your drawing window (xournal, or xournal++ or openboard or krita) on your pen display ... display. 

2. Then run xwininfo (part of x11-utils) and click on your window. You get a window id, e.g. 36000a

Then run x11vnc:
x11vnc -id 36000a

Note the port number -- likely 5900.

The window is now being shared via vnc. 

3. To see it, use e.g. vinagre, click Connect, set the protocol to vnc and the port to 5900 (and you're presumably connecting to localhost). 

Make sure to enable 'scaling', since many old video projectors have a 4:3 resolution ratio, whereas e.g. the xp pen 13.3 has a 16:9 ratio.

Drag this window to the projector.

4. Share the original window via zoom

Note that I've had issues getting the pen display to map correctly when all three display (laptop, xp pen, and projector) are connected. Turning off the laptop screen solved it.


A script:

I've made a script called mirror.sh which starts the x11vnc with the correct id:

winid=`xwininfo |grep "Window id"|gawk '{print $4}'`
x11vnc -id  $winid




01 October 2020

666. Zoom -- multiple booking for a course

Problem:

Recurring bookings are easy enough to make in zoom, but what do you do if your lectures are given at different times each day?

Solution: 

make a recurring booking e.g. at 8 am, 2 hours, each day for two weeks. 'When' is not important.

Then go in and edit the booking. You can then change the times for each zoom meeting:

You can also delete meetings e.g. those that fall on weekends:






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.