JACK as a Plugin

Since there were open issues on Github about JACK support, I looked in to suggestions of implementing first-class support in the form of a plugin:

It works for me, on a Lenovo IdeaPad (laptop.) I’m not aware of anyone else using it yet.

Instead of using an Audio or Audio 16, you use one or more JACK Audio.

Features:

  • Variable-length audio buffers (weird to test though; JACK on my end usually keeps the same size) 1/1/2019
  • Four independent outputs per module 1/2/2019
  • Four independent inputs per module 1/5/2019
  • Custom names for each port (shows up in VCV and patch bays) 1/5/2019
  • macOS support 1/11/2019
  • Multiple I/O modules cooperate; use as many as you need / your computer can handle 1/13/2019

Things that don’t work:

  • MIDI
  • Sessions
  • Transport
  • Gracefully handling the JACK server going down and coming back up (it won’t crash Rack, but you won’t get audio back until you restart the program.)
  • I don’t know what kind of dragons happen if both an AudioInterface and JACK Audio are in the same patch Seems to be that depending on your setup, either nothing happens or trying to delete the non-JACK module can cause hangups or crashes.

Strangely, it may even be possible to support JACK Sessions as a plugin. The only two things needed to do so are:

  1. The ability to save a patch to a specified directory when the server tells us to, and,
  2. A command line argument that opens the file again
12 Likes

Sounds interesting, keep us posted!

Are you working exclusively on Linux, or will a Windows implementation be included, as well?

I don’t have a Windows dev environment set up. It should work there; there is nothing platform specific being used.

Are there many JACK clients on Windows? I’ve only seen Radium support it there.

Today’s work: all four of the output sockets on the module now have corresponding JACK ports; tested sending VCO output to them and each port connected to Non-Mixer.

2 Likes

All I know about it is here:

http://jackaudio.org/faq/jack_on_windows.html

Today’s work: input ports bring sound from JACK in to RACK (we’re full-duplex now) and you can rename each port individually. Names stick to your patch file (they’re saved in JSON) and load.

There is one crinkle: ports have to have unique names within a single running instance of VCV Rack. If the names are botched they just don’t work, there is no visual representation of this (although you can see it in your patchbay.) I might add LEDs that light up to represent JACK is running and the ports are live.

Question is: should I start seeking a release build / plugin listing in this state, or wait to also have MIDI support?

1 Like

I m subscribing to this threat

If it works at all, and does something useful, and is reasonably stable then I say: Relase it! Let the Jack users have a play with it, gain some experience and provide you with some useful feedback.

1 Like

I’ve put out a preview release on Github. It’s built with the official SDK on 64-bit OpenSuSE. Happy patching!

2 Likes

thanks, @Skrylar I will test this night

The upcoming 0.6.1 removes linking with JACK at build time I’ve shoved all of the JACK interaction to a separate class that loads it at runtime as part of trying to get it running for macOS users. If the fix works for them then a similar trick will be used to get Windows support working as well.

3 Likes

Fixed on Mac! Thank you.

I’ve uploaded a binary. Hit me up for any further Mac builds as required.

Cheers.

1 Like

working flawless in kubuntu 18.04, really great

I have a couple of features and suggestions , I don’t know if could be possible

sometimes 4 channels are not enough to route audio trough jack (I usually use the Audio 16 module of RCM) perhaps 16 channel or even a custom number will be great.

a panel that trigers to jack transport and vcv could be great to sync vcv with externals software

many thanks you for your effort

1 Like

sometimes 4 channels are not enough to route audio trough jack (I usually use the Audio 16 module of RCM) perhaps 16 channel or even a custom number will be great.

  • Throw in as many JACK Audio’s as you need. Each one creates four input and output ports on the same client (you’ll see more ports appear in your patch bay. There is no need for a 16 wire version (other than convenience.)
  • If you click in the text field you can rename each port individually. They have a crazy name (technically the memory address of the module and the port index, since those are extremely unlikely to collide) by default; when renaming, each port in a single Rack instance has to have a unique name or JACK complains (doesn’t damage anything; if you give one an invalid name, just change it to a valid one and it starts working again.)

I thought about having an 8-IN and 8-OUT variant, just to make it easier to add extra ports of a single type. That might happen.

amazing, I m not tried to use 2 modules Since two audio modules in the same patch produce a bigger amount of the Xruns, I will test today adding two modules, 8 channel variant is a great idea!

by the way, my defauld patch include a Audio 16, if I add the jack port beside the audio 16 , then if I delete the audio 16 vcv rack crash

The audio modules jam up Rack until the audio server comes by to pick up the sound they’ve buffered, so having more than one probably has them stepping on each other’s toes (thus the xrun.) Come to think of it, the JACK Audio module does that too. May have to fix that or 0.6.2.

1 Like

@skrylar thanks for your efforts! I really want to try this out… windows 10 user here… Anyway, I can’t get this thing to load… unzipped the file and put it in my plug-ins folder… Do I have to manually compile it or something? (not sure what that is but I’ve been told this before). Hopefully I can get this up running! thx

1 Like

It has to be manually compiled and YMMV as there are no success reports for this module on Windows yet.

If you want to learn how to compile stuff then read here:

https://vcvrack.com/manual/Building.html#building-rack-plugins

@modlfo has a tutorial for Windows on how to set up your dev environment and build Rack:

2 Likes

I m getting wrong pitch even when the sample rate match at 48000hz