[Csnd] Midi output from csound through channels

I'm calling csound from Ctcsound to read Midi notes. I assumed I could pass the notes read back to ctcsound using channels. But what comes back from playing a chord is only a single note value.

Here is the csound .csd file I'm using:

If all notes happen in the same kcycle, the channel will only hold the last note. Maybe the best thing would be to store the notes in a function table and then read however many have been stored in one kcycle. You can keep a global count and pass that in a channel. Clearing the global count every kcycle so you can start again every time.

Prof. Victor Lazzarini
Maynooth University
Ireland