Csound api in a bidule object

General Discussion about Plogue Bidule

Moderators: vincent@plogue, davidv, seb@plogue

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Csound api in a bidule object

Postby boonier » Fri Jul 07, 2017 6:59 am

http://write.flossmanuals.net/csound/a-the-csound-api/

..would be very cool indeed. I spend time in other environments and whilst making interesting and cool sounds, they rarely have a library of go-to control structures to compose with. Of course creating them from scratch is fine, but it takes time. One of the great strengths of Bidule is how quickly I can throw something together to do this, and in a modular fashion too. I also like mixing environments and workflows - using strengths of each.

Think about how Csound could be integrated into Bidule's workflow. Setting up a wrapper around the api, should be a trivial task to those that know how (me a bit more non-trivial), but it would open up a huge number of synthesis options. Having event driven instr with p fields creation is also very powerful.

Passing messages to the csound api could be achieved using osc format possibly? Taking a cue from this http://write.flossmanuals.net/csound/a-csound-in-pd/ or text fields populated with a string and formatting the messages internally to pass on to the csound api...

Certainly seems possible

seb@plogue
Site Admin
Posts: 9587
Joined: Tue Mar 02, 2004 7:23 pm
Location: Montreal
Contact:

Re: Csound api in a bidule object

Postby seb@plogue » Fri Jul 07, 2017 8:46 am

It's LGPL so it would be legal (although there's quite a few functions to wrap...).

The main question would be if it's possible to use the API so that it can process a sample buffer on request (after being set a sample rate and buffer size) and if everything can be done in real-time. I haven't kept up with csound but from memory some of the opcodes/features weren't able to do that.

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Csound api in a bidule object

Postby boonier » Mon Jul 10, 2017 10:19 am

As I understand it, the host buffer cycle is specified in the host and CS api falls into line.

When you created the orchestras etc in Csound, you make the score run for a very long time, so the real-time aspect comes into play when you send instrument events from the orchestra (or python or whatever) - csound engine is running. There is the Cabbage environment that enables making VSTs out of Csound instruments, so it seems to me that the way that works is the same as any other plugin in Bidule.

(At this point you might be wondering, why then if you can make VST/AUs in Cabbage do you want to create a bidule for this? Well it's more of a granular control and interacting with the csound named software busses like chnset - more than just midi - which makes it interesting).

Jens Groh
Posts: 49
Joined: Sun May 14, 2006 1:08 pm

Re: Csound api in a bidule object

Postby Jens Groh » Mon Jul 10, 2017 2:59 pm

I would be surprised if this were too difficult to do it at all. (Although there may be some obstacles: For example, if my own contributions are still contained, they might have broken some encapsulation principle... :oops: )
I remember that, 15 years ago, I used Gabriel Maldonado's DirectCsound application, which wrapped the Csound core and ran smoothly in a realtime context. The score was not used, apart from possible table definitions. For the orchestra, there were minor opcode extensions for instrument definitions to support MIDI information. MIDI note events created instrument instances on the fly, event-independent instruments needed to be instantiated by a special "infinite-note" command. MIDI controllers could be converted to Csound's parameter-change events. Of course it didn't simply run any given Csound instrument file, but it was really not too far away from the canonical, batch-processing Csound.
The block-wise processing should fit well to Bidule.

JensJohansson
Posts: 42
Joined: Sun Nov 04, 2012 10:48 am
Contact:

Re: Csound api in a bidule object

Postby JensJohansson » Wed Jul 19, 2017 5:08 pm

Perhaps I'm misunderstanding, but would you not load Csound VST as a VSTi and use that?

https://csound.github.io/docs/manual/Co ... ndVST.html

boonier
Posts: 982
Joined: Wed Sep 14, 2005 6:34 am
Location: Brighton, UK

Re: Csound api in a bidule object

Postby boonier » Thu Jul 20, 2017 1:41 am

Sure! I could, and I do, load Cabbage too :)

But because its only input is midi, it doesn't give you the ability to create events with unique parameters (much like calling a function with arguments)...or maybe I haven't dug into it enough to find out. It might just be a bunch of work for not a whole lot of gain, but having the flexibility would expose a lot of the Cs api's power.


Return to “Bidule General”

Who is online

Users browsing this forum: No registered users and 5 guests