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

Discuss the hardware/software tools and techniques involved in capturing sound, in the studio or on location.

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

Post by claz »

Wondering if anyone has suggestions for this bugaboo:

I'm getting intermittent pops and crackles at low latencies on a machine that should be able to handle a decent workload at low buffers.

I need the low buffers for live overdubbing without latency.

Worse, the crackles end up in the recording; it's not just a monitoring issue.

Equipment:
- M1 Max Macbook Pro, 64GB Ram
- Motu M4, latest driver / firmware
- Mac OS 12.4
- Reaper 6.59 (also happens in Logic, seemingly less)

Test case:
- In Reaper
- Recording two audio tracks: a mono vocal and stereo piano
- No plugins
- 44.1kHz
- no other CPU intensive processes running in the background

Result
- crackles occur below a buffer of 1024 samples

I've done everything I can think to do (updates, checking connection, restarting), and it's driving me crazy!

Any troubleshooting/diagnostic suggestions appreciated.
claz
Regular
Posts: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by muzines »

This sounds like driver issues to me - does the M4 have an Apple silicon native driver?
User avatar
muzines
Jedi Poster
Posts: 12332 Joined: Tue Jan 10, 2006 12:00 am
..............................mu:zines | music magazine archive | difficultAudio  | Legacy Logic Project Conversion

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

Post by claz »

Indeed it does: https://motu.com/en-us/news/motu-and-macos-big-sur/

Some drivers require disabling the new hardened runtime, but I don't believe this one does.
claz
Regular
Posts: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by claz »

It just occurred to me that this could be an electrical problem, and that the buffer size issue could be a red herring.

If it were electrical, I would expect constant noise of some kind, though, right, whether hum or crackle?

I do occasionally get a kind of quiet "nyeaahh" noise (pitched around 400Hz if memory serves) that seems to pass through the system -- it's less frequent, and I assume unrelated. I haven't had the DAW recording during that one, so I'm not sure if it's just in the monitors or the interface.

Electrical connections: Wall outlet --> power line conditioner (3 prong) --> keyboard, speakers, monitor, mac (all 3 prong, except keyboard, which is 2).

Not intentionally trying to complicate things, just trying to check all possibilities...
claz
Regular
Posts: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by Drew Stephenson »

Do you get the same issue with both speakers and headphones?
It might be worth starting with the simplest set up you can, i.e. Macbook on battery, M4, headphones, then adding components back in one at a time to see if something is triggering it - either a ground loop or a lack of a ground.
User avatar
Drew Stephenson
Apprentice Guru
Posts: 27698 Joined: Sun Jul 05, 2015 12:00 am Location: York
(The forumuser formerly known as Blinddrew)
Ignore the post count, I have no idea what I'm doing...
https://drewstephenson.bandcamp.com/

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

Post by claz »

The battery idea is excellent, thanks -- the keyboard can even run on batteries, so I may start completely unplugged! (Though I still suspect it's buffer- or driver-related.)
claz
Regular
Posts: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by Wonks »

If it goes away when you set the buffer size above 1024 samples, then I really don't think it's electrical noise related.

On a Windows machine, I'd suspect some other program hogging the processor, but I have no idea if this can happen with a Mac.

Got any hardware monitoring programs to view processor % usage when you get the crackles? If you aren't hitting 100% (or very near it) then it's not classic processor overload dropouts.
User avatar
Wonks
Jedi Poster
Posts: 17926 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 Sam Spoons »

OSX has an 'Activity Monitor' app built in which monitors the hardware in real time.
User avatar
Sam Spoons
Forum Aficionado
Posts: 21535 Joined: Thu Jan 23, 2003 12:00 am Location: Manchester UK
People often mistake me for a grown-up because of my age.

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

Post by RichardT »

There’s no way an M1 machine should struggle with a load like that. If it goes away with higher buffer sizes, then it can’t be electrical, radio interference or ground related.

I don’t know much about the technology of digital audio, but does the fact that the crackles get recorded suggest there is a problem with what’s coming into the Mac - ie are the crackles being output by the A to D converter? I don’t know though, maybe incoming signals enter some kind of buffer on the Mac before being recorded, in which case the above is completely wrong.

In any event, something is wrong. Do you have another audio interface you could use to see if it works?
RichardT
Frequent Poster
Posts: 4897 Joined: Fri Aug 13, 2004 12:00 am Location: UK

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

Post by Dave Rowles »

Would totally agree. Have you got access to any other interface so you can test? I'd try changing the cable too because that's scuppered me a few times in the past.
User avatar
Dave Rowles
Frequent Poster
Posts: 1537 Joined: Thu Feb 28, 2008 12:00 am Location: Isle of Man
http://www.manninmusic.com Teacher - Isle of Man
http://www.manninmusic.shop Music Shop - Isle of Man
https://www.facebook.com/mannin.sound - PA Hire/Sound Engineer - Isle of Man

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

Post by Chromeman »

To the OP, if you go onto the Motunation website, you'll find quite a number of people with similar issues when using Apple Silicon Macs and MOTU hardware. No definitve solution but some have successfully changed cables, even replaced the unit itself etc etc. Maybe worth a read?
Chromeman
Regular
Posts: 250 Joined: Mon Mar 31, 2014 12:00 am

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

Post by Bob Bickerton »

An M1 Mac would eat that - so the problem will be to do with the interface or connection cables.

Have you switched out all the cabling? How’s the keyboard attached? Via line input or USB? If line input what levels are you recording at? If you’re recording keys and vocals at the same time, is the crackling on all tracks or just some?

Bob
User avatar
Bob Bickerton
Longtime Poster
Posts: 5356 Joined: Fri Dec 20, 2002 12:00 am Location: Nelson, New Zealand

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: 110 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: 110 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: 15670 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: 17926 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: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by Drew Stephenson »

What sample rate are you running at? Raising that will lower your latency.
User avatar
Drew Stephenson
Apprentice Guru
Posts: 27698 Joined: Sun Jul 05, 2015 12:00 am Location: York
(The forumuser formerly known as Blinddrew)
Ignore the post count, I have no idea what I'm doing...
https://drewstephenson.bandcamp.com/

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: 17926 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 Drew Stephenson »

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
Drew Stephenson
Apprentice Guru
Posts: 27698 Joined: Sun Jul 05, 2015 12:00 am Location: York
(The forumuser formerly known as Blinddrew)
Ignore the post count, I have no idea what I'm doing...
https://drewstephenson.bandcamp.com/

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: 110 Joined: Mon Sep 10, 2018 3:35 am

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

Post by Drew Stephenson »

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
Drew Stephenson
Apprentice Guru
Posts: 27698 Joined: Sun Jul 05, 2015 12:00 am Location: York
(The forumuser formerly known as Blinddrew)
Ignore the post count, I have no idea what I'm doing...
https://drewstephenson.bandcamp.com/

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: 17926 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
Posts: 4897 Joined: Fri Aug 13, 2004 12:00 am Location: UK
Post Reply