linux MIDI/Audio latency | xltronic messageboard
 
You are not logged in!

F.A.Q
Log in

Register
  
 
  
 
Now online (2)
EpicMegatrax
Roger Wilco
...and 74 guests

Last 5 registered
Oplandisks
nothingstar
N_loop
yipe
foxtrotromeo

Browse members...
  
 
Members 8025
Messages 2608076
Today 60
Topics 127197
  
 
Messageboard index
linux MIDI/Audio latency
 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 11:40 [#02513011]
Points: 10671 Status: Regular | Show recordbag



Does anyone use linux combined with hardware? What's your
software set up?

I am having latency issues with a bunch of different distros
and software set ups, should I just get one of those special
music distros?


 

offline freqy on 2017-02-14 11:54 [#02513012]
Points: 18724 Status: Regular | Show recordbag



how are you testing latency?

is it so obvious , that your ears alone can hear it or are
you doing a type of ping test?

how many ms?



 

offline freqy on 2017-02-14 11:55 [#02513013]
Points: 18724 Status: Regular | Show recordbag




what sound card are you using on linux?



 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 12:11 [#02513014]
Points: 10671 Status: Regular | Show recordbag



I can hear it to the point that that my hardware sequenced
stuff is noticeably ahead of the audio software. I can't
lower the latency in the software any further or I get
buffering glitches. I'm just using a focusrite saffire usb
cars, it's picked up automatically because I'm trying to
integrate it in to my live set up.


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 12:13 [#02513015]
Points: 10671 Status: Regular | Show recordbag



whoops

'it's picked up automatically. I'm just using a small old
interface because I'm trying to integrate it in to my live
set up.'


 

offline freqy on 2017-02-14 12:37 [#02513017]
Points: 18724 Status: Regular | Show recordbag




These are probably obvious to you.. but what the hek..

how about adding latency to the midi with a plugin? or an
external module that you route through? (company called midi
solutions)

or the other idea you may not want to do, but is what i
would do, is dual boot windows.

or maybe get an RME 9632 from ebay.



 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 12:44 [#02513018]
Points: 10671 Status: Regular | Show recordbag



The problem with adding latency is that I'm playing live and
it fuck s everything up because I'm not great. I have
windows on the lappy at the moment and am using it, I just
don't like the OS but I'll have to suck it up. I tried
hackintoshing it but the graphics card has some issues so
there's glitches.

I think if Windows annoys me too much I will ditch the
laptop completely and lean more on the ipad


 

offline freqy on 2017-02-14 12:47 [#02513019]
Points: 18724 Status: Regular | Show recordbag



you want your latency as low as possible for live.

so id scrap the adding more latency to midi idea.

are you using a Saffire 6 USB 2, so the module runs both
audio and midi?

or are you using two different modules one for audio and one
for midi?



 

offline freqy on 2017-02-14 12:49 [#02513020]
Points: 18724 Status: Regular | Show recordbag





i replied without seeing your other message.

so what i can gather from the thread title was you were
having issues with linux

but i see you were trying to get away from windows and try
something new= linux)

i think i understand



 

offline freqy on 2017-02-14 12:54 [#02513022]
Points: 18724 Status: Regular | Show recordbag



what os version you using?

what probs you having?

Ive been using xp for as long as i can remember.

only prob is when you go on the internet!!

So, what i do is have a separate PC for music making .. ( or
dual boot)

so i have a fresh install of xp with only the progs i need,
no junk, ...nice and clean , no problems. certainly no virus
scanning or other junk and it works great.



 

online EpicMegatrax from Greatest Hits on 2017-02-14 13:12 [#02513026]
Points: 23959 Status: Addict



$ lspci -vvv -s 04:06.0
04:06.0 Multimedia audio controller: Creative Labs
EMU10k2/CA0100/CA0102/CA10200 [Sound Blaster Audigy Series]
(rev 04)
Subsystem: Creative Labs SB035x Audigy 2 OEM
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV-
VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr-
DEVSEL=medium >TAbort- SERR-
Kernel driver in use: snd_emu10k1
Kernel modules: snd_emu10k1

milkytracker lets me set the latency. it's something like
50ms. i don't notice too hard, but i might start too soon.
getting more into just laying stuff down by rhythmically
smashing the keyboard as it plays in edit mode... best part
of trackers, right? so this is when latency starts to matter
in a studio context


 

online EpicMegatrax from Greatest Hits on 2017-02-14 13:16 [#02513027]
Points: 23959 Status: Addict



The heart of the Sound Blaster Live! Value is
the EMU10K1 audio
processor chip, which is the most powerful integrated
music, audio
and effects engine available. Every signal is
processed at 32 bit,
48kHz using E-mu’s patented 8-point
interpolation wave-table
synthesis with much more powerful effects processing.
Therefore,
the result is a cleaner reproduction of the
wave-table musical
instruments at all degrees of pitch shifting.


shit, i have to figure out if i can use all that somehow


 

offline fleetmouse from Horny for Truth on 2017-02-14 13:17 [#02513028]
Points: 18042 Status: Lurker



What software is generating the MIDI? Are the MIDI and audio
coming from the same program? See if you can find a delay
compensation setting. A low latency kernel would help a bit
but things would still be off because with any setup there
will still be a processing block size, no matter how small.

Are you running the hardware audio back into the computer,
or does it go straight into a mixer? In Ableton there's an
"external instrument" built-in plugin to address audio
returning from hardware, with a hardware latency adjustment.
Of course that doesn't help you, but I'm just saying, this
is a problem on every platform, and there are various
solutions.


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 14:09 [#02513029]
Points: 10671 Status: Regular | Show recordbag



I tried an Ubuntu derivative, a debian derivative and solus.
The laptop came with Windows 10, which just feels clunky and
inconsistent although this is probably me not having used
windows for like 8 years?

If I use the computer (which is really just for recording
these days) I do it on my desktop which is a mac but I
can't take that out. I think I've got everything set up on
the iPad as I want it now anyway :)


 

offline fleetmouse from Horny for Truth on 2017-02-14 14:14 [#02513030]
Points: 18042 Status: Lurker | Followup to Indeksical: #02513029



what are you using on ipad as a master brain control center?


 

offline Hyperflake from Wirral (United Kingdom) on 2017-02-14 14:46 [#02513034]
Points: 30707 Status: Regular



99& of the time its driver related in my experience or
whatever virtual audio device you have selected stuff like
this can be very annoying


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 14:53 [#02513035]
Points: 10671 Status: Regular | Followup to fleetmouse: #02513030 | Show recordbag



sorry thread got more replies without me refreshing it.

Octatrack is the brain generating clock and also sending
MIDI notes plus CC info. It's also generating its own audio

Audio from laptop/ipad is fed back in to the octatrack


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 15:01 [#02513036]
Points: 10671 Status: Regular | Followup to Hyperflake: #02513034 | Show recordbag



You're right. If I set my buffer sizes the same in OS X on
the desktop and use the same soundcard, same software, same
setup the latency is different. I have 2 small midi
interfaces so will try those out and see if it's a MIDI or
audio issue


 

offline Hyperflake from Wirral (United Kingdom) on 2017-02-14 16:05 [#02513040]
Points: 30707 Status: Regular



^ am I? oh thanks!, i had this issue for a while on cubase,
for me it was just a matter of fiddling around with the
settings, but since thats only tangentially related to your
issue i wont go into it. I hope you sort it anyway


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-14 17:24 [#02513049]
Points: 10671 Status: Regular | Followup to Hyperflake: #02513040 | Show recordbag



I presume you are as I've tried different kernel versions
but have used the default asio (I think) driver for the
interface.

Now I'll see if there's a different driver about that I can
use.


 

offline steve mcqueen from caerdydd (United Kingdom) on 2017-02-15 02:41 [#02513071]
Points: 6148 Status: Addict



you will have to faff about getting a real time kernel n
stuff .. major tweaks necessary
i think there are distros which are built for doing it out
of the box ?
(it also lets u use ur cpu properly: i get less sine
oscillators out of a 2 core celeron 2.16ghz than i did out
of a 1999 ibook... i think)


 

offline steve mcqueen from caerdydd (United Kingdom) on 2017-02-15 02:42 [#02513072]
Points: 6148 Status: Addict



it is worth it though


 

online EpicMegatrax from Greatest Hits on 2017-02-15 11:03 [#02513073]
Points: 23959 Status: Addict



...can i write away to a catalog for that real-time kernel,
or what? is it corn?

computers and cars match up, in the context of this thread.
there's a company called sweetwater sound in glorious texas
that will build you a rack-mounted music computer (mac or
pc) and it will be totally tuned to shit. the operating
system, the (lack of) fan [noise], blah blah.

it's tuned for music, though. that same refined machine
would generally suck a turd as a web server. same as a track
car would suck a turd in a street race

anyways, this leads to a simple and important point: clearly
defining what you want out of the computer upfront is a lot
easier than buying one and fumbling around until it's "good"


 

online EpicMegatrax from Greatest Hits on 2017-02-15 11:11 [#02513074]
Points: 23959 Status: Addict



does windows still have that "pick your poison" approach to
audio drivers? like: do i want directsound 3D single duplex
or double trouble? the winner, universally, was "ASIO (Full
Duplex)" and consequently it's the only option i can
remember without turning into walruspeak. do you have it set
to ASIO (Full Duplex)? there might be a custom variant on
this for your soundcard, this is even better than vanilla
ASIfullplex

then there's the usual signal chain nonsense:

the sapphire talks to the usb, is the usb stuffed full of
sixteen things? unplug as much as you can. it's not that i
think this is the problem, it just eliminates noise that
could potentially obscure the actual culprit

does the motherboard have a northbridge worth a shirt or is
usb bandwidth slowing you down? unlikely but possible

are you using the latest, native drivers for the sapphire?
like hyperflake said, if you don't have a proper driver,
you'll get some crappy windows generic with the latency of
an old man's bowel

next, can you test your sapphire card with just the windows
tray widgets or something? essentially examine the way the
card and the OS talk without your DAW or whatever in the way
(and USB stuff unplugged) so you can see if the card and the
OS have a laggy relationship.

if the card and the OS seem to have zippy latency, examine
your DAW config next

onion layers innit


 

online EpicMegatrax from Greatest Hits on 2017-02-15 11:35 [#02513075]
Points: 23959 Status: Addict



same shit different context...

I learned more from Apple -- like avoiding USB devices
when possible. For me, the guilty parties were my Ethernet
dongle, memory card reader and external hard drives



 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-15 12:12 [#02513076]
Points: 10671 Status: Regular | Followup to EpicMegatrax: #02513074 | Show recordbag



Windows latency is fine matey! It's the only device
attached.

To steve, I'll move to a low latency kernel in the linux
partition next time I boot it up and have a fiddle. I have a
vague memory of doing it once before and it not solving the
problem but I'm probably wrong


 

online EpicMegatrax from Greatest Hits on 2017-02-15 13:32 [#02513079]
Points: 23959 Status: Addict



if everything from the sapphire device up through the usb,
driver, and OS are alright, the problem is in your DAW. but
that's only if you're sure about the first part


 

offline steve mcqueen from caerdydd (United Kingdom) on 2017-02-16 22:29 [#02513186]
Points: 6148 Status: Addict | Followup to EpicMegatrax: #02513073



>> anyways, this leads to a simple and important point:
clearly
>> defining what you want out of the computer upfront is a
lot
>> easier than buying one and fumbling around until it's
"good"
oh god aye, but that effort and learning is not wasted if it
helps you in other things that you know you want to do
after. which it might not in this case.
anyway, that's a very 'upper management' attitude ;)


 

offline mappatazee from ¨y¨z¨| (Burkina Faso) on 2017-02-17 03:14 [#02513197]
Points: 14283 Status: Regular



not sure if you got this sorted out, but i was curious and
found this for NixOS:

LAZY_TITLE

might give it a try in the future, haven't tried NixOS since
~v14. it's a lot different from usual distros but once you
learn the configuration language it's got some nice features
like reproducible configuration and rollbacks, i might try
switching from mint completely when 17.3 is no longer
supported


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-17 09:59 [#02513200]
Points: 10671 Status: Regular | Followup to mappatazee: #02513197 | Show recordbag



I've not tried nix but was planning to dig in and sort this
problem this weekend so will get it on a USB. Sounds really
interesting actually!

Cheers Mapp


 

online EpicMegatrax from Greatest Hits on 2017-02-17 11:32 [#02513206]
Points: 23959 Status: Addict | Followup to steve mcqueen: #02513186



] ] > > anyways, this leads to a simple and important
point:
] ] > > clearly defining what you want out of the
computer upfront is a
] ] > > lot easier than buying one and fumbling around
until it's "good"
> > oh god aye, but that effort and learning is not
wasted if it
> > helps you in other things that you know you want
to do after.
> > which it might not in this case. anyway, that's a
very 'upper management' attitude ;)

upper management? no, not quite... but, yes, you have hit on
something, here: you can't clearly define what you want
unless you have your head around the relevant subsystems. i
agree completely: if you're cutting your teeth, just dive
in.

Inskeletal doesn't sound like a n00b, though -- seems like
the music is sorted and it's more a matter of how to get it
on the road. in this context, "you might learn something" is
a very 'pedantic engineer' attitude :>

to be fair, though, i immediately dove into my rant without
taking a moment to note it's presumed you're already with
clue


 

online EpicMegatrax from Greatest Hits on 2017-02-17 11:40 [#02513207]
Points: 23959 Status: Addict



i have a hell of a lot to say about debugging things.
down-to-the-wire IT panics.... years of fixing things from
toy helicopters up to server farms.... tracking down cable
problems at a plus three on the shulgin scale.... yessir, i
know a few things


 

online EpicMegatrax from Greatest Hits on 2017-02-17 11:52 [#02513209]
Points: 23959 Status: Addict



here's something i don't know: can a long USB cable tank up
the works?

it's not about the raw latency of the eletrical signals
zipping back and forth, it's more about usb being one of
those protocols with error-correction. you won't get audio
artifacts from a dodgy USB cable, but the devices speaking
with each other will have repeatedly repeat themselves and
this will tank your latency.

i figure this is not even worth mentioning re: OP ("are you
using short USB cables? if not, use short USB cables") but i
am curious exactly what the limits of USB cables are...

all i found specifics for was MIDI:
LAZY_TITLE

for USB, there's lots of conflicting info on the internet --
search results are just people arguing about it on internet
forums. lol


 

online EpicMegatrax from Greatest Hits on 2017-02-17 12:11 [#02513210]
Points: 23959 Status: Addict



the toy helicopter has a bit of a story. it was one of those
tiny wee ones that charges by plugging into the helicopter
remote (which is easily five times the size of the
helicopter itself). an ex and i had great fun with it for a
week or two before a fiery crash and tears. i took it down
to my workshop and spent an hour or three with tape and
tweezers and got it flying like new. proudly hand it back to
my ex, who promptly flew it into a shelf full of jargon.
broken even worse than before. at that point, i grabbed the
little bugger and threw it at the wall as hard as i could.
exploded it. ex was stunned and upset, obviously. i said
something like: it wants to be broken, let it.

i get a bit superstitious about these fings.


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-17 20:28 [#02513289]
Points: 10671 Status: Regular | Followup to EpicMegatrax: #02513209 | Show recordbag



Interestingly at work we use two 30m USB 2 cables connected
to powered hubs and they send not only controller signals
with no latency but images to USB monitors that are also
seemingly latency free (at least not noticeably enough for
ableton/logic sets)

For midi we use Kenton line drivers to convert to Cat5 and
can then send up to a couple of hundred metres providing
there's no switches.


 

offline Indeksical from Phobiazero Damage Control (United Kingdom) on 2017-02-17 20:31 [#02513290]
Points: 10671 Status: Regular | Show recordbag



Should point out that that's 2 computers with a 30m USB
each, not 2 30m cables daisy chained. 30m is the max you can
go with USB 2 AFAIK, 45 with 1 and like 6m with 3


 

online EpicMegatrax from Greatest Hits on 2017-02-17 21:57 [#02513340]
Points: 23959 Status: Addict



the word engineers would kool-aid man in and scream up in
this thrizz-ed wud b: attenuation. the more wire the signal
passes through, the fainter it is. if it's too faint, the
receiving end can miss or misinterpret it. from there it's a
lot like a network connection -- if a "packet" gets dropped
due to attenuation, the answer is to re-transmit. too many
dropped "usb packets" and you begin to get audible
drop-outs. a few feet of cable past that it's too
attenuate-y and stops working entirely.

the flip side of this is that, in theory, you should never
have latency issues with short, quality USB cables... but
every time i've read that answer, it's been some dude on a
message board or a small blurb on numark's site and i want a
proper answer from a pedantic compulsive nerd like me so i
can stop stressing it


 

offline Hyperflake from Wirral (United Kingdom) on 2017-02-17 22:29 [#02513354]
Points: 30707 Status: Regular



attenuation is a great word


 

online EpicMegatrax from Greatest Hits on 2017-02-18 00:54 [#02513377]
Points: 23959 Status: Addict



a point of attenuated returns ~ chasing after an irrelevant
edge case. my curiosity regularly exceedes my reserves of
practicality.

someone on one forum said something like, "you could could
put one end of the USB in florida and the other in the free
city of newark and maybe you'd get 25s delay."

i thought: oh! napkin math. let's look up USB on wikipedia,
and see if the orders of magntiude are in the ballpark. but,
no, it's complexicated:

"here are two types of pipe: stream and message. A message
pipe is bi-directional and is used for control transfers.
Message pipes are typically used for short, simple commands
to the device, and a status response, used, for example, by
the bus control pipe number 0. A stream pipe is a
uni-directional pipe connected to a uni-directional endpoint
that transfers data using an isochronous,[39] interrupt, or
bulk transfer"

so, yes, when a dodgy usb cable is on the edge of being too
long, a botched, er, bulk stream could trigger a control
transfer and it could up the wagiggers of the bidirectional
diophantine afterburner and i love making this shit up far
more than i do reading it.

finally, we get to:

"For low-speed (1.5 Mbit/s) and full-speed (12 Mbit/s)
devices the shortest time for a transaction in one direction
is 1 ms.[149] High-speed (480 Mbit/s) uses transactions
within each micro frame (125 µs)[150] where using 1-byte
interrupt packet results in a minimal response time of 940
ns. 4-byte interrupt packet results in 984 ns."

you could calculate how much a stereo sample at 44.1 costs
you in bandwidth.... but can you get that 940ns latency
and the full 480mbit? a lifetime of experience with
engineer hazing rituals says no

then you get into the real shit: if your bohringer (tm)
crusto 900 audio interface has weak USB power, could that
generate my edge case of bodged packets even in short
cables?

it goes on forever


 

online EpicMegatrax from Greatest Hits on 2017-02-18 00:59 [#02513378]
Points: 23959 Status: Addict



isometromorphic diophantium. bidirectional titmosh


 

online EpicMegatrax from Greatest Hits on 2017-02-18 01:01 [#02513379]
Points: 23959 Status: Addict



so did indy fix the thing? i've lost the plot, here


 

offline Hyperflake from Wirral (United Kingdom) on 2017-02-18 10:54 [#02513392]
Points: 30707 Status: Regular



something something femtocopters up your japseye


 

online EpicMegatrax from Greatest Hits on 2017-02-18 21:04 [#02513460]
Points: 23959 Status: Addict



more or less. my brain is full of femptocopter flap and so i
log onto xltronic and the weasel fire takes ahold and you
get some manic screed. then i feel like i've taken a
psychological dump and i move on with my so-called venetian
snares album


 

offline steve mcqueen from caerdydd (United Kingdom) on 2017-02-19 03:41 [#02513478]
Points: 6148 Status: Addict



Epic have u read 'The Brain of the Firm'? goodun that


 

offline steve mcqueen from caerdydd (United Kingdom) on 2017-02-19 03:51 [#02513479]
Points: 6148 Status: Addict



i just tried to re-read the intro but it was in the voice of
Johnny off of Naked


 


Messageboard index