records from optical-in too fast

We all have our ideas regarding recording! Share your experience.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
marbo
Posts: 20
Joined: Tue Dec 04, 2007 5:50 pm
Operating System: Please select

records from optical-in too fast

Post by marbo » Tue Dec 04, 2007 6:32 pm

Hello,
I am new to audacity and wanted to record old MDs via optical output to my laptap. Since my laptap does not have any line in, I am using an external usb soundcard (aureon 5.1 usb mk II). My problem is, that recordings from line in are ok but recordings from S/P-DIF are faster (pitch/velocity) than the original. See the image:
Pitch.jpg
Any ideas how to cope with that?

Oh, tried both Audacity 1.2.6 and 1.3.4 without any change and am on windows.
Thanks in advance!

alatham
Posts: 1591
Joined: Tue Jul 31, 2007 2:27 pm
Operating System: Windows 10

Re: records from optical-in too fast

Post by alatham » Tue Dec 04, 2007 6:55 pm

You digital audio player is probably trying to use the 48KHz sample rate, not the 44.1KHz rate.

Try setting Audacity to 48KHz in the lower left hand corner of the main screen. Does that help when using the digital input?

marbo
Posts: 20
Joined: Tue Dec 04, 2007 5:50 pm
Operating System: Please select

Re: records from optical-in too fast

Post by marbo » Tue Dec 04, 2007 7:11 pm

@alatham
Thanks for the fast answer!
But unfortunately this does not change it. When recording 35 seconds, I get a record of approximately 32 seconds length!
I do not know if this is a problem but when recording, audacity is always some seconds behind - the line is moving further with time but the spectrum gets filled some seconds later. What I try to say is, that my system is obviously not able to do it in realtime! My System: windows xp service pack 2, with 512mb ram and 2GHz shouldn't this be enough?
Any other ideas?

marbo
Posts: 20
Joined: Tue Dec 04, 2007 5:50 pm
Operating System: Please select

Re: records from optical-in too fast

Post by marbo » Tue Dec 04, 2007 8:33 pm

@alatham
You were right, the samplerate is the problem.

So when recording at 48kHz and then (!) changing audio track samplerate inside audacity back to 44,1kHz I get an audio track with right length and pitch.
But now - next problem - when I export this to a wav file the samplerate is again 48 and the track is slightly longer. The whole song was 5:21 and the resulting file is 5:26!

Any idea how to get the digital audio player using the right samplerate, instead of playing with audacity?

alatham
Posts: 1591
Joined: Tue Jul 31, 2007 2:27 pm
Operating System: Windows 10

Re: records from optical-in too fast

Post by alatham » Tue Dec 04, 2007 10:43 pm

marbo,

First, the reason Audacity appears to be missing data while recording is because drawing the waveform is low-priority. So Audacity only writes a new image to the screen occasionally, making it appear that audio might be messed up. In reality, the audio should be fine.

And for your other problem, it'd be best if you can get your digital player to send a 44.1KHz stream. But I don't know how to do that, maybe the manual or website will.

So it appears that you can record at 48KHz, and playback at 44.1KHz. That's odd, but I've seen this before a few times. I can't really explain it.

I can tell you that Audacity has a bug when you Export to a sample rate that is different from the track that Audacity recorded/imported (as you have done). It adds silence to the end of a file for some reason.

That 5:26 second file you have, does it play at the right pitch? If it does, I bet it's got a few seconds of silence tacked onto the end of it. If that's the case, you can just import it into Audacity and cut off the silence and then export it again (to the same sample rate), that should get rid of the extra silence. It's annoying, but until Audacity's sample rate conversion is fixed I think it's the only workaround we've got.

kozikowski
Forum Staff
Posts: 69374
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: records from optical-in too fast

Post by kozikowski » Wed Dec 05, 2007 6:23 am

<<<Any idea how to get the digital audio player using the right samplerate,>>>

The "right" sample rate is 48 (or 96 or higher) not 44.1. 44.1 is CD quality deliverable, not a production format. All video production is 48, DATs run at 48, DigiBeta and D1s run at 48, etc, etc.

44.1 is barely acceptable to most audiophiles when it's done correctly. When you try to do production--something as simple as changing the volume--in 44.1, errors show up immediately.

48 makes very good MP3s and most CD burning programs accept it, too. It makes the video people really happy. What are you trying to do with the work?

Koz

marbo
Posts: 20
Joined: Tue Dec 04, 2007 5:50 pm
Operating System: Please select

Re: records from optical-in too fast

Post by marbo » Wed Dec 05, 2007 12:14 pm

@kozikowski
Quote: "What are you trying to do with the work?"
I have a lot of old Mini Discs and want them in flac. I bet almost all records are already in 44,1kHz on the MDs.

@alatham
Quote: "That 5:26 second file you have, does it play at the right pitch? If it does, I bet it's got a few seconds of silence tacked onto the end of it."

Yep, you're right, silence at the end, pitch sounds right and without silence the whole song has the right length! So it seems to work this way.

Now I found out that my soundcard only allows 48kHz on the digital ins/outs. Well, I never thought of that when buying since I thought there would be something like downward-compatibility!
A bit weird I think, that the souncard first changes from 44,1(MD) to 48kHz(S/P-DIF) and then I have to rechange it.

Well, do you think that on this way I'm losing quality? I mean there are three conversion steps!
Any idea if there is another possibility to get the right sample rate out of my soundcard?
Thanks so far!

alatham
Posts: 1591
Joined: Tue Jul 31, 2007 2:27 pm
Operating System: Windows 10

Re: records from optical-in too fast

Post by alatham » Wed Dec 05, 2007 4:00 pm

That's actually two conversions, but you're right that it would be best to avoid them. At the same time, the only way to avoid them would be to record an analog signal, but that will add noise from the analog parts of the circuits. So you're damned if you do, and damned if you don't.

I'm not sure what I'd do in this situation. Are you going to keep these flacs on your computer and use that to play them? Or are you going to burn them to CD eventually?

As long as you aren't going to make CDs, I would just leave them as 48KHz Flac files. That will remove the need to cut out silence at the end of each song (which would take days of boredom).

marbo
Posts: 20
Joined: Tue Dec 04, 2007 5:50 pm
Operating System: Please select

Re: records from optical-in too fast

Post by marbo » Wed Dec 05, 2007 4:54 pm

@alatham
Quote: "As long as you aren't going to make CDs, I would just leave them as 48KHz Flac files."

Well, I was going to leave them on my computer so I can access them more easily. But I also wanted to store them without quality loss and without wasting space on my harddisk (it is too small). If I store files at 48 kHz, they will be bigger than files at 44,1 kHz, am I right? And the thing is, the source (my MDs) are just recorded at 44,1 kHz, so that's like if I would take an mp3 file recorded at 44,1 kHz and reincode it in 48 kHz - just wasting space!

Anyway, since there might be no way to avoid this, do you know if there are any improvements in 1.3.4 regarding samplerate conversion which would make me use it instead of 1.2.6?

alatham
Posts: 1591
Joined: Tue Jul 31, 2007 2:27 pm
Operating System: Windows 10

Re: records from optical-in too fast

Post by alatham » Wed Dec 05, 2007 5:07 pm

If I store files at 48 kHz, they will be bigger than files at 44,1 kHz, am I right? And the thing is, the source (my MDs) are just recorded at 44,1 kHz, so that's like if I would take an mp3 file recorded at 44,1 kHz and reincode it in 48 kHz - just wasting space!
Yes, the files will be slightly larger, and that extra space is pretty much wasted.

And no, the sample rate conversion bug also shows up in the beta versions of Audacity.

If you want them at 44.1KHz, I would export everything as a 48KHz wav and then use r8brain (freeware for Windows) to batch convert all the wav files down to 44.1KHz. At that point, you'll have to convert them to flac, I'm sure there's a freeware wav -> flac converter somewhere that can do all that without you having to monitor it.

Post Reply