Yeah, maybe I’ll wait to have a more relaxed moment and then give Arch a try. Everybody suggested to do that, so I guess that’s the way to go anyway. For now I guess I can use it for some of the things I need it for with Linux Mint, and for the rest I’ll see.
anyone know what kind of latency can be achieved running linux-rt on a macbook? And those things have line-in/line-out, correct?
Achilles heel of my chromebook is it’s audio codec - just a car crash in terms of low-latency audio. way worse than even a good usb interface! In-the-box linux music laptop + an mpk or something would actually be awesome if it weren’t for ~ 15ms midi latency…
Also was up late last night screwing all my rack-mounting things onto cedar planks - current plan is to use the chromebook & seq64 as midi sequencer only & at least get back to a basic functional midi setup…
is 15ms really so bad?
I believe anything beyond 5ms is when humans start to notice latency (correct me if this is wrong, anyone)
I don’t have any idea honestly. I always end up nudging tracks around to compensate a perceived delay when recording into a DAW. And I never had a DAW that would go below 10ms (which then become 20ms, once you go out and back in).
But… I got curious and found this article, which seems pretty well written about the suject: https://thecrocoduckspond.wordpress.com/2015/02/15/latency-facts-and-mythske/
I always like to convert latency times to distance, and imaging standing that far away from a speaker. The speed of sound is 340m/s at sea level, but let’s simplify it to 300m/s. For each millisecond sound will travel 30cm.
So 5ms is approximately 1.5m and 15ms is approximately 4.5m.
If you have hardware monitoring on your sound card, that usually has sub-millisecond monitoring.
One final point, modern CPUs are significantly more efficient at doing to same thing repeatedly, so having a large buffer size will give you more processing power.
Great read, thank you!!
So for playing softsynths with midi controllers (pads, keys) my feeling is linux-rt/jack system should target 64 sample buffers @ 44.1kHz. So what currently available laptop hardware can actually achieve this? Macbook? Thinkpad? Anyone actually hitting this kind of performance with their linux laptop?
I’ve squeezed this kind of latency out of desktop machines with RME raydat & delta1010lt soundcards, but it’s a bit of a crapshoot. For example nvidia graphics drivers dash any chances of getting really good latency…
64 sample buffers at 44.1kHz sounds like a nice, but not entirely necessary, goal to me.
I concur with much of this:
That being said, I’m comfortable with a bit of slop in my music. Blues/rock was my first musical love and it isn’t exactly known for its accuracy.
The Xenomai kernel that Bela uses supposedly allows for sub-ms latency.
I need to get some kind of I/O going for my Bela. I have the mux capelet that allows for 64 analog inputs. I have considered eurorack-izing my Bela, but it seems like an ambitious first-time hardware design project.
It should also be noted that if you’re into drone music… you can cope also with a setting of 1024 samples
Yup that article seems spot on! My chromebook built-in hardware hits 256 sample buffer & totally agree that 256 is ‘difficult but not impossible’!
Also curious what people who make their music ‘in-the-box’ on macbook/OSX are hitting. Almost didn’t want to open this can of worms, it hits on the topic of “computers they’re not so bad”!
But indulge me for a minute… Is music laptop with 64-sample latency & enough juice to simultaneously run ardour, some sequencer & a couple of softsynths just a pipe dream in 2017, or a matter of knowing which cheapo laptop to get?
I happen to be running at 512 samples on my mid-2014 MBP with a 2.8Ghz i7. I could probably get away with lowering that most of the time, but leaving it there means I rarely have glitches. But we’ve already established that I’m not overly fussy with these things.
On my 4th gen iPad, I need at least 1024 samples, if not considerably more. Looking forward to upgrading the iPad in the next year or so.
Is it a hardware issue? Or a hardware/driver/os/software issue, as I suspect? I guess I’d look at drivers and OS kernels first, as they are going to be the hardest things to change down the road. So, for Linux, I’d be interested in Xenomai distros (are there other musically oriented Xenomai distros besides Bela?) and I’d be looking for ways of avoiding driver problems. Would class-compliant USB interfaces work? You don’t need graphics performance, so I assume the solution to crappy Nvidia drivers is “don’t use Nvidia”.
Is “laptop” a strict requirement? Or could a very compact desktop do the trick?
Hmm a bit belatedly realizing your app has to be compiled to take advantage of the Xenomai kernel, so it’s not exactly general purpose, I suppose.
Interesting point! I can get 32 samples latency with focusrite usb interface on the same machine. That’s my only data point suggesting this is a ‘hardware issue’! Hadn’t even thought it could be a driver issue. Don’t really see how I could expect to fix this, though. Running a pretty bleeding-edge RT-patched kernel…
laptops are appealing for the portability, especially the indestructible, long-battery-life c720 chomebook. focusrite interface requires an external psu & jack explodes causing weird crashes if you, for example, hotplug the usb while sound server runs. All-in-one setup would be an improvement! Quneo controller fits in a pouch with my laptop - I could chuck the whole thing in a drybag, charge up the batteries and take it camping, for example. I mean, just driving hydrogen drum machine from the chiclet keyboard & 32 samples latency is nice (fingerdrumming practice is starting to pay off), but increase the buffer to 256 I’m tearing my hair out…
little tangent - if you want to use a powerful graphics card to combine opengl music visualisation in a low-latency linux setup then a radeon card can get the job done very nicely. Don’t remember off the top of my head which card I used…
…based on my experience yesterday trying to put arch on my old macbook pro I’d say nvidia drivers dash any hope of even using the machine!
Since I have a hard time giving up I gave it another try. and tried Ubuntu Studio. Not a big fan of Ubuntu for some of the reasons that have been mentioned in this thread already, but it was the only one I hadn’t tried… so to say, my option except a almost-from-scratch install with Arch (which I haven’t got the time for right now).
So a couple of coffee breaks later I have it running on my netbook, and after nuking Pulseaudio (what’s that doing in an audio-oriented distro anyway?) it now runs quite nicely. Ubuntu Studio uses xfce so it’s not too resource hungry and while I have it when you get your system already filled up with software I couldn’t care less, it still spared me a bit of time… and I do have most of what I need for now.
Since it was mentioned here, I did a quick recording and tried to use 256samples but that gave me lots of underrruns, so I went back to 512. I guess that’s the max I can get with this system and the Zoom H5.
Anyway… I think we can consider this solved for now, thanks everybody for your help!
@rick_monster: Can you elaborate a bit more on your chromebook set up? My music set up is a 2011 MacBook Air - it runs just dandy and all is well for now… but I realize it’s life time is coming up (I’m begining to push it’s abilities when I’ve got too many M4L instruments…) - and it isn’t clear if Apple is going to be making anything I’d want to buy in a year or so.
At work I have a Chromebook Pixel which is just a delightfully solid piece of hardware: Boots “bam” fast, hardware seems built like a rock, etc… While I’m an Ableton user… switching to Linux on Chromebook HW, running Bitwig seems like a potential future replacement.
it’s a c720 chromebook, the Celeron 2955U cpu, 32Gb hard drive & 2G ram. They’re cheap & hardy. Has built-in SD card slot which is pretty handy for extra storage. One of those low-profile SDcards nearly fits in the slot…
You have to enter some insane terminal spell or other from inside chromeOS to enable booting linux. Then there’s some further crap, opening up the laptop with a credit card to remove a BIOS protection screw. This allows to disable a ten-second countdown on boot, and more importantly a handy message, iirc something like:
‘foreign OS detected, please press space to nuke your linux install (or delete to actually boot the horrid nasty foreign OS)’
Arch install should work pretty peachy once you endure the above torture, only trackpad drivers were a faff when I set this up, maybe better documented now - happy to dig out my config obviously. Only other catch is there’s no ‘windows key’ on the chiclet - I remap capslock-position to ‘windows key’, which kind of sucks when you want to shout at people on the comments section of youtube (actually hang on, possibly no remapping required, just missing capslock)…
Thanks for reporting your struggles @papernoise, this was very useful. I guess Ubuntu is still the no-hassle (well, relatively…) alternative, especially with more exotic hardware. Btw I think there’s still some speed gains to be had, if you ditch Xfce and install a more minimalist WM. Also, I suppose installing a RT kernel allows you to drop the sample buffer too.
It just popped into my mind last night that perhaps posing this question at https://linuxmusicians.com/ would’ve been useful, I think that’s the best concentration of Linux & audio knowledge in the internet.