GithubHelp home page GithubHelp logo

litmelon's Introduction

Loss In Translation

This repo contains the sound and light control code for the Loss In Translation art installation.

Installation

In your favorite Python3.11 environment:

pip install -r requirements.txt

Audio Clips

The repo comes with a clip in cebuano in the clips directory for easy testing. Copy more .mp3 files into the clips directory to test with more languages. Make sure the clips are MONO.

Running

The sound aspect can be tested on any computer. Invoke with

python main.py --sound-device-type "default"

Available CLI options are:

  • clips-dir (clips): where to look for audio clips
  • clip-extension (mp3): what file extension to load
  • sound-device-type (default): which audio devices should be loaded, only those with this argument as part of their name are loaded. See Audio Devices below
  • fallback-time (30): Number of seconds of inactivity before the system starts playing a random clip by itself. Lower it to test things.
  • fadeout-length (10): Number of seconds of fadeout to use when switching to a new clip. Only used if clip overlap strategy is fadeout.
  • clip-overlap-strategy (*fadeout*|abort): What to do if a new clip is requested (via button press) while a clip is already playing. Fadeout fades the current clip out and starts playing the new clip, abort does nothing, not allowing new clips to be triggered until the current clip ends.

Audio Devices

This uses your system audio devices, but you need to configure which device(s) to use. You can view the available devices by runnning the following:

python -c "import sounddevice; print(sounddevice.query_devices())"

You can pass the name of any of these devices (or a substring of one, or common to multiple) to use that/those devices. default is a safe choice on many systems, as well as Speakers on a MacBook or Headphones on a Raspberry Pi.

For final art installation where custom USB audio cards are used, find the common substring of these devices' names and pass that to load all of them, but only them.

litmelon's People

Contributors

bkgoksel avatar

Watchers

 avatar  avatar

Forkers

bndrsntch m0namon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.