We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › for VJ, how to switch between sketches easily
Page Index Toggle Pages: 1
for VJ, how to switch between sketches easily (Read 5466 times)
for VJ, how to switch between sketches easily
Mar 23rd, 2009, 11:16pm
 
Hi, i'm a VJ (video jockey) and I use processing.

I'm trying to figure out how to switch between more than one processing sketches seemlessly during a live VJ performance?

is there a way to switch between multiple sketches within a master sketch?
Re: for VJ, how to switch between sketches easily
Reply #1 - Mar 24th, 2009, 12:29am
 
My thought, although there's probably a cleverer way to do this, would be to encapsulate each sketch as a separate class that implements draw(), and package them all up into one master sketch.  The master sketch's draw() just calls the appropriate sub-sketch's draw.  The master sketch then only has to create instances of the sub-sketches and switch between them according to whatever input you want.
Re: for VJ, how to switch between sketches easily
Reply #2 - Mar 24th, 2009, 1:10am
 
cloister wrote on Mar 24th, 2009, 12:29am:
My thought, although there's probably a cleverer way to do this, would be to encapsulate each sketch as a separate class that implements draw(), and package them all up into one master sketch.  The master sketch's draw() just calls the appropriate sub-sketch's draw.  The master sketch then only has to create instances of the sub-sketches and switch between them according to whatever input you want.

Will you be able to provide an example of what you mentioned here How would you start/stop draw() of a sub-sketch
Re: for VJ, how to switch between sketches easily
Reply #3 - Mar 24th, 2009, 4:48am
 
onar3D has worked on a library called Mother to do this.
Re: for VJ, how to switch between sketches easily
Reply #4 - Mar 24th, 2009, 6:44am
 
I also give an example in Re: Sequencing, display update, and functions. The sketches are run sequentially, after a given time, but you can also use keyboard or mouse events, for examples (or Midi, serial, etc.) to switch them as well.
Re: for VJ, how to switch between sketches easily
Reply #5 - Mar 30th, 2009, 2:17pm
 
REAS wrote on Mar 24th, 2009, 4:48am:
onar3D has worked on a library called Mother to do this.

I shall revisit the Mother library, thanks for reminding.
Re: for VJ, how to switch between sketches easily
Reply #6 - Apr 2nd, 2009, 10:00am
 
PhiLho  wrote on Mar 24th, 2009, 6:44am:
I also give an example in Re: Sequencing, display update, and functions. The sketches are run sequentially, after a given time, but you can also use keyboard or mouse events, for examples (or Midi, serial, etc.) to switch them as well.


This is starting to look interesting, thanks for the post, will do some code cracking on this.
Re: for VJ, how to switch between sketches easily
Reply #7 - Jul 3rd, 2009, 2:05am
 
Mother seems to be aimed at windows user... isn't there any other solution for mac users ?
Re: for VJ, how to switch between sketches easily
Reply #8 - Aug 5th, 2009, 2:37am
 
Wow this looks good. Anyone got some sample code as to how to map sketch changes to keyboard (or any other input for that matter) rather than duration? This would be good for mac users who are waiting for Mother to be ported.
Re: for VJ, how to switch between sketches easily
Reply #9 - Aug 5th, 2009, 3:22am
 
-rb- wrote on Aug 5th, 2009, 2:37am:
Anyone got some sample code as to how to map sketch changes to keyboard (or any other input for that matter)

If you look at the example I gave, just move the 'time' depending code in draw() to a keyboard or mouse (or other) event handler.
Re: for VJ, how to switch between sketches easily
Reply #10 - Aug 5th, 2009, 5:26pm
 
Thanks thats what I'm up to at the moment!

I'm new so it's taking me a while   Sad
Re: for VJ, how to switch between sketches easily
Reply #11 - Jan 29th, 2010, 9:01pm
 
Mukei wrote on Jul 3rd, 2009, 2:05am:
Mother seems to be aimed at windows user... isn't there any other solution for mac users

it does support osx
Page Index Toggle Pages: 1