For the cartwall I Use a novation launchpad with a script from kloppi somwhere september something changed (after update) and the script don’t work anymore for the players.
This is the player part in the script what do I need to alter?
procedure OnPlayerStateChange(Playlist,PlayerIndex: integer; OldState: TPlayerState; NewState: TPlayerState);
var
i:integer;
begin
if (NewState = psLoaded) then
begin
playerset(PlayerIndex, cHighGreen,chighyellow);
for i:=4 to 7 do
begin
midiout (Launchpad_Device,144,Stopbuttons[i], cOff);
end;
end
else if (NewState = psEmpty) then
begin
playerset(PlayerIndex, cOff,cOff);
end
else if (NewState = psPlaying) then
begin
playerset(PlayerIndex, cBlinkRed,cHighRed);
end
else if (NewState = psFading) then
begin
playerset(PlayerIndex, cBlinkRed,cHighRed);
end
else if (NewState = psError) then
begin
playerset(PlayerIndex, cBlinkYellow,cBlinkRed);
end
else if (NewState = psLoading) then
begin
playerset(PlayerIndex, cBlinkGreen,cBlinkRed);
end;
Is this the entire script? I don’t think so. I see a procedure “playerset” being used that must be defined somewhere (it’s not a built-in function of mAirList).
In mAirList 5 - and beyond - OnPlayerStateChange needs an extra “Item: IPlaylistItem” parameter:
// Called when (playlist) player changes its state
procedure OnPlayerStateChange(PlaylistIndex: integer; PlayerIndex: integer; OldState: TPlayerState; NewState: TPlayerState; Item: IPlaylistItem);
begin
end;
The same is true for a number of other procedures (notably OnPlayetStart, OnPlayerStop). Please check the current “Background Script Template.mls” file in the program directory if all definitions are up to date.