Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JACK MIDI/OSC/CV backend #30

Closed
mxmilkiib opened this issue Oct 30, 2019 · 12 comments
Closed

JACK MIDI/OSC/CV backend #30

mxmilkiib opened this issue Oct 30, 2019 · 12 comments
Assignees
Labels
new backend New backend requests
Projects
Milestone

Comments

@mxmilkiib
Copy link

Both JACK and LV2 format have CV signal mechanisms that allow for finer automation than MIDI can support.

carla-git recently introduced internal CV ports, added a CV search filter in the plugin dialog, and will in future expose parameters as CV ports, and zrythm-git has just received CV functionality.

CV support in MIDIMonster would be very handy.

@cbdevnet
Copy link
Owner

Hi, that sounds very interesting indeed! Could you point me to some documentation on the subject? :)

@cbdevnet cbdevnet added the new backend New backend requests label Oct 30, 2019
@mxmilkiib
Copy link
Author

mxmilkiib commented Oct 31, 2019

In the LV2 spec:

JACK client/LV2 host commits:

Conversion:

  • mod-spi2jack - JACK client for converting SPI to a JACK control-voltage stream and vice-versa.

Plugins with support:

If you're on IRC, I'd highly recommend #lad for audio and related dev chat.

@Spacelord09 Spacelord09 added this to Incoming in Backends via automation Nov 2, 2019
@cbdevnet
Copy link
Owner

cbdevnet commented Nov 2, 2019

I'll just do a braindump here for further reference, anyone is welcome and encouraged to comment corrections :)

So from my reading of the linked specs and then some, the LV2 side would concern only communication between an LV2 plugin host (such as Carla) and the actual plugin.

Since I don't think the MIDIMonster should become a full-blown LV2 plugin host (I'd rather keep with only dealing with control data, not audio, much less realtime audio), we're concerned with how to connect the MIDIMonster to plugin hosts to supply control data.

Now I have not actually used any of these projects (except for a limited JACK setup), as I'm mostly coming from the lighting & show control side of things, but from reading some of the Carla code, it has native support for OSC control input, which is already supported by the MIDIMonster, as well as MIDI control input via JACK.

There is also somewhat of a non-standard to transmit OSC via JACK midiports, which ingen seems to support but Carla does not. Instead Carla uses JACK ports to transfer CV data (the format of which I don't yet fully understand, but from reading a note on the JACK homepage it might actually just be DC offset samples at audio rate which would fit with my understanding of old hardware synthesizers as the origin of the CV mechanism). This mechanism might also work for ingen (which also connects to JACK for CV inputs of some to-be-determined form).

A generic plugin adapting MIDIMonster data to JACK ports (MIDI, MIDI/OSC, CV) would probably be the best interface for these use cases.

@mxmilkiib
Copy link
Author

mxmilkiib commented Nov 2, 2019

See also this thread in relation to CV and the synthpod host.

Also, a wee note that there have been newer alternative JACK+OSC developments.

@cbdevnet
Copy link
Owner

cbdevnet commented Nov 2, 2019

So from reading a lot of ingen code, it seems the CV data transported via JACK audio ports consists of float32 samples, what I'm currently missing is some kind of upper/lower limit for the values, or any info on how they are interpreted by the plugins themselves.

@cbdevnet
Copy link
Owner

cbdevnet commented Nov 2, 2019

At least on the LV2 plugin side, this seems to be set by the Host as properties on the incoming port (?). So the next idea is to figure out what these are usually set to by hosts (or to just make it configurable in the backend).

@mxmilkb: Are these limits configurable in the UI of Carla or ingen?

@cbdevnet cbdevnet self-assigned this Nov 2, 2019
@cbdevnet cbdevnet changed the title JACK/LV2 CV? JACK MIDI/OSC/CV backend Nov 2, 2019
@mxmilkiib
Copy link
Author

It appears the various (older) plugins that I linked to above are -1 min to 1 max.

@falkTX noted in #jack earlier: "there is no predefined range. we usually just go with 1.0f = 1v".

I think that comment relates to the newer MOD CV plugins. I don't think those are openly available yet though(?). I guess they use the Eurorack/VCV convention of 0 to 10 for unipolar / -5 to 5 for bipolar. Awaiting confirmation on that.

@mxmilkiib
Copy link
Author

falkTX says there is no convention among the newer MOD CV plugins. They will be GPLd after getting free artwork.

@drobilla
Copy link

drobilla commented Nov 3, 2019

LV2 CV ports are just like control ports as far as values go, the plugin defines a minimum, maximum and default value.

There can also be units to describe what those values actually mean.

@cbdevnet
Copy link
Owner

cbdevnet commented Nov 3, 2019

Thanks for the feedback, so I gather the values are unitless (and dimensionless) until they arrive at the plugin itself.

I'll just make the range configurable in the backend instance configuration :)

@cbdevnet cbdevnet moved this from Incoming to Planned / Ready for development in Backends Nov 3, 2019
@cbdevnet cbdevnet moved this from Planned / Ready for development to In testing in Backends Nov 6, 2019
@cbdevnet
Copy link
Owner

cbdevnet commented Nov 6, 2019

I just pushed an implementation that seems to work for my test cases, though I have only tested with basic MIDI and CV transport yet. I may look into testing with a basic LV2 setup some time, but any feedback would be much appreciated :)

The backend should work both on Linux and OSX, documentation is available in the usual place.

I've left out OSC for the time being, as I didn't want to duplicate the parsing code from the OSC backend.

@cbdevnet
Copy link
Owner

cbdevnet commented Dec 5, 2019

Marking this issue closed, as the backend is implemented and seems to do its job, but further discussion is welcome :)

@cbdevnet cbdevnet closed this as completed Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new backend New backend requests
Projects
Backends
  
Done
Development

No branches or pull requests

3 participants