# Streaming from Bol Processor to Csound

**URL:** <https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56>\
**Category:** Developers\
**Created:** [January 12, 2021, 4:21pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56 "2021-01-12T16:21:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![BernardBel](https://forum.csound.com/user_avatar/forum.csound.com/bernardbel/32/24_2.png) [@BernardBel](https://forum.csound.com/u/BernardBel)\
**Post date:** [January 12, 2021, 4:21pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/1 "2021-01-12T16:21:17Z")

</div>

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 [https://bolprocessor.org/](https://bolprocessor.org/)

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 [https://bolprocessor.org/microtonality/](https://bolprocessor.org/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 tag. (A similar process is used for MIDI files.)

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. 😉

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

Bernard Bel

---

<div class="post-metadata">

**Author:** ![rory](https://forum.csound.com/user_avatar/forum.csound.com/rory/32/7_2.png) [@rory](https://forum.csound.com/u/rory)\
**Post date:** [January 12, 2021, 5:02pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/2 "2021-01-12T17:02:41Z")

</div>

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 😉

Regarding your question, have you considered sending events to Csound in realtime via [UDP](https://flossmanual.csound.com/csound-frontends/web-based-csound).

You might also wish to look at the web build of Csound, which can be downloaded from [here](https://csound.com/download.html). 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.

---

<div class="post-metadata">

**Author:** ![stevenyi](https://forum.csound.com/user_avatar/forum.csound.com/stevenyi/32/4_2.png) [@stevenyi](https://forum.csound.com/u/stevenyi)\
**Post date:** [January 12, 2021, 7:06pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/3 "2021-01-12T19:06:55Z")

</div>

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:

[https://csound.com/docs/api/group\_\_\_s\_c\_o\_r\_e\_h\_a\_n\_d\_l\_i\_n\_g.html](https://csound.com/docs/api/group___s_c_o_r_e_h_a_n_d_l_i_n_g.html)

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

[https://csound.com/docs/manual/udpserver.html](https://csound.com/docs/manual/udpserver.html)

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

[https://csound.com/docs/manual/CommandFlagsCategory.html](https://csound.com/docs/manual/CommandFlagsCategory.html)

(Search for “-L device”)

---

<div class="post-metadata">

**Author:** ![BernardBel](https://forum.csound.com/user_avatar/forum.csound.com/bernardbel/32/24_2.png) [@BernardBel](https://forum.csound.com/u/BernardBel)\
**Post date:** [January 12, 2021, 9:00pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/4 "2021-01-12T21:00:46Z")

</div>

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! 😉

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) 😉 Bernard

---

<div class="post-metadata">

**Author:** ![BernardBel](https://forum.csound.com/user_avatar/forum.csound.com/bernardbel/32/24_2.png) [@BernardBel](https://forum.csound.com/u/BernardBel)\
**Post date:** [March 7, 2021, 3:48pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/5 "2021-03-07T15:48:09Z")

</div>

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:

---

<div class="post-metadata">

**Author:** ![BernardBel](https://forum.csound.com/user_avatar/forum.csound.com/bernardbel/32/24_2.png) [@BernardBel](https://forum.csound.com/u/BernardBel)\
**Post date:** [March 7, 2021, 4:04pm UTC](https://forum.csound.com/t/streaming-from-bol-processor-to-csound/56/6 "2021-03-07T16:04:34Z")

</div>

PS. Sorry for question (2): I discovered
