Regular recording gaps from cassette to PC [SOLVED]

Help for Audacity 2.x.x on GNU/Linux.

ImageThis forum is for Audacity 2.x.x on GNU/Linux and Unix-like operating systems.
Please state which version of Linux you are using, the exact three-section version number of Audacity from Help > About Audacity... and whether you installed your distribution's release or daily version of Audacity or compiled Audacity from source code.

Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.

Regular recording gaps from cassette to PC [SOLVED]

Permanent link to this post Posted by jg1 » Tue Feb 21, 2017 6:35 pm

I've just installed Audacity 2.1.2 from the Xubuntu repository (v16.04 LTS, Amd64) on a Dell XPS-17 laptop with Intel Core i7-2670QM processor 2.20 GHz with 8GB RAM and 2x 500MB HDDs. It has a 3GB NVIDIA GeForce GT 555M Graphics Card. There is a 12GB swap partition and a 27GB Linux system partition with more than 18GB free space. I am trying to record from an EZcap USB Cassette Capture audio cassette drive connected through a USB port on the PC which has a Li battery installed and is plugged into the mains power. I can get the setup to record OK but whatever I do I get short gaps in the recording of about 25ms each +/-50%, about 0.6secs apart. The tapes are old and of poor quality but there are no gap-clicks either listening to the cassette player or on Playthrough; only on the Audacity recorded data when it is replayed.

I've changed the audio buffer to 10ms and to 1000ms and switched off Playthrough but it makes no difference.
I've swapped the Open Source drivers for NVIDIA's own, to no avail.
I've uninstalled the CPU monitor which refreshes every 250ms and that makes no difference.
Looking at the CPU trace, CPU usage for any core selom reaches 40% and most of the time only 1 or 2 cores are above 20%. Less than 750MB RAM is being used out of a total of 7.7GB, with no Swap activity. There are no spikes.
Attached is a screen shot of the audio trace from my last effort.

Any clues or ideas as to what I could try next would be most welcome.
Tks in anticipation
jg
Attachments
Screenshot_2017-02-21_18-15-02.png
Screenshot_2017-02-21_18-15-02.png (111.65 KiB) Viewed 621 times
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by steve » Tue Feb 21, 2017 7:17 pm

Very strange.
Have you tried a test recording from your normal sound card to see if the gaps still happen?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45390
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by jg1 » Tue Feb 21, 2017 9:34 pm

Hi, Steve
Tks for quick reply.
No I haven't. Not sure how I'd go about that. I've looked for a traditional-style sound card but I keep coming back to the NVIDIA graphics card.
If I were to record a simple sonnd stream through the internal mike, would that work? What might be a suitable App to use?
As you will guess, this is a foreign land to me, full of dragons and bear-traps.
Rgds
jg
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by steve » Wed Feb 22, 2017 2:01 am

In a terminal window, type:
Code: Select all
aplay -l

(the last character is lower case "L")
What does it say?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45390
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by jg1 » Wed Feb 22, 2017 8:51 am

Tks again for your reply.

[email protected]:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC665 Analog [ALC665 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC665 Digital [ALC665 Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
[email protected]:~$

Clever stuff!
Chasing that down I note that according to Synaptic, I'm using the ALSA drivers v1.0.25 (installed from the Xubuntu distro) and according to
http://www.alsa-project.org/main/index.php/Changes_v1.0.22_1.0.23
support for ALC655 was added in v1.0.23.
Your further guidance would be greatly appreciated. Meanwhile I'll continue to poke about to see if I stumble on a solution.
jg
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by jg1 » Wed Feb 22, 2017 10:08 am

Further to my first reply which is still with the mods I have done a test which may be helpful:
I started by downloading Gnome-sound-recorder and used the internal mic to record a piece from the radio. When I looked at the (.ogg) trace with Audacity there were no breaks although the amplitude of the trace was quite low. Encouraged by this I added an external mic (mono) and turned up the gain. When I recorded through Audacity using the HDA Intel PCH: ALC665 Analog (hw:0,0) setting in Edit/Preferences/Devices, there were no breaks (see attached traces).
Screenshot_2017-02-22_09-35-08.png
Screenshot_2017-02-22_09-35-08.png (75.45 KiB) Viewed 607 times
Screenshot_2017-02-22_09-35-49.png
Screenshot_2017-02-22_09-35-49.png (73.27 KiB) Viewed 607 times

This says to me that the problem lies with the handling of the digital input via the USB as the Playthrough sound is fine. I've tested all the USB ports on the PC and the result is the same.
jg
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by steve » Wed Feb 22, 2017 11:07 am

jg1 wrote: I've tested all the USB ports on the PC and the result is the same.

Rats, that was my next suggestion. "Next!"


Try recording with a sample rate of 48 kHz. To do that:
  1. Connect the USB device
  2. Launch Audacity
  3. Change the "Project Rate" (lower left corner of the main Audacity window) to 48000
  4. Select the USB device as the recording device
  5. Start recording.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45390
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by jg1 » Wed Feb 22, 2017 12:01 pm

BINGO !!
Brilliant... No gaps.
But why?

I ran another test with exactly the same software build, but X86 rather than Amd64, with a much less capable CPU and no graphics card (Dell Inspiron-530 desktop) and got the same result. I also have a (rarely used) Win10 partition on the laptop. This morning I installed Audacity 2.1.2 which worked OK from the off with 44100Hz recording rate. That was going to have to be a very reluctant workaround until you struck gold.

Thanks 1,000,000
I shall break out the Coke in celebration
vbw
jg
:D
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC

Permanent link to this post Posted by steve » Wed Feb 22, 2017 12:23 pm

Many of the common USB audio devices use a fixed 48000 Hz clock (built into the hardware) for timing when to measure each consecutive sample value. In order to operate at 44100 Hz, the data needs to be resampled from 48000 samples per second to 44100 samples per second. How exactly this conversion happens is for the hardware and its drivers to sort out. In your setup, that's not working correctly. It seems that the device is providing too few audio samples to fill the audio buffers, so you are getting short periods of silence at the end of each audio buffer.

By telling Audacity to use 48000 Hz sample rate, we bypass the problem by calling for audio at the "native" sample rate for the device of 48000 samples per second.

So that you don't need to manually change the project rate setting every time, you can set the default project rate in "Preferences":
"Edit menu > Preferences > Quality"
First setting "Default Sample Rate:" set to 48000
http://manual.audacityteam.org/man/qual ... ences.html
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45390
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Regular recording gaps from cassette to PC [SOLVED]

Permanent link to this post Posted by jg1 » Wed Feb 22, 2017 2:01 pm

Job done!
Tks again, Steve.
Mark this one as Fixed/Solved
vbw
jg
jg1
 
Posts: 12
Joined: Tue Feb 21, 2017 5:43 pm
Operating System: Linux *buntu


Return to GNU/Linux and Unix-like



Who is online

Users browsing this forum: No registered users and 2 guests