Is it not correct that this will only work if all the instruments have been loaded into ram? I have followed your scripts with interest but I don't think they address this specific problem. If the patch change requires Kontakt to load a sample then it can't work because Biab is already playing in real time. That has always been the problem with trying to use sample based VSTi's and is the reason the only synths that do work seamlessly with Biab are relatively small ones like the VSC or Forte. Their samples are small enough to load into ram so they are instantly accessable. It's been suggested that the cure for this is for Biab to allow multiple midi channels for the same instrument track so if you have a patch change on the piano track for example going from acoustic to electric the program can look ahead and load that second patch in time to play it. This has only been a forum suggestion, AFAIK no one is working on this problem.
One of the many reasons to use Real Band instead of Biab. Whatever instruments you want to use can be generated on separate tracks and midi channels.

Bob


Biab/RB latest build, Win 11 Pro, Ryzen 5 5600 G, 512 Gig SSD, 16 Gigs Ram, Steinberg UR22 MkII, Roland Sonic Cell, Kurzweil PC3, Hammond SK1, Korg PA3XPro, Garritan JABB, Hypercanvas, Sampletank 3, more.