Forum rss-feed

Forum

Software: Issuing Belcanto From Other Software

Most Recent

written by: dkah

Does anybody have a good idea how to initialize this from Max/MSP? One could use Javascript or Java and make some nice buttons. I will figure it out eventually, unfortunately at the moment there are more important things on my task list, like figure out how to use Belcanto in the first place ;-). But maybe someone else already knows how to do this.

written by: jsn

Thu, 21 Apr 2011 08:47:51 +0100 BST

What is the simplest software interface I can use to issue Belcanto phrases directly to EigenD?

I want to send Belcanto from a piece of my own software to control EigenD. I need to be able to send any Belcanto phrase. I don't want to run the Commander or Browser.

Ideally, I just want to have a call like sendBelcanto(...). I am happy to write the calls in whatever language, but I need to know the protocol to use
(e.g. XMLRPC? Plain socket? HTTP/REST?)

If its possible, an example would be appreciated. If its not can I make a feature request? (It cannot be hard - you're almost there)

I'll happily make any 'stubs' I create available to others and document it up.


written by: geert

Thu, 28 Apr 2011 13:57:08 +0100 BST

Hi John,

We added this capability to EigenD 1.3.17-testing. There's basically an XML-RPC call with the name 'execBelcanto' that accepts any Belcanto string. In Python you can for example use it like this:


import xmlrpclib
s=xmlrpclib.Server('http://localhost:55553')
s.execBelcanto('start')


HTH,

Geert


written by: dkah

Thu, 28 Apr 2011 19:26:28 +0100 BST

Couldn't help myself, as a proof of concept I connected my Novation Launchpad via Osculator -> Applescript -> Python -> Belcanto -> Eigenharp Pico to start/stop the metronome.

Description and scripts on my blog.


written by: jsn

Thu, 28 Apr 2011 21:24:36 +0100 BST

Brilliant. Thanks, Geert!

Was going to say this is going to start an avalanche of apps but dkah has beat me to saying it by doing it!


written by: john

Fri, 29 Apr 2011 08:11:54 +0100 BST

There is one caveat that you might need to bear in mind when using xmlrpc to execute Belcanto, and I thought it might be a good idea to let you know about it before someone files a bug. Using this interface is like using the commander, the Belcanto is parsed and executed at the time the command is issued. This means that it is not timely, and in fact there is no guarantee of the time it will take to run the command as it is executed in a different thread that has a lower priority than others in EigenD. The way we make Belcanto timely is to effectively precompile it, and the mechanism for this is the Talkers. The reason I mention this is that if, for example, you are starting and stopping the Metronome, or changing a scale, you will find that if the system is lightly loaded it may well seem timely because it only takes a few milliseconds to run, but if things get busy then it might start to take hundreds of milliseconds, and you're going to notice that. Talker commands are executed in the audio buffer in which they are issued, so add no latency at all, and this is reliable.

Before you ask, no, there isn't yet an xmlrpc interface to enable you to set Talker phrases up. You could in theory do this using the normal Belcanto xmlrpc process, using a Talker you create for the purpose, but we're about to make some big changes in the way that Talkers work to make them a lot nicer to use, so anything you write doing that will probably stop working in the 2.X series. By all means have a go though, it'll be really interesting to see what you come up with, just please bear in mind that you might have work to do to keep it working later.

With that caveat, have fun!

John


written by: jsn

Fri, 29 Apr 2011 08:25:31 +0100 BST

Thanks for the caveat, John.

I assumed that something like this would be the case. I'm working on the principle it's not real-time enough for guaranteed timing during live performance (another way of saying what you just said)

Any chance of an extended example showing error handling and a response object? (i.e. I'd like to be able to ask EigenD questions about the current configuration - is that possible?)



written by: jsn

Tue, 3 May 2011 20:17:46 +0100 BST

So for all those Javascript junkies out there, here's a piece of code that lets you issue BelCanto from your web-browser to EigenD (locally or on another machine)

Have a look at my demo page at http://eigentab.net/testrpc.htm

View the source - it's reasonably obvious if you know HTML/Javascript. This will be used from EigenTab when I can figure the BelCanto out (grrrr - see other post)


written by: dkah

Wed, 13 Jul 2011 21:12:26 +0100 BST

Does anybody have a good idea how to initialize this from Max/MSP? One could use Javascript or Java and make some nice buttons. I will figure it out eventually, unfortunately at the moment there are more important things on my task list, like figure out how to use Belcanto in the first place ;-). But maybe someone else already knows how to do this.



Please log in to join the discussions