Hallo Leo,
ich habe das mit folgendem Script realisiert.
// PunchLight USB
// Script by Holger Ledermann
const
// Recording Lamp USB (rgb)
PunchLight = 1;
procedure OnLoad;
begin
MidiOutOpen(PunchLight);
end;
procedure OnOffAir;
begin
SystemLog('Encoder ist OFF AIR.');
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 0);
MidiOut(PunchLight, 176, 12, 14);
MidiOut(PunchLight, 176, 44, 4);
end;
procedure OnOnAir;
begin
SystemLog('Encoder ist ON AIR.');
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 127);
end;
procedure OnEncoderInputToggle(Input: TEncoderInput; NewState: boolean);
begin
if Input = eiMic then
begin
if NewState = True then
begin
MidiOut(PunchLight, 176, 12, 14);
MidiOut(PunchLight, 176, 44, 69);
end
else if NewState = False then
begin
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 127);
end;
end;
if Input = eiLine then
begin
if NewState = True then
begin
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 127);
end
else if NewState = False then
begin
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 0);
MidiOut(PunchLight, 176, 12, 14);
MidiOut(PunchLight, 176, 44, 4);
end;
end;
end;
procedure OnExecuteCommand(Command: string);
begin
{ if Command = 'COMMAND' then
begin
end; }
end;
procedure OnUnload;
begin
MidiOut(PunchLight, 144, 48, 0);
MidiOut(PunchLight, 144, 60, 0);
MidiOut(PunchLight, 176, 12, 14);
MidiOut(PunchLight, 176, 44, 4);
MidiOutClose(PunchLight);
end;
begin
end.
Viel Erfolg!