; 'A CH32 CH32', 32 DMX Channels, filename: A_CH32.R20
;  Copyright © Avolites Ltd. 2026
;
;   Date       By                Description
;   19-09-26   Pers Creator      Created - Exported from Diamond 4 file.
;
;----------------------------------------------------------------------------
; The device name, upto 11 characters, no spaces are allowed
DEVICE  CH32                                mode=CH32  32 DMX Channels
NAME "A" "CH32 CH32"
;
;----------------------------------------------------------------------------
; The Type of instrument, 1 & M must required for backward compatibility
; The middle number denotes the number of DMX channels used
TYPE  1  32  M
;
;----------------------------------------------------------------------------
; Mirror/Head resolution
MIRROR  2    0    0
;       |    |    |
;       |    |    |_______ maximum tilt movement (in degrees)
;       |    |____________ maximum pan movement (in degrees)
;       |_________________ 1 means moving mirror, 2 means moving head
;
;----------------------------------------------------------------------------
; Patching Information. (Upto 10 lines allowed)
; Upto 10 lines of 159 chars are allowed including formulae
; Variables used d=dmx number(1..512), h=handle(1..60), n=devicename (11-char)
; Allowed modifiers
;   +,-,*,/,(,) basic arithmatic
;   % means remainder after divide
;   & means logical AND
;   | means logical OR
;   R means reverse the bits of the current result (operates on a byte)
;   ^ means logical Exclusive OR (operates on a byte)
;   > means shift to the right
;   < shift to the left
;   r followed by number means get the value of that parameter
;   d DMX address
;   n Fixture name, a 0 terminated character string
;   h The handle number
DEVICEADDRESS
"Handle  %2d"h
"Fixture %11s"n
"DMX     %03d"d
""
""
"Set to CH32"
""
""
DAEND
;
;----------------------------------------------------------------------------
; Specify DMX limits
;
; minimum allowed dmx number
MINDMX=1
;
; maximum allowed dmx number
MAXDMX=480
;
; DMX number must be divisible by this
DIVBY=1
;
;----------------------------------------------------------------------------
; DMX channel description
;
; Column by column description of each DMX channel
; 1. The channels bank number (1..20)
; 2. The upper faders in the bank (1) or the lower faders in the bank (61)
; 3. Channel type (L=LTP, H=HTP, I=Instant LTP, S=16-bit instant LTP,
;    s=16-bit Fadeable LTP
; 4. DMX offset (1..number of DMX channels)
; 5. The output level is proportionally reduced by this level (0..100%)
; 6. The curve number (applicable only to HTP channels), usually set to 1
; 7. Inverted (I) or Normal (N)
; 8. Attribute type (A=Colour Wheel 1, B=Cyan, C=Magenta, D=Yellow,
;         E=Pan, F=Tilt, G=Iris, H=Dimmer, I=Gobo1, J=Gobo2, K=Gobo1 Rotate,
;         L=Focus, M=Gobo2 Rotate, N=Colour Wheel 2, O=Shutter, P=Prism, Q=Zoom,
;         R=Effect Rotate, S=Frost, T=Red, U=Green, V=Blue, 0=uncategorised)
; 9. Checksum channel (Always 1)
;10. Attribute name, must be enclosed in quotes and upto 12 characters allowed
;11. The ON value of this channel (0..255)
;12. The Highlight level of this channel
;13. The Lowlight level of this channel
;
DMX
3     1   L    1   100   1N   F   1   "Tilt"            127     0     0
3    61   L    2   100   1N   0   1   "Tilt Fine"         0     0     0
4     1   L    3   100   1N   0   1   "Tilt Infinit"      0     0     0
6    61   L    4   100   1N   0   1   "Tilt Speed"        0     0     0
4    61   L    5   100   1N   0   1   "Tilt Mode"         0     0     0
5     1   L    6   100   1N   0   1   "T ModeSpeed"       0     0     0
5    61   L    7   100   1N   R   1   "Tilt Range"        0     0     0
6     1   L    8   100   1N   Q   1   "Tilt Offset"       0     0     0
7     1   L    9   100   1N   L   1   "Reserved"          2     0     0
1     1   L   10   100   1N   H   1   "Dimmer"          255     0     0
2     1   H   11   100   1N   H   1   "A Dimmer"        255     0     0
2    61   L   12   100   1N   O   1   "A Shutter"         0     0     0
12    1   L   13   100   1N   0   1   "B Shutter"         0     0     0
12   61   L   14   100   1N   O   1   "C Shutter"         0     0     0
10    1   L   15   100   1N   T   1   "A Red"           255   255     0
10   61   L   16   100   1N   U   1   "A Green"         255   255     0
9    61   L   17   100   1N   V   1   "A Blue"          255     0   229
9     1   L   18   100   1N   0   1   "A White"           0     0     0
13    1   L   19   100   1N   0   1   "A Colour Mac"      0     0     0
13   61   L   20   100   1N   0   1   "A CTO"             0     0     0
8    61   I   21   100   1N   P   1   "A Mode"            0     0     0
8     1   L   22   100   1N   0   1   "A Speed"           0     0     0
14    1   I   23   100   1N   A   1   "A BG Color"        0     0     0
14   61   L   24   100   1N   0   1   "A BG Dimmer"     255     0     0
7    61   L   25   100   1N   0   1   "A Direction"       0     0     0
20    1   I   26   100   1N   0   1   "B Red"           255   255     0
20   61   I   27   100   1N   0   1   "B Green"         255   255     0
19   61   I   28   100   1N   0   1   "B Blue"          255     0   229
15    1   L   29   100   1N   H   1   "C Red"           255   255     0
15   61   L   30   100   1N   H   1   "C Green"         255   255     0
16    1   L   31   100   1N   H   1   "C Blue"          255     0   229
16   61   L   32   100   1N   H   1   "C White"           0     0     0
END
;
;----------------------------------------------------------------------------
TEXT
A 
CH32

INPUT fixture DMX No.
Press a Fixture
Select or Swop button
to make the patch.
END

ATTR
Function Obsolete
END

;----------------------------------------------------------------------------
; Preset Palette Tables

;----------------------------------------------------------------------------
; Macros

;----------------------------------------------------------------------------
; Range Tables

; Column by column description...
; 1. Low DMX value (inclusive)
; 2. High DMX value (inclusive)
; 3. Displayed text (max 11 chars)
; Variables used a=low val, b=high val, c=DMX val

RANGE 1  ;Tilt
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 2  ;Tilt Fine
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 3  ;Tilt Infinite
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 4  ;Tilt Speed
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 5  ;Tilt Mode
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 6  ;T ModeSpeed
0   255  "T Mo %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 7  ;Tilt Range
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 8  ;Tilt Offset
0   255  "Tilt %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 9  ;Reserved
0   5    "Safe"
250 255  "Reset"
REND

RANGE 10  ;Dimmer
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 11  ;A Dimmer
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 12  ;A Shutter
0   255  "A Sh %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 13  ;B Shutter
0   255  "B Sh %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 14  ;C Shutter
0   255  "C Sh %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 15  ;A Red
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 16  ;A Green
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 17  ;A Blue
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 18  ;A White
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 19  ;A Colour Macro
0   255  "A Co %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 20  ;A CTO
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 21  ;A Mode
0   255  "A Mo %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 22  ;A Speed
0   255  "A Sp %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 23  ;A BG Color
0   255  "A BG %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 24  ;A BG Dimmer
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 25  ;A Direction
0   255  "A Di %3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 26  ;B Red
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 27  ;B Green
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 28  ;B Blue
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 29  ;C Red
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 30  ;C Green
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 31  ;C Blue
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

RANGE 32  ;C White
0   255  "%3d.%d%%"(c-a)*100/(b-a),10*((c-a)*100%(b-a))/(b-a)
REND

