Coder Social home page Coder Social logo

jamyx's Introduction

Jamyx

logo


| Clients | Usage | Installation | IPC Specs


A Jackaudio mixer/patchbay suite written in rust

Jamyx is meant to be an easy to use alternative to qjackctl.

Why should I replace qjackctl?

Jamyx is a daemon

Because Jamyx is a server and requires no windows manager or graphics to run. This means that even if you restart your X server, the Jamyx server daemon will keep running independently. Why should your audio setup depend on your window manager? This is also why Jamyx is called Jamyx and not qJamyx of Jamyx-gtk. If you want a graphical front-end to Jamyx, you can download a separate client or even make your own!

Clients

I have already written some clients for Jamyx:

  • Jmctl: A powerful yet simple client for the Jamyxer server written in go
  • Jamyxui: Graphical client for the Jamyx server written in Go
  • Jamyxgo: Jamyx client library written in Go (the lib that the above clients use)

Jamyx has more features

Jamyx offers a patchbay utility as well as a full featured audio mixer! After some quick configuration, you can have complex audio routes and volume control over your ports.

Some key features include:

Mixer:

  • Individual volume and balance control over ports
  • Support for mono and stereo ports
  • Supper for monitor channel
  • Connection of volume-controlled ports to volume-controlled outputs in a grid-like system

Patchbay:

  • Automatic event-based (dis)connections of ports when they appear
  • Automatic retrial of (dis)connections when they fail
  • Multithreaded and event-based, so never skips a beat!

General:

  • On-the-fly loading and saving of current configuration state with non need to restart the daemon.
  • Jack server reconnection loop. This means the Jamyx server is independant of the Jackaudio server and will wait for it to restart in case it stops or crashes. Crashing or stopping the Jack server will not crash the Jamyx server.
  • Multithreaded IPC
  • Easy IPC for server-client communication:
    • Monitor any port property and event (e.g.: wait for change in volume of a certain port)
    • Getters & Setters for all properties
    • Create, delete and rename volume-controlled ports
    • Json is used for easy (de)serializing of commands and replies

IPC Specifications

Interprocess communication is done via a TCP connection to the Jamyx server (default port: 56065). The messages are formatted in Json as follows:

Format

(using python syntax highlighting in readme for better comment support)

Command

{
    "target": "<TARGET>",       One of "myx" and "con" for targetting
                                 the mixer and the patchbay respectively
    "cmd":    "<COMMAND>",      One of the later described commands
    "opts":   ["<OPTIONS>"]     The options for the chosen command
}

Reply

{
    "ret": <RETURN CODE>,       The return code of the command (0 = good)
    "msg": <MESSAGE>,           Short description of return object or error
    "obj": <RETURN OBJECT TREE> Object tree caintaining information
                                 returned by the command
                                 (described in seperate command descs.)
}

Port Object

A common reply object returned by commands is a Port Object:

{
    "port":   <str>,            The name of the port
    "ptype":  <"out" | "in">,   The port type
    "vol":    <float>,          The volume multiplier (in percentage) of the port
    "bal":    <float>,          The balance of the port
    "ismono": <bool>,           Whether the port is mono or not
    "cons":   <list of str>     List containing names of all the
                                 connected ports to this one

}

Commands (target: myx)

con/dis/tog

Connect/Disconnect/Toggle two channels together

Command

key value description
target "myx"
cmd "CMD" con, dis, or tog for connecting, disconnecting and toggling connection
opts ["INPUT_NAME", "OUTPUT_NAME"] the names of the two channels

Return object

This command returns the port object of the output port

get

Get port(s) specified

Command

key value description
target "myx"
cmd "get"
opts ["monitor"] OR ["channels"] OR ["TYPE", "NAME"] get monitor channel OR get all in/output ports OR get specified channel where TYPE is in or out and NAME is the name of the channel

Return object

This command returns port object of the specified port.

For the get channels command, this returns the following object:

{
    "inputs": [OBJS],
    "outputs": [OBJS]
}

where the OBJS are port objects

mon

Wait for a certain event and then return the

Command

key value description
target "myx"
cmd "mon" monitor property on a certain port
opts ["PROPERTY", "TYPE", "NAME"] where PROPERTY is any of volume, connections, or balance, and TYPE is in or out and NAME is the name of the channel

Return object

This command returns port object of the specified port once the monitored property has changed.

set

Set the value of a certain property

Command

key value description
target "myx"
cmd "set" set the value of a property of a channel or set the monitor channel
opts ["PROPERTY", "TYPE", "NAME", "VALUE"]OR["monitor", "TYPE", "NAME"] where PROPERTY is volume or balance, and TYPE is in or out and NAME is the name of the channel and VALUE is the new value

Return object

This command returns port object of the specified port.

jamyx's People

Contributors

javyre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jamyx's Issues

TODO

The project as it is work very well and I've been using it for a couple years now. There are some minor things i strongly feel the need for though.

Here's a TODO in no particular order:

  • Update jack-rs version
  • Clean up code:
    • Remove unwrap()s and use proper error handling
    • Remove ugly leftover commented-out code (that's embarrassing)
    • Review naming/minor design choices
  • Add Regex matching to port names from cfg file if possible
  • Review realtime code for performance
  • Look into making an equalizer (may be a separate project from jamyx)

cpu usage at idle

jam has 10%-15% cpu usage while just listening for new connections. I don't think this is normal.

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.