What's new

Session Recorder script

hi there, when I use the session recorder script it records all my groups even if they're not active that blows my CPU up to 100% real quick.
Is there a way to allow the session recorder to record only the groups that are activated?

Thanks
 
Make sure that your Session Recording factory script is placed after your main script slot.
on note

disallow_group($ALL_GROUPS)
allow_group(0)
allow_group(6)
allow_group(7)

if ($1 = 1)
allow_group(1)
end if

if ($2 = 1)
allow_group(2)
end if

if ($3 = 1)
allow_group(3)
end if

if ($4 = 1)
allow_group(4)
end if

if ($5 = 1)
allow_group(5)
end if
if ($Record = 1)
if ($cursor >= $buffer-2)
exit
end if
$number := $cursor
%note_number[$number] := $EVENT_NOTE
%note_velo[$number] := $EVENT_VELOCITY
%note_on[$number] := $ENGINE_UPTIME - $start_time
inc($cursor)
end if
end on

I think here is the problem. I've copied the code into my main script because I don't know how I can use scripts from the other slots
 
I double checked on my end, and when I place the factory script AFTER the main script slot, which includes the necessary allow/disallow code, the recorder script works as expected. Maybe transferring the code into your main code will do the trick. However, note that the code you posted only takes care of the note capture functionality. The playback of the captured notes is handled in another part of the factory script.

By the way, if your main concern is how to use scripts in separate slots, then I’d suggest checking out PGS in the KSP reference manual :)
 
Top Bottom