Previous topicNext topic

Spawn module

Suggestions for new features for Magic.
Post Reply
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Spawn module

Post by blackdot »

A module that plays its input (what is pugged in on the left) once if it's triggered by midi. BUT if it's triggered again before the input's playtime is over, it creates new "instances" of the input that play.

Example: the input is a clip/jpg sequence of a white circle going from left to right, about 4s long. The spawn module is triggered by my midi input, the circle starts going. I keep hammering my midi controller: a lot of new circles spawn and do their thing.

As indefinite new instances would certainly be a performance issue possible options could be: max instances (only this many instances are created paralelly), min time between spawns (so single circles wouldnt create a line (if user doesnt want that) ).
Crop input time: input is 10s long, user only wants 2s-4s.

Usage: manual or musical repeated triggering of animations. Stuff triggered by bass or beatclock, but is allowed to finish its thing even though a new beat came in.

Maybe there's programming magic to use synergies because the same thing is recreated?

Maybe youre already working on a particle emitter of some sort which would make this obsolete, but i recently discussed thid with a friend and we ended up specifically thinking about the details of such a functionality so i thought id post it :).
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Spawn module

Post by Magic »

Thanks, I've definitely thought about something like that. The main issue is that each module is already an instance, so creating new instances would mean creating new modules, perhaps "invisible" ones, and I'm not sure how it would be accomplished. Currently, each module retains its own independent state -- in your example, the current frame of the video -- so if you wanted each spawned video to be in a different frame position, you would need multiple Video modules (or JpegFolder modules) as inputs. Know what I mean?

Perhaps an acceptable solution would be to have a module like the InputSelector, but instead of only activating one input at a time, it would keep all the inputs active, but only "reset" (rewind) the one you specify. So if you wanted a maximum of 10 instances, you could hook up 10 Video modules. Your MIDI controller would be linked to the Input # parameter, and you could use a Trigger modifier to cycle through resetting the inputs.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Spawn module

Post by blackdot »

Hm yeah i think this would work with your description of an input"spawner". However it would need videos with alpha or masked ones (or masked jpg sequences) to work, i assume.

Also i dont know if the aversge computer can have 10 video modules active at the same time. As far as i remember the max amount of parallel videos was about 5 for me, before the performance dropped drastically.

But still, 3 or 4 parallel ones would already suffice i assume. If they're bass or beat triggered.

The whole idea btw stems from a larger discussion about flash and triggers that trigger predefined animations. There might be a better way than using videos/jpgs as your "predefined animations" but it would certainly allow for a wide variety of possibilities :).
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Spawn module

Post by Magic »

Hm yeah i think this would work with your description of an input"spawner". However it would need videos with alpha or masked ones (or masked jpg sequences) to work, i assume.
That's true, but wouldn't anything like this require an alpha channel? Otherwise the only thing you'd see is the most recently triggered instance.
Also i dont know if the aversge computer can have 10 video modules active at the same time. As far as i remember the max amount of parallel videos was about 5 for me, before the performance dropped drastically.

But still, 3 or 4 parallel ones would already suffice i assume. If they're bass or beat triggered.

The whole idea btw stems from a larger discussion about flash and triggers that trigger predefined animations. There might be a better way than using videos/jpgs as your "predefined animations" but it would certainly allow for a wide variety of possibilities :).
The reason I like my solution is that the inputs aren't restricted to just video or images. They can be any modules, which would all be reset when they are triggered, and each input could be completely different. So you could have something like Polygon -> Rotate -> Translate as one of the inputs, and Video -> Pixelate -> Scale as another, and so on.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Spawn module

Post by blackdot »

hmmm, so if you had a polygon that starts rotating at angle 0 and would just continuously rotate... if we'd hook that up in your inputspawner (i like that name :P), would it start at angle 0 again if it was "reset"/"spawned" ? because that would be awesome yes :o :D

oh my gaud, we could input whole scene-modules into that :D.

what are your thoughts about the performance?
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Spawn module

Post by Magic »

Yup! Exactly. All those things would be possible.

Performance would just depend upon the complexity of the inputs. Polygons would be faster than videos, for example.
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Spawn module

Post by blackdot »

Ahmygawd yes please 8-)
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Spawn module

Post by artnik »

+1 to bump this.

I find a lot of effects I want to create I could do with the Starfield module if there was a way to specify the XYZ dimensions of the emitter plane, without affecting the size of the stars.

The Starfield module already can be rotated in XYZ, so it has a 3D structure, if that could be extended, and (I know I'm stretching) to also respect the Depthtest module, a lot more possibilities would open up. For example I could specify 1, 0, 1 as the dimensions to constrain the particles to a 2D plane.

In the meantime, glad to hear a particle system is under consideration.
Post Reply