MIDI software for Haiku

portMidi needs to be ported. Have a look at History for media-libs/portaudio - haikuports/haikuports · GitHub for the current status.

1 Like

in the current code of Musescore, portmidi support was simply removed (removed portmidi · musescore/MuseScore@02a8a45 · GitHub). It’s probably not interesting to try to port portmidi then.

Hello!

I’ve rebooted an old Thinkpad X230 (2.6GHz Intel Core i5-3320M, Y 2012) with Haiku and it runs great. I use it in my home studio as a Midi tracker (LMMS). It is also connected with an USB/MIDI cable to a MIDI keyboard.

Great news: Everything works without any extra configuration!

Bad news: when I play on the keyboard with the intention of using the notebook as a general midi sound generator for the keyboard there is a sensible latency…

Is this specification low for using as a software sound module? (2.6GHz Intel Core i5-3320M)

I use internalmidi or the midi keyboard software - the latency is the same.

Could or should I change something?

thanks
Robert

1 Like

Maybe you’re seeing the same as me with Samedi. That is, the default large buffers causing some latency. See the section on La…tency of its ReadMe.

4 Likes

Wow - thanks, I’ll try the recommended settings in the referenced doc when I’m back home today…

R

1 Like

That’s great advice, thanks. Will have to test if this solves my latency problem with MidiSynth as well. Always had a bit of a delay when connecting my USB MIDI keyboard and playing with differnent sounds. Not huge but big enough to be annoying. Will report back :wink:

1 Like

Hello!

Great, it works… buffer is 512, no. of buffers is 4.
LMMS plays as before, keyboard answer with internal midi is almos realtime and not annoying at all anymore.

thanks!
Robert

6 Likes

Thanks all! I can’t wait to try this, I’ve always avoided MIDI on Haiku for this reason.

3 Likes

How large are the default buffers, I wonder? We should add logic to choose smaller ones by default, if they work better.

1 Like

It’s different for the different drivers and defined at different locations, of course…

If you go to /src/add-ons/kernel/drivers/audio and grep for current_settings = { you find it for 4 drivers. Then there’s default_buffer_length_for_rate for hda, and BUFFER_FRAMES/COUNT defines for a97/auvia, and a DEFAULT_FRAMES_PER_BUFFER define for a97/geode.
And probably a bunch of others I haven’t found easily. I’m also not sure if these are actually the right code locations and actually used…

They work better for low latency, but may stutter more easily under heavy CPU load.

The use cases of playing music live on a MIDI keyboard, and listening to music while doing some heavy compiling, are quite different.

But we can surely reduce it by quite a bit anyways. If I remember correctly, they were set to very large values to avoid issues with overall bad performance of the OS back then, most of which is probably long solved.

2 Likes

One more addition for those who would experiment: after changing buffer sizes audio system restart may not work throwing an error but following a full reboot it was OK. So, one shall not be frightened… :slight_smile:

1 Like

I have an M-Audio Oxygen Pro 49 connected by usb to Haiku. I’m trying to use LMMS but in Edit → Setting → MIDI settings, under MIDI interface, I only see “Dummy (no MIDI support)”. How did you get MIDI to be recognized in LMMS?