Forum rss-feed

Forum

Pico: Breath Controlled Octave switch

Most Recent

written by: john

Hi Hugo

There's a growing body of information for developers that you can find here. There were a number of talks at the Developers Conference in January that are of use, particularly Jim's introduction to the internals and Geert's talk on writing a first Agent. These have now all been edited and uploaded and you can find them, and the slides that accompanied them here. The 'build scripts' referred to in the documentation are the Scons scripts that drive the creation of binaries and the compilation of the C++ and Python wrappers, these are scattered all through the source tree.

In order to write an Agent you will need reasonable C++ and Python skills and need to be reasonably familiar with standard development tools. It is possible to write pure Python Agents, but not for performance data as it's too slow - for the logical function you're after you'll need a C++ component. The one thing you don't need any more is the full git checkout - the recent versions of EigenD now ship with the API headers and some build scripts that you can use to compile your own Agent and make an install package for it directly.

We have a 'wish list' of small Agents that we're encouraging people to have a go at and some basic logical building blocks like the one you're interested in are on it - it would be great to see it written. If you do have a go, please keep us posted, we'd love to hear about it.

John

written by: Hugo.Evers

Tue, 29 Nov 2011 16:10:22 +0000 GMT

HI there,

I would like to able to use the breath controller as a temporary half octave switch.
This is an example of how i would like it to work.

Say you are using a pentatonic c major scale, the normal layout should be CDEGA.
With drawn breath it would become F# pentatonic with C# as the first note: C#D#F#G#A#
But as soon as you stop drawing your breath blow into the breathpipe it would be CDEGA again.

The idea is that when the breath controller outputs a negative value(there should probably a very small minimum value so it wont react to changes is air pressure or something like that), it will change the scale by 0.5 octave up and change the basenote(the first note of the keygroups) 5 semitones down. This change should only be active while there is a negative value, so whenever i wouldn't use the breathpipe or i would blow into it, the scale should be normal.

It would be great if the output signal could be turned into an absolute value after it acts as a switch. What i mean is that by using drawn breath to be able to play accidentals, a windcontrolled VST wouldn't work. It would be great if the negative value could be turned into a positive value before it is send as a midi signal.

Diagram style it would look like this:

Breath--> when negative(by a certain minimum amount) octave 0.5 up basenote -5 ---> | breathvalue | ---> breath ouput/shaper.

So my question is, how can this be done in belcanto language?
Maybe the ranger could be used to create the threshold minimum negative value, and set up the breath control as a talker to send to belcanto phrases neccesary to change the octave and basenote and configure that message to be active only when breath controller value is negative.

I would really appreciate your help:-).


written by: NothanUmber

Sat, 3 Dec 2011 17:29:06 +0000 GMT

Hi,

I am not sure how/whether this is possible by combining the existing agents.
You might want to experiment with those three chains:
bending up: keyboard breath output -> shaper (highest compression) -> ranger [-1;1] -> talker activation (with the script kgroup 1 hey course 1 to 1 semitone set)
bending down: keyboard breath output -> shaper (highest compression) -> ranger [1;-1] -> talker activation (with the script kgroup 1 hey course 1 to -1 semitone set)
reset: keyboard breath output -> ranger [0;1]->shaper(highest compression)->ranger[1;0]->talker activation (with the script kgroup 1 hey course 1 to 0 semitone set)

That might work given that the talker likes the input from the chain before it (normally it is meant to be connected to a key).
If this does not work it is definitely possible by writing a new agent.


written by: Hugo.Evers

Sat, 10 Dec 2011 20:25:04 +0000 GMT

Thank you for your response,

I have watched every seminar and looked at every little bit of information in the forum and wiki but i can't find how to let the breath output behave as if it is a key(so it can activate a talker).

I thought about using the shaper's activation output to trigger a talker, unfortunately this doesn't work. It is not possible to connect the output of the ranger to the shaper.

It is also not possible to connect the ranger's output to a talker.

This is the belcanto i used:

empty join
kgroup create
pico keyboard 1 to kgroup 4 connect
kgroup 4 listen
output 2 create
empty join
ranger create
ranger 2 hey
minimum to 0 set
empty join
kgroup 4 output 2 breath output to ranger 2 connect
empty join
shaper create
empty join
ranger 2 output to shaper 1 connect (this doesn't work!)
talker create
it to scaleresetter name ify

I hoped to do:
shaper 1 activation output to scaleresetter activation input connect

Or:
shaper 1 activation output to scaleresetter activation connect

But that doesn't work so i did:

ranger 2 output to scaleresetter activation input connect
empty join
scaler 1 listen
scaleresetter listen

scaler 1 scale to user 2 when ranger 2 set

Or:
scaler 1 scale to user 2 when shaper 1 activation output set

or:
scaler 1 scale to user 2 when scaleresetter activation input set

But unfortunately, that didn't work:-(.

So i would like to use the ranger's output to trigger a talker, without the use of any external programs like max/msp.


You suggested creating a new agent, how could that be done?

I would really appreciate any help on this:-)!




written by: NothanUmber

Sun, 11 Dec 2011 00:09:40 +0000 GMT

ranger 2 output to shaper 1 connect (this doesn't work!)

that would probably work:
ranger 2 output to shaper 1 pressure input connect

The problem will still be that activation alone is not enough, you have to select the right phrase for the talker (it essentially contains a map of keys to belcanto phrases).

So there could be two variants:
1) forget the talker and try to directly modify the octave input of the kgroup or scaler (breath->shaper->kgroup/octave could work.
2) If that does not work (or you generally want to know how to hack with EigenD :) ): You could write your own breath to key agent:

If you know a bit of C++ and Python this could be an interesting incentive to get into EigenD programming.
First you have to get the EigenD sources.
Have a look here:
http://www.eigenlabs.com/wiki/Developers/

If you have them one way to start would be:
* read the introduction in
EigenD\plg_osc\Roadmap
* Search for the sources of the kgroup:
Python: EigenD\plg_simple\kgroup_plg.py
C++ EigenD\piw\piw_kgroup.h and EigenD\piw\src\piw_kgroup.cpp
* Copy them and call the new agent e.g. "breath key controller"
* remove all atoms but the breath input and the key output
* write new code that sends out a specific key press when breath is negative another for zero breath and a third one for positive breath values, throw out all the other code
* compile this new breath key controller agent and connect it between the keyboard and the talker
* now breath controlled octave switching should work
* think about sharing the sources to make other people happy, too :)


written by: NothanUmber

Sun, 11 Dec 2011 01:44:17 +0000 GMT

ok, tested a small example on my side that works:

ranger create
it to octave breath ranger name ify
octave breath ranger curve to 10 set
octave breath ranger minimum to 2 set
octave breath ranger rest to 3 set
octave breath ranger maximum to 4 set
pico keyboard 1 breath output to octave breath ranger input connect
octave breath ranger output to kgroup 1 octave connect

Unfortunately now the octave keys don't work in combination with breath control because the ranger set an absolute octave value and thus overwrites the relative value usually set by the octave talker (but you could change the octave talker in a way that it changes the minimum/rest/maximum values of the octave breath ranger if one sets them e.g. to 2/3/4 and the other key to 5/6/7 you have at least two ranges then):

talker 6 hey all phrase cancel
talker 6 listen
interpreter listen
kgroup 1 listen
" octave breath ranger minimum to 2 set " when 1 do
" octave breath ranger rest to 3 set " when 1 do
" octave breath ranger maximum to 4 set " when 1 do
" octave breath ranger minimum to 5 set " when 2 do
" octave breath ranger rest to 6 set " when 2 do
" octave breath ranger maximum to 7 set " when 2 do
empty join

Perhaps you might want to experiment with the curve/add an additional shaper in between etc. as resetting to zero when no breath happens can take some seconds for my test.

Have fun!


written by: Hugo.Evers

Sun, 11 Dec 2011 17:26:48 +0000 GMT

Hey NothanUmber,

I really appreciate your help, but i thought about the octave control and basically that only works when you are using major/minor scales.

When i read through to the forums i read a lot of posts about ways to "expand" the range of the pico keyboard. So i think i might be able to make some pico owners pretty happy by creating a scale modifier.

The only thing i need to complete it is the ability to activate a talker when the breath value is negative and activate a talker when the breath value is zero/positive. Or, in general a way to connect a continious output to a talker.

so here's the idea:

there is the eigenD Stage application, and in the midi configuration there's a tab where you can change the scale.

I want to turn those scales into talker, when i click major in the stage tab(and i know this is possible, i already got this working) that needs to activate a talker that will change the breathtalkers.

It sounds a little cryptic so to visualize it, here's a diagram:

stage/Major(sends out a keypress)-> talker( breath talker positive hey when breathvalue is zero or positive change scale to user 2)and(breathtalker negative hey when breathvalue is negative change scale to user 3).

Now, if i define user 2 as 0 2 4 5 7 9 and user 3 as 1 3 6 8 10 11, it will let me change between cdefga and c# d# f# g# a# b.

but... you could also configure a different talker in the stage tab as a whole tone talker the diagram would become:

stage/Wholetone(sends out a keypress)-> talker( breath talker positive hey when breathvalue is zero or positive change scale to user 4)and(breathtalker negative hey when breathvalue is negative change scale to user 5).

and define user 4 as 0 2 4 6 8 10 and user 5 as 1 3 5 7 9 11, the breathpipe will allow so to play accidentals and such, so can play in a scale but very easily go out of it to allow maximum musical performance.

You can of coarse extend this idea to every scale, blues for example or mysterious jazz scales:p..

But unfortunately, i dont know any c++ or any python, i just started looking into belcanto three weeks ago..

I can imagine that connecting the continious value generated by the breath controller directly to a talker would cause the talker to talk all the time.. So i will need to create a new agent that reacts to a change in the breathvalue being zero/positive or Negative. and only send out a keypress once, in a very distant kgroup which is not connected to a midi output.

I will look into eigend code and some C++ and Python, but i have got no experience at all..
So any help.. Would be very appreciated :-)..

And of coarse, i will share the result:).

And thanks NothanUmber for your support so far, i really appreciate it!


written by: NothanUmber

Sun, 11 Dec 2011 21:32:36 +0000 GMT

Hi Hugo,

ok, from this point on things would be more effort than 10 minutes of Belcanto phrase searching.
So my suggestion: let's first wait another few weeks until EigenD2 arrives - it has the fingerer agent which might be the answer to the accidentals and bigger range question on Pico.
Additionally as far as I understood John, there will be a "call for agents" soon - they will collect ideas for easy to write agents for the coding workshop and beyond that the open source community can implement and where Eigenlabs will provide active support for development. So if you fledge out your idea far enough (and best in a way that it can be used for many purposes) then chances are good that it could become reality even if you don't dive into programming lands yourself ;)

Greetings,
Ferdinand


written by: Hugo.Evers

Thu, 16 Feb 2012 20:14:23 +0000 GMT

I was wondering since eigend 2.0 has been released, or at least the experimental version, it would be possible the write the necessary agent.

When i read the release notes it mentioned reference build scripts for building agents. Although unfortunately, i couldn't find these.

I don't know any python vocabulary but i think the agent necessary for completing the scale switch is applicable in many different situations, a simple comparator would do.
Using this agent you could switch any set of agentparameters via a talker activated by a continuous value. Doesn't seem like it would be that hard to code though the possibilities are endless:-p..

If you would let this agent act as if it is a keyboard key(which is capable of initiating a talker) that would send a note_on value( or whatever value it is that the eigenharp keys send out) when input from a definable source(so in this case connecting the breathvalue to the agent) is within a definable range.

Similar agents(shaper, ranger, talker) already exist but i couldn't find any really helpful information about how they work or how i could create an agent myself that combines certain elements from these agents.

So basically what i would like to know is whether there is any documentation(except the osc agent) about some similar agents and their source code, I searched the github but i couldn't find what i was looking for.

And whether the fingerer agent(which from what i read is delayed) could be an answer to this problem.

I would appreciate any help:-).


written by: john

Thu, 16 Feb 2012 20:59:38 +0000 GMT

Hi Hugo

There's a growing body of information for developers that you can find here. There were a number of talks at the Developers Conference in January that are of use, particularly Jim's introduction to the internals and Geert's talk on writing a first Agent. These have now all been edited and uploaded and you can find them, and the slides that accompanied them here. The 'build scripts' referred to in the documentation are the Scons scripts that drive the creation of binaries and the compilation of the C++ and Python wrappers, these are scattered all through the source tree.

In order to write an Agent you will need reasonable C++ and Python skills and need to be reasonably familiar with standard development tools. It is possible to write pure Python Agents, but not for performance data as it's too slow - for the logical function you're after you'll need a C++ component. The one thing you don't need any more is the full git checkout - the recent versions of EigenD now ship with the API headers and some build scripts that you can use to compile your own Agent and make an install package for it directly.

We have a 'wish list' of small Agents that we're encouraging people to have a go at and some basic logical building blocks like the one you're interested in are on it - it would be great to see it written. If you do have a go, please keep us posted, we'd love to hear about it.

John



Please log in to join the discussions