X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=inline;f=misc%2Ftools%2Fmidi2cfg-ng.pl;fp=misc%2Ftools%2Fmidi2cfg-ng.pl;h=4fe6a0cecb8b47a73a74b4c4f6e48ca8d359bdac;hb=3affa1daab78ba6f0b2bf6e10ac84e61f01dc10e;hp=a2e7083f9637446fb039e2a2d4807e7bf689abac;hpb=04d72aedb295a3962be46f6be6c1646b36be5d74;p=xonotic%2Fxonotic.git diff --git a/misc/tools/midi2cfg-ng.pl b/misc/tools/midi2cfg-ng.pl index a2e7083f..4fe6a0ce 100755 --- a/misc/tools/midi2cfg-ng.pl +++ b/misc/tools/midi2cfg-ng.pl @@ -539,16 +539,19 @@ sub botsort($$$$@) map { my $q = 0; - if(($_->{lastuse} // -666) >= $time - $time_forgetfulness) + if($channel != 10) # percussion just should do round robin { - if($channel == $_->{lastchannel}) + if(($_->{lastuse} // -666) >= $time - $time_forgetfulness) { - $q += $_->{lastchannelsequence}; - } - else - { - # better leave this one alone - $q -= $_->{lastchannelsequence}; + if($channel == $_->{lastchannel}) + { + $q += $_->{lastchannelsequence}; + } + else + { + # better leave this one alone + $q -= $_->{lastchannelsequence}; + } } } [$_, $q, rand]