Crackling at low latencies on M1 Mac, recording audio with no plugins

All about the tools and techniques involved in capturing sound, in the studio or on location.

Moderator: Moderators

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by claz »

Thanks to all for the suggestions and confirmation that this shouldn't be happening.

Lots of permutations to try, so I'm going to take a beat and work on those.

If I meet with success, I'll report back what worked!
claz
Regular
Posts: 100 Joined: Mon Sep 10, 2018 3:35 am

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by claz »

Just thought I'd update this with results, in case anyone comes to this with a similar issues, and to say thanks for suggestions.

I did switch the M4's USB cable, and things seem to have improved.

I had been using a USB-C to C cable, and now, surprisingly, I'm using a USB-C to A-with-adapter-back-to-C (because it's all I had available).

I'm at a buffer size of 32 samples now, getting almost no clicks (every ~10 minutes instead of every 30 seconds) recording a couple of tracks of audio -- but still not none.

I wish I could understand *why* the USB cable would make a difference, so that I could remedy this completely -- but I'm also not 100% sure that all the clicks were the result of the cable.

Whenever I've heard one, I've tried to immediately open Activity Monitor, and the only thing I've noticed so far is that sometimes I have an automated backup running.

This should still consume only a fraction of the CPU I have available, so I'm not convinced that that's the cause, either.

The other thing I've done is unplug my Time Machine backups while recording.

So, hooray for progress, but too bad for remaining ambiguities. If the problem continues, I hope to get enough data for a definitive solution!

Thanks to all for troubleshooting with me.
claz
Regular
Posts: 100 Joined: Mon Sep 10, 2018 3:35 am

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by James Perrett »

claz wrote: Tue Jul 05, 2022 2:35 pm This should still consume only a fraction of the CPU I have available, so I'm not convinced that that's the cause, either.

It isn't so much down to CPU but more down to whether it locks out any other interrupts or prevents any system calls from happening. If a badly written low level routine prevents anything else from running for half a millisecond then you'll end up with an interruption to the audio stream. 32 samples is very low in my experience with Windows although I don't know if the Mac works differently. It would almost certainly be safer to use 64.
User avatar
James Perrett
Moderator
Posts: 12382 Joined: Mon Sep 10, 2001 12:00 am Location: The wilds of Hampshire
JRP Music - Audio Mastering and Restoration. JRP Music Facebook Page

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by Wonks »

It may well be that the USB C to C cable wasn't well made, or possibly damaged, and even though USB2 rather than USB3, some of the signals were getting corrupted and so rejected.

What you are left with are the odd dropouts due to the processor occasionally being too busy, as James says. You either need to spend time tracking down what process is occasionally holding things up, or else swap to a 64 sample buffer size.
User avatar
Wonks
Jedi Poster
Posts: 13209 Joined: Thu May 29, 2003 12:00 am Location: Reading, UK
Reliably fallible.

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by claz »

That all makes sense.

Latency drives me crazy when recording with VST instruments, hence a buffer of 32 -- but I shall continue to observe and optimize!
claz
Regular
Posts: 100 Joined: Mon Sep 10, 2018 3:35 am

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by blinddrew »

What sample rate are you running at? Raising that will lower your latency.
User avatar
blinddrew
Jedi Poster
Posts: 19700 Joined: Sun Jul 05, 2015 12:00 am Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by Wonks »

Doing that will put more work on the processor. But if it's another program that very occasionally just holds an interrupt for too long, and the processor is otherwise coping with the audio, then you might get away with it.
User avatar
Wonks
Jedi Poster
Posts: 13209 Joined: Thu May 29, 2003 12:00 am Location: Reading, UK
Reliably fallible.

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by blinddrew »

Indeed, but I think we've established that the processor isn't particularly stressed. So the buffer could be raised and offset slightly by a sample rate rise if the OP is using 44.1 or 48.
User avatar
blinddrew
Jedi Poster
Posts: 19700 Joined: Sun Jul 05, 2015 12:00 am Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by claz »

Re: sample rates, I'm at 44.1 -- so good idea! Isn't it true that higher sample rates come with some side effects (besides file size)?

Mic dust crackles wouldn't manifest similarly to buffer-size crackles, would they? The mic wasn't in use for a number of months prior, and I didn't store it following best practices (now I do!).
claz
Regular
Posts: 100 Joined: Mon Sep 10, 2018 3:35 am

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by blinddrew »

claz wrote: Thu Jul 07, 2022 12:48 am Re: sample rates, I'm at 44.1 -- so good idea! Isn't it true that higher sample rates come with some side effects (besides file size)?

Doubling from base to 88.2 or 96kHz is very unlikely to cause any kind of side-effects. I understand there might be some if you start going to 192 or beyond but I can't remember what they are. I'm sure a search of the site will find the answer that Hugh wrote about it a while back. :)

Mic dust crackles wouldn't manifest similarly to buffer-size crackles, would they? The mic wasn't in use for a number of months prior, and I didn't store it following best practices (now I do!).

I don't think so, condensation on a mic (or the dust attracted by that) tends to sound different to dropped samples.
User avatar
blinddrew
Jedi Poster
Posts: 19700 Joined: Sun Jul 05, 2015 12:00 am Location: York
Ignore the post count, I have no idea what I'm doing...

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by Wonks »

Your processor has to work harder at higher sample rates, so if you are using a lot of processor-hungry effects or instruments then you may need to keep an eye on your processor loading. But on a modern computer, that is generally going to be a lot of effects/instruments before it even breaks into a slight sweat.

And doubling the sample rate doubles the recording file sizes, but unless you are working with a nearly full drive, then that too shouldn’t be an issue these days with such large drives available.
User avatar
Wonks
Jedi Poster
Posts: 13209 Joined: Thu May 29, 2003 12:00 am Location: Reading, UK
Reliably fallible.

Re: Crackling at low latencies on M1 Mac, recording audio with no plugins

Post by RichardT »

I don't think the difference in latency between a buffer of 32 samples and one of 64 is going to be significant. The difference between the two is less than a millisecond. Try 64 samples and see if that fixes the problem.
RichardT
Frequent Poster (Level2)
Posts: 2329 Joined: Fri Aug 13, 2004 12:00 am Location: London UK
Post Reply