Reverse detail from Kakelbont MS 1, a fifteenth-century French Psalter. This image is in the public domain. Daniel Paul O'Donnell

Forward to Navigation

Installing Vidyo on Ubuntu 16.10

Posted: May 12, 2017 15:05;
Last Modified: May 14, 2017 14:05

---

I need to use Vidyo conferencing software for some projects I’m on. Because I just reinstalled Ubuntu 16.04, I needed to reinstall the Vidyo desktop.

This is not easy, since the installation file Vidyo directs you to contains a dependency that is not available on Ubuntu 16.10 (libqt4-gui).

There are various solutions out there, though I was not able to get the one proposed by Vidyo itself to work.

The one that did work for me is on the CERN site.

apt-get -f install
sudo apt-get install libqt4-designer libqt4-opengl libqt4-svg libqtwebkit4
wget -O vidyo-desktop.deb https://goo.gl/2Ykmoq
sudo dpkg -i vidyo-desktop.deb
apt-get -f install

To run Vidyo, either type VidyoDesktop at the command line or use the HUD to find VidyoDesktop in your GUI.

Notes

  1. The apt-get -f install is not really necessary if you do this first. I did it (as does the original poster) in order to clean up mistakes I made earlier.
  2. Instead of wget -O vidyo-desktop.deb https://goo.gl/2Ykmoq you can download the file in your webbrowser (the google short URL resolves to a Dropbox file: https://www.dropbox.com/s/7cw6acxm4ys2ioy/VidyoDesktopInstaller-ubuntu64-TAG_VD_3_6_3_017-no_libqt4-gui.deb?dl=0); if you do this, then you need to use that longer filename in the rest of the commands.
  3. libqt4-designer libqt4-opengl libqt4-svg are dependencies that were originally unmet when I tried installing Vidyo. The person who posted this solution also added libqtwebkit4 so I did too. I’m not sure it is necessary, however.
----  

Dangerous bug in Moodle

Posted: Apr 19, 2014 12:04;
Last Modified: Mar 04, 2015 05:03

---

Just discovered a dangerous bug in the Moodle essay question template.

About the essay question edit screen

When you write an essay question in Moodle, there are a couple of different boxes on the form:

The question goes in the top. Then you have the “General response” (something the student usually can see when the results are released). Then the “Response Template,” which can be used for including text you want to appear in the answer box as soon as the question loads for the student (e.g. text like “Type your essay here”). And finally a grader box, where you can include tips for the grader (this shows up on the grading screen right above the student’s answer.

The problem

The bug involves the Response Template box: text entered there is difficult to delete. In particular, the fact that this box is empty on the “edit question” screen ‘’‘doesn’t mean the previous content is not being shown to the student’‘’.

I discovered this by accident: I had accidentally entered the grader tips into the response template box. When I realised my mistake, I went back and deleted the content of all the template boxes (by either “cutting”—i.e. <ctl>+x—or copying—<ctl>-c and then back spacing the text away).

But when I previewed the questions, the response template content was still showing up in the answer box, ‘’‘even though it was not visible in the template form box on the edit screen’‘’.

The solution

To solve this you need to do the following:

  1. go to the top left corner of the response box (that is probably where your cursor will start if the box has no visible content)
  2. holding down <shift>, move your cursor to the right, the way you would if you wanted to highlight existing content.
  3. delete the “highlighted text” (in fact, you won’t see any and your cursor won’t travel because there is no text visible in the box) by hitting the <bacspace> key.
  4. type in a few spaces to provide new, meaningless, content for the response template.
  5. save the question.

When you preview the question, the content of the answer box should just be the spaces you entered. I assume (but haven’t checked) that you can then go in and remove the spaces.

Discovered this ust before an exam went live. Whew!

----  

Using the M-Audio Audiophile USB Digital Audio Interface with Linux

Posted: Sep 07, 2008 10:09;
Last Modified: Nov 01, 2014 15:11

---

This describes how to get the M-Audio Audiophile USB Digital Audio Interface working with Linux/ALSA. It has been updated (2014-11-01) to reflect recent discoveries and now seems to work well.

Contents

Introduction

Many of my courses deal with sounds of speech, and I am increasingly looking to supplement my course materials with additional digital video and audio material.

The University of Lethbridge, like most universities, I imagine, is well equipped with computer labs and IT personnel who are able to assist faculty and students with production of this kind of material. But I am looking for something that will allow me both to experiment without committing to the time involved for arranging studio and personnel time, and something that will allow me to respond quickly to opportunities that arise in the course of the year or moments of pedagogical inspiration. The University also has lots of computer labs, after all, but most faculty have a computer on their desk anyway.

Since I was an avid home recording hobbyist in my teens and twenties, I had most of the most useful hardware in a closet: a decent microphone (necessary), and a mixer and patchbay (optional, though not if you want to do quality-sounding work); and the various cables (RCA, ¼ inch, MIDI, etc.) that make things cheaper and easier to set up. My mixer and patchbay were refugees from an old 1980s Yamaha MM30/MT44 Multitrack home studio (see image). Any old mixer will probably do, and I imagine you might be able to get some cheap ones on the internet. Having a mixer makes life easier in the sense that you have more control over the volume, stereo position, and quality of the audio signal before it gets to the computer. Certainly to begin, however, you can work without one, plugging your microphone directly into the card that acts as an interface between you and your computers.

M-Audio Audiophile USB Digital Audio Interface

The one thing I needed, of course was a way of connecting my microphone and mixer to the computer. I was in a music store on the weekend looking for some supplies, and I found a cheap used M-Audio Audiophile USB Digital Audio Interface (DAI) for sale. While you can buy microphones, record and cassette players, and MIDI cables that all convert a single input directly to USB for recording, a more general DAI like the Audiophile USB allows you to do more. With this, I’ll be able to convert cassettes of accents I have for my class on World Englishes to audio form as well, for example. The M-Audio was an extremely popular DAI, so there are likely thousands of used ones floating around.

A quick search on my cell phone found a page that described how to get the interface working and suggested that it is reasonably well supported in Linux. So I took a flutter. When I got home, I installed the audio software from Ubuntu Studio (a full-featured home studio suite, that is, of course, free). And used some hobby time getting things set up. All in all, it took me about 5 hours, including writing up this description of what I did.

The M-Audio Audiophile USB works with Linux due to some heroic efforts by a couple of people, most particularly Thibault Le Meur, who wrote the kernel documentation. These people have ferreted out and developed patches for the various inconsistencies in the device’s use of the USB protocols. The instructions for getting it working, however, are not always that easy to follow, so I thought I’d collect what I found and write down what worked for me.

Process

Getting the M-Audio Audiophile USB to work with Linux involves two discrete steps:

A third step, which isn’t applicable to my current project, involves getting the MIDI (Musical Instrument Digital Interface) input to work with digital instruments like synthesizers and drum machines. Since I’m at the moment only interested in recording relatively high quality spoken work and analogue feeds from cassettes and records, I haven’t tried it to see if the discussion below gets the MIDI working as well.

Getting the M-Audio Audiophile USB recognised by ALSA

As the kernel documentation indicates, the M-Audio Audiophile USB works partially with current versions of ALSA right out of the box. If have the right modules installed (and you almost certainly do, as USB sound is something I suspect all distributions support), ALSA will recognise your device as soon as you plug it in and turn it on.

So if you have headphones plugged in and have set the card to be the choice for playback (either using whatever utility your desktop uses for letting you set Sound preferences [in Ubuntu: System > Preferences > Sound Preferences], or by giving the hardware address explicitly to a program via the command line or configuration utility), you will be able to hear audio files sent to it.

The problem, however, is that you won’t be able to record anything—or at least anything meaningful. Due to a technical problem, the details of which thankfully don’t have to concern us, audio inputs to the device are recorded as white noise by ALSA if you use the default setting (If you are interested in the problem or planning to do development using the M-Audio Audiophile USB, you can read about the details of the issue in the kernel documentation).

The solution, developed by Thibault Le Meur and others, and recorded in the kernel documentation, is to reload the ALSA USB module with some device specific instructions:

  1. Turn off your M-Audio Audiophile USB sound card
  2. At the command line, remove the usb module: sudo modprobe -r snd-usb-audio
  3. Reinsert the module with explicit information about Audiophile’s location and setup, e.g. sudo modprobe snd-usb-audio device_setup=0x01
    1. Note: I used to specify both the index value index=0 and a different device_setup =0x09, but I found that the index wasn’t necessary with only one USB and that 0×01 worked way better than 0×09—in fact it answers the questions about noisiness in the comments below.
    2. Note the different possibilities are:
      1. device_setup=0×01 (this is the one I use now)
        1. 16bits 48kHz mode with Di disabled
        2. Ai,Ao,Do can be used at the same time
        3. hw:1,0 is not available in capture mode
        4. hw:1,2 is not available
      2. device_setup=0×11
        1. 16bits 48kHz mode with Di enabled
        2. Ai,Ao,Di,Do can be used at the same time
        3. hw:1,0 is available in capture mode
        4. hw:1,2 is not available
      3. device_setup=0×09 (This is the one I originally recommended, but it creates a lot of background noise).
        1. 24bits 48kHz mode with Di disabled
        2. Ai,Ao,Do can be used at the same time
        3. hw:1,0 is not available in capture mode
        4. hw:1,2 is not available
      4. device_setup=0×19
        1. 24bits 48kHz mode with Di enabled
        2. 3 ports from {Ai,Ao,Di,Do} can be used at the same time
        3. hw:1,0 is available in capture mode and an active digital source must be connected to Di
        4. hw:1,2 is not available
      5. device_setup=0×0D or 0×10
        1. 24bits 96kHz mode
        2. Di is enabled by default for this mode but does not need to be connected to an active source
        3. Only 1 port from {Ai,Ao,Di,Do} can be used at the same time
        4. hw:1,0 is available in captured mode
        5. hw:1,2 is not available
  4. Turn your M-Audio Audiophile USB sound card back on.

You are now able to record and playback audio files. You can test it out by plugging a microphone into the one of the two ¼” (unbalanced) input plugs on the right hand side of the back and making a recording from the command line using arecord; if you have a mixer, plug your microphone(s) into the mixer and connect the mixer’s audio out/line out plug to the Audiophile’s RCA Input jacks (second from the right when you are looking at the back):

arecord -D hw:1,1 -c2 -d 10 -t raw -r48000 -fS24_3BE test.raw

(this command uses the following options: -D hw1:1,1, the likely hardware address of your Audiophile USB card; -c2, two-channel recording [required for this card]; -d 10 duration of recording in seconds [default is infinite and is stopped by sending a break signal to the program]; -t raw, a .raw file type; -r48000, sampling rate; -fS24_3BE, number and order of bits).

You can then use aplay to play the recording back

aplay -t raw -r48000 -fS24_3BE test.raw

(the above command will output to your default sound card [i.e. probably the one that drives your speakers]; if you want to hear it in the headphones through your Audiophile, add -D hw:1,0 to the command).

Getting the M-Audio Audiophile USB recognised by JACK

update: I’m not sure the following is necessary any more. I was able to record well within Audacity without going to this step.

Command line recording is not a particularly user-friendly way of working, though knowing how to do it has its uses. For daily work, we are going to want to get the sound card working with the many excellent studio programs available for Linux, all of which (or at least all the most serious of which) work with the connection utility JACK. The fact that your Audiophile is recognised by ALSA, unfortunately, doesn’t seem to mean that it is recognised by JACK (actually your card does seem to be recognised by JACK without modification if you use the default module settings for snd-usb-audio; but it seems no longer to be recognised automatically by JACK or by the GNOME sound preferences manager after you add the device-specific options.

To get it recognised by JACK, you need to modify the JACK settings. You do this using jackctl (also known as qjackctl). While you can work from the command line with jackctl, Ubuntu Studio comes with a graphic version (Applications > Sound & Video > JACK Control).

  1. Once JACK Control is open, choose the “Setup” button;
  2. In Setup click on > beside “Input Device”;
  3. Choose the device that matches the hw: address you used above with arecord: probably hw:1,1 USB Audio #1
  4. Close the setup and start (or restart if you had already started) JACK.

Open up another JACK device (e.g. Ardour, the sound recording program, or even Meterbridge, the sound meter), and see if you are getting an audio signal from your microphone through your Audiophile USB sound card. If things are working, the audio will be available from system/capture 1 or capture 2 (if you used a microphone directly) or system/capture 1 and capture 2 (if you used a mixer); if these inputs are connected to something in the “Connection” button on the Jack Control, you should be able to record audio. If they or JACK are not working, you may need to play with some settings. I found, for example, that I basically was unable to record anything at under 1024 frames/period, and I got the best results by setting the frames/period to its maximum value of 4096. Unfortunately, this brings with it the cost of a very high latency (the time between a signal being triggered and its reception at the computer end): 171 msec. Many people, in contrast, seem to be working with latencies of <10 or even <5 msecs.

Since others appear to be able to get reliable functioning with much lower frames/period (and lower latency), I assume I still need to play with the various JACK settings and perhaps even some of the hardware connections. For the specific type of projects I have in mind at the moment, however—making single voice, spoken word recordings of sounds and words for my classes and converting tapes and records I have used in classes in the past to digital format—I suspect this is a relatively minor issue. I would appreciate any tips, however!

Examples

My first examples, recorded with a good mike, the mixer mentioned above, but otherwise unprocessed and recorded with my computer fan roaring in the background are available here: http://people.uleth.ca/~daniel.odonnell/Teaching/english-3450a-the-pronunciation-of-old-english

Problems

In addition to the latency issues mentioned above, I’m aware of/suspect there may be some additional issues.

  1. I’m not sure how the Audiophile USB card, or the special device specific instructions required to set the module up for it will affect other USB sound cards I use, particularly the USB headset I use for audio conferencing.
  2. Setting the JACK input to the Audiophile USB card looks like it may disable your ability to use other inputs in Jack without changing things back: I did a quick test with Hydrogen (a drum machine), for example, and it looks like I need to change the input back to get it to record in Ardour (though I’m not 100% certain this is true, since none of my spoken word requirements—at the moment!—require a drum track or other instrumentation).
----  

Back to content

Search my site

Sections

Current teaching

Recent changes to this site

Tags

anglo-saxon studies, caedmon, citation, citation practice, citations, composition, computers, digital humanities, digital pedagogy, exercises, grammar, history, moodle, old english, pedagogy, research, student employees, students, study tips, teaching, tips, tutorials, unessay, universities, university of lethbridge

See all...

Follow me on Twitter

At the dpod blog