JunoScan MKII
Stairville
Romano Drews
Geheimtipp LED Scanner unter 200€
unit JunoScanMKII;
interface
procedure FormRefresh(channel:Integer);
procedure FormClose;
procedure PositionXYChange(Top, Left: Integer);
procedure ColorBoxChange;
procedure SHUTTERchange;
procedure DIMMERchange;
procedure GOBO1change;
procedure GOBO1ROTchange;
procedure PRISMAchange;
procedure FOCUSchange;
procedure SPECIAL1change;
procedure SPECIAL2change;
procedure PositionXYChange(Top, Left: Integer);
procedure ColorBoxChange;
procedure shutterchange;
procedure dimmerchange;
procedure gobo1change;
procedure gobo1rotchange;
procedure PositionXYChange(Top, Left: Integer);
procedure ColorBoxChange;
procedure SHUTTERchange;
procedure DIMMERchange;
procedure gobo1change;
procedure GOBO2change;
procedure SPECIAL1change;
procedure PositionXYChange(Top, Left: Integer);
procedure ColorBoxChange;
procedure SHUTTERchange;
procedure DIMMERchange;
procedure gobo1change;
procedure GOBO2change;
procedure SPECIAL1change;
procedure PositionXYChange(Top, Left: Integer);
procedure SHUTTERchange;
procedure DIMMERchange;
procedure gobo1change;
procedure GOBO2change;
procedure SPECIAL1change;
procedure PositionXYChange(Top, Left: Integer);
procedure ColorBoxChange;
procedure SHUTTERchange;
procedure DIMMERchange;
procedure gobo1change;
procedure GOBO2change;
procedure SPECIAL1change;
implementation
var
DontRefresh:boolean;
procedure FormRefresh(channel:Integer);
var
Value:integer;
r,phi,temp:Double;
begin
if not DontRefresh then
case channel of
0:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
1:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
2:
begin
value:=get_channel('color1');
case value of
0..7: colorbox.itemindex:=0;
8..13: colorbox.itemindex:=1;
14..20: colorbox.itemindex:=2;
21..27: colorbox.itemindex:=3;
28..34: colorbox.itemindex:=4;
35..41: colorbox.itemindex:=5;
42..48: colorbox.itemindex:=6;
49..55: colorbox.itemindex:=7;
56..63: colorbox.itemindex:=8;
64..70: colorbox.itemindex:=9;
71..77: colorbox.itemindex:=10;
78..84: colorbox.itemindex:=11;
85..91: colorbox.itemindex:=12;
92..98: colorbox.itemindex:=13;
99..105: colorbox.itemindex:=14;
106..112: colorbox.itemindex:=15;
113..119: colorbox.itemindex:=16;
120..127: colorbox.itemindex:=17;
128..191: colorbox.itemindex:=18;
192..255: colorbox.itemindex:=19;
end;
end;
3:
begin
SHUTTERslider3.position:=get_channel('SHUTTER');
end;
4:
begin
DIMMERslider4.position:=get_channel('DIMMER');
end;
5:
begin
value:=get_channel('gobo1');
case value of
0..7: gobobox1.itemindex:=0;
8..15: gobobox1.itemindex:=1;
16..23: gobobox1.itemindex:=2;
24..31: gobobox1.itemindex:=3;
32..39: gobobox1.itemindex:=4;
40..47: gobobox1.itemindex:=5;
48..55: gobobox1.itemindex:=6;
56..63: gobobox1.itemindex:=7;
64..71: gobobox1.itemindex:=8;
72..79: gobobox1.itemindex:=9;
80..87: gobobox1.itemindex:=10;
88..95: gobobox1.itemindex:=11;
96..103: gobobox1.itemindex:=12;
104..111: gobobox1.itemindex:=13;
112..119: gobobox1.itemindex:=14;
120..127: gobobox1.itemindex:=15;
128..191: gobobox1.itemindex:=16;
192..255: gobobox1.itemindex:=17;
end;
end;
6:
begin
GOBO1ROTslider6.position:=get_channel('GOBO1ROT');
end;
7:
begin
PRISMAslider7.position:=get_channel('PRISMA');
end;
8:
begin
FOCUSslider8.position:=get_channel('FOCUS');
end;
9:
begin
SPECIAL1slider9.position:=get_channel('SPECIAL1');
end;
10:
begin
SPECIAL2slider10.position:=get_channel('SPECIAL2');
end;
end;
DontRefresh:=false;
end;
procedure FormClose;
var
Value:integer;
r,phi,temp:Double;
begin
if not DontRefresh then
case channel of
0:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
1:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
2:
begin
value:=get_channel('color1');
case value of
0..5: colorbox.itemindex:=0;
6..11: colorbox.itemindex:=1;
12..17: colorbox.itemindex:=2;
18..23: colorbox.itemindex:=3;
24..27: colorbox.itemindex:=4;
30..35: colorbox.itemindex:=5;
36..41: colorbox.itemindex:=6;
42..47: colorbox.itemindex:=7;
48..53: colorbox.itemindex:=8;
54..63: colorbox.itemindex:=9;
64..73: colorbox.itemindex:=10;
74..79: colorbox.itemindex:=11;
80..85: colorbox.itemindex:=12;
86..91: colorbox.itemindex:=13;
92..97: colorbox.itemindex:=14;
98..103: colorbox.itemindex:=15;
104..109: colorbox.itemindex:=16;
110..115: colorbox.itemindex:=17;
116..121: colorbox.itemindex:=18;
122..127: colorbox.itemindex:=19;
128..191: colorbox.itemindex:=20;
192..255: colorbox.itemindex:=21;
end;
end;
3:
begin
SHUTTERslider3.position:=get_channel('SHUTTER');
end;
4:
begin
DIMMERslider4.position:=get_channel('DIMMER');
end;
5:
begin
value:=get_channel('gobo1');
case value of
0..5: gobobox1.itemindex:=0;
6..11: gobobox1.itemindex:=1;
12..17: gobobox1.itemindex:=2;
18..23: gobobox1.itemindex:=3;
24..29: gobobox1.itemindex:=4;
30..35: gobobox1.itemindex:=5;
36..41: gobobox1.itemindex:=6;
42..47: gobobox1.itemindex:=7;
48..53: gobobox1.itemindex:=8;
54..63: gobobox1.itemindex:=9;
64..73: gobobox1.itemindex:=10;
74..79: gobobox1.itemindex:=11;
80..85: gobobox1.itemindex:=12;
86..91: gobobox1.itemindex:=13;
92..97: gobobox1.itemindex:=14;
98..103: gobobox1.itemindex:=15;
104..109: gobobox1.itemindex:=16;
110..115: gobobox1.itemindex:=17;
116..121: gobobox1.itemindex:=18;
122..127: gobobox1.itemindex:=19;
128..191: gobobox1.itemindex:=20;
192..255: gobobox1.itemindex:=21;
end;
end;
6:
begin
value:=get_channel('gobo2');
case value of
0..7: gobobox2.itemindex:=0;
8..15: gobobox2.itemindex:=1;
16..23: gobobox2.itemindex:=2;
24..31: gobobox2.itemindex:=3;
32..39: gobobox2.itemindex:=4;
40..47: gobobox2.itemindex:=5;
48..55: gobobox2.itemindex:=6;
56..95: gobobox2.itemindex:=7;
96..103: gobobox2.itemindex:=8;
104..111: gobobox2.itemindex:=9;
112..119: gobobox2.itemindex:=10;
120..127: gobobox2.itemindex:=11;
128..151: gobobox2.itemindex:=12;
152..159: gobobox2.itemindex:=13;
160..255: gobobox2.itemindex:=14;
end;
end;
7:
begin
SPECIAL1slider7.position:=get_channel('SPECIAL1');
end;
end;
DontRefresh:=false;
end;
procedure PositionXYChange(Top, Left: Integer);
var
Value:integer;
r,phi,temp:Double;
begin
if not DontRefresh then
case channel of
0:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
1:
begin
PositionXY.Left:=round(Fadenkreuz.Width * get_channel('pan')/255)-(PositionXY.Width div 2);
PositionXY.Top:=round(Fadenkreuz.Height * get_channel('tilt')/255)-(PositionXY.Height div 2);
end;
2:
begin
value:=get_channel('color1');
case value of
0..5: colorbox.itemindex:=0;
6..11: colorbox.itemindex:=1;
12..17: colorbox.itemindex:=2;
18..23: colorbox.itemindex:=3;
24..27: colorbox.itemindex:=4;
30..35: colorbox.itemindex:=5;
36..41: colorbox.itemindex:=6;
42..47: colorbox.itemindex:=7;
48..53: colorbox.itemindex:=8;
54..63: colorbox.itemindex:=9;
64..73: colorbox.itemindex:=10;
74..79: colorbox.itemindex:=11;
80..85: colorbox.itemindex:=12;
86..91: colorbox.itemindex:=13;
92..97: colorbox.itemindex:=14;
98..103: colorbox.itemindex:=15;
104..109: colorbox.itemindex:=16;
110..115: colorbox.itemindex:=17;
116..121: colorbox.itemindex:=18;
122..127: colorbox.itemindex:=19;
128..191: colorbox.itemindex:=20;
192..255: colorbox.itemindex:=21;
end;
end;
3:
begin
SHUTTERslider3.position:=get_channel('SHUTTER');
end;
4:
begin
DIMMERslider4.position:=get_channel('DIMMER');
end;
5:
begin
value:=get_channel('gobo1');
case value of
0..5: gobobox1.itemindex:=0;
6..11: gobobox1.itemindex:=1;
12..17: gobobox1.itemindex:=2;
18..23: gobobox1.itemindex:=3;
24..29: gobobox1.itemindex:=4;
30..35: gobobox1.itemindex:=5;
36..41: gobobox1.itemindex:=6;
42..47: gobobox1.itemindex:=7;
48..53: gobobox1.itemindex:=8;
54..63: gobobox1.itemindex:=9;
64..73: gobobox1.itemindex:=10;
74..79: gobobox1.itemindex:=11;
80..85: gobobox1.itemindex:=12;
86..91: gobobox1.itemindex:=13;
92..97: gobobox1.itemindex:=14;
98..103: gobobox1.itemindex:=15;
104..109: gobobox1.itemindex:=16;
110..115: gobobox1.itemindex:=17;
116..121: gobobox1.itemindex:=18;
122..127: gobobox1.itemindex:=19;
128..191: gobobox1.itemindex:=20;
192..255: gobobox1.itemindex:=21;
end;
end;
6:
begin
value:=get_channel('gobo2');
case value of
0..7: gobobox2.itemindex:=0;
8..15: gobobox2.itemindex:=1;
16..23: gobobox2.itemindex:=2;
24..31: gobobox2.itemindex:=3;
32..39: gobobox2.itemindex:=4;
40..47: gobobox2.itemindex:=5;
48..55: gobobox2.itemindex:=6;
56..95: gobobox2.itemindex:=7;
96..103: gobobox2.itemindex:=8;
104..111: gobobox2.itemindex:=9;
112..119: gobobox2.itemindex:=10;
120..127: gobobox2.itemindex:=11;
128..151: gobobox2.itemindex:=12;
152..159: gobobox2.itemindex:=13;
160..255: gobobox2.itemindex:=14;
end;
end;
7:
begin
SPECIAL1slider7.position:=get_channel('SPECIAL1');
end;
end;
DontRefresh:=false;
end;
procedure ColorBoxChange;
begin
case colorbox.itemindex of
0: set_channel('color1', -1, 0, 0);
1: set_channel('color1', -1, 8, 0);
2: set_channel('color1', -1, 14, 0);
3: set_channel('color1', -1, 21, 0);
4: set_channel('color1', -1, 28, 0);
5: set_channel('color1', -1, 35, 0);
6: set_channel('color1', -1, 42, 0);
7: set_channel('color1', -1, 49, 0);
8: set_channel('color1', -1, 56, 0);
9: set_channel('color1', -1, 64, 0);
10: set_channel('color1', -1, 71, 0);
11: set_channel('color1', -1, 78, 0);
12: set_channel('color1', -1, 85, 0);
13: set_channel('color1', -1, 92, 0);
14: set_channel('color1', -1, 99, 0);
15: set_channel('color1', -1, 106, 0);
16: set_channel('color1', -1, 113, 0);
17: set_channel('color1', -1, 120, 0);
18: set_channel('color1', -1, 128, 0);
19: set_channel('color1', -1, 192, 0);
end;
end;
procedure SHUTTERchange;
begin
DontRefresh:=true;
set_channel('SHUTTER',-1,SHUTTERslider3.position,0);
end;
procedure DIMMERchange;
begin
DontRefresh:=true;
set_channel('DIMMER',-1,DIMMERslider4.position,0);
end;
procedure GOBO1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 8, 0);
2: set_channel('gobo1', -1, 16, 0);
3: set_channel('gobo1', -1, 24, 0);
4: set_channel('gobo1', -1, 32, 0);
5: set_channel('gobo1', -1, 40, 0);
6: set_channel('gobo1', -1, 48, 0);
7: set_channel('gobo1', -1, 56, 0);
8: set_channel('gobo1', -1, 64, 0);
9: set_channel('gobo1', -1, 72, 0);
10: set_channel('gobo1', -1, 80, 0);
11: set_channel('gobo1', -1, 88, 0);
12: set_channel('gobo1', -1, 96, 0);
13: set_channel('gobo1', -1, 104, 0);
14: set_channel('gobo1', -1, 112, 0);
15: set_channel('gobo1', -1, 120, 0);
16: set_channel('gobo1', -1, 128, 0);
17: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure GOBO1ROTchange;
begin
DontRefresh:=true;
set_channel('GOBO1ROT',-1,GOBO1ROTslider6.position,0);
end;
procedure PRISMAchange;
begin
DontRefresh:=true;
set_channel('PRISMA',-1,PRISMAslider7.position,0);
end;
procedure FOCUSchange;
begin
DontRefresh:=true;
set_channel('FOCUS',-1,FOCUSslider8.position,0);
end;
procedure SPECIAL1change;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,SPECIAL1slider9.position,0);
end;
procedure SPECIAL2change;
begin
DontRefresh:=true;
set_channel('SPECIAL2',-1,SPECIAL2slider10.position,0);
end;
procedure PositionXYChange(Top, Left: Integer);
var
phi,r,x,y:Double;
pan, tilt, panfine, tiltfine:Double;
begin
if usemhcontrol.checked then
begin
// Moving-Head-Steuerung (Polarkoordinaten)
x:=((PositionXY.Left+(PositionXY.Width div 2)-(fadenkreuz.Width/2))/fadenkreuz.Width)*2; //-1..0..1
y:=((PositionXY.Top+(PositionXY.Height div 2)-(fadenkreuz.Width/2))/fadenkreuz.Height)*2; //-1..0..1
r:=sqrt(x*x+y*y);
if (r>0) then
begin
if (y>=0) then
phi:=arccos(x/r)
else
phi:=6.283185307179586476925286766559-arccos(x/r);
end else
phi:=64;
r:=128-((r/2)*255);
phi:=(phi/6.283185307179586476925286766559)*255;
if 64>=phi then
phi:=phi+191
else
phi:=phi-64;
pan:=255-phi;
tilt:=255-r;
end else
begin
// Scannersteuerung (Kartesische Koordinaten)
pan:=((PositionXY.Left+(PositionXY.Width div 2))/fadenkreuz.Width)*255;
tilt:=((PositionXY.Top+(PositionXY.Height div 2))/fadenkreuz.Height)*255;
end;
// Ausgabe
if panmirror.checked then
begin
dontrefresh:=true;
set_channel('pan',trunc(255-pan),trunc(255-pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(255-pan)*255),trunc(frac(255-pan)*255),0);
end else
begin
dontrefresh:=true;
set_channel('pan',trunc(pan),trunc(pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(pan)*255),trunc(frac(pan)*255),0);
end;
if tiltmirror.checked then
begin
dontrefresh:=true;
set_channel('tilt',trunc(255-tilt),trunc(255-tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(255-tilt)*255),trunc(frac(255-tilt)*255),0);
end else
begin
dontrefresh:=true;
set_channel('tilt',trunc(tilt),trunc(tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(tilt)*255),trunc(frac(tilt)*255),0);
end;
end;
procedure ColorBoxChange;
begin
case colorbox.itemindex of
0: set_channel('color1', -1, 0, 0);
1: set_channel('color1', -1, 6, 0);
2: set_channel('color1', -1, 12, 0);
3: set_channel('color1', -1, 18, 0);
4: set_channel('color1', -1, 24, 0);
5: set_channel('color1', -1, 30, 0);
6: set_channel('color1', -1, 36, 0);
7: set_channel('color1', -1, 42, 0);
8: set_channel('color1', -1, 48, 0);
9: set_channel('color1', -1, 54, 0);
10: set_channel('color1', -1, 71, 0);
11: set_channel('color1', -1, 78, 0);
12: set_channel('color1', -1, 85, 0);
13: set_channel('color1', -1, 92, 0);
14: set_channel('color1', -1, 99, 0);
15: set_channel('color1', -1, 106, 0);
16: set_channel('color1', -1, 113, 0);
17: set_channel('color1', -1, 120, 0);
18: set_channel('color1', -1, 128, 0);
19: set_channel('color1', -1, 192, 0);
20: set_channel('color1', -1, 0, 0);
21: set_channel('color1', -1, 0, 0);
end;
end;
procedure shutterchange;
begin
DontRefresh:=true;
set_channel('shutter',-1,shutterslider3.position,0);
end;
procedure dimmerchange;
begin
DontRefresh:=true;
set_channel('dimmer',-1,dimmerslider4.position,0);
end;
procedure gobo1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 8, 0);
2: set_channel('gobo1', -1, 16, 0);
3: set_channel('gobo1', -1, 24, 0);
4: set_channel('gobo1', -1, 32, 0);
5: set_channel('gobo1', -1, 40, 0);
6: set_channel('gobo1', -1, 48, 0);
7: set_channel('gobo1', -1, 56, 0);
8: set_channel('gobo1', -1, 64, 0);
9: set_channel('gobo1', -1, 72, 0);
10: set_channel('gobo1', -1, 80, 0);
11: set_channel('gobo1', -1, 88, 0);
12: set_channel('gobo1', -1, 96, 0);
13: set_channel('gobo1', -1, 104, 0);
14: set_channel('gobo1', -1, 112, 0);
15: set_channel('gobo1', -1, 120, 0);
16: set_channel('gobo1', -1, 128, 0);
17: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure gobo1rotchange;
begin
DontRefresh:=true;
set_channel('gobo1rot',-1,gobo1rotslider6.position,0);
end;
procedure PositionXYChange(Top, Left: Integer);
var
phi,r,x,y:Double;
pan, tilt, panfine, tiltfine:Double;
begin
if usemhcontrol.checked then
begin
// Moving-Head-Steuerung (Polarkoordinaten)
x:=((PositionXY.Left+(PositionXY.Width div 2)-(fadenkreuz.Width/2))/fadenkreuz.Width)*2; //-1..0..1
y:=((PositionXY.Top+(PositionXY.Height div 2)-(fadenkreuz.Width/2))/fadenkreuz.Height)*2; //-1..0..1
r:=sqrt(x*x+y*y);
if (r>0) then
begin
if (y>=0) then
phi:=arccos(x/r)
else
phi:=6.283185307179586476925286766559-arccos(x/r);
end else
phi:=64;
r:=128-((r/2)*255);
phi:=(phi/6.283185307179586476925286766559)*255;
if 64>=phi then
phi:=phi+191
else
phi:=phi-64;
pan:=255-phi;
tilt:=255-r;
end else
begin
// Scannersteuerung (Kartesische Koordinaten)
pan:=((PositionXY.Left+(PositionXY.Width div 2))/fadenkreuz.Width)*255;
tilt:=((PositionXY.Top+(PositionXY.Height div 2))/fadenkreuz.Height)*255;
end;
// Ausgabe
if panmirror.checked then
begin
dontrefresh:=true;
set_channel('pan',trunc(255-pan),trunc(255-pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(255-pan)*255),trunc(frac(255-pan)*255),0);
end else
begin
dontrefresh:=true;
set_channel('pan',trunc(pan),trunc(pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(pan)*255),trunc(frac(pan)*255),0);
end;
if tiltmirror.checked then
begin
dontrefresh:=true;
set_channel('tilt',trunc(255-tilt),trunc(255-tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(255-tilt)*255),trunc(frac(255-tilt)*255),0);
end else
begin
dontrefresh:=true;
set_channel('tilt',trunc(tilt),trunc(tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(tilt)*255),trunc(frac(tilt)*255),0);
end;
end;
procedure ColorBoxChange;
begin
case colorbox.itemindex of
0: set_channel('color1', -1, 0, 0);
1: set_channel('color1', -1, 6, 0);
2: set_channel('color1', -1, 12, 0);
3: set_channel('color1', -1, 18, 0);
4: set_channel('color1', -1, 24, 0);
5: set_channel('color1', -1, 30, 0);
6: set_channel('color1', -1, 36, 0);
7: set_channel('color1', -1, 42, 0);
8: set_channel('color1', -1, 48, 0);
9: set_channel('color1', -1, 54, 0);
10: set_channel('color1', -1, 64, 0);
11: set_channel('color1', -1, 74, 0);
12: set_channel('color1', -1, 80, 0);
13: set_channel('color1', -1, 86, 0);
14: set_channel('color1', -1, 92, 0);
15: set_channel('color1', -1, 98, 0);
16: set_channel('color1', -1, 104, 0);
17: set_channel('color1', -1, 110, 0);
18: set_channel('color1', -1, 116, 0);
19: set_channel('color1', -1, 122, 0);
20: set_channel('color1', -1, 128, 0);
21: set_channel('color1', -1, 192, 0);
end;
end;
procedure SHUTTERchange;
begin
DontRefresh:=true;
set_channel('SHUTTER',-1,SHUTTERslider3.position,0);
end;
procedure DIMMERchange;
begin
DontRefresh:=true;
set_channel('DIMMER',-1,DIMMERslider4.position,0);
end;
procedure gobo1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 6, 0);
2: set_channel('gobo1', -1, 12, 0);
3: set_channel('gobo1', -1, 18, 0);
4: set_channel('gobo1', -1, 24, 0);
5: set_channel('gobo1', -1, 30, 0);
6: set_channel('gobo1', -1, 36, 0);
7: set_channel('gobo1', -1, 42, 0);
8: set_channel('gobo1', -1, 48, 0);
9: set_channel('gobo1', -1, 54, 0);
10: set_channel('gobo1', -1, 64, 0);
11: set_channel('gobo1', -1, 74, 0);
12: set_channel('gobo1', -1, 80, 0);
13: set_channel('gobo1', -1, 86, 0);
14: set_channel('gobo1', -1, 92, 0);
15: set_channel('gobo1', -1, 98, 0);
16: set_channel('gobo1', -1, 104, 0);
17: set_channel('gobo1', -1, 110, 0);
18: set_channel('gobo1', -1, 116, 0);
19: set_channel('gobo1', -1, 122, 0);
20: set_channel('gobo1', -1, 128, 0);
21: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure GOBO2change;
begin
case gobobox2.itemindex of
0: set_channel('gobo2', -1, 0, 0);
1: set_channel('gobo2', -1, 8, 0);
2: set_channel('gobo2', -1, 16, 0);
3: set_channel('gobo2', -1, 24, 0);
4: set_channel('gobo2', -1, 32, 0);
5: set_channel('gobo2', -1, 40, 0);
6: set_channel('gobo2', -1, 48, 0);
7: set_channel('gobo2', -1, 56, 0);
8: set_channel('gobo2', -1, 96, 0);
9: set_channel('gobo2', -1, 104, 0);
10: set_channel('gobo2', -1, 112, 0);
11: set_channel('gobo2', -1, 120, 0);
12: set_channel('gobo2', -1, 128, 0);
13: set_channel('gobo2', -1, 152, 0);
14: set_channel('gobo2', -1, 160, 0);
end;
end;
procedure SPECIAL1change;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,SPECIAL1slider7.position,0);
end;
procedure PositionXYChange(Top, Left: Integer);
var
phi,r,x,y:Double;
pan, tilt, panfine, tiltfine:Double;
begin
if usemhcontrol.checked then
begin
// Moving-Head-Steuerung (Polarkoordinaten)
x:=((PositionXY.Left+(PositionXY.Width div 2)-(fadenkreuz.Width/2))/fadenkreuz.Width)*2; //-1..0..1
y:=((PositionXY.Top+(PositionXY.Height div 2)-(fadenkreuz.Width/2))/fadenkreuz.Height)*2; //-1..0..1
r:=sqrt(x*x+y*y);
if (r>0) then
begin
if (y>=0) then
phi:=arccos(x/r)
else
phi:=6.283185307179586476925286766559-arccos(x/r);
end else
phi:=64;
r:=128-((r/2)*255);
phi:=(phi/6.283185307179586476925286766559)*255;
if 64>=phi then
phi:=phi+191
else
phi:=phi-64;
pan:=255-phi;
tilt:=255-r;
end else
begin
// Scannersteuerung (Kartesische Koordinaten)
pan:=((PositionXY.Left+(PositionXY.Width div 2))/fadenkreuz.Width)*255;
tilt:=((PositionXY.Top+(PositionXY.Height div 2))/fadenkreuz.Height)*255;
end;
// Ausgabe
if panmirror.checked then
begin
dontrefresh:=true;
set_channel('pan',trunc(255-pan),trunc(255-pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(255-pan)*255),trunc(frac(255-pan)*255),0);
end else
begin
dontrefresh:=true;
set_channel('pan',trunc(pan),trunc(pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(pan)*255),trunc(frac(pan)*255),0);
end;
if tiltmirror.checked then
begin
dontrefresh:=true;
set_channel('tilt',trunc(255-tilt),trunc(255-tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(255-tilt)*255),trunc(frac(255-tilt)*255),0);
end else
begin
dontrefresh:=true;
set_channel('tilt',trunc(tilt),trunc(tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(tilt)*255),trunc(frac(tilt)*255),0);
end;
end;
procedure ColorBoxChange;
begin
case colorbox.itemindex of
0: set_channel('color1', -1, 0, 0);
1: set_channel('color1', -1, 6, 0);
2: set_channel('color1', -1, 12, 0);
3: set_channel('color1', -1, 18, 0);
4: set_channel('color1', -1, 24, 0);
5: set_channel('color1', -1, 30, 0);
6: set_channel('color1', -1, 36, 0);
7: set_channel('color1', -1, 42, 0);
8: set_channel('color1', -1, 48, 0);
9: set_channel('color1', -1, 54, 0);
10: set_channel('color1', -1, 64, 0);
11: set_channel('color1', -1, 74, 0);
12: set_channel('color1', -1, 80, 0);
13: set_channel('color1', -1, 86, 0);
14: set_channel('color1', -1, 92, 0);
15: set_channel('color1', -1, 98, 0);
16: set_channel('color1', -1, 104, 0);
17: set_channel('color1', -1, 110, 0);
18: set_channel('color1', -1, 116, 0);
19: set_channel('color1', -1, 122, 0);
20: set_channel('color1', -1, 128, 0);
21: set_channel('color1', -1, 192, 0);
end;
end;
procedure SHUTTERchange;
begin
DontRefresh:=true;
set_channel('SHUTTER',-1,SHUTTERslider3.position,0);
end;
procedure DIMMERchange;
begin
DontRefresh:=true;
set_channel('DIMMER',-1,DIMMERslider4.position,0);
end;
procedure gobo1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 6, 0);
2: set_channel('gobo1', -1, 12, 0);
3: set_channel('gobo1', -1, 18, 0);
4: set_channel('gobo1', -1, 24, 0);
5: set_channel('gobo1', -1, 30, 0);
6: set_channel('gobo1', -1, 36, 0);
7: set_channel('gobo1', -1, 42, 0);
8: set_channel('gobo1', -1, 48, 0);
9: set_channel('gobo1', -1, 54, 0);
10: set_channel('gobo1', -1, 64, 0);
11: set_channel('gobo1', -1, 74, 0);
12: set_channel('gobo1', -1, 80, 0);
13: set_channel('gobo1', -1, 86, 0);
14: set_channel('gobo1', -1, 92, 0);
15: set_channel('gobo1', -1, 98, 0);
16: set_channel('gobo1', -1, 104, 0);
17: set_channel('gobo1', -1, 110, 0);
18: set_channel('gobo1', -1, 116, 0);
19: set_channel('gobo1', -1, 122, 0);
20: set_channel('gobo1', -1, 128, 0);
21: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure GOBO2change;
begin
case gobobox2.itemindex of
0: set_channel('gobo2', -1, 0, 0);
1: set_channel('gobo2', -1, 8, 0);
2: set_channel('gobo2', -1, 16, 0);
3: set_channel('gobo2', -1, 24, 0);
4: set_channel('gobo2', -1, 32, 0);
5: set_channel('gobo2', -1, 40, 0);
6: set_channel('gobo2', -1, 48, 0);
7: set_channel('gobo2', -1, 56, 0);
8: set_channel('gobo2', -1, 96, 0);
9: set_channel('gobo2', -1, 104, 0);
10: set_channel('gobo2', -1, 112, 0);
11: set_channel('gobo2', -1, 120, 0);
12: set_channel('gobo2', -1, 128, 0);
13: set_channel('gobo2', -1, 152, 0);
14: set_channel('gobo2', -1, 160, 0);
end;
end;
procedure SPECIAL1change;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,SPECIAL1slider7.position,0);
end;
procedure PositionXYChange(Top, Left: Integer);
var
phi,r,x,y:Double;
pan, tilt, panfine, tiltfine:Double;
begin
if usemhcontrol.checked then
begin
// Moving-Head-Steuerung (Polarkoordinaten)
x:=((PositionXY.Left+(PositionXY.Width div 2)-(fadenkreuz.Width/2))/fadenkreuz.Width)*2; //-1..0..1
y:=((PositionXY.Top+(PositionXY.Height div 2)-(fadenkreuz.Width/2))/fadenkreuz.Height)*2; //-1..0..1
r:=sqrt(x*x+y*y);
if (r>0) then
begin
if (y>=0) then
phi:=arccos(x/r)
else
phi:=6.283185307179586476925286766559-arccos(x/r);
end else
phi:=64;
r:=128-((r/2)*255);
phi:=(phi/6.283185307179586476925286766559)*255;
if 64>=phi then
phi:=phi+191
else
phi:=phi-64;
pan:=255-phi;
tilt:=255-r;
end else
begin
// Scannersteuerung (Kartesische Koordinaten)
pan:=((PositionXY.Left+(PositionXY.Width div 2))/fadenkreuz.Width)*255;
tilt:=((PositionXY.Top+(PositionXY.Height div 2))/fadenkreuz.Height)*255;
end;
// Ausgabe
if panmirror.checked then
begin
dontrefresh:=true;
set_channel('pan',trunc(255-pan),trunc(255-pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(255-pan)*255),trunc(frac(255-pan)*255),0);
end else
begin
dontrefresh:=true;
set_channel('pan',trunc(pan),trunc(pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(pan)*255),trunc(frac(pan)*255),0);
end;
if tiltmirror.checked then
begin
dontrefresh:=true;
set_channel('tilt',trunc(255-tilt),trunc(255-tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(255-tilt)*255),trunc(frac(255-tilt)*255),0);
end else
begin
dontrefresh:=true;
set_channel('tilt',trunc(tilt),trunc(tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(tilt)*255),trunc(frac(tilt)*255),0);
end;
end;
procedure SHUTTERchange;
begin
DontRefresh:=true;
set_channel('SHUTTER',-1,SHUTTERslider3.position,0);
end;
procedure DIMMERchange;
begin
DontRefresh:=true;
set_channel('DIMMER',-1,DIMMERslider4.position,0);
end;
procedure gobo1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 6, 0);
2: set_channel('gobo1', -1, 12, 0);
3: set_channel('gobo1', -1, 18, 0);
4: set_channel('gobo1', -1, 24, 0);
5: set_channel('gobo1', -1, 30, 0);
6: set_channel('gobo1', -1, 36, 0);
7: set_channel('gobo1', -1, 42, 0);
8: set_channel('gobo1', -1, 48, 0);
9: set_channel('gobo1', -1, 54, 0);
10: set_channel('gobo1', -1, 64, 0);
11: set_channel('gobo1', -1, 74, 0);
12: set_channel('gobo1', -1, 80, 0);
13: set_channel('gobo1', -1, 86, 0);
14: set_channel('gobo1', -1, 92, 0);
15: set_channel('gobo1', -1, 98, 0);
16: set_channel('gobo1', -1, 104, 0);
17: set_channel('gobo1', -1, 110, 0);
18: set_channel('gobo1', -1, 116, 0);
19: set_channel('gobo1', -1, 122, 0);
20: set_channel('gobo1', -1, 128, 0);
21: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure GOBO2change;
begin
case gobobox2.itemindex of
0: set_channel('gobo2', -1, 0, 0);
1: set_channel('gobo2', -1, 8, 0);
2: set_channel('gobo2', -1, 16, 0);
3: set_channel('gobo2', -1, 24, 0);
4: set_channel('gobo2', -1, 32, 0);
5: set_channel('gobo2', -1, 40, 0);
6: set_channel('gobo2', -1, 48, 0);
7: set_channel('gobo2', -1, 56, 0);
8: set_channel('gobo2', -1, 96, 0);
9: set_channel('gobo2', -1, 104, 0);
10: set_channel('gobo2', -1, 112, 0);
11: set_channel('gobo2', -1, 120, 0);
12: set_channel('gobo2', -1, 128, 0);
13: set_channel('gobo2', -1, 152, 0);
14: set_channel('gobo2', -1, 160, 0);
end;
end;
procedure SPECIAL1change;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,SPECIAL1slider7.position,0);
end;
procedure PositionXYChange(Top, Left: Integer);
var
phi,r,x,y:Double;
pan, tilt, panfine, tiltfine:Double;
begin
if usemhcontrol.checked then
begin
// Moving-Head-Steuerung (Polarkoordinaten)
x:=((PositionXY.Left+(PositionXY.Width div 2)-(fadenkreuz.Width/2))/fadenkreuz.Width)*2; //-1..0..1
y:=((PositionXY.Top+(PositionXY.Height div 2)-(fadenkreuz.Width/2))/fadenkreuz.Height)*2; //-1..0..1
r:=sqrt(x*x+y*y);
if (r>0) then
begin
if (y>=0) then
phi:=arccos(x/r)
else
phi:=6.283185307179586476925286766559-arccos(x/r);
end else
phi:=64;
r:=128-((r/2)*255);
phi:=(phi/6.283185307179586476925286766559)*255;
if 64>=phi then
phi:=phi+191
else
phi:=phi-64;
pan:=255-phi;
tilt:=255-r;
end else
begin
// Scannersteuerung (Kartesische Koordinaten)
pan:=((PositionXY.Left+(PositionXY.Width div 2))/fadenkreuz.Width)*255;
tilt:=((PositionXY.Top+(PositionXY.Height div 2))/fadenkreuz.Height)*255;
end;
// Ausgabe
if panmirror.checked then
begin
dontrefresh:=true;
set_channel('pan',trunc(255-pan),trunc(255-pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(255-pan)*255),trunc(frac(255-pan)*255),0);
end else
begin
dontrefresh:=true;
set_channel('pan',trunc(pan),trunc(pan),0);
dontrefresh:=true;
set_channel('panfine',trunc(frac(pan)*255),trunc(frac(pan)*255),0);
end;
if tiltmirror.checked then
begin
dontrefresh:=true;
set_channel('tilt',trunc(255-tilt),trunc(255-tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(255-tilt)*255),trunc(frac(255-tilt)*255),0);
end else
begin
dontrefresh:=true;
set_channel('tilt',trunc(tilt),trunc(tilt),0);
dontrefresh:=true;
set_channel('tiltfine',trunc(frac(tilt)*255),trunc(frac(tilt)*255),0);
end;
end;
procedure ColorBoxChange;
begin
case colorbox.itemindex of
0: set_channel('color1', -1, 0, 0);
1: set_channel('color1', -1, 6, 0);
2: set_channel('color1', -1, 12, 0);
3: set_channel('color1', -1, 18, 0);
4: set_channel('color1', -1, 24, 0);
5: set_channel('color1', -1, 30, 0);
6: set_channel('color1', -1, 36, 0);
7: set_channel('color1', -1, 42, 0);
8: set_channel('color1', -1, 48, 0);
9: set_channel('color1', -1, 54, 0);
10: set_channel('color1', -1, 64, 0);
11: set_channel('color1', -1, 74, 0);
12: set_channel('color1', -1, 80, 0);
13: set_channel('color1', -1, 86, 0);
14: set_channel('color1', -1, 92, 0);
15: set_channel('color1', -1, 98, 0);
16: set_channel('color1', -1, 104, 0);
17: set_channel('color1', -1, 110, 0);
18: set_channel('color1', -1, 116, 0);
19: set_channel('color1', -1, 122, 0);
20: set_channel('color1', -1, 128, 0);
21: set_channel('color1', -1, 192, 0);
end;
end;
procedure SHUTTERchange;
begin
DontRefresh:=true;
set_channel('SHUTTER',-1,SHUTTERslider3.position,0);
end;
procedure DIMMERchange;
begin
DontRefresh:=true;
set_channel('DIMMER',-1,DIMMERslider4.position,0);
end;
procedure gobo1change;
begin
case gobobox1.itemindex of
0: set_channel('gobo1', -1, 0, 0);
1: set_channel('gobo1', -1, 6, 0);
2: set_channel('gobo1', -1, 12, 0);
3: set_channel('gobo1', -1, 18, 0);
4: set_channel('gobo1', -1, 24, 0);
5: set_channel('gobo1', -1, 30, 0);
6: set_channel('gobo1', -1, 36, 0);
7: set_channel('gobo1', -1, 42, 0);
8: set_channel('gobo1', -1, 48, 0);
9: set_channel('gobo1', -1, 54, 0);
10: set_channel('gobo1', -1, 64, 0);
11: set_channel('gobo1', -1, 74, 0);
12: set_channel('gobo1', -1, 80, 0);
13: set_channel('gobo1', -1, 86, 0);
14: set_channel('gobo1', -1, 92, 0);
15: set_channel('gobo1', -1, 98, 0);
16: set_channel('gobo1', -1, 104, 0);
17: set_channel('gobo1', -1, 110, 0);
18: set_channel('gobo1', -1, 116, 0);
19: set_channel('gobo1', -1, 122, 0);
20: set_channel('gobo1', -1, 128, 0);
21: set_channel('gobo1', -1, 192, 0);
end;
end;
procedure GOBO2change;
begin
case gobobox2.itemindex of
0: set_channel('gobo2', -1, 0, 0);
1: set_channel('gobo2', -1, 8, 0);
2: set_channel('gobo2', -1, 16, 0);
3: set_channel('gobo2', -1, 24, 0);
4: set_channel('gobo2', -1, 32, 0);
5: set_channel('gobo2', -1, 40, 0);
6: set_channel('gobo2', -1, 48, 0);
7: set_channel('gobo2', -1, 56, 0);
8: set_channel('gobo2', -1, 96, 0);
9: set_channel('gobo2', -1, 104, 0);
10: set_channel('gobo2', -1, 112, 0);
11: set_channel('gobo2', -1, 120, 0);
12: set_channel('gobo2', -1, 128, 0);
13: set_channel('gobo2', -1, 152, 0);
14: set_channel('gobo2', -1, 160, 0);
end;
end;
procedure SPECIAL1change;
begin
DontRefresh:=true;
set_channel('SPECIAL1',-1,SPECIAL1slider7.position,0);
end;
end.