< Back to IRCAM Forum

Spat.transform / source message

hi everyone, hi T.

I am setting up few control for my sound model. I am working on the spat.transform object. I m in the middle of a pb here. I was wondering if spat.transform would accept differential source message. I would like for instance to apply the spat.transform only on specific source. Let’s say i have 4 sources. I have a message that’d say translation (offsetx) only on source 1 2 3, or everything but 3 … whatever. That could be a very interesting effect on live manipulation.

But; I don’t see in the attribute list of the object that it could accept that kind of message. So then i said, let’s filter at the output (everything to spat.spat, but 3)… but i don’t get it. When i look simply what message it outputed for spat.transform, i can see only coordinates from the last source of the list. There’s spooky mystery for little max knowledge.

Could you help me?
thanks!!
eric

Hi Eric,

*) The messages are coming out of spat.transform sequentially. That may be the reason why you only see the last one.
Use “print” to check the output.

*) There is a new object (that will be included in the next release) that will be super useful: spat.rename.
It can easily perform renaming and routing of source messages.

A beta of the object is attached, as well as a patch that shows how to transform only 3 sources out of 4 (as an example).

T.

Archive.zip (449 KB)

Thanks T. That’s the kind of routing tool that’d be very useful. However would you help me to understand furthermore ? I understand the logic and how it means to use with spat.transform… but I hardly have to make right for what i want.

In the patch attached i started from you example. The tool is working well when playing from the viewer.

But thing is, spat.transform holding the value when it comes from a message box with $. So when you clear the message of spat.rename, and you play with float input value message box - spat.transform is still applying the modulation on source from previous spat.rename message. So i tried to clear transform in the same time i clear spat.rename, but then as soon you send again a rename value, the offsetx message box has no effect anymore.

That’s the first of my upcoming long message on this great developement. thanks for you patience!
eric

test4.maxpat (9.26 KB)

Could you re-explain what you’re trying to do ? I got lost.

In your attached patch : you send the ‘clear’ message to ‘spat.rename’. This indeed clears all the renaming rules. Meaning that all incoming messages are going out of the 2nd outlet. As a consequence no message is going into the ‘spat.transform’ (this is the reason why your offset has no effect anymore).

T.

Actually no
…take this patch again attatched. If you clear the spat.name message, and then use the int/offsetx message, it still send data to spat.transform

i am missing something!

test41.maxpat (9.09 KB)

What are you trying to do ?
What do you expect from this patch ?

‘spat.transform’ has a memory: it keeps into memory the latest positions it has received.
When you change the ‘offsetx’ value, the transformations are applied to the positions currently in memory.
(the int/offsetx message is not “sending any position data” to ‘spat.transform’)
That is the normal behavior.
You can use the ‘clear’ message to clear the memory of ‘spat.transform’.

yeah this is what i said previously. But then when clear spat.transform, then re send a spat.rename message, then your offsetx control doesn’t work.

But i should explain more my expectation. Let’s start from scratch then. I am making a lemur (osc) template to use in a live context. I have set all my spat.tranform controls (fader, knob). It works pretty well but for all the sources of my model. Some fader go to translate x, some other to scale x, etc…

I want to have the possibility to say from lemur which sources is affected by spat.transform, or not. That led to my initial question.
So I have few buton that i turn on/off . On button —>source is affected by spat.Transform. (And off counts). that was ma question about clearing message.

As you can see, i have to be able to increment message, and reset them. That’s easy to have a button bang to spat.name ‘rename 1 1’ (from osc - on). But then off has to be understood, and all other possible combination too (1, 2, 3 or 2,4 or 1,3 etc).

am i clear?

my understanding, is that you can’t go on the fly between two message like in this another exemple. You have to clear spat.transform for each message changed in spat.name if you want the correct result in real time. But if you clear spat.transform memory, then transform offsetx doesn’t apply, because it doesn’t have any data to transform. So i assume i have to bang again last sources coordinates of sources just after i clear spat.transform memeory?

am i right at some point? The chain is getting really complicated for me :slight_smile:

test5.maxpat (9.55 KB)

I’d maybe suggest taking a look at spat.group which could be useful for handling collections of sources – for example, with your lemur you could select which sources are part of a given group and then apply some transformation to them. the question then becomes whether the transformation becomes the new absolute position (or maybe you want to keep stored the original position).

In the spat.group help patch you can see one example how you can use intermediary spat.viewer for temporary state storage. I guess if you are dealing with several groups I would recommend not using spat.transform’s last state, but instead update your positions just before you send out your transformation. You can use the “getgroup” message to spat.group to output the positions of a given group.

(I might make a feature request to allow prepending “set” for spat.transform’s parameters, and then trigger output with source messages, which would be less iterating :wink:

hope that helps –

p.s. spat.rename is great! - thanks T!

cheers,
r

@fraction : I dont know if the attached patch is helping you…
Otherwise, yes, spat.group might be helpful.
I must admit I dont EXACTLY understand what is causing you troubles. Maybe we can discuss that during the forum if you’re at ircam (might be easier/faster than using the Forum discussion group…)

@rama : spat.transform is ready for ‘prepend set’ in the next release.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JAptfJnmAYLOSKjLsvTQ9d8I3EcZoHNlK2+riiEY4ZLdmHOv.o1xIn  
F5IpyjiwihI3XKoShHdcpPpyJOEPa5zTafxH+7JRg2ddfNYSfI0.mjNCm4jh  
VENwcpbHUHmvNUM8mkp7iRqR4DzovoxMhi6N5LtNKVdcmdp097tamELT8nc5  
fdpZqNsakSklycWXtWMTe5lyDbuxWnecTS2IGhW+ROXbOiOj5jSamImv5Pmt  
y2CseIGROSN0AO9MTN1h0XqWeuoL9hOInDS4x2kpxeMzEdUHsuBUm5n32KJ6  
ObPANLkoFYsoBxMJaQuaiBcFlONOM7uvCKYu+  
-----------end_max5_patcher-----------  

yeah that’d have been a great idea… unfortunetely i am in montreal working at http://sat.qc.ca/fr/satosphere and trying to make a great use of spat :wink: for a project.

My problem is really simple… but i m messing up trying to explain it correctly. :slight_smile:

I have few general spat.transform control on in a osc device. It works well, but it controls all sources at the same time. I want to keep that this way, and add the possibility, with some selectors to apply spat.transform to all sources but one, or two or whatever. These buttons send 0/1

see the pic attached. On your down left, you have few buttons. I imagined them like when clicing one (1), it’d say to spat.transform : don’t apply tranform to this one. So you answered my question by this great new object spat.rename, which could translate my button to messages.You could have 2 source muted (spat.transform effect muted) or more etc… on the fly… so spat.transform has to get updated… for what i tried in patches we share, it didn’t work at all.

i am not sure about the grouping idea either… it is bringing to something that sounds a bit too complicate to me for the development i was thinking,

i acknowledge, that i might very messy to understand. :slight_smile: thx for the patience!
-eric

Sans-titre.png

The attached patch is pretty dirty but it should do what you want for your OSC controller.
(just adapt it for more sources and more controllers)

T.

fraction.maxpat (41.6 KB)

hi T.

woa. You call that dirty? i call that pretty awesome. How you structured the idea in max patch is way beyond my knowledge.

When i use it, it does definitely what i was looking for. That’d be terrific to work with you ! I mean, all the patch is nice…

Let me play with and i get back to you with some good beer promises, if you can accept that from a forum member :slight_smile:

thanks so much again!
eric