OSC receive to change rack spaces via reaper region numbers

In the meantime, with a few user functions, here’s a simple (and slow) implementation of StringToInt that could be used for convenience

function CharToInt(ch : string) returns Integer
      
   result = 0
  
    select 
       ch == "0" do result = 0
       ch == "1" do result = 1
       ch == "2" do result = 2
       ch == "3" do result = 3
       ch == "4" do result = 4
       ch == "5" do result = 5
       ch == "6" do result = 6
       ch == "7" do result = 7
       ch == "8" do result = 8
       ch == "9" do result = 9
    end        
   
end


function StringToInt(s : string) returns Integer
   var i : integer
       ch : string
       
   result = 0
   for i = 0; i < Length(s); i = i + 1 do
       result = result * 10 + CharToInt(CopySubstring(s, i, 1))       
   end    
end
1 Like

Thanks @pianopaul. Although I can get very close by defining the region number to be sent out with the GP switch rackspace format, Reaper appears to only allow it to be sent as a string. I saw some old posts on the Reaper forum asking about it, but it looks like nothing has changed.

@rank13
One could use multi instance of Gig Performer.
1 rackspace with the script and then send out the correct OSC message to the other instance.

So the 1st instance has just 1 script to get the OSC message from reaper, parse it and then send the
correct OSC message to the 2nd instance.

1 Like