Streaming from Bol Processor to Csound

Dear colleagues,

I am not a developer of Csound but the developer of another piece of music software strongly connected with Csound: the Bol Processor

While working on the development of a multiplatform version (BP3), we realize that its output should use Csound in priority to real-time MIDI, MIDI files etc. Recently I have done a great amount of R&D work on microtonality which only makes sense via the accurate coontrol of frequencies offered by Csound.

Currently, the BP3 interface (a set of PHP pages) sends instructions to the (compiled-C) BP console which writes down a Csound score. Immediately, Csound is invoked (by PHP) to produce a WAV file appearing on a player of the page thanks to the HTML5

An evident shortcoming is that processing the Csound score only occurs once it has been completed by BP3 console. A long musical item may saturate the work space. With real-time MIDI output (in BP2) we could produce variations in a continuous, never-ending flow.

Therefore we dream of using a “real-time” feature of Csound, which implies being able to stream Csound scores “line by line” to the Csound console.

I am certain that these features have been implemented in Csound but I confess being unable to browse the documentation and reach the information required for achieving our goal… Therefore it would be extremely helpful that a Csound developer (or expert user) directs us to the relevant documentation which I will take time to read in detail!

Can you help us on this? Indeed it would even be wonderful to have Csound geeks in the community of BP3 developers — boarding on a train that has been running for 40 years. :wink:

All the best and thanks for all the work invested in this beautiful venture!

Bernard Bel

Hi @BernardBel, and congratulations, you’re the first person to post to the new online forum! There are not many here yet, but we hope to attract as many people as we can :wink:

Regarding your question, have you considered sending events to Csound in realtime via UDP.

You might also wish to look at the web build of Csound, which can be downloaded from here. That provides an interface to Csound through the WebAudio API. It will run a little slower than native Csound, but it’s still very good.

Hi Bernard,

Are you using the Csound API or executing Csound as a separate process? You can communicate score events to csound via API using these functions:

If you using csound as a process, Rory’s suggestion to use UDP is probably the easiest:

You can also use stdin and pipe score to Csound. There is mention of it here:

(Search for “-L device”)

Dear Steven and Rory,

Thank you for your quick and informative responses!

I admit that when I discovered this blank forum I feared it would be an old abandonned space! :wink:

I will follow the UDP track in priority. Currently, Bol Processor BP3 console (compiled in C) does not communicate directly with Csound. We downloaded Csound version 6.15 from . I use the OS X version. We install Csound and other BP3 resources as explained on BP3 saves the Csound score it has produced followed by a small “done.txt” dummy file which PHP detects to send a command line to Csound, for example: csound --wave -o …/my_output/result.wav …/csound_resources/default.orc …/my_output/result.sco I understand we should “teach” BP3 the creation and use of a UDP service. I guess this will be useful the day we install BP3 on a distant server, because users should process scores on their local installations of Csound. It is certainly much easier to stream Csound instructions than sound files over the Internet. OK, I see documentation on the topic, for instance: Thanks a lot, I will come back if things turn well (or really bad) :wink: Bernard

Dear colleagues,

I haven’t yet found time to work on the UDP protocol for connecting Bol Processor (BP3) with Csound in real time. I have been busy for 2 months with the complex issue of converting MusicXML scores, which now proved successful:

PS. Sorry for question (2): I discovered