I'll admit that I'm absolutely unfamiliar with csound and with running csound inside pure data, but I have to ask, could it be easier to run it completely independently of pd? If you're on linux (and probably on OSX, not sure about Windows), you can use jack and a program like QJackCtl or Patchage to route audio and MIDI in between pd and other applications.
I'm not sure if csound is at all similar, but if I were using SuperCollider, I could define a MIDI listener in SC, send it MIDI output from pd, and pipe the audio back into pd for further processing.
Somebody could make pure data externals to communicate with the supercollider server directly, but it seems unnecessarily complicated.