Contol Pitch in semitone By usb midi cc#

Even better, let the compiler give you the best possible number, use

Pitch_cc = ((128.0/24.0*semi_key)-1); 

And since the controlChange function takes a byte (0-255) value, round it

Pitch_cc = ((128.0/24.0*semi_key)-1)+0.5;