check presentation mode

Aug 5, 2013 at 1:34pm

check presentation mode

hi max pros,
is there a way to check, if a patcher is in presentation mode or not ?
thanks,
hh

#258105
Aug 6, 2013 at 3:33am

hello maxlist,

i am still trying to solve my problem, getting the information, if a patcher is in presentation mode or not.

i also tryed to use javascript.
and it outputs an object.
perhaps somebody knows how to parse the response of the
this.patcher.presentation call

if i print out this:
this.patcher.presentation
i get this in the message window: jsobject 311634832

if i print out this:
this.patcher.presentation.toString()
i get this in the message window:
function presentation() {
[native code]
}

or is there a secret message i can send to the thispatcher object, which does the job ?

best,
hh

#258161
Aug 6, 2013 at 4:43am

[quebec] by Nicolas Danet does that.

https://github.com/nicolasdanet/Quebec

#258165
Aug 6, 2013 at 10:15am

thank you very much LSKA !
thats exactly, what i need :-)

to cycling crew:
it would be a great feature, if there would be a possibility to get this basic info with standard objects.

a good place could be an addition to the [thispatcher] object ;-)

best,
hh

#258190
Aug 7, 2013 at 3:00am

The problem is that objects and views are separated. An object can be displayed in multiple view so in this case quebec output can’t be correct for every view ;-) If you want the truth about presentation and nothing but the truth, you have to do it in C.

#258230
Aug 7, 2013 at 3:51am

Hi,

That’s true that [quebec] is attached only to the first view ; it is a known limitation that didn’t bother me because i never used (no idea why it is needed) multiple views of the same patcher.

Another limitation (that can be a serious problem) is recursive calls. What’s happen if you decide to change the presentation mode according to the presentation mode notification! I implemented a kind of breaker, but it is not really foolproof.

I guess both limitations could be solved, but not only with the SDK. Maybe i’m wrong but nowhere (at least in 5.1.7) it is explained multiple views access. At time i did [quebec] i tried to hack it, but never found how to, and to be honest i do not use [quebec] anymore.

With more informations/clues provided about under-the-hood mechanisms, i’m OK to improve it. Ciao ;-)

#258234
Aug 7, 2013 at 8:20am

hi emmanuel,

thank you for looking into this.
i think the standard case is that you have a single view.
personally, i never used the feature of having multiple views.

what about this:
send the message getpresentation to [thispatcher] outputs the presentation mode of the first view.

if you want the presentation mode of a specific view, you could append an additional int to specify which you want to get.
something like getpresentation 1, getpresentation 2, getpresentation 3 …

c should not be the problem :-)

best,
hh

#258246
Aug 7, 2013 at 10:57pm

Hi,

Oops, i was wrong ; it is possible to get all the patcherviews with the SDK ( patcherview_get_nextview ). Now, i remember why i aborted to manage multiple views ; too lazy to dive into the mess obtained ;-)

#258296
Aug 8, 2013 at 2:10am

wow… i wasn’t aware of that “new view” feature… now it just scares me… what’s the use of this ? like, livecoding show ?

#258303
Aug 8, 2013 at 10:27am

@Nicolas: I hardly ever use multiple views, but I can think of lots of reasons for using them. Exempli gratia:

- While developing a patch, have two presentation views, one at 400% for fine-tuning the positioning of individual objects, with the other at 100% (or smaller) to see the entire effect.

- For a gig, have one view in presentation mode, full-screen on a beamer, with the other one in non-presentation (with lots of sliders, number boxes, toggles, and other UI objects you don’t want the audience to see).

and so on.

@Vichug: I believe the officially sanctioned use for multiple views is whatever you want to do with them.

#258351
Aug 10, 2013 at 10:25pm

Hi,

Caution : it seems [quebec] was buggy if you delete the firstview after creating multiple views ; i pushed a fix on my github (you need to download the master branch tip).

Soon i’ll push a new one that should manage multiple views properly.

Ciao.

#258560

You must be logged in to reply to this topic.