In Reaper, the Take Pitch Envelope, unfortunately, doesn't work on MIDI Items. It only works on AUDIO Items. So you could "bounce in place" the MIDI Item, so it becomes an AUDIO Item. Then apply the Take Pitch Envelope on that AUDIO Item. Sidenote: weird that Reaper let's you draw a Take Pitch Envelope on a MIDI item, while it doesn't work.