Smooth the movers' Corners in the test show.
Corners slammed the heads about 100° of pan every 0.6 s at full motor speed. It now runs at a quarter of the speed dial like the other shapes, about 1.4 s a corner, and its pad starts a collection with a Movers glide scene that sets the heads' Pan/Tilt Speed to 40 while it runs, so they ease into each corner. That channel is forced HTP on the movers, so it drops back to full speed when Corners stops instead of QLC+ holding it for everything after (scripts/shows/mover_corners_glide.py). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f674dc9fe0
commit
3b38df3dd0
2 files changed
+82
-3
No files matched your search
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Smooth the movers' Corners in shows/test.qxw.
|
||||
|
||||
Corners (pad 11 on the movers layer) jumps the heads corner to corner of a
|
||||
square. At full motor speed each jump is a slam of about 100° of pan, and at an
|
||||
eighth of the speed dial the next comes 0.6 s later. Now it runs at a quarter,
|
||||
like the other shapes (about 1.4 s a corner, 5.5 s a round to start with), and
|
||||
its pad starts a collection of the EFX and a Movers glide scene that sets the
|
||||
heads' Pan/Tilt Speed to GLIDE while it runs (0 is fastest, 255 slowest), so
|
||||
they ease into each corner and settle there before the next. The channel is
|
||||
forced HTP on the movers, so like a dimmer it drops back to 0, full speed, when
|
||||
Corners stops; left LTP, QLC+ would hold it at GLIDE for everything after.
|
||||
|
||||
python3 scripts/shows/mover_corners_glide.py
|
||||
|
||||
Run it once on a show with Corners; it stops if the glide is already there.
|
||||
QLC+ has to reopen the show to see it.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
|
||||
from mover_bank import M1, M2, M3, M4, ROOT, scene
|
||||
from mover_more_efx import START_MS
|
||||
|
||||
SHOW = ROOT / "shows" / "test.qxw"
|
||||
|
||||
PAN_TILT_SPEED = 4 # mover channel
|
||||
GLIDE = 40
|
||||
TIMES_1_4 = 4 # speed dial factor index: (Not Sent), 0, 1/16, 1/8, 1/4, ...
|
||||
|
||||
|
||||
def main() -> None:
|
||||
xml = SHOW.read_text()
|
||||
if 'Name="Movers glide"' in xml:
|
||||
raise SystemExit(f"{SHOW.relative_to(ROOT)} already has the movers glide")
|
||||
engine = xml.split("<VirtualConsole>")[0]
|
||||
corners = int(re.search(r'<Function ID="(\d+)" Type="EFX" Name="Movers corners">', engine).group(1))
|
||||
glide = max(int(i) for i in re.findall(r'<Function ID="(\d+)" Type', engine)) + 1
|
||||
collection = glide + 1
|
||||
|
||||
xml, n = re.subn(rf'(<Function ID="{corners}" Type="EFX" Name="Movers corners">\n.*?<Speed FadeIn="\d+" FadeOut="0" Duration=")\d+"',
|
||||
rf'\g<1>{START_MS}"', xml, count=1, flags=re.S)
|
||||
assert n == 1
|
||||
xml, n = re.subn(rf'(<Function FadeIn="0" FadeOut="0" Duration=")\d+(">{corners}</Function>)', rf"\g<1>{TIMES_1_4}\2", xml)
|
||||
assert n == 1
|
||||
functions = (scene(glide, "Movers glide", {PAN_TILT_SPEED: GLIDE})
|
||||
+ f' <Function ID="{collection}" Type="Collection" Name="Movers corners glide">\n'
|
||||
f' <Step Number="0">{corners}</Step>\n <Step Number="1">{glide}</Step>\n </Function>\n')
|
||||
xml = xml.replace(" </Engine>", functions + " </Engine>", 1)
|
||||
for fid in (M1, M2, M3, M4):
|
||||
xml, n = re.subn(rf'( <ID>{fid}</ID>\n(?: .*\n)*? <Channels>43</Channels>\n)',
|
||||
rf"\1 <ForcedHTP>{PAN_TILT_SPEED}</ForcedHTP>\n", xml, count=1)
|
||||
assert n == 1, fid
|
||||
xml, n = re.subn(r'(<Button Caption="Corners" ID="\d+" Icon="">\n.*?<Function ID=")\d+"', rf'\g<1>{collection}"',
|
||||
xml, count=1, flags=re.S)
|
||||
assert n == 1
|
||||
SHOW.write_text(xml)
|
||||
print(f"Corners in {SHOW.relative_to(ROOT)} now glides (scene {glide}, collection {collection})")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
+18
-3
@@ -120,6 +120,7 @@
|
||||
<Universe>0</Universe>
|
||||
<Address>44</Address>
|
||||
<Channels>43</Channels>
|
||||
<ForcedHTP>4</ForcedHTP>
|
||||
</Fixture>
|
||||
<Fixture>
|
||||
<Manufacturer>Small Eye 7</Manufacturer>
|
||||
@@ -130,6 +131,7 @@
|
||||
<Universe>0</Universe>
|
||||
<Address>0</Address>
|
||||
<Channels>43</Channels>
|
||||
<ForcedHTP>4</ForcedHTP>
|
||||
</Fixture>
|
||||
<Fixture>
|
||||
<Manufacturer>beamZ</Manufacturer>
|
||||
@@ -223,6 +225,7 @@
|
||||
<Universe>0</Universe>
|
||||
<Address>257</Address>
|
||||
<Channels>43</Channels>
|
||||
<ForcedHTP>4</ForcedHTP>
|
||||
</Fixture>
|
||||
<Fixture>
|
||||
<Manufacturer>Small Eye 7</Manufacturer>
|
||||
@@ -233,6 +236,7 @@
|
||||
<Universe>0</Universe>
|
||||
<Address>300</Address>
|
||||
<Channels>43</Channels>
|
||||
<ForcedHTP>4</ForcedHTP>
|
||||
</Fixture>
|
||||
<FixtureGroup ID="0">
|
||||
<Name>Cans</Name>
|
||||
@@ -1189,7 +1193,7 @@
|
||||
<StartOffset>0</StartOffset>
|
||||
</Fixture>
|
||||
<PropagationMode>Parallel</PropagationMode>
|
||||
<Speed FadeIn="500" FadeOut="0" Duration="3000"/>
|
||||
<Speed FadeIn="500" FadeOut="0" Duration="6000"/>
|
||||
<Direction>Forward</Direction>
|
||||
<RunOrder>Loop</RunOrder>
|
||||
<Algorithm>SquareChoppy</Algorithm>
|
||||
@@ -1309,6 +1313,17 @@
|
||||
<Phase>0</Phase>
|
||||
</Axis>
|
||||
</Function>
|
||||
<Function ID="78" Type="Scene" Name="Movers glide">
|
||||
<Speed FadeIn="0" FadeOut="0" Duration="0"/>
|
||||
<FixtureVal ID="17">4,40</FixtureVal>
|
||||
<FixtureVal ID="8">4,40</FixtureVal>
|
||||
<FixtureVal ID="9">4,40</FixtureVal>
|
||||
<FixtureVal ID="18">4,40</FixtureVal>
|
||||
</Function>
|
||||
<Function ID="79" Type="Collection" Name="Movers corners glide">
|
||||
<Step Number="0">75</Step>
|
||||
<Step Number="1">78</Step>
|
||||
</Function>
|
||||
</Engine>
|
||||
<VirtualConsole>
|
||||
<Frame Caption="">
|
||||
@@ -2918,7 +2933,7 @@
|
||||
<BackgroundImage>None</BackgroundImage>
|
||||
<Font>Default</Font>
|
||||
</Appearance>
|
||||
<Function ID="75"/>
|
||||
<Function ID="79"/>
|
||||
<Action>Toggle</Action>
|
||||
<Intensity Adjust="False">100</Intensity>
|
||||
<Input Universe="1" Channel="37086"/>
|
||||
@@ -3146,7 +3161,7 @@
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">72</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">73</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">74</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="3">75</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">75</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">76</Function>
|
||||
<Function FadeIn="0" FadeOut="0" Duration="4">77</Function>
|
||||
</SpeedDial>
|
||||
|
||||
Reference in new issue
Block a user