[Csnd] Csound API question

Hey hey,
I'd like to run Csound inside a c++ application using its API. Csound should communicate only through the host, not directly connecting to any outside audio/MIDI I/O. Sample buffer size will be dictated by a host set frame size.

In audio this is possible, on e can pass in sample buffers and read them. But how about control channel access? I see that the C function:
csoundSetControlChannel
takes a single value
and
csoundGetControlChannel
returns a single value.

Is there a way to read/write control data at the speed of the control rate in such a setup? We can assume that I set the control rate to work well with the frame buffer size of the audio.

Or is there another approach, when automating Csound k-rate values when running in such a way?

As an example, you can take JACK process callback function, which will process a fixed given number of audio samples per call and audio channel.

Any help is very much appreciated.

Best wishes,

Jeanette

Thank you Michael! This is helpful. So I might look at the Csound7 API.

Just to be sure though: with Csound6 and that type of setup, I best send one control value per host processing callback.

Best wishes,

Jeanette

Michael Gogins, Oct 8 2026:

First step is to study the C++ examples in the repo

https://github.com/csound/csoundAPI_examples

they will give you a good idea of what you need to do for various use cases.

Prof. Victor Lazzarini
Maynooth University
Ireland

Hello Iain,
thank you for that suggestion. I downloaded the sources and am looking at them. I think this might prove helpful in my undertaking. It will become clearer in time.

Best wishes,

Jeanette

Iain Duncan, Oct 9 2026: