Forum rss-feed

Forum

Pico: belcanto script to play a piano note/chord

Most Recent

written by: earthspot

@John --I'm reassured by what you say. At least, I get the picture.

I can see why you wouldn't want customers to invest too heavily in setups based on hundreds of lines of Belcanto. Having to guarantee heritage Belcanto will stay upward-compatible till hell freezes over would seriously hold back its future development.

I appreciate your recommendation to write my own agent. Migration to the next release of eigenD is then my problem not yours. Pity, though, if it has to be written in Python. Not my fav language. (Even though Google likes it.)

I don't want to get in a tussle here about what is / is not a "scripting language", and whether that includes Belcanto. Wikipedia happens to mean what I do. To me it's how it's used, not its taxonomy. I've even seen ASM used as a scripting language, would you believe?

Here's a simple demo using Belcanto as a scripting language, which shows what I'm up to:
http://www.jsoftware.com/jwiki/Scripts/Belcanto

written by: earthspot

Sun, 6 May 2012 17:59:59 +0100 BST

Sorry to keep asking naff questions...

Writing my own specialist chord vamper in J language, (though EigenTab is superb) and I need a "Play It" button. Acutely feeling the lack of a Belcanto language reference, especially one with sample phrases. Or (better) a big enough library of assorted sample scripts.

What's the Belcanto to send to the Pico to play a (piano) note or notes/chord?...

(a) irrespective of (and hopefully preserving or restoring) existing keyboard setup

(b) setting up piano + scale, then hitting (numbered) keys?

Ian


written by: john

Wed, 9 May 2012 16:21:46 +0100 BST

Hi Ian

There's a new Agent in the 2.0 series that does exactly this, it generates a note when told to do so in Belcanto. This is called 'Player' and there's a new (as in we just included it today, we didn't want to reply to your post untill there was documentation) Wiki page for it here. If used directly via the Stage backend (using xmprpc) it's timing may not (depending on how loaded the system is) be that good but it wll probably do roughly what you want.

Please be aware that this Agent has some changes to come, in particular to specify the course of the key to be played as part of the verb, which it doesn't presently do. This will probably happen fairly shortly and any such change will be in the release notes.

If you want guaranteed good timing in playing notes from an external program then there are two options. You could wait untill we have implemented an OSC input so that you can plumb something up directly. We won't get to this in 2.0, but it may makle an appearance in 2.1, as may improvements to the MIDI in system to allow driving notes directly from MIDI.

Alternatively you could define a Talker with appropruiate phrases to play the notes you want, then drive this from the MIDI in - this is a possible option right now..

I hope that helps, please keep us posted as to how you get on.

John


written by: earthspot

Thu, 10 May 2012 08:25:16 +0100 BST

Thanks John... but I can't make it work.
I've tried to reproduce my steps exactly, and test them out repeatedly. Which may make it seem long-winded, but AFAIC simply anything might otherwise be going wrong, and I've tried to eliminate the obvious possibilities....

Read:
http://www.eigenlabs.com/forum/threads/id/989/
http://www.eigenlabs.com/wiki/2.0/Player/

Scratch head over this page:

1. The word "play" is a verb.
(going by: http://www.eigenlabs.com/wiki/2.0/Player/)
Aren't verbs supposed to be at the end of the Belcanto statement?
(Quote from: http://www.eigenlabs.com/wiki/1.3/The_Belcanto_Introduction/
"Belcanto sentences always have a verb at the end. This may be something as simple as 'set' if you want to set a value, or something as complex as 'connect'. Verbs may only appear at the end of Belcanto sentences - they are like a full stop and tell the Interpreter to go off and do what you have asked."

2. So... shouldn't the 3 examples at the bottom of the page each be preceded (or terminated??) with the word: "play"?

Press on anyway...

I now proceed exactly as follows:
(I've repeated this several times from STEP 1 as it stands, also with slight variations)

STEP 0:
Download 2.0.48-experimental for the Mac and install.

STEP 1:
Verify all existing Eigenlabs apps have been quitted.
Run: /Applications/Eigenlabs/2.0.48-experimental/EigenD.app/
Verify by eye it loads Factory Setups > pico > 1 (Standard Setup)
Choose menu: File > About eigenD
Black dialog box appears, showing: 2.0.48-experimental
(to check aren't somehow running wrong version)
Verify piano sound is heard when Pico keys pressed.

STEP 2:
Choose menu: Tools > EigenCommander
Verify Eigencommander accepts these commands:
metronome hey start
Response: ok
Percussion heard to commence
metronome hey stop
Response: ok
Percussion heard to cease.

STEP 3:
Type in:
player 1 listen
Response: failed

player 3 listen
Response: failed

Scratch head:
How do you create a test Player if there isn't one already created by the Factory Setup?
...No clue from: http://www.eigenlabs.com/wiki/2.0/Player/

play note 1 with velocity 1
Response: ok
But no sound!

Scratch head:
Maybe velocity 1 is too slow to hear anything with the piano?

play note 1 with velocity 9
Response: failed
Message: Inappropriate arguments for the verb play

play note 1 with velocity 1
[...what it accepted before]
Response: failed
Message: Inappropriate arguments for the verb play
[The error messages don't immediately appear in the message pane. It soon becomes clear though that Eigencommander is chaining my inputs and I can't stop it doing it, except by quitting eigenD.]

Can't make any further progress. I'm wading deep in unknown unknowns here.

Eigenlabs... can you pls correct the above test procedure so it works reliably for you?


written by: john

Thu, 10 May 2012 09:01:30 +0100 BST

Hi Ian

The players defined in the Factory setups are all used internally to rigs and are there to support the arranger. This is likely to get changed in the next couple of releases as we want to move them and change the way the arranger interacts with them. You have stumbled into one of the last remaining areas of flux in 2.0 prior to it going into stable release I'm afraid.

In the meantime you're best off creating a new player specifically to do what you want. If you open Workbench you can do this using the new agent tool. You don't need one already created, just select it from the list of available agents in the way described in the tutorial series here. It's well worth following that series if you want to start doing more advanced configuration. Using Belcanto for that kind of thing is possible but unsupported and frankly very hard as you have no visibility of what you're doing - it's the whole reason we wrote Workbench in the first place.

I'm not sure if you have Pro or not (for what you're starting to do, you need it really). If you don't have it, we're about to introduce an upgrade option for EigenD subscribers, so hold off on buying a pro sub for a few days if you are thinking of it and you'll save some money.

Once you've created your new player agent, you can connect it to whichever rig you want to play using the wiring tool and then you should be able to use whatever way you're invoking Belcanto to play notes, in pretty much the way you're trying to do right now.

John


written by: jim

Thu, 10 May 2012 09:31:18 +0100 BST


In the Pico setup you can do this:


player create
player key to sampler rig 3 key connect
player pressure to sampler rig 3 pressure connect


Then to make notes:


note 3 with velocity 100 play


jim


written by: earthspot

Thu, 10 May 2012 23:43:09 +0100 BST

@Jim, thanks, that works a treat, provided I put your first 3 sentences into a user script.

So I take it the examples in http://www.eigenlabs.com/wiki/2.0/Player/ are just plain wrong? Or do they work on the alpha?

How to play a chord? Simply stringing your last sentence:

note 2 with velocity 100 play note 5 with velocity 100 play

works ok for me, but it looks a trifle cumbersome. Just curious. It won't matter to me, the way I plan to use it.

@John, yes if the answer to everything is Workbench, then I'd be keen to know how to lay my hands on it (even for a 30-day trial) for less than the £249 annual sub quoted at http://www.eigenlabs.com/store/category/subscriptions/

Ian


written by: john

Fri, 11 May 2012 08:48:02 +0100 BST

Hi Ian

You can buy Workbench for £139 including VAT, you get 6 months of free updates for that. It's certainly not the answer to everything, but for building and plumbing setups it's the best way and we won't be supporting doing this directly in Belcanto in the future.

John


written by: earthspot

Fri, 11 May 2012 18:16:35 +0100 BST

john said:
... but for building and plumbing setups it's the best way and we won't be supporting doing this directly in Belcanto in the future.


Mind my asking... what *will* you be supporting in Belcanto in the future?

The presence of a scripting language fit-for-purpose was a significant factor in my deciding to go for an eigenharp. I should qualify what I mean by that. But I'll wait till I'm asked.

I bought a pico as an entry-level tool. So far it's done what I hoped (...just). So my ideas have grown, and are beginning to gell.


written by: john

Fri, 11 May 2012 23:20:13 +0100 BST

Hi Ian

Belcanto will remain a very important part of the Eigenharp. It's original intended purpose was as a command and control language and in this respect we see it becoming more powerful and flexible over time rather than less.

It will still be possible to create agents and connect them together with Belcanto if you really wish to. However, we have now had several years of experience with this and it has proven to be a clumsy, hard to communicate and almost impossible to support way of constructing and managing setups. Of all the things Belcanto is good at, this is not it's strength. Setups and the signal flow that they represent are much better managed, documented and manipulated with a graphical tool and the tool we have developed for that is Workbench. So when I say that we will not be supporting the use of Belcanto to build and edit setups that's exactly what I mean - we're not going to be helping people to do things in that way as it's a bit bonkers when a much better way exists. If you've built a setup that way we won't be able to help you with it if you have problems as we won't be able to open it in Workbench and make sense of it. And if our experience is anything to go by, setups that have had much direct manipulation (in terms of signal flow using Belcanto) by users are often in a fair mess - it's very easy to go wrong in odd ways with no graphical overview and extremely hard to debug. We're not being awkward when we wish to deprecate the construction of setups outside of Workbench, there are really good reasons for it.

I notice that you describe Belcanto as a 'scripting language' btw. It isn't that I'm afraid and never has been - for starters it doesn't even have any conditionals. For programmers the scripting language in EigenD is Python and we provide libraries to help write agents in that language (usually mixed with C++ but not always). Belcanto really is a command language for musicians, it's what it was designed for and in that space it is really useful. It's future lies firmly in that direction. If you want to code with EigenD then we've done a lot of things to make that easier in the last year and if you're interested it's worth taking the time to watch some of the presentations at the 2012 DevCon. You can now write your own Agents fairly easily and I'd encourage you to have a go if you have the urge.

You might also be interested to know that we've introduced an upgrade option today for EigenD owners, you can read the forum post here.

John


written by: earthspot

Sat, 12 May 2012 15:00:14 +0100 BST

@John --I'm reassured by what you say. At least, I get the picture.

I can see why you wouldn't want customers to invest too heavily in setups based on hundreds of lines of Belcanto. Having to guarantee heritage Belcanto will stay upward-compatible till hell freezes over would seriously hold back its future development.

I appreciate your recommendation to write my own agent. Migration to the next release of eigenD is then my problem not yours. Pity, though, if it has to be written in Python. Not my fav language. (Even though Google likes it.)

I don't want to get in a tussle here about what is / is not a "scripting language", and whether that includes Belcanto. Wikipedia happens to mean what I do. To me it's how it's used, not its taxonomy. I've even seen ASM used as a scripting language, would you believe?

Here's a simple demo using Belcanto as a scripting language, which shows what I'm up to:
http://www.jsoftware.com/jwiki/Scripts/Belcanto



Please log in to join the discussions