3 ms·
Isn't MIDI something the userland can and should handle?
by bjourne 3y ago
Isn't MIDI something the userland can and should handle?
- thomasfedb 3y agoTiming is pretty crucial for MIDI and sound, does that mean being in the kernel space is helpful?
- adamnemecek 3y agoNot the I/O, they are drivers after all.
- syntheweave 3y agoMIDI has never been userland in multitasking environments. It's a real-time, low-latency interface between some number of running processes and some number of hardware ports: the timing glitches and weird buffer behaviors you'll get from mixing together different hardware are totally kernel's wheelhouse. If you meant General MIDI synthesis, that's a different spec and related only in that the MIDI message encoding is reused to describe sequences.
- hdygdtfd 3y agoyes. but the companies contributing code don't want to bother to do it right and simply use from user space the kernel real time primitives. much easier to just add real time code and bugs in the kernel and clock out at 5. (byw, their code isn't even that real time)
- nomel 3y agoWhat’s a good method for semi real-time, multi process, and multi hardware port synchronization, in user space? All of the real-time kernel code I’ve worked on wasn’t possible 15 years or so. Are there some new user space hooks?
- j16sdiz 3y agoThe kernel aint hard real time anyway. In userspace, guess you can pin the task to one or two core, have it the highest rr priority and get more or less the same soft realtime we have in kernel?
- coldtea 3y agoSo, basically you need to manually pin the processes, be constrained to specific cores, and cross your fingers...
- duped 3y agoHow would it be in userland? You need to communicate directly with devices?
- viraptor 3y agoThat's ok. You can talk to USB devices from userspace without issues. That's how many game controllers work. Also most (all?) SDR devices. In most systems that impacts the mininal latency you can achieve though, so unless you have a system designed around it, you typically don't want real-time usage crossing to userspace too many times.
- coldtea 3y agoMusic is far more sensitive to latency and jitter than graphics - one of the reasons to have more direct support.