On 05/22/2017 12:52 PM, Tim wrote: > > On 05/15/2017 09:06 PM, Tim wrote: >> I noticed MusE quits if the ALSA support is enabled in the midi config >> dialog. >> >> It quits because it can't set the ALSA HR timer frequency to >> our desired value, default 1024Hz in the Global Settings. >> >> In fact, no matter what I tried in the timer params >> structure that we pass to snd_timer_params(), it failed. > Yikes! > It turns out I missed something. > There is now some kind of default limit at 1000Hz. > It works OK if I set it at 1000Hz, not 1024Hz. > Can't find any setting, kernel config or otherwise. > I emailed ALSA for help. > For now I may add 1000Hz as an option in Settings. > Also 250Hz and 100Hz would be good to have there. >> Hmm... >> I thought "Meh, another permissions thing, the user likely >> has to poke some setting to allow changing the timer." >> >> So I pushed a fix that allows MusE to continue with whatever >> the HR timer wants to run at. That's 1000000000Hz by the way. >> I warn the user that their system may need adjustment. >> > No, this is actually NOT working! > I neglected to test PLAYBACK. It does not work because the timer > refused our 'autostart' request in the timer params structure. > The timer fires once then stops. I tested this by starting it again > after each tick - it works! but this is NOT what we want. > See, the weird thing is, to set the 'autostart' flag you must supply > the desired frequency (ticks) at the same time in the structure. > How can we do that when we don't know the limit ??? > I wish I knew where to find that info, this new limit... > The timer says it has waaay more resolution available than this. > We should be able to set it higher, but this new limit is > messing things up. > > Tim. > > OK folks, try this ALSA HR timer fix in git master. Steps through several frequencies looking for the best one. Starting from your requested value in Settings (default is 1024 Hertz), all the way down to 100 Hertz. It gives up after that.
It should now find (at least) 1000 Hertz on a standard desktop system. Likely not any higher, from what I've seen so far. Midi PLAYBACK should work now. Hmm. Now we have a situation where, for higher rates the ancient RTC timer is better for those who set it up correctly. Or else, likely (waiting for alsa's reply) the user must now fool with the system HR timer to get better timing out of it. I really hope not. I hope it can be done in userland. Either way would be bad, I don't want that users must fool with that stuff. T. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Lmuse-user mailing list Lmuse-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lmuse-user