Coder Social home page Coder Social logo

midi-webmixer's Introduction

CircleCI

Midi Webmixer

The aim of this project was to allow me to remotely control the 4 aux sends of my Yamaha 01V desk via midi. The idea being that each of the members in my band can control their own monitor mix on anything that can load a browser (phones etc)

Installation

I recommend using the docker compose file if you wan to get started quickly. However here are some manual installation steps..

Clone the repo:

git clone [email protected]:adamcathersides/midi-webmixer.git

Install

cd midi-webmixer
pip3 install . --user

Running

Once installed the application webmixer should be available

The application if comprised to two parts.

  • RestAPI
  • GUI (webpage)

General archetecture overview

This application is split into two parts; a rest API and a the main GUI - both of which can be run from the webmixer command. Data storage and persistance is dealt with via redis. Both the rest API and mixer GUI need to be externally accessible as the GUI sends requests to the rest API using sendBeacon messages.

It is reccomended to run this application using the docker-compose file provided. However due to the (probably shortsighted) design the GUI container needs to know what the externally accessible hostname of the rest API therefore this has to be manually provided at the point of running docker-compose up. See docker-compose section for an example.

You can run the restapi by itself and access it manually if required (I use the amazing Insomnia to do this.) The GUI part relies on the restapi to be running.

Poke the rest API

The rest API accepts POST requests like so: http://rest_api:5001/mixer/<aux>/<channel>/<value>

So if you wanted to set aux1, channel 2 to full volume: http://rest_api:5001/mixer/aux1/2/127

Running the REST api

webmixer --config config.ini --restapi --port 5001

Running the GUI

webmixer --config config.ini --gui --port 5000

Config file

The config file is pretty self explanatory. As well as normal midi and networking settings, it also allows you to define custom channel names.

The midi port is the number of the midi out port you would like to use. Find out what you have installed by running webmix --listmidi If midi port is set to virtual the system will create a fake midi port which is handy for debugging.

If rest_host is left blank it will attempt to use an environment variable called REST_HOST. This is required when deploying in containerised enviroments.

Here is an example:

[Network]
interface = lo

[Services]
redis_host = redis
redis_port = 6379
rest_host =
rest_port = 5001
gui_host = gui
gui_port = 5000

[Midi]
port = virtual

[ChannelNames]
1 = Kick
2 = SNR
3 = OH
4 =
5 = Dave
6 = Jon
7 = Adam
8 = Paul
9 =
10 = Bass
11 = AdamGit
12 = JonGit

Get midiport numbers

webmixer --listmidi

Docker

cd midi-webmixer
docker build -t webmixer:1 .
docker run --net=host -v /home/adam/github/01v-midi/config.ini:/config.ini webmixer:1 /config.ini --restapi
docker run --net=host -v /home/adam/github/01v-midi/config.ini:/config.ini webmixer:1 /config.ini --gui

Docker Compose (Reccomended)

This is an example of how to run on the webmixer from a single machine.
The HOSTNAME variable is required in order for the GUI to contact the rest API. It can also be set in the config.ini

cd midi-webmixer
docker-compose build
HOSTNAME=$(hostname) docker-compose up

midi-webmixer's People

Contributors

adamcathersides avatar

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.