cmd barrier
cmd selectweapon 1
cmd wait 0.5
+ raw settemp g_balance_laser_primary_refire 0.3
percussion 38 # 038_Snare_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
- busy 0.7
+ busy 0.3
percussion 40 # 040_Snare_2-0.wav
percussion 38
cmd barrier
cmd selectweapon 3
cmd wait 0.5
- raw set g_balance_uzi_reload_ammo 0
+ raw settemp g_balance_uzi_reload_ammo 0
+ raw settemp g_balance_uzi_first_refire 0.2
+ raw settemp g_balance_uzi_sustained_refire 0.2
percussion 27 # 027_High_Q-0.wav
time 0
buttons attack1
cmd barrier
cmd selectweapon 6
cmd wait 0.5
+ raw settemp g_balance_electro_primary_refire 0.2
percussion 49 # 049_Cymbal_Crash_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
- busy 0.6
+ busy 0.2
percussion 57 # 057_Cymbal_Crash_2-0.wav
percussion 49
cmd barrier
cmd selectweapon 7
cmd wait 0.5
+ raw settemp g_balance_crylink_primary_refire 0.3
+ raw settemp g_balance_crylink_secondary_refire 0.2
percussion 34 # 034_Metronome_Bell-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
- busy 0.7
+ busy 0.3
percussion 45 # 045_Tom_Mid_2-0.wav
time 0
buttons attack2
cmd barrier
cmd selectweapon 8
cmd wait 0.5
+ raw settemp g_balance_nex_primary_refire 1.25
percussion 52 # 052_Cymbal_Chinese-0.wav
time 0
buttons attack1
cmd barrier
cmd selectweapon 12
cmd wait 0.5
+ raw settemp g_balance_minstanex_refire 1
percussion 55 # 055_Cymbal_Splash-0.wav
time 0
buttons attack1
cmd barrier
cmd selectweapon 9
cmd wait 0.5
+ raw settemp g_balance_hagar_primary_refire 0.2
percussion 35 # 035_Kick_1-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
- busy 0.15
+ busy 0.2
percussion 60 # 060_Bongo_High-0.wav
percussion 35
percussion 61 # 061_Bongo_Low-0.wav
cmd barrier
cmd selectweapon 10
cmd wait 0.5
+ raw settemp g_balance_rocketlauncher_refire 1.1
percussion 25 # 025_Snare_Roll-0.wav
time 0
buttons attack2
cmd barrier
cmd selectweapon 13
cmd wait 0.5
+ raw settemp g_balance_hook_primary_refire 0.3
percussion 62 # 062_Conga_High_1_Mute-0.wav
time 0
buttons attack1
time 0.05
buttons
time 0.1
- busy 0.1
+ busy 0.3
percussion 63 # 063_Conga_High_2_Open-0.wav
percussion 62
cmd barrier
cmd selectweapon 18
cmd wait 0.5
+ raw settemp g_balance_seeker_tag_refire 0.2
percussion 41 # 041_Tom_Low_2-0.wav
time 0
buttons attack2
time 0.05
buttons
time 0.1
- busy 0.75
+ busy 0.2
percussion 51 # 051_Cymbal_Ride_1-0.wav
percussion 41
percussion 43 # 043_Tom_Low_1-0.wav
use MIDI::Opus;
use Storable;
+# workaround for possible refire time problems
use constant SYS_TICRATE => 0.033333;
+#use constant SYS_TICRATE => 0;
+
use constant MIDI_FIRST_NONCHANNEL => 17;
use constant MIDI_DRUMS_CHANNEL => 10;
if defined $bot->{channels} and not $bot->{channels}->{$channel};
my $cmds;
my $cmds_off;
+ my $k0;
+ my $k1;
if($channel <= 0)
{
# vocals
{
$cmds = [ map { [ map { $_ eq '%s' ? $note : $_ } @$_ ] } @$cmds ];
}
+ $k0 = "vocals";
+ $k1 = $channel;
}
elsif($channel == 10)
{
# percussion
$cmds = $bot->{percussion}->{$note};
$cmds_off = undef;
+ $k0 = "percussion";
+ $k1 = $note;
}
else
{
# music
$cmds = $bot->{notes_on}->{$note - ($bot->{transpose} || 0) - $transpose};
$cmds_off = $bot->{notes_off}->{$note - ($bot->{transpose} || 0) - $transpose};
+ $k0 = "note";
+ $k1 = $note - ($bot->{transpose} || 0) - $transpose;
}
return -1 # I won't play this note
if not defined $cmds;
#++$busy;
#print STDERR "BUSY: $busy bots (ON)\n";
}
+ ++$bot->{seen}{$k0}{$k1};
return 1;
}
sub Deallocate()
{
print STDERR "Bots allocated:\n";
+ my %notehash;
+ my %counthash;
for(@busybots_allocated)
{
print STDERR "$_->{id} is a $_->{classname}\n";
+ ++$counthash{$_->{classname}};
+ while(my ($type, $notehash) = each %{$_->{seen}})
+ {
+ while(my ($k, $v) = each %$notehash)
+ {
+ $notehash{$_->{classname}}{$type}{$k} += $v;
+ }
+ }
+ }
+ for my $cn(sort keys %counthash)
+ {
+ print STDERR "$counthash{$cn} bots of $cn have played:\n";
+ for my $type(sort keys %{$notehash{$cn}})
+ {
+ for my $note(sort { $a <=> $b } keys %{$notehash{$cn}{$type}})
+ {
+ my $cnt = $notehash{$cn}{$type}{$note};
+ print STDERR " $type $note ($cnt times)\n";
+ }
+ }
}
for(@busybots_allocated)
{