Skip to content

Instantly share code, notes, and snippets.

View imorrish's full-sized avatar

Ian Morrish imorrish

View GitHub Profile
@imorrish
imorrish / HyperDeck_Console.ps1
Last active August 15, 2022 16:49
Use PowerShell to control BlackMagic HyperDeck
## HyperDeckTest.ps1
## By Ian Morrish
## Control Blackmagic HyperDesk via Ethernet from Windows PowerShell. PowerShell is part of all modern Windows desktop/server products
## see https://technet.microsoft.com/en-us/scriptcenter/powershell.aspx
##
## To run the script requires enabling PowerShell Script file execution. Run the following command to allow only local scripts to be executed
## set-executionpolicy remotesigned
#
#run with command line e.g.
# PS > .\HyperDeckTest.ps1 -remoteHost "10.0.0.34" -commands @('remote: override: true', 'goto: clip id: 2','play: single clip: true')
@imorrish
imorrish / RecordHyperDecks.ps1
Created May 27, 2015 08:51
PowerShell to start recording on multiple Blackmagic HyperDeck devices
# record on multiple HyperDecks
$HyperDecks = @('10.0.0.34','10.0.0.35','10.0.0.36','10.0.0.37')
$fileName = 'Recording' + (Get-Date).tostring("dd_MM_yyyy_hh_mm")
$sb = {
param ([string] $HyperDeckIP, [string] $HDcommand)
try {
$socket = new-object System.Net.Sockets.TcpClient($HyperDeckIP, 9993)
$stream = $socket.GetStream()
$writer = new-object System.IO.StreamWriter($stream)
@imorrish
imorrish / PoshMidiDemo.ps1
Last active August 29, 2015 14:22
PowerShell to control Midi device
#Example using https://midinet.codeplex.com/ to control MIDI device
#Copy the following DLL's from above CodePlex project into path you want to use in the script
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.dll'
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.IO.dll'
add-type -path 'C:\Users\IAN\Documents\WindowsPowerShell\Modules\Midi\CannedBytes.Midi.dll'
$midiInCaps = new-object CannedBytes.Midi.MidiInPortCapsCollection
$midiOutCaps = new-object CannedBytes.Midi.MidiOutPortCapsCollection
"Input Devices-----------------------------"
For($i=0; $i -lt $midiInCaps.Count; $i++){
"Device ID: $i Name: " + $midiInCaps[$i].Name
@imorrish
imorrish / Send-PushAlot.ps1
Last active September 22, 2016 06:50
PowerShell function to send alert to PushAlot
function Send-PushAlot {
<#
.SYNOPSIS
Send alert via https://pushalot.com/api#webapi to Windows Phone or Desktop device app
#>
Param(
[String]
[parameter(Mandatory=$true)]
[ValidateLength(1,250)]
@imorrish
imorrish / ATEM-VoiceCommand.ps1
Created March 26, 2016 08:32
Voice activated Blackmagic ATEM video switching
# get SwitcherLib.dll from https://github.com/imorrish/atemlib
add-type -path 'C:\Users\imorrish\Documents\WindowsPowerShell\Modules\ATEM\SwitcherLib.dll'
$atem = New-Object SwitcherLib.Switcher("192.168.1.8")
$atem.Connect()
Write-host "ATEM Product: $($atem.GetProductName())"
$preview = new-object SwitcherLib.Switcher+PreviewInput
[Reflection.Assembly]::LoadWithPartialName("System.Speech") | Out-Null
[Reflection.Assembly]::LoadWithPartialName("System.Globalization") | Out-Null
@imorrish
imorrish / Resolume.ps1
Created June 16, 2016 08:27
Control Resolume using PowerShell and OSC
Update path below to the location where you save the dll from
# https://github.com/ValdemarOrn/SharpOSC/tree/master/Binaries
add-type -path 'C:\Users\imorrish\OneDrive\PowerShell\OSC\SharpOSC.dll'
#Connection for Resolume
$sender = new-object SharpOSC.UDPSender "192.168.1.67", 7000
#start a layer clip
$message = new-object SharpOSC.OscMessage "/layer3/clip1/connect", 1;
$sender.Send($message);
#Enable or dissable a video effect on a clip. 1 = disable, 0 = enabled
$message = new-object SharpOSC.OscMessage "/activeclip/video/effect1/bypassed", 1;
@imorrish
imorrish / ATEM Audio MIDI Demo.ps1
Created July 8, 2016 23:32
Windows PowerShell script to control Blackmagic ATEM audio mixer using a MIDI device
# Sample script to control Blackmagic ATEM audio mixer using a MIDI device
# This script only runs on Windows 10 and ISE 64bit
#Requires ATEMLib.dll and PeteBrown.PowerShellMidi.dll
# which can be downloaded from https://ianmorrish.wordpress.com
#
# Blackmagic ATEM Software Control must also be instaled (v6.4 or grater)
#ATEM setup
add-type -path 'C:\Users\imorrish\OneDrive\PowerShell\ATEM\SwitcherLib.dll'
@imorrish
imorrish / VLC-Remote.ps1
Created December 3, 2016 18:04
Remote control VLC from Windows PowerShell
# Remote commands for VLC
#Run from ISE
$socket = new-object System.Net.Sockets.TcpClient("localhost", 5000)
if($socket -eq $null) {
write-host "Failed to connect to VLC"
Exit
}
$stream = $socket.GetStream()
$writer = new-object System.IO.StreamWriter($stream)
@imorrish
imorrish / Amira.ps1
Last active December 4, 2016 02:52
Amira Camera Tally Test
Function Send-CameraTally
{ Param (
[Parameter(ValueFromPipeline=$true)]
[String[]]$Command,
[string]$CamerIP = "IPAddress",
[string]$Port = "23"
)
#Attach to the remote device, setup streaming requirements
$WaitTime = 200
$Socket = New-Object System.Net.Sockets.TcpClient($CameraIP, $Port)
@imorrish
imorrish / Decklink.ps1
Created December 23, 2016 04:01
Configure Blackmagic Decklink card from command line or PowerShell script