Git Product home page Git Product logo

emepleier's Introduction

EMEPLEIER

Send OSC messages to MPlayer

Install

You will need Python 3, pip and mplayer.

Python dependencies

Install first dependencies with Pip.

pip3 install --user -r requirements.txt

Mplayer

Linux (Debian-based)

sudo apt-get install mplayer

OSX

Download Mplayer OSC Extended.

Make a symbolic link to the mplayer binary so you can start mplayer from the command line. For example:

ln -s /Applications/MPlayer\ OSX\ Extended.app/Contents/Resources/Binaries/mpextended.mpBinaries/Contents/MacOS/mplayer /usr/local/bin/mplayer

Test if it works by running mplayer from your terminal:

$ mplayer
MPlayer SVN-r38017-4.2.1 (C) 2000-2018 MPlayer Team
Usage:   mplayer [options] [url|path/]filename

Basic options: (complete list in the man page)
...

Windows

?

Usage

In SuperCollider, start SuperDirt as usual, then execute the following:

~oscaddr = NetAddr.new("127.0.0.1", 5005);    // create the NetAddr

(
~video = "";
~dirt.receiveAction = { |event|
    var dur, nchan, vel, note, pchan;

    if (event['video'] != nil) {
        if (event.video != ~video) {
            event.postln;
            ~oscaddr.sendMsg("/loadfile", event.video);
            ~video = event.video;
        }
    };

    if (event['depth'] != nil && event['pos'] != nil && event['n'] != nil) {
        SystemClock.sched(event.latency, {
            ~oscaddr.sendMsg("/seek", (event.n + 1) * event.depth + event.pos);
        });
    }
};
)

Then, in Tidal, execute these:

let pos = pF "pos"
    depth = pF "depth"
    video = pS "video"

Finally, supposing you have a directory videos/ with some videos, run emepleier passing some video to start playing first:

python3 ./emepleier.py videos/0001.mp4

Example

d1 $ n "0 1 2 1" # s "in" # depth 1.2 # pos "40 50" # video "0002.mp4"

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.