Convert midi PC to midi CC

There are no walls in GP, just replace the script with this one.

var last_cc : Integer Array = [0,0,0,0,0,0,0,0,0]

On ProgramChangeEvent(m : ProgramChangeMessage)
    var pg_num : Integer = GetProgramChangeNumber(m)
        cc_num : ControlChangeMessage
    
    If pg_num >= Size(last_cc) Then
        Print("PC message out of range")
    Else 
        If last_cc[pg_num] == 0 Then
            last_cc[pg_num] = 127
        Else
            last_cc[pg_num] = 0
        End
        
        cc_num = MakeControlChangeMessage(pg_num, last_cc[pg_num])
        SendNow(cc_num)  
    End
End

If I get chance I will send you a gig file with widgets mapped to the PC/CC messages, you should then map the output of the widgets to what ever you want to control in SampleTank.
Also see … SampleTank 4 Macro Learn