Midi notes drop by a semi tone

I record a melody through any mid instrument. Once recorded the whole thing randomly drops a semi tone…Any ideas