floating m4l device AND docking ?

schlam's icon

Hello.

..I don't find the answer, maybe it's simple.
.I search the forum without answer.

in a m4l device it's easy to make the window floating,
in this case, usually, there's only an "open/close" button on the "docked" part of the device, at the bottom of Live.

How can you have your device regulary docked, AND, with a button, make it floats ? and vice et versa..
How do you go from one situation to the other ?

for the floating window, the only way (am I wrong?) it's to have a [p myFloat] and a [pcontrol]
But, it'a not possible to see a [p xxxxx] in the device's presentation ... no?

So..I know how to float a [bpatcher] window.. putting it in a [p xxxxx].
But then how can I see the patch when I need it docked ?

I want that changing a parameter affects the patch in the both situations.

The only solution I have for now, is to have, in this device, 2 copys of itself.
:///

.one is in a [p xxxx] and will be opened when I need a floating window
There, the docked part disappears and you only see an "open/close" button.

.the other one is a simple [bpatcher] and is only visible when the device is not floating.

Is this the only way ?
having 2 times the same patch in the device ??

If yes, it becomes hard to have changes always synchronised between both.
...and even... it's very ugly ! I just want only one patch, not two...

I should have a simpler way, I don't find it..

..I tried 'script sendbox' with 'replace' without any success in this case.

I hope my question quite clear...

If someone could point me an idea, it would be great !

Thank you!

Julien



benj3737's icon

This is how I do it

Max Patch
Copy patch and select New From Clipboard in Max.

schlam's icon

Thank a lot BenJ for your time and your help!

..but I am not sure that it answers the question.
..my english is not as good as my french...

I know to open and close a floating window.

the patch I"m talking about is a bit heavy, with lot's of pattrstorage tricks..etc.

..could you give me and example (an amxd would be perfect =) where you have some parameters in your patch handled with a pattrstorage (in my case it's more than 150..) and where it's possible to have this SAME device at the bottom of live AND floated ?

chainging parameters when the window is floted, changes the same parameters when the window is 'docked'...

I don"t know if I am clear , sorry!

benj3737's icon

Sorry that’s over my head. But If you click the the button in the patch I sent it should open and close a floating window. Doesn’t really Matter what’s inside the window. 

schlam's icon

...i must miss something basic..

yes your patch works perfectly to open a floating window.
but my doubt is about the windows where it "Doesn’t really Matter what’s inside".

how do you do to have a "big" device (not only one parameter..) in a floating window AND the ability to have it at the bottom of live ?
In your example, we only have the floating window. when you close it, what is inside is not seeable at the bottom. It's closed...

...My father should have met an english girl before he met my mum..
..hard to be understandable =)

broc's icon

I think what you want can only be done with 2 instances of device content and 2-way communication for each parameter.

Max Patch
Copy patch and select New From Clipboard in Max.

11OLSEN's icon

schlam, i think that's what I try to solve with an external. https://cycling74.com/forums/2nd-patcherview-window-flags/replies/1#reply-601a42d2a2cb7f25c1853948
I'm happy to share if it's finished in some days.

schlam's icon

thank a lot BROC !

..but it confirms my fear. The only solution is to have 2x the whole patch.. it's sad..
..maybe a feature request for m4l next release.
ability to float a [bpatcher] when it's not in a [p xxxx].

In your opinion what should be the best way to comunicate between the both copy of the patch when you have 100 parameters to link between both ? (set $1)--[pattrforward] ?

cheers

Julien

broc's icon

I would rather use simple [s/r] because [pattrforward] requires different scripting names of the UI objects such that both copies are not identical anymore.





schlam's icon

"scripting names of the UI objects such that both copies are not identical anymore.".

but with the s/r way I will need to create a receive object for each of the 100 parameters..no?

Is the pattrworward way with a bit of scripting and a 'combine' with a "patcher::", should avoid to create all this receivers ?

broc's icon

Just use receivers or scripting based on your specific needs or taste.



schlam's icon

@11olsen

(..11olsen is talking to me ...
.....................I am a big fan of your externals ! '11strokes' is in lot of my patch ! thank you a lot for your work! cheers!"

woow ! the gif you posted in the thread is amazing !
It's exactly what I (the world!) was waiting for !
It seems to already work perfectly

bravo !

I hope that your "if it's finished in some days." will be short!


11OLSEN's icon

Yes, will be short. No more duplicating controls for a device in a floating window soon..;)
It can also open new views for bpatchers and normal patchers. But I'm better not talking to much before it's done.

schlam's icon

just wow!