records from optical-in too fast

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:
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!

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?

@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?

@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?

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.

<<<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

@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!

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).

@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?

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.

And what about bit depth? I haven’t thought about this until now. But I think, correct me if I’m wrong, Mini Discs will be recorded like CDs at 16 bit. So is it better to record in 32 bit and convert to 16 bit or directly record in 16 bit or just recording in 32 bit and not changing it? Well, just because I do not know the bit depth of the signal my soundcard delivers!??

You’re using an external soundcard, that is spitting data into your computer down a USB cable. If you store (record) that data without changing it, then that is the best quality that you can get (without changing your soundcard).

So stick with whatever format your soundcard uses - from skim reading this topic it sounds like it is 16 bit, 48kHz, so for best quality sound, keep it at that.

Higher bit rates improve the “amplitude resolution”, and higher sampling rates improve the “frequency resolution”.
16-bit recordings will give you about 96dB dynamic range.
44.1kHz recording will give you a frequency range up to about 16kHz (theoretically 20kHz, but in practice it is less).

If you convert a 16 bit 44.1kHz recording to a higher bit depth or higher sample rate, it will not improve the sound quality as even a perfect conversion can only replicate what is already there.

Increasing the resolution is only useful if you are manipulating the sounds, for example mixing together several tracks, apply effects, or filtering. In such cases, the higher resolutions reduce the losses incurred by the digital processing.

What Steve says is more or less on the money, but I have a few tiny things to say.

Higher bit rates improve the “amplitude resolution”, and higher sampling rates improve the “frequency resolution”.

Higher sampling rate actually gives you greater frequency range, not resolution. Insane audiophiles will tell you that even if you’re ultimately going to end up with a 44.1KHz file, you still need to do all your processing at 96KHz (or even 192KHz) because of vaguely-defined “phase interferences.” These people don’t generally know what they’re talking about.

The difference between a file that was converted from 48 → 44.1 KHz and a file that was converted from 192 → 44.1KHz will be inaudible to a human being unless evolution is getting ahead of me. This is provided that the conversion process is equally good (not always a safe assumption).

Go ahead and keep the files at 48KHz during processing and resample them as a last step before burning.

What Steve said about bit depth is right. If you’re doing any editing, use 24-bits or higher. If not, then go ahead and keep them at 16.

Also,

16-bit recordings will give you about 96dB dynamic range.

A real world 16-bit signal will never get you higher than 90dB above the noise floor. This is because the first bit is more or less useless if you’ve got any analog instruments in the project since the noise floor from any analog equipment will completely hide the digital noise floor (this is a good thing though, digital noise is not pretty). And even 90dB is asking too much of most equipment.

However, if you’re generating the signal completely digitally (via a piece of software generally), then you can get much closer to 96dB.

All this means nothing unless you routinely leave your speakers turned up past 90dB (I hope that isn’t the case) and have an excellent stereo system.

Higher bit-rates give you greater frequency range because the resolution in the time domain (number of samples per unit time) is greater. Any processes that involve shifting samples time-wise (for example pitch shifting) will be measurably higher quality with higher bit-rates, though at bit rates of 44.1kHz upwards, the difference is not usually very audible.

A real world 16-bit signal will never get you higher than 90dB above the noise floor. This is because the first bit is more or less useless if you’ve got any analog instruments in the project since the noise floor from any analog equipment will completely hide the digital noise floor (this is a good thing though, digital noise is not pretty). And even 90dB is asking too much of most equipment.

If you get much better than about 80dB SNR you are doing well unless you have (expensive) professional recording gear.

Digital noise does not actually sound bad, it’s pretty much like “white noise”. Digital distortion on the other hand does sound bad - very bad. :smiley:

Higher bit-rates give you greater frequency range because the resolution in the time domain (number of samples per unit time) is greater. Any processes that involve shifting samples time-wise (for example pitch shifting) will be measurably higher quality with higher bit-rates, though at bit rates of 44.1kHz upwards, the difference is not usually very audible.

Agreed. Higher sample rate means higher resolution in the time domain, broader range in the frequency domain.

And the bit about pitch shifting (and similar processes) makes sense logically to me. I’ve never thought of that. Thanks.

Audacity is an excellent tool, but like all good tools it’s targeted towards a specific use. Unless you are only trying to capture part of a specific song or modify it’s aural representation and you’re using Audacity, you’re using the wrong tool. Use CDEX for digital audio extraction. I love audacity and use it regularly to record myself reading books out loud, it’s good for that kind of thing. One thing to be sure you do with CDEX is set your e-mail address in their preferences to Myob_@_myob.com or some other BS e-mail address. Otherwise, the album detection feature won’t work.

Ooh the resurrection of an ancient topic :slight_smile:
C-Dex is a great tool for ripping CDs, but as you say seier, the right tool for the right job - C-Dex is a CD ripper, so no use at all for MDs.
Another good tool for ripping CDs is “Exact Audio Copy” http://www.exactaudiocopy.de/
When set up correctly, EAC gives the reassurance of “bit perfect” copies of CDs. One word of warning with EAC is that if the CD is damaged, extraction can be extremely slow (and no better than the much quicker C-Dex).