Politics I is a participatory work of music created by Eric Lemmon. For performances of this work, please get in touch at [email protected].
For more about this work, please visit my website.
- Technical Requirements
- Installation
- Registering for requisite services and getting access to web APIs
- Setting up Politics I Environment
- Running
- Bibliography
- Minimum: Stereo PA System & Sub
- Projector Screen
- Projector
- Stable Internet Connection
Politics I requires many different dependencies. This README file will walk you through downloading and installing the software required for Politics I and its installation.
NB: Politics I has only been tested and run on MacOS. All installation instructions are based on the assumption that you are running MacOS Monterey.
Download and install Python 3.9.2
Download and install SuperCollider
Download and install Ableton Live 11
Download and install Twilio CLI interface
Download and install ngrok CLI interface
Download and install Postgresql
Download and install Redis from source
Download and install Processing
Download and extract Politics I from github into a directory of your choosing
Download and install Python 3.9.2
Download and install Ableton Live 11
Download and install Processing
Install brew from terminal
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install all other requisite packages
$ brew install \ --cask supercollider \ ngrok/ngrok/ngrok \ git \ postgresql \ redis && brew tap twilio/brew && brew install twilio
Clone Politics I from GitHub
$ git clone https://github.com/eclemmon/politics_1.git
Twilio is a low-cost, enterprise messaging service provider. This service is how Politics I sends and receives sms messages from and too the audience.
Buy a phone number on Twilio.
Fill Twilio account as needed. Running a performance of Politics I takes <$20 to buy the number and fill the account for a concert, depending on the number of people in the audience.
Create a Developer account and go through the process of applying for a standalone app.
NB: so that the tweepy message responder can reply to tweets automatically in Politics I, OAuth 1.0a must be turned on:
Create a new server
Create a new application
Add the bot
Make the bot private and get the token
Go to the Oauth2 --> URL Generator tab and check the bot option in scopes
Set the bot permissions and copy the generated URL
Add the bot to your server
In your discord server, go to server settings by hitting the carrot at the top left near the server name.
Click on the integrations tab
Select the webhooks option and create a new webhook.
Set the webhook name, set the target channel where participants can chat, save changes, and copy the webhook URL into the .env file
PHEW! All done with setting up discord!
Follow these instructions. When you are choosing what to name the database, you can name it whatever you want, but it is recommended that the name is something recognizably associated with the piece, like
politics_1_prod
.
Navigate to your Politics I directory in terminal:
$ cd /path/to/politics_1
Initialize a virtual environment with python:
$ python3 -m venv /path/to/new/virtual/environment
Activate your python virtual environment:
$ source myvenv/bin/activate
Install required python packages:
$ (venv) python3 -m pip install -r requirements.txt
Install processing-java for CLI control of processing sketches.
Still in your politics I directory, create a .env file through Terminal, which will store global environment variables.
NB: You may need to execute ⌘
+ ⇧ Shift
+ .
to see this file after its creation.
$ touch .env
Open the .env file and fill out the empty fields following the =
symbol.
For example, after TWILIO_ACCOUNT_SID=, you will place your unique String Identifier code, which will look something like this:
SMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(see instructions below to find all authentication tokens for both Twilio, Discord, and Twitter).
# GET THESE TWILIO VALUES FROM TWILIO DASH
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=
# GET THESE TWITTER VALUES FROM TWITTER DEV DASH
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=
# YOUR TWITTER HANDLE GOES HERE, AUDIENCE MEMBERS SHOULD BE INSTRUCTED TO TWEET AT YOUR ACCOUNT
SEARCH_TERM=
# YOUR DISCORD TOKEN, GUILD, AND WEBHOOKS GO HERE
DISCORD_TOKEN=
DISCORD_GUILD=
DISCORD_WEBHOOK=
# SOME LOGIC VALUES FOR RUNNING THE PROGRAM
MOVEMENT=1
SCORED=false
DAW=true
DEBUG=true,
SECRET_KEY=abc123
# SHOULD BE THE NAME OF THE POSTGRES DB YOU CREATED
SQLALCHEMY_DATABASE_URI=postgresql:///politics_1_prod
# DEFAULT DIRECTORY FOR SUPERCOLLIDER ALLOWING FOR AUTO-BOOT VIA SHELL SCRIPT
SC_DIR="/Applications/SuperCollider.app/Contents/MacOS"
Twilio SID and Auth Token instructions.
Instructions for finding and getting twitter authentication keys and secrets.
Get Discord bot token.
Get Discord webhook.
Once all these variables are set, you should be almost ready to go!
First, boot the messaging servicer(s):
$ sh run.sh
Then, open Live and SuperCollider (whether you open live will depend on the movement you are performing) and execute any necessary supercollider code in the movement_name_main.scd file. Then navigate back to the directory of the movement you are performing and execute:
$ sh run_movement_name.sh
NB: In the future, you will not need to run SuperCollider code manually, as sclang and scsynth will be run from the shell scripts automatically.
If you have any questions, or any steps seem to be missing in this installation walk-through,
let me know! Contact me at [email protected]