If I understand correctly, you're getting 0-127 in string format but the output format needs to be a number.
In this case try this:
Code:
match("%i",#input_value,output_value);
"%i" : output format, integer
#input : input string containing your OSC value
output_value : variable that gets to store the value for MIDI output