Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 3:43 am

Hi, I'm a new user having tons of fun with Magic.

I'm using several "InputSelectors" (all with a different number of inputs) and I'd like to send them a global "Hold" so they all switch at the same hold times. Is this possible to do? If so, how? Thanks in advance.
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 4:42 pm

You can use MIDI or OSC to control one or more parameters.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 9:01 pm

If you're not using MIDI or OSC, the answer would be no?
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 9:08 pm

Correct.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 9:25 pm

Thanks. Feature request? :)
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue Apr 14, 2020 10:07 pm

Perhaps I have misinterpreted you question (as I am wont to do on occasion) but does this help?

linked_input_selectors.magic
(2.07 KiB) Downloaded 41 times

If not, perhaps describe further what your trying to achieve.
Sadler
 
Posts: 685
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Creating A Global To Send To The "Hold"

Wed May 06, 2020 8:51 am

Sadler wrote:Perhaps I have misinterpreted you question (as I am wont to do on occasion) but does this help?

linked_input_selectors.magic

If not, perhaps describe further what your trying to achieve.



Sorry, I missed your reply. I'm trying to send a global value to the "Hold" parameter of multiple InputSelector modules across multiple scenes. That way they will all switch inputs at the same intervals. I would like to do this with MIDI, and without MIDI.

I attempted this as a global variable without luck.

When using MIDI, it appears MIDI does not get sent to a scene unless it is the active scene in the playlist? Am I mistaken?
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Wed May 06, 2020 7:22 pm

What exactly are you trying to do? I'm not sure why you would want to use a Hold modifier with the InputSelector, but maybe I'm not understanding.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Wed May 06, 2020 9:25 pm

Eric wrote:What exactly are you trying to do? I'm not sure why you would want to use a Hold modifier with the InputSelector, but maybe I'm not understanding.


I'm new to this so I could be doing this wrong, but...

Screen Shot 2020-05-06 at 3.20.47 PM.png
Screen Shot 2020-05-06 at 3.20.47 PM.png (109.23 KiB) Viewed 1156 times


I have multiple InputSelectors throughout different scenes. I'm using the "Hold" expression to as a timer to randomly trigger effects. I would like all of these InputSelectors to work in sequence. So I'm attempting to sync them all using either a global or a MIDI control.
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Wed May 06, 2020 9:47 pm

To randomly trigger something, use the modifier called Random Trigger ;).

Hold is overkill and not really meant for what you're doing. Hold is meant to preserve an incoming value from a source, not a value you generate with a modifier.

A better way to do things based on a timer is to use a Ramp or Increase modifier. With a parameter value of 1.0, these modifiers take exactly 1 second to reach the value 1.0. With a parameter value of 0.1, they take exactly 10 seconds to reach 1.0. And so on.

To synchronize multiple modules, definitely use the Ramp or Increase in a Global parameter and have all the modules link to that Global. You never want to have separate timers in separate modules. Even if they have the same settings, they can get desynchronized, even if only by milliseconds.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Wed May 06, 2020 11:43 pm

I will try that. Thanks!
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Thu May 07, 2020 2:00 am

Eric wrote:To randomly trigger something, use the modifier called Random Trigger ;).

Hold is overkill and not really meant for what you're doing. Hold is meant to preserve an incoming value from a source, not a value you generate with a modifier.

A better way to do things based on a timer is to use a Ramp or Increase modifier. With a parameter value of 1.0, these modifiers take exactly 1 second to reach the value 1.0. With a parameter value of 0.1, they take exactly 10 seconds to reach 1.0. And so on.

To synchronize multiple modules, definitely use the Ramp or Increase in a Global parameter and have all the modules link to that Global. You never want to have separate timers in separate modules. Even if they have the same settings, they can get desynchronized, even if only by milliseconds.


I'm still not getting it to work and I haven't gotten to the global yet.

I've got an InputSelector with 3 inputs.

I want it to randomly pick an input every 3 seconds. What is the proper way to script that? And then, how do I give it a global to replace that 3 seconds with a global value?
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Thu May 07, 2020 2:17 am

Eric wrote:To randomly trigger something, use the modifier called Random Trigger ;).

Hold is overkill and not really meant for what you're doing. Hold is meant to preserve an incoming value from a source, not a value you generate with a modifier.

A better way to do things based on a timer is to use a Ramp or Increase modifier. With a parameter value of 1.0, these modifiers take exactly 1 second to reach the value 1.0. With a parameter value of 0.1, they take exactly 10 seconds to reach 1.0. And so on.

To synchronize multiple modules, definitely use the Ramp or Increase in a Global parameter and have all the modules link to that Global. You never want to have separate timers in separate modules. Even if they have the same settings, they can get desynchronized, even if only by milliseconds.


With a bit of trial and error, I came up with this. By increasing the Ramp value, it speeds up, and vice versa. Am I on the right track?
Screen Shot 2020-05-06 at 8.15.23 PM.png
Screen Shot 2020-05-06 at 8.15.23 PM.png (118.78 KiB) Viewed 1139 times
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Thu May 07, 2020 2:33 am

Yup!
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Thu May 07, 2020 2:45 am

Eric wrote:Yup!


Great. Thanks!
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Thu May 07, 2020 2:27 pm

I want it to randomly pick an input every 3 seconds. What is the proper way to script that? And then, how do I give it a global to replace that 3 seconds with a global value?

Sorry, I didn't see that earlier post.

To create a timer of x seconds, you use a Ramp with parameter 1/x. So, for 3 seconds, you would use .333.

To use this timer to control all modules, you simply create a Global with a Ramp modifier, then link to that Global in all your modules.

To make it easy for yourself to change the timer in the future, have a separate Global that is the timer duration, and link to it from your timer. You can then have the Ramp parameter be 0, and it will accept the 1/x as the parameter from the Expression module.

Put it all together, it looks like this:

Capture.PNG
Capture.PNG (15.48 KiB) Viewed 1121 times

I'm feeling generous this morning ;), so to give you some futher help, you would proceed like this:

Capture2.PNG
Capture2.PNG (18.12 KiB) Viewed 1121 times

With the Scale value being the number of inputs to your InputSelector.

Now to go back and use a MIDI command instead of a Ramp timer, do this:

Capture3.PNG
Capture3.PNG (29.46 KiB) Viewed 1121 times

The key thing being that I didn't change the modules -- only the globals. So you can see if you have 20 modules that link to the same global, it makes your life 20 times easier.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Fri May 08, 2020 2:57 am

Thanks so much. I know your time is valuable. Going to play around with this tonight!
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Wed May 13, 2020 8:27 pm

I was able to successfully get this to work... up until the MIDI. The moment I select MIDI to control the global it immediately freezes every time. Any ideas? Happens no matter what I try to do every time I select MIDI.

Screen Shot 2020-05-13 at 2.25.39 PM.png
Screen Shot 2020-05-13 at 2.25.39 PM.png (181.78 KiB) Viewed 902 times
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Thu May 14, 2020 2:45 pm

Use MIDI for the Timer, not the TimerDuration. See my last screenshot above.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Tue May 19, 2020 12:44 am

Now I'm confused. :) If I am changing the value of the TimerDuration to set how many seconds everything holds for, don't I want to map that to a MIDI device to change that value via MIDI controller?
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue May 19, 2020 2:44 am

Yes, you can do that too. I thought you wanted to use the MIDI command as a trigger to go to the next random value.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Re: Creating A Global To Send To The "Hold"

Tue May 19, 2020 3:05 am

Ok. That makes sense. :)

The app keeps freezing when trying to assign MIDI with the global variables that I've setup. Trying to isolate exactly what's happening and come up with something duplicatable to post on the bug forum.
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue May 19, 2020 5:08 am

I found out that if I enter "0" in the TimerDuration Global, it freezes the application. This is what was happening with MIDI as well as it was producing a "0" value. I've duplicated this on two separate computers. When I delete / bypass the 1/x Expression in the Timer Global, it does not freeze.


Should I report this as a bug in some particular place or is this post adequate?
LexD
 
Posts: 17
Joined: Tue Apr 07, 2020 10:18 pm

Re: Creating A Global To Send To The "Hold"

Tue May 19, 2020 3:42 pm

Yes, it’s a bug I suppose, but the problem is that you’re dividing by 0 (= infinity).

An easy solution is to enforce a minimum duration, let’s say 1 second, which you can achieve using Offset 1 before the Expression, or a Threshold, or other methods.
Eric
Site Admin
 
Posts: 2786
Joined: Wed Apr 09, 2014 9:28 pm

Return to General Discussion

© 2020 Color & Music, LLC • This web site is mobile-friendly