A method for installed playback systems. Set as a login item for macOS. Adjust the target process and launch file as necessary. The watcher script will check that the defined process exists. If not, it will relaunch the target file. Based on the work of Jim Bell for Generativity by Fernanda D'Agostino, Suyama Space, Seattle WA, … Continue reading Process Watcher
PJLink Projector Control
Use AppleScript to control basic functions of PJ-Link enabled Panasonic projectors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
-- @file: allControls.applescript -- @author: Brendan Hogan -- @language: AppleScript -- @version: 1.0.0 -- @update: 2018-07-05 -- Version history -- ver. 1.0.0 : initial build -- Panasonic projector control scripts to power on, open/close the shutter -- and set to standby mode. -- to use in QLab: copy the text between the <Script> and </Script> notations -- and paste it into a Script cue within your workspace, one cue per projector action. -- Update the user variables as necessary to match your projector settings. -- OPEN the Shutter: -- <Script> -- user variables. Adjust as necessary set userAddress to "192.168.168.210" -- the projector's IP address, in quotes. update as necessary set userName to "admin1" -- the administrative user name, in quotes. update as necessary set userPass to "production" -- the projector's password, in quotes. update as necessary -- do not change anything below the line -------------------- -- main script set myFile to (POSIX path of (path to temporary items)) & "curl_downloaded_file.xml" do shell script "curl -L " & "http://" & userName & ":" & userPass & "@" & userAddress & "/cgi-bin/sd95.cgi?cm=0200a1910203" & " -o " & myFile -- </Script> -- CLOSE the Shutter: -- <Script> -- user variables. Adjust as necessary set userAddress to "192.168.168.210" -- the projector's IP address, in quotes. update as necessary set userName to "admin1" -- the administrative user name, in quotes. update as necessary set userPass to "production" -- the projector's password, in quotes. update as necessary -- do not change anything below the line -------------------- -- main script set myFile to (POSIX path of (path to temporary items)) & "curl_downloaded_file.xml" do shell script "curl -L " & "http://" & userName & ":" & userPass & "@" & userAddress & "/cgi-bin/sd95.cgi?cm=0200a1910103" & " -o " & myFile -- </Script> -- Projector ON: -- <Script> -- user variables. Adjust as necessary set userAddress to "192.168.168.210" -- the projector's IP address, in quotes. update as necessary set userName to "admin1" -- the administrative user name, in quotes. update as necessary set userPass to "production" -- the projector's password, in quotes. update as necessary -- do not change anything below the line -------------------- -- main script set myFile to (POSIX path of (path to temporary items)) & "curl_downloaded_file.xml" do shell script "curl -L " & "http://" & userName & ":" & userPass & "@" & userAddress & "/cgi-bin/sd95.cgi?cm=0200a13d0103" & " -o " & myFile -- </Script> -- Projector STANDBY: -- <Script> -- user variables. Adjust as necessary set userAddress to "192.168.168.210" -- the projector's IP address, in quotes. update as necessary set userName to "admin1" -- the administrative user name, in quotes. update as necessary set userPass to "production" -- the projector's password, in quotes. update as necessary -- do not change anything below the line -------------------- -- main script set myFile to (POSIX path of (path to temporary items)) & "curl_downloaded_file.xml" do shell script "curl -L " & "http://" & userName & ":" & userPass & "@" & userAddress & "/cgi-bin/sd95.cgi?cm=0200a13d0203" & " -o " & myFile -- </Script> |
Show Control Case Study: Frost/Nixon at Strawberry Theatre Workshop
Frost/Nixon, performing now through Saturday, February 17, 2018, features extensive use of media control systems to synchronize audio and camera/video devices. The central device in the video signal chain is the Extron 1616 AV composite matrix switcher. This device inputs five camera feeds (four fixed cameras and one mobile camera) into fourteen outputs (twelve televisions … Continue reading Show Control Case Study: Frost/Nixon at Strawberry Theatre Workshop
Stage Effects with QLab
I recently assisted Chris Walker with Holiday Inn at the 5th Avenue Theatre, where I set up a MIDI-controlled relay array for LED/solenoid valve effects in "Let's Say It With Firecrackers". As this was rented equipment from the Broadway production (Roundabout Theatre at Studio 54), the challenge was to do a bit of reverse engineering, as … Continue reading Stage Effects with QLab
Updates on Github/Kreivalabs
Numerous updates have been made to the repositories at https://www.github.com/kreivalabs. Rather than continually update the printed code in the previous posts, please head over to the git repositories (and follow the page, if you like) to be notified of updates. Previous code posts will make their way over to the Projects page.
Speaker coverage measurements with Python
NOTE: visit https://www.github.com/kreivalabs for current code versions. Calculate the coverage pattern area of a point-source loudspeaker based on its dispersion angle and the measured distance from source to listener (or some other point). This method uses Future functionality from www.python-future.org:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
#!/usr/bin/env python # @version 1.1 02-November-2017 # @language: python3 # @requirements: Future additions (http://www.python-future.org) # @description: Calculate speaker coverage based on driver dispersion angle and measured distance from source. # Import Future functions from __future__ import absolute_import, division, print_function, unicode_literals from builtins import input import math title="Loudspeaker Coverage Calculator" print(title) print("=" * 80) # Prompt for user input cone_degrees = int(input("Enter speaker dispersion angle in degrees: ")) measured_distance = float(input("Enter measured distance from speaker in feet: ")) # Convert angles to radians angle_radians = math.radians(cone_degrees) radians_div = angle_radians / 2 # Calculate coverage pattern coverage_pattern = ((math.tan(radians_div)) * measured_distance)* 2 # Round results to two decimal places coverage_pattern_round = str(round(coverage_pattern, 2)) # Return results, prompt for user input to quit print("Approximate speaker coverage pattern is: ", coverage_pattern_round, "ft.") # Return results, prompt for user input to quit. print("=" * 80) print("Speaker coverage pattern is: ", coverage_pattern_round, "ft.") >>>>>>> Stashed changes print() print("Press the <Enter> key to exit.") input() |
Convert Samples to Time with Python
NOTE: visit https://www.github.com/kreivalabs for up to date code versions. The following will calculate elapsed time in milliseconds and seconds for a given sample rate and time (entered in seconds). It will also calculate the number of individual samples elapsed based on sample rate and time (seconds). This Python script utilizes the Future functions available for … Continue reading Convert Samples to Time with Python
Acoustic Velocity and Loudspeaker Delay with Temperature and Python
NOTE: visit https://www.github.com/kreivalabs for the current code versions. Building on the method below, here is the same calculator in Python (hooray for cross-platform!). Save the text below as a .py file to run in the Terminal of your choice. Python 2:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#!/usr/bin/env python # Version 1.4 / 08-November-2017 title="Acoustic Velocity and Loudspeaker Delay Calculator" print title print"=" * 80 # Prompt for user input temp_fahrenheit = float(input("Enter temperture in degrees Fahrenheit: ")) measured_distance = float(input("Enter measured distance between speakers in feet: ")) # Convert Fahrenheit to degrees Celsius temp_celsius = (temp_fahrenheit - 32) * 5/9 # Calculate acoustic velocity in meters/second meters_seconds = (temp_celsius * 0.606) + 331.3 # Convert meters/second to feet/millisecond feet_milliseconds = meters_seconds * 0.00328084 # Calculate time differential based on acoustic velocity and measured distance delay_time = measured_distance / feet_milliseconds # Round results to two decimal places - suitable for most loudspeaker processing hardware and software meters_seconds_round = str(round(meters_seconds, 4)) feet_milliseconds_round = str(round(feet_milliseconds, 4)) delay_time_round = str(round(delay_time, 4)) # Return results print"=" * 80 print"Approximate acoustic velocity is:" print meters_seconds_round, "m/s, or", feet_milliseconds_round, "ft/ms." print"" print"Approximate delay time is" , delay_time_round, "ms." print"" print"Press <Enter> to exit." raw_input() |
Python 3:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#!/usr/bin/env python # Version 1.4 / 08-November-2017 title='Acoustic Velocity and Loudspeaker Delay Calculator' print(title) print('=' * 80) # Prompt for user input temp_fahrenheit = float(input("Enter temperture in degrees Fahrenheit: ")) measured_distance = float(input("Enter measured distance between speakers in feet: ")) # Convert Fahrenheit to degrees Celsius temp_celsius = (temp_fahrenheit - 32) * 5/9 # Calculate acoustic velocity in meters/second meters_seconds = (temp_celsius * 0.606) + 331.3 # Convert meters/second to feet/millisecond feet_milliseconds = meters_seconds * 0.00328084 # Calculate time differential based on acoustic velocity and measured distance delay_time = measured_distance / feet_milliseconds # Round results to two decimal places - suitable for most loudspeaker processing hardware and software meters_seconds_round = str(round(meters_seconds, 4)) feet_milliseconds_round = str(round(feet_milliseconds, 4)) delay_time_round = str(round(delay_time, 4)) # Return results print('=' * 80) print('Approximate acoustic velocity is:' print(meters_seconds_round, 'm/s, or', feet_milliseconds_round, 'ft/ms.') print() print('Approximate delay time is', delay_time_round, 'ms.') print() print('Press <Enter> key to exit.') input() |
And a version if you have Future installed, … Continue reading Acoustic Velocity and Loudspeaker Delay with Temperature and Python
Acoustic Velocity with Temperature and AppleScript
NOTE: visit https://www.github.com/kreivalabs for the current code version. UPDATE - additional user prompt to enter the measured distance (in feet) between the reference speaker and delay speaker. This version will round all returned values to two decimal places, for convenience. If you require a more precise measurement, you can delete the rouding functions in the … Continue reading Acoustic Velocity with Temperature and AppleScript
Further Adventures with Twitter, node-red and Sonic Pi
Building upon the methods explored here, I've been experimenting with using node-red's Twitter node to interface directly with ruby files in Sonic Pi by means of shell scripting. By creating multiple instances of the Twitter nodes in a single flow, I can set unique search terms, strings, hash tags, etc per node, which correspond to … Continue reading Further Adventures with Twitter, node-red and Sonic Pi