add martin elp cl
This commit is contained in:
parent
bcf29d506b
commit
aab74d4bdd
2 changed files with 67 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dafh3tlcmos4p"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dafh3tlcmos4p"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bgpsbsunf8fwf" path="res://scripts/artnet.gd" id="1_hsiae"]
|
||||
[ext_resource type="Texture2D" uid="uid://buuvoh3jf0f52" path="res://sprites/cross.png" id="2_vgkya"]
|
||||
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Texture2D" uid="uid://glyt8h1eag1u" path="res://sprites/pixel.png" id="3_qvw8c"]
|
||||
[ext_resource type="Script" uid="uid://b0qusiobeu8d4" path="res://scripts/dmx_color.gd" id="4_velje"]
|
||||
[ext_resource type="Script" uid="uid://lkit8whq53i1" path="res://scripts/dmx_direct.gd" id="6_tefeu"]
|
||||
[ext_resource type="Script" uid="uid://ie4upuuhc80j" path="res://scripts/color_picker_button.gd" id="7_o6xl0"]
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
|
||||
|
@ -22,18 +23,53 @@ output = false
|
|||
channel_offset = 100
|
||||
|
||||
[node name="ColorRect" type="Sprite2D" parent="." node_paths=PackedStringArray("artnet")]
|
||||
modulate = Color(0, 0.12549, 1, 1)
|
||||
position = Vector2(162.125, 549.375)
|
||||
scale = Vector2(283.75, 328.75)
|
||||
modulate = Color(1, 0, 0.716667, 1)
|
||||
position = Vector2(150, 500)
|
||||
scale = Vector2(200, 200)
|
||||
texture = ExtResource("3_qvw8c")
|
||||
script = ExtResource("4_velje")
|
||||
artnet = NodePath("../ArtNet")
|
||||
output = false
|
||||
channel_offset = 93
|
||||
model = 1
|
||||
|
||||
[node name="ColorRect2" type="Sprite2D" parent="." node_paths=PackedStringArray("artnet")]
|
||||
modulate = Color(1, 0, 0.716667, 1)
|
||||
position = Vector2(437, 508)
|
||||
scale = Vector2(200, 200)
|
||||
texture = ExtResource("3_qvw8c")
|
||||
script = ExtResource("4_velje")
|
||||
artnet = NodePath("../ArtNet")
|
||||
channel_offset = 100
|
||||
model = 2
|
||||
|
||||
[node name="Test" type="Node" parent="." node_paths=PackedStringArray("artnet")]
|
||||
script = ExtResource("6_tefeu")
|
||||
artnet = NodePath("../ArtNet")
|
||||
channel_offset = 93
|
||||
values = Array[float]([255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0])
|
||||
output = false
|
||||
channel_offset = 100
|
||||
values = Array[float]([255.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="ColorPickerButton" type="ColorPickerButton" parent="Control" node_paths=PackedStringArray("toChangeNode")]
|
||||
layout_mode = 0
|
||||
offset_left = 141.0
|
||||
offset_top = 409.0
|
||||
offset_right = 240.0
|
||||
offset_bottom = 508.0
|
||||
script = ExtResource("7_o6xl0")
|
||||
toChangeNode = NodePath("../../ColorRect")
|
||||
|
||||
[node name="ColorPickerButton2" type="ColorPickerButton" parent="Control" node_paths=PackedStringArray("toChangeNode")]
|
||||
layout_mode = 0
|
||||
offset_left = 359.0
|
||||
offset_top = 409.0
|
||||
offset_right = 458.0
|
||||
offset_bottom = 508.0
|
||||
script = ExtResource("7_o6xl0")
|
||||
toChangeNode = NodePath("../../ColorRect2")
|
||||
|
||||
[connection signal="color_changed" from="Control/ColorPickerButton" to="Control/ColorPickerButton" method="_on_color_changed"]
|
||||
[connection signal="color_changed" from="Control/ColorPickerButton2" to="Control/ColorPickerButton2" method="_on_color_changed"]
|
||||
|
|
|
@ -5,11 +5,12 @@ extends Node2D
|
|||
|
||||
@export var artnet:Node
|
||||
@export var output:bool=true
|
||||
@export_range(0,255,1) var master = 255
|
||||
@export_range(0,255,1) var dimmer = 255
|
||||
var dimmerchannel=1
|
||||
|
||||
@export_range(1,512,1) var channel_offset=1
|
||||
|
||||
enum Model {cameo_clp_flatpro_18, robtertjuliat_dalis_861_fullmode8b}
|
||||
enum Model {cameo_clp_flatpro_18, robtertjuliat_dalis_861_fullmode8b,martin_elp_cl_10ch}
|
||||
@export var model: Model
|
||||
|
||||
|
||||
|
@ -32,7 +33,7 @@ func _ready() -> void:
|
|||
[1.0,0.75,0], #amber
|
||||
]
|
||||
colorchannels=[3,4,5,6,7] #same order as colormix
|
||||
|
||||
dimmerchannel=1
|
||||
fixedchannels=[2,8]
|
||||
fixedvalues=[0,0]
|
||||
elif (model==Model.robtertjuliat_dalis_861_fullmode8b):
|
||||
|
@ -48,9 +49,25 @@ func _ready() -> void:
|
|||
[1.0,0.9,0.8], #warm white
|
||||
]
|
||||
colorchannels=[2,3,4,5,6,7,8,9] #same order as colormix
|
||||
|
||||
dimmerchannel=1
|
||||
fixedchannels=[10,11,12,13]
|
||||
fixedvalues=[0,0,255,0]
|
||||
elif (model==Model.martin_elp_cl_10ch):
|
||||
#https://www.martin.com/en/site_elements/elp-cl-user-manual page 28
|
||||
colormix=[
|
||||
[1.0,0,0], #red
|
||||
[0,1.0,0], #green
|
||||
[0,0.0,1.0], #blue
|
||||
[0.75,1.0,0.0], #lime
|
||||
[1.0,0.5,0], #amber
|
||||
]
|
||||
colorchannels=[5,6,7,8,9] #same order as colormix
|
||||
dimmerchannel=2
|
||||
fixedchannels=[1,3,4]
|
||||
fixedvalues=[255,0,0]
|
||||
|
||||
|
||||
|
||||
|
||||
colorvalues.resize(colorchannels.size())
|
||||
|
||||
|
@ -78,7 +95,7 @@ func _process(delta: float) -> void:
|
|||
|
||||
|
||||
if output:
|
||||
artnet.setDMXChannel(channel_offset-1+1,master) #master dimmer
|
||||
artnet.setDMXChannel(channel_offset-1+dimmerchannel,dimmer) #master dimmer
|
||||
|
||||
#artnet.setDMXChannel(channel_offset-1+2,0) #strobo
|
||||
#artnet.setDMXChannel(channel_offset-1+8,0) #macros
|
||||
|
|
Loading…
Add table
Reference in a new issue