I experienced same issues, which forced my to stick to AVLDrums https://github.com/x42/avldrums.lv2
for a long time. Despite that setup working fine to practice here and there, the sound quality of Crocell (which has a real, decent OpenHiHat and great ride sound) made me give it another try, and this time I succeeded to my goal of keeping my 48khz 256 buffer (which gives a processing latency of max 10ms).
So, I'll describe in a bit of detail how I made it, but first, a note about my hardware. I have a refurbished HP notebook with an SSD drive. The cpu is an i5-8250U and has 8GB of RAM. I also have Behringer UMC 404HD external sound card. This is more or less, a pretty "stock" system. If you want you can compare it to a Toyota Corolla, made to get you here and there. In comparison, most people doing audio have way more powerful systems, so quite a lot of tuning is required to get mine to perform at a decent level.
Tuning your system, kill all things you don't use. Having processes and subsystems consuming cpu and blocking i/o during your realtime audio session is like texting while racing the nascar. In my case I took down things like wifi, and daemons that don't have any value.
First, I installed the realtime kernel. In my system it was
Code: Select all
sudo apt install linux-image-5.2.0-0.bpo.2-rt-amd64
Go and find the equivalent for your system.
Then, time to turn off anything you don't need for your audio session.
Code: Select all
# I turned off every service I could find with systemctl status and htop that I didn't needed
for service in wpa_supplicant.service ModemManager.service colord.service NetworkManager.service cups-browsed.service cups.service gvfs-daemon.service accounts-daemon.service udisks2.service dnsmasq.service; do
sudo systemctl stop $service
# And removed all modules that kept things working
for module in ppdev lp uvcvideo videodev ath9k iwlmvm iwlwifi; do
sudo modprobe -r $module
# Then killed a few processes that were not giving me any value
sudo killall gvfsd
That already gave me quite some spare cycles. To get it even further, I use WindowMaker, which is pretty extreme on the efficiency side. I like it because I'm old and used it for the last 20 years, but you can find a lightweight windowmanager, like LXDE or something like that, instead of Gnome.
Then I ramped up my realtime capabilities. I have eight pseudocores so I made sure to put them in performance mode, and to activate the realtime timer in the kernel
Code: Select all
sudo modprobe snd-hrtimer # Load the ALSA high res timer for my MIDI stuff
for i in 0 1 2 3 4 5 6 7; do
echo -n performance | sudo tee /sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor
I then made two scripts, one to get into "audo mode" and another to restore network connectivity and other services, and I run them to switch back and forth.
Second step, tuning DrumGizmo
With all that, things already went way better, but still had some xruns. I saw, someone suggested 2048 frames. That is 85ms of latency, just on the internal latency. I would not like to be recording on that, so went more into trying to get this thing to work on 256 frames.
First thing, was to load the set in memory, but as anyone who tried may tell you, Crocell set will not fit in the memory of a regular system, so I had to chop it down somehow. Now, I have a Medeli dd 315 as MIDI input for drums. You can find it rebranded by Alesis, and a bunch of other lesser known brands, but is the same thing. That means I have just 10 sounds in a set. With that in mind, I created a customized Crocell set, that I called CrocellKit_custom.xml with my chosen 10 sounds:
Code: Select all
<instrument name="CrashL" file="CrashL/CrashL.xml">
<instrument name="CrashR" file="CrashR/CrashR.xml">
<instrument name="HihatClosed" group="hihat" file="HihatClosed/HihatClosed.xml">
<instrument name="HihatOpen" group="hihat" file="HihatOpen/HihatOpen.xml">
<instrument name="HihatPedal" group="hihat" file="HihatPedal/HihatPedal.xml">
<instrument name="KDrumR" file="KDrumR/KDrumR.xml">
<instrument name="RideR" file="RideR/RideR.xml">
<instrument name="Snare" file="Snare/Snare.xml">
<instrument name="Tom1" file="Tom1/Tom1.xml">
<instrument name="Tom2" file="Tom2/Tom2.xml">
and a companion midi mappings file for it.
After that, voila! I could lode it in less than 3GB! Even better, I had my loved HihatPedal sound, and the whole setup sounded great. Now, the kit was still using more CPU than I wanted. I played around on the setup and found out that adding it as 16 Channel Fan Out
works better. Seems like Ardour can mix channels in a very efficient way, and you have the added benefit of tweaking the mics one by one. I strongly recommend using it that way.
I tried to go even further and remove the Floor Toms channels (which I was not using) and the Ambient Mics, but that didn't seemed to do any difference.
One last bit, "warming up the set" helps also prevent xruns. I did this several times and seems to work, you get a few xruns first time you bang it relly hard, then things go smooth.
Hope this helps