[hi-res timers] Important for users of ALSA Midi, no Jack

MusE is a MIDI/Audio sequencer with recording and editing capabilities, aiming to be a complete multitrack virtual studio for Linux. http://muse-sequencer.org/

Moderators: khz, MattKingUSA, spamatica

Tim E. Real
Established Member
Posts: 206
Joined: Sat Sep 15, 2012 12:36 am

[hi-res timers] Important for users of ALSA Midi, no Jack

Postby Tim E. Real » Mon Apr 15, 2019 4:51 am

Hi, for a while I have noticed that here on my distro and apparently some others that MusE
will pick the lowly 250Hz ALSA system timer and you'll get a warning - unless Jack is run first,
even if Jack is subsequently stopped. I have noticed it in some users' bug reports and logs.

I just found out why.

Please ensure that the ALSA module snd-hrtimer is loaded before starting MusE if you have not started Jack yet.
Try "sudo modprobe snd-hrtimer".
It seems that because Jack uses the ALSA pcm api or some other, that causes the module to be loaded.

Loading the snd-hrtimer module will allow MusE to pick the ALSA hi-resolution 1000Hz timer.
This is important for midi timing.

I note that MusE uses the ALSA seq api but never the pcm api.
Even when MusE quits, snd-hrtimer module is *still* not loaded.

Therefore apart from warning users to load the module, I looking at a possible solution that maybe involves making
dummy calls to the pcm api or something, to get the snd-hrtimer module to load. Or some other means.

But... For better resolution try to set up your hardware RTC timer. MusE will detect it, and you can go
to Settings and set the frequency pretty high, beyond 1000Hz.
Note that I was informed by the ALSA team a while ago that recently a hard-coded 1000Hz limit was placed
on the hr-timer. In the past it had a theoretical limit of 0.001 us or 1Ghz.
It is now impossible for me to set it higher than 1000Hz.
See? That's why our Settings now fail to go any higher than that. For a brief period after adding hr timer support,
we were actually allowed to set it *very* high! It was paradise.

So, all you precision accuracy hounds, be sure to dust off that old RTC timer.

Tim.

artofmusic
Established Member
Posts: 79
Joined: Mon Mar 17, 2014 8:01 pm

Re: [hi-res timers] Important for users of ALSA Midi, no Jack

Postby artofmusic » Fri Apr 26, 2019 5:12 am

Huh since Arch Linux is built with Full Dyn Ticks I wonder if this is mute


Return to “MusE Sequencer”

Who is online

Users browsing this forum: No registered users and 1 guest