Globally de- or increasing fader and oscillator values

Discuss macro programming, and post any new macros here!
sekrausian
Posts: 3
Joined: Thu Feb 02, 2017 7:58 pm

Globally de- or increasing fader and oscillator values

Post by sekrausian »

Guten Tag!

Is there a macro (or any other way) to globally de- or increase fader and oscillator (amount) values by a certain percentage?

It is meant for the following situation: I have preprogrammed the lightshow for my band for a tour, but in one venue the front light is much brighter (because it is more powerful or closer to the stage). Now I quickly need to readjust the faders in all banks and presets.

I think it should be possible, unfortunately I do not have any Python skills :(. But there might have been someone with the same problem before?

Vielen Dank!
Callan05
Posts: 69
Joined: Thu Dec 01, 2016 4:06 am
Location: Melbourne, Australia
Has thanked: 1 time

Re: Globally de- or increasing fader and oscillator values

Post by Callan05 »

Not quite an answer you are looking for, but can you just adjust the dimmer, if your fixtures have that available?
sekrausian
Posts: 3
Joined: Thu Feb 02, 2017 7:58 pm

Re: Globally de- or increasing fader and oscillator values

Post by sekrausian »

Thanks for your answer, I'll check that!

In the meantime I came up with another idea: I could set all other faders to "control" so they are not affected by the master fader. Then I can dim the frontlights (e.g.) globally with the master fader.

But a macro would be the coolest way ;-). Might be I need to decrease different faders by different percentages ;-)
sekrausian
Posts: 3
Joined: Thu Feb 02, 2017 7:58 pm

Re: Globally de- or increasing fader and oscillator values

Post by sekrausian »

A friend of mine wrote this for me (decreasing selected channels globally by 10%):

adjust=-0.1
oscadjust=-0.1

# Get the user selected channels
ns = GetNumSelCh()
if ns==0:
Message("Select some channels first!")

# loop over banks
for bnkid in range(GetNumBanks()):
LoadBank(bnkid)
for presid in range(GetNumPresets()):
LoadPreset(presid)
for chnum in range(ns):
# get and set values
chid = GetSelCh(chnum)
finalchval = int(round(GetChVal(chid) * (1 + adjust)))
finaloscval = GetOscAmount(chid) * (1 + oscadjust)
print 'Bank %s Preset %s Channel %s Val %s Osc %s' % (bnkid, presid, chid, finalchval, finaloscval)
SetChVal(chid, min(finalchval, 255))
SetOscAmount(chid, min(finaloscval, 1))
SaveCurrentPreset()

Message('Adjusted all selected channels')

For some strange reason it doesn't affect the very first preset in the first bank, and it has some weird rounding mistakes, but besides it works fine =). By changing the two numbers in the first two lines you can change the percentage.
Post Reply