config.yaml # runtime configurable parameters
freesound_v2.yaml # blueprint to zip freesound login data
README.md # this readme
requirements.txt # python required packages
t2m.py # the app script
twitter_v1.yaml # blueprint to zip twitter login data
After install and setup this directory will contain:
credentials.zip # a zip file with passowrd
t2mvenv # a python virtual environmnet folder
This is a command line application that has to be installed and run manually.
python, git and ffmpeg commands must be accessible from a terminal.
-
Install SuperCollider: https://supercollider.github.io/download
Run the SuperCollider's IDE and boot the server at least once to enable network permissions for the server and quit the IDE. The IDE is not needed later.
-
Install ffmpeg command.
On Windows 10:
- Download: https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2021-10-14-12-22/ffmpeg-N-104348-gbb10f8d802-win64-gpl.zip
- Unzip the folder to program files and set the contained bin directory in the PATH environment variable.
- Check ffmpeg command is available from PowerShell.
-
Install git: https://git-scm.com/downloads
-
Install Python 3.8+ in your platform: https://www.python.org/downloads
-
Clone t2m repo
git clone https://github.com/smrg-lm/t2mand move to the t2m created directory.
-
Create a virtual env within t2m directory
python -m venv t2mvenvTo activate it on Linux or Mac:
source t2mvenv/bin/activateTo activate it on Windows 10:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser t2mvenv\Scripts\Activate.ps1
Upgrade pip:
python -m pip install pip --upgrade -
Install required packages with t2mvenv activated
python -m pip install -r requirements.txtInstall spacy en model afterwards
python -m spacy download en_core_web_sm
The program needs a standard (e.g. Info-ZIP) password protected zip file containing only two files: freesounds_v2.yaml and twitter_v1.yaml that in turn contain the keys and secrets to use the app. Blueprints of these files are provided.
Info-ZIP on Linux will compress and encrypt the files with this command:
zip -e credentials.zip freesound_v2.yaml twitter_v1.yamlA few run time parameters can be configured using the config.yaml file.
hashtag: '#t2mtest' # a str with the hastag or search query for Twitter API
select: [ADJ, NOUN] # a list of word types (without quotes) for spacy analysis
filter: 'duration:[15 TO 30]' # Freesound API search filters
search_wait_time: 15 # a number as wait time between searches (also initial wait time)
tweet_dur: 40 # a number as the duration of shown tweets if sounds were found
credentials: 'credentials.zip' # the filename of the credentials file-
cd to the t2m directory.
-
Activate t2mvenv
Linux or Mac:
source t2mvenv/bin/activateWindows 10:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser t2mvenv\Scripts\Activate.ps1
-
Run the script
python t2m.pyThe password for credentials.zip file will be prompted in the terminal then the app creates a window that can be placed in another screen for projection. The window has two keyboard actions,
Fto toggle full screen andEscto exit the app. All runtime log information will post in the running terminal for monitoring.
-
http://infozip.sourceforge.net or any other standard zip utility
-
https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets