Greetings everyone... not sure if the questions are still being answered on this but I'm trying to provide an artist with the ability to play a different video clip each night of the week for a permanent installation using an AMBA. How would that look?
Do the machines shut down at the end of the night? If so, the easiest way would be to write a layer preset for each day of the week. The script below uses Preset Bank 0, with Sunday being Preset Slot 1, Monday = Slot 2, Tuesday = Slot 3, etc... grabs the day of the week from the system time, sets the layer level to full, and loads the corresponding preset onto Mix 1 Layer 1. In the Macro Properties, you would enable "Run on MacroManager Start", and when you start the engine for the day, the script will wait 30 seconds (for the engine to fully start - you will want to adjust this time in the "sleep" line - it's in milliseconds - to account for however long it takes the engine to fully start for your project), and then execute. It will not automatically detect a change of day - it only runs when the engine is started.
end If the machines are always running and don't get shutdown every night, it gets a bit trickier... As with the first script, you'll enable "Run On MacroManager Start", but because we don't want to continually re-load the same preset if the day hasn't changed (since that could potentially send your video back to the in-point), we need to tell it to run continuously to compare the current day with the last known day. I've got the same delay at the beginning of the script, but the "sleep" towards the end sets the interval at which to run the loop that checks the day and loads the correct preset. I have it set to one minute right now (again, in milliseconds), but you can adjust accordingly - I wouldn't set it to be more frequent than that if you don't need it, but you could certainly make it sleep longer.
local layer1 = HippoNet.LocalHost.Engine:FindMix(1).Layers local lastDay
while true do
local day = os.date("%A")
if lastDay == day then
elseif day == "Sunday" then
lastDay = day
elseif day == "Monday" then
lastDay = day
elseif day == "Tuesday" then
lastDay = day
elseif day == "Wednesday" then
lastDay = day
elseif day == "Thursday" then
lastDay = day
elseif day == "Friday" then
lastDay = day
elseif day == "Saturday" then
lastDay = day
end Note: If you manually change Layer 1 while the above script is running, no changes will be applied until the day changes.
Were you in Auto Scale mode when you were experiencing this? Does the issue persist if you switch to Pixel 1:1 mode? I've seen this once before, and it was ultimately fixed through some settings in Vision Configure, but I was never able to fully reproduce it... Can you answer the following questions, please?
- What is the resolution and frame rate of the incoming signal(s)? - What is the resolution of your mix(es)? - What is the resolution and frame rate of your output(s)? - Are you using hardware/software de-interlacing (if the input is an interlaced signal)? - Does the problem persist if you modify the resolution of your mix?
While there isn't necessarily a maintained list of "recommended' SSD's for STRATA, I personally am quite partial to the Samsung 850 EVO series - they're readily available from practically anywhere (Amazon, NewEgg, Google Express, etc.). They're not the cheapest drives in the world, but I've never had any issues with them.
If you find another drive you're interested in, feel free to email email@example.com with the make/model/specs of the drive, and we'll let you know if we've had any experience with that particular drive.
-- The purpose of this macro is to change the DMX2 component patch settings. In many DMX-controlled systems, the system is configured such that a single machine can "take over" for any other machine in the system simply by changing the DMX2 patch settings and recalling a preset from the router. This macro changes the universes patched in the DMX2 component, which is faster than manually importing. This script could easily be extended to reference a UserPin for the variable new starting address, making it possible to build presets on the lighting desk for very fast re-addressing of the backup machine.
-- We can access the DMX settings without having to find the component.
artNet = HippoNet.LocalHost.DMX
-- Get a table of the available universes indexed alphabetically by universe name.
univTable = artNet.Universes
-- Declare the new starting universe
newStart = 25
-- Iterate through table and replace the addresses for each entry
for k,v in pairs(univTable) do
univTable[k].Address = newStart
newStart = newStart + 1
-- Note that the GUI for DMX2 component will not display the new entries until you navigate away from that pinboard and back to it. However, the addresses have been set.
-- This script accesses a weather website that returns an XML file with the weather conditions for a United States ZIP Code entered into the User Pin attached to the script. Based on the information in the XML file, there are 7 possible presets (Presets #1 through #7) that can be applied to Mix 1, Layer 1. If no XML is returned (e.g., invalid ZIP code), Preset #8 is applied. The run interval is set within the Macro Properties panel.
-- Establish the variable to store the user-entered ZIP Code
local zipCode = UserPins["ZIP_Code"]
-- Establish the HTTP connection and request the XML file for the specified ZIP Code
local weather = httpGet("http://api.openweathermap.org/data/2.5/weather?zip="..zipCode..",us&mode=xml&appid=4e6b4df368a67046f50dcd6d9e91e2a8")
-- Uncomment below line to see what kind of goodies you can get from here
-- Search the XML for the "Weather Number" (which is how the website classes various weather types)
local weatherStart = string.find(weather,"<weather number=\"")
-- Ensure there is a valid "Weather Number" before proceeding
if weatherStart ~= nil then
-- Convert the string formatted data to numbers that can be used for comparison
local numStart = string.find(weather,"\"",weatherStart) + 1
local numEnd = string.find(weather,"\"",numStart) - 1
local output = string.sub(weather,numStart,numEnd)
-- Weather information provided by OpenWeatherMap.org. This uses the Green Hippo US Free Account - we strongly suggest making your own account for use on shows, as we may cancel our account at any time.
-- The purpose of this script is to run at a preset interval (interval can be adjusted in Macro Properties) and write to a file with the system date/time of what media was played when on Mix 1, Layer 1.
-- Get the Media Map Table, the current Media Index on Mix 1, Layer 1, as well as create a variable to store the previous clip played for comparison later
mediaMap = mediaMap or HippoNet.LocalHost.MediaManager.MediaMap
lastClip = lastClip or -1
currentClipPin = currentClipPin or HippoNet.LocalHost.Engine:FindMix(1).Layers:FindPin("Source/MediaPlayer/MediaSelect")
-- Compare the last clip played with the current clip playing
if lastClip ~= currentClipPin.Value then
-- Declare a local variable to store the media name
local mediaName = "NO CLIP"
-- Set the last clip to the current clip
lastClip = currentClipPin.Value
-- Don't continue with a nil media name
if mediaMap[currentClipPin.Value] ~= nil then
mediaName = mediaMap[currentClipPin.Value].Name
-- Write (in append mode) to a file in the user's Documents folder with the media name, as well as the date and time the script detected the media was changed (accuracy is dependent on script run interval - so run the script at least once per second)
local file = io.open(os.getenv("USERPROFILE").."\\Documents\\PlayerLog.txt", "a")
file:write(mediaName.." Played at "..os.date("%c"), "\n")
-- The purpose of this script is to put each mix on the system into a specific preset before fading up the level on each mix simultaneously. This script works quite well when starting up after shutting down via the script "Graceful" Shutdown. Note that when storing the mix presets, I have NOT included the mix master into the preset - the preset only holds layer information, which places a clip onto layer 1 of that mix, and resets all remaining layers for that mix. I have also stored my presets sequentially (the preset for Mix #1 is Preset #1, the preset for Mix #2 is Preset #2, etc.)
-- Wait for Engine to have started. We reference the FPS/Performance pin, as it will remain at 0fps until the last mix has finished loading
-- The purpose of this macro is to enable a "graceful" shutdown of the software. When you enable the "Run" pin for this script, it will fade out all of the mix masters (regardless of how many mixes you have on your host) simultaneously, and then shutdown the engine when the fade is complete. This example is meant to work with the "Graceful" Startup macro, which will create a startup macro that will gracefully fade in all of your mixes after selecting specific media.
-- Determine how many mixes exist on the host
mixCount = HippoNet.LocalHost.Engine.MixCount
-- Iterate through the mixes and fade them all out in one second
-- The purpose of this script is to create a simple A/B style crossfader that will loop successive clips within a specified bank (specify bank in the user pin of the macro) with a preset crossfade time of 1/2 second. When the script detects a slot with no media assigned to it, it will loop back to the beginning.
-- Calculate the index of the first clip in the bank. For the purposes of this script, this will start at slot 0
local firstClip = UserPins["Bank"] * 256
-- Create a variable that represents the next clip to be played
local clipOffset = 0
-- Specify our crossfade time, in milliseconds
local fadeTime = 500
-- Find the layers we wish to use, and store the media map table for reference later on
local layer1 = HippoNet.LocalHost.Engine:FindMix(1).Layers
local layer2 = HippoNet.LocalHost.Engine:FindMix(1).Layers
local mediaMap = HippoNet.LocalHost.MediaManager.MediaMap
-- Preset the layers to off
layer1.Level = 0
layer2.Level = 0
-- This variable decides which layer starts out as the active layer
local l1Active = 1
-- Only run the script is there is a clip in the first slot of the selected bank
if mediaMap[firstClip] ~= nil then
-- Begin our loop. This script will run continuously until it is manually stopped
while 1 do
-- Check if there is a clip in the next slot. If not, then return to the start clip
if mediaMap[firstClip + clipOffset] == nil then
clipOffset = 0
-- Create a reference to the currently playing clip so that we can find the duration of it later
local mediaFile = mediaMap[firstClip + clipOffset]
-- Load the clip onto the correct layer and set the play mode to be forward (without looping)
if l1Active == 1 then
layer1:SetMedia(firstClip + clipOffset,"forward")
layer1.Position = 0
layer2:SetMedia(firstClip + clipOffset,"forward")
layer2.Position = 0
-- Pause for long enough to safely ensure the clip has been loaded
-- Calculate the duration of the clip, minus the fade time to determine when to trigger the crossfade
local triggerPoint = mediaFile.Duration - fadeTime
-- Crossfade the clip and then wait for the clip to near the end