< Back to IRCAM Forum

Updated Expression Controller in 3.5.1.b2

Fantastic Robert!

The expression editor really helps a lot! Fx the formatting of loops is great stuff!

Some question :

  1. It would be great if “access-position” was added to the features.
    I have an idea for a new feedback instrument based on position.

  2. I see that there is a getref(“name-of-objet”).
    Does it also works for controllers getref(“name-of-controller”)?

  3. = and <= used to exist. Do they still? Or maybe they are written something like or(x>0.5, x=0.5)?
    Please provide and example if you have one …

Until soon Hans Peter

Hi Hans Peter,

“access-position” will work in 3.5.1.b3.

I will check getref for controllers, and >= & <= (it is meant to work).

“for” loops need to work, too.

It was really time to dust off the expression controller!

Robert

Hi Hans Peter,

“access-position” will work in 3.5.1.b3.

I will check getref for controllers, and >= & <= (it is meant to work).

“for” loops need to work, too.


It was really time to dust off the expression controller!

Robert

Hi Hans Peter,


“access-position” will work in 3.5.1.b3.

I will check getref for controllers, also >= and <= (it is meant to work).

“for” loops need to work, too.


It was really time to dust off the expression controller!

Robert

Hi Hans Peter,

“access-position” will work in 3.5.1.b3.

I will check getref for controllers, also >= and <= (it is meant to work).

“for” loops need to work, too.


It was really time to dust off the expression controller!

Robert

Hi Hans Peter,

“access-position” will work in 3.5.1.b3.
I will check getref for controllers, also >= and <= (it is meant to work).
“for” loops need to work, too.

It was really time to dust off the expression controller!
Robert

Hi Hans Peter,

“access-position” will work in 3.5.1.b3.
I will check getref for controllers, also >= and <= (it is meant to work).
“for” loops need to work, too.

It was really time to dust off the expression controller!

Robert

Hi everyone !

I have made a new nonlinear instrument using the expression controller.
This time achieved using a bifurcating recursive formular (feedback) mapped to an access’ position along a string.
Best way to explore is by just setting force to a fixed value an move fine control (really slow).

Some questions:

  1. It seems that getref() can work both on named objects and controllers from inside an expression controller.
    Is it correct? Or maybe I should ask how general is this function? Does it work on ALL controllers, connections, PointInput and pointOutput?

  2. Why is expression controller included in the script if unconnected to mlys.script? Also PointOutputs and dynamic Controllers will still be included even if unconnected to the mlys.script.

  3. Anyone has an idea of how expression output can be smoothed (which is by nature jumping)?

  4. Lowering number of modes should yield freer nonlinearity, but results in silence (if changed dynamically).
    Anyone has an idea of why this can only be changed in the string object inspector?

Any feedback, comments or other are highly wellcome!

best Hans Peter

feedback_loop-v2D.maxpat (34.2 KB)

Hi folks!

I have tested the new expression controller for all possible ways to get info an access.

In the patch attached you’ll see my findings. Many works, but some crashes Max.
I am glad too see how much you can do with the getref() function. But still, should’t they all work?

For the sake of the feedback instruments I am currently working with it would be nice if all versions would be made green.

Kindly Hans Peter

feedback_loop-v2F.maxpat (34.1 KB)

Sure, Hans Peter, I’ll look into these.

Thanks,
Robert

Hi all!

I’ll try to develop more examples too. A question for Robert. I remember a function in order to change the mode frequencies during the synthesis but I don’t remember its name.

Is there a function in the expression language like set-info to change objects internally? Any ideas?

Jean

Hi Jean!

Here’s a patch that I use to debug the getinfo function, listing all the currently available messages.
See fx getinfo 'mode-frequency
and its campanion: setinfo 'mode-frequency

I don’t whether all of these also work inside an expression (a test to be made). Most of them I suspect will.
In an expression that would be: setinfo(“mode-frequency”, “String”, 0, 100.);
The actual frequency could also be given via a dynamic controller:
freq=inlet(1,1);
setinfo(“mode-frequency”, “String”, 0, freq.);

As it is now you’ll have to loop over the entire modal frequencies to set all.
This is where a multidimensional dynamic controller would be handy … (something to come I believe).

Good luck, Hans Peter

01B-Mlys-getinfo-test-v2.maxpat (60.7 KB)

Thanks, Hans Peter!

I will have a look just now!

Jean

Hi!

I made some tests yesterday. I can’t make setinfo working in an expression. So I finally did this patch with a very simple feedback (with an atan which allows me to run the expression with an update of 0) and Max objects to slowly change the frequencies of the object… It could be awesome to do that directly in an expression!

Here is the patch…

I will do some other try today !

Jean

01a-string-force_mlysChgModefrq.maxpat (39.2 KB)

Hello,

I like the idea of an object with its mode frequencies varying slightly randomly overtime!
Attached is a fun example (you may have to wait until 3.5.1.b3 for it to work, though…)

The expression is:

  
t=inlet(1,1)  
s=getref("String")  
e=getinfo("energy",s)  
if (e>t)  
	n=getinfo("num-modes",s)  
	r=inlet(2,1)  
	while (n>0)  
		n=n-1  
		f=getinfo("mode-frequency",s,n)  
		v=random(r)-(r/2)  
		f=f+v  
		if (f>20)  
			setinfo("mode-frequency",s,n,f)  
		end  
	end  
end  
0.  

Robert

setinfo_expression_example.maxpat (11.5 KB)

Hi Hans Peter,

  • getref() works for any kind of objects.

  • access’ position, speed or force works well in 3.5.1.b3 :wink:

Robert

Hi Hans Peter,

You example feedback_loop-v2F.maxpat is now all green in 3.5.1.b4 :wink:

A couple of remarks, though:

  • Listening to the force of an output access (an access not equipped with a connection) should always return 0 (which it does in 3.5.1.b4 - it crashed previously…)
  • getinfo(“force”) and getinfo(“access-force”) are slightly different: “force” just listen to the connection attached to the access whereas “access-force” collects all forces coming from (potentially) all connections sharing the same location.

Robert

Hi Robert !

Great with the new version I am looking forward to b4!

And thanks for clarifying the difference between getting force and access-force. Makes good sense.

I was wondering what if I just wanted to execute an expression controller once during synthesis?
First set its @update to -1 but then how do I call it? Any keywords like for the dynamic controllers?

best Hans Peter

Hi Jean!

Great idea with you atan driven instrument!

Here’s a version using only an expression controller to modify mode frequencies (much like Roberts previous setinfo example).
Two additions: I have added a controller to set size of random deviations and a scaler to the output of the atan. Makes timbre brighter/weirder.

Visualisation is still done using regular getinfo messages in order to get values from modalys to max.

Best Hans Peter

01b-string-force_mlysChgModefrq.maxpat (45.9 KB)

Hi Hans Peter,

To answer your question, I would set the update parameter to “-1” (= auto) and attach any dynamic controller to the expression, and then set its value to whatever number when you need to update the mlys.expression.
This works well in the attached example.

Robert
PS: really fun, your last example! :slight_smile:

trigger.maxpat (7.71 KB)