LV2 Plugin Control Units in Ardour

LV2 has had a “units” extension since the beginning, which allows plugins to specify units like Hz or dB for their controls. To date this information has not been used very widely by hosts, so I’ve done some work in Ardour to use this information for better UI generation and intelligent plugin control.

Units can specify a format string which describes how to print a value in that unit. This is now used to draw the text on control sliders:

An Ardour control dialog for an LV2 plugin.

An Ardour control dialog for an LV2 plugin.

The same controls are used in automation lane headers. If the control is a note number, then right-clicking will present a menu with an option to pop up a note selector dialog where the value can be chosen on a piano keyboard:

The select note menu on a note number port.

The select note menu on a note number port.

The Ardour note selector dialog.

The Ardour note selector dialog.

Similarly, numeric frequency controls have a context menu which can set the value to a specific number of beats in the current tempo, if the frequency range is low:

Setting a low frequency port in beats.

Setting a low frequency port in beats.

If the frequency range is high, then numeric frequency ports can be set with the note selector dialog just like note numbers:

Setting an audible frequency port by note.

Setting an audible frequency port by note.

In the future, it would be nice to have this idea applied more extensively so automation lanes can “pretend” a port is in the desired unit, for example allowing the user to automate an LFO frequency in beats, or a cutoff frequency in notes. Until then, being able to at least easily set controls to musically sensible values makes many production tasks easier, particularly in electronic music where it’s often desirable to set plugin controls based on key or tempo.

Up next is setting time ports based on tempo, for cases like setting delay lines to a certain number of beats, but many plugins are missing the unit information required to make this possible. Hopefully better and more widespread host support will provide some incentive for plugin authors to specify the units of their ports. It is very simple to do so, see the LV2 units documentation for examples.

(Flattr this)

Jalv 1.4.6

Jalv 1.4.6 is out. Jalv is a simple but fully featured LV2 host for Jack. It runs LV2 plugins and exposes their ports as Jack ports, essentially making any LV2 plugin function as a Jack application.

Changes:

  • Show newly saved presets in the preset menu.
  • Generate Qt moc nonsense at build time for broader compatibility.
  • Update for latest LV2 Atom Object simplifications.
  • Set port pretty names via new Jack metadata API.
  • Add support for data-access extension (based on patch by Filipe Coelho).
  • Support new UI show/hide interface in console version.
  • Add option to print control output changes to stdout.
  • Support saving the same preset several times.
  • Update man pages and console jalv help output for new options.
  • Upgrade to waf 1.7.16.

(Flattr this)

Lilv 0.20.0

Lilv 0.20.0 is out. Lilv is a C library to make the use of LV2 plugins as simple as possible for applications.

Changes:

  • Don’t load files multiple times if they are listed as rdfs:seeAlso for several plugins.
  • Call lv2_lib_descriptor separately for different bundle paths (fix loading several dynamic plugins like Ingen at once).
  • Tolerate calling lilv_node_as_uri or lilv_node_as_blank on NULL.
  • Add convenient lilv_new_file_uri for creating file URIs.
  • Fix use of lv2info -m and -p options to write plugin data (useful for porting plugins bridges with NASPRO).
  • Fix issues with lilv_plugin_get_author_name and friends (thanks Filipe Coelho).
  • Improved/working lv2_apply.py to apply plugin to a .wav (thanks Joe Button).
  • Add lilv_world_unload_bundle() and lilv_world_unload_resource().
  • Fix several minor memory leaks.
  • Improve test coverage.
  • Upgrade to waf 1.7.16.

(Flattr this)

Patchage 1.0.0

After a long hiatus, a new release of Patchage is finally out. This version uses a new canvas library, Ganv, and includes many fixes and other improvements.

Download Patchage 1.0.0 (sig)

Changes:

  • Allow removing connections by selecting their handle and pressing delete.
  • Remove Raul dependency.
  • Switch from FlowCanvas to Ganv (much improved looks and performance).
  • Remove LASH support and simplify UI.
  • Fix font configuration on OSX.
  • Use Mac style key bindings on OSX.
  • Integrate with Mac menu bar on OSX.
  • Support for DOT export for rendering with GraphViz.
  • Use XDG_CONFIG_HOME instead of ~/.patchagerc.
  • Make port colours configurable.
  • Support port pretty names via new Jack metadata API.

Enjoy.

(Flattr this)

Pretty names in Patchage via Jack Metadata

The much-awaited (by me, at least) Jack metadata API has arrived. This will allow us to easily achieve many new things with minimal/nonexistent API friction. One of the simplest and most obvious is pretty names for Jack clients and ports, so I’ve chosen this as the first thing to tackle (as part of a drive to get Patchage polished up for a much overdue release).

Unfortunately, as far as I can tell, there is a chicken & egg scenario here since nothing is setting this metadata yet. So, I’ve made Jalv and Ingen both set pretty names for their ports. In the case of Jalv, the “pretty name” is the label given in the plugin data (distinct from the LV2 “symbol” which is restricted and unique).

Firing up Jalv with the Tal Dub III plugin (LV2 port courtesy KXStudio), we can see the port symbols, which are a bit awkward for end users with their prefixes and underscores. Conflating strong identifiers with human-readable labels is a serious design error I learned of the hard way, but that’s a discussion for another time…

Enable “Human Names” in the view menu, or press C-h, and voilĂ , we see the pretty names set in Jack metadata (if present) instead.

Tal Dub III in Jalv as shown by Patchage with human names off.

Tal Dub III in Jalv as shown by Patchage with human names enabled.

The metadata API is very simple to use for ports, though there seems to be a hole in the API which makes it difficult to get the UUID for your client to set metadata (I want a simple jack_client_uuid, like jack_port_uuid, but it seems you have to get a string UUID and parse it to a jack_uuid_t, clunky enough that I just didn’t bother). In any case, I am happy to see a low-friction mechanism in Jack which apps can use to share metadata towards making a better user experience.

It will be interesting to see what sort of information proves useful and becomes established/standard. For those of us of a mad scientist bent who live in a nest of patch cables, a CV tag seems like another obvious simple step, but for everyone, a big step is finally having meaningful port grouping and channel roles. I have always liked to joke that Jack (like LADSPA) doesn’t really even do stereo, but with metadata, we can mark up stereo, 5.1, Ambisonics, etc., and other clients will be able to make sense of the channel assignments without resorting to dirty kludges based on guessing from names. All without changing the ABI one bit. Good stuff.

(Flattr this)

Labeled MIDI controller values in Ardour

A while ago, I implemented MIDI patch, controller, and note name support for Ardour.

There was one thing missing from that work: labelled controller values. This is particularly useful for controllers that don’t represent a continuous numeric parameter, but instead have a set of specific values. For example, the Moog Minitaur supports CC #86 to control the LFO sync clock division, but it’s not obvious how a 0-127 number maps to a clock division. From the manual, we can learn that 61-67 is “1/4″, 68-73 is “1/8 Dot”, and so on.

Translate that information into standard MIDINameDocument format, and a few hours of hacking later… voila, Ardour displays something sensible when hovering over an automation point instead of a meaningless number.

Ardour displaying a labelled MIDI controller value when hovering over an automation point.

If you want to add support for your MIDI device or program, my .midnam documents for the Moog Minitaur, MF-104M, and MF-108M, included in the Ardour distribution all contain examples of labelled values. It should be relatively obvious how to copy and modify these for other devices.

(Flattr this)