Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't MIDI something the userland can and should handle?


MIDI 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.


Timing is pretty crucial for MIDI and sound, does that mean being in the kernel space is helpful?


Not the I/O, they are drivers after all.


Music is far more sensitive to latency and jitter than graphics - one of the reasons to have more direct support.


How would it be in userland? You need to communicate directly with devices?


That'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.


yes. 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)


What’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?


The 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?


So, basically you need to manually pin the processes, be constrained to specific cores, and cross your fingers...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: