Description

This vocabulary defines a number of units for use in audio processing.

For example, to say that a gain port's value is in decibels (units:db)

@prefix units: <http://lv2plug.in/ns/extensions/units#> .
@prefix eg:    <http://example.org/> .

eg:plugin lv2:port [
    a            lv2:ControlRateInputPort ;
    lv2:datatype lv2:Float ;
    lv2:index    0 ;
    lv2:symbol   "gain" ;
    lv2:name     "gain" ;
    units:unit   units:db
] .

Using the same form, plugins may also specify one-off units inline, to give better display hints to hosts:

eg:plugin lv2:port [
    a            lv2:ControlRateInputPort ;
    lv2:datatype lv2:Float ;
    lv2:index    0 ;
    lv2:symbol   "frob" ;
    lv2:name     "frob level" ;
    units:unit [
        a            units:Unit ;
        rdfs:label   "frobnication" ;
        units:symbol "fr" ;
        units:render "%f f"
    ]
] .

It is also possible to define conversions between various units, which makes it possible for hosts to automatically and generically convert from a given unit to a desired unit. The units defined in this extension include conversion definitions where it makes sense to do so.

Index

Classes
Properties
conversion, factor, prefixConversion, render, symbol, to, unit
Instances
bar, beat, bpm, cent, cm, coef, db, degree, frame, hz, inch, khz, km, m, mhz, midiNote, mile, min, mm, ms, oct, pc, s, semitone12TET

Reference

Class units:Conversion

Conversion

A conversion from one unit to another.

Restriction on units:to
owl:cardinality 1
A conversion MUST have exactly 1 units:to property.
In domain ofunits:to
units:factor
In range ofunits:conversion
units:prefixConversion

Class units:Unit

Unit

A unit for LV2 port data

In domain ofunits:prefixConversion
units:symbol
units:conversion
units:render
In range ofunits:unit
units:to

Property units:conversion

conversion

A conversion from this unit to another.

OWL TypeObject Property
Domainunits:Unit
Rangeunits:Conversion

Property units:factor

conversion factor

The factor to multiple the source value by in order to convert to the target unit.

OWL TypeDatatype Property
Domainunits:Conversion

Property units:prefixConversion

prefix conversion

A conversion from this unit to the same unit but with a different SI prefix (e.g. Hz to kHz).

OWL TypeObject Property
Sub-property ofunits:conversion
Domainunits:Unit
Rangeunits:Conversion

Property units:render

A printf format string for rendering a value (eg. "%f dB").

OWL TypeDatatype Property
Domainunits:Unit
Rangexsd:string

Property units:symbol

The abbreviated symbol for the unit (e.g. dB).

OWL TypeDatatype Property
Domainunits:Unit
Rangexsd:string

Property units:to

conversion target

The target unit this conversion converts to.

OWL TypeObject Property
Domainunits:Conversion
Rangeunits:Unit

Property units:unit

unit

Relates a port to the unit of its data

OWL TypeObject Property
Domainlv2:Port
Rangeunits:Unit

Instance units:bar

bars
Typeunits:Unit
units:symbol bars
units:render %f bars

Instance units:beat

beats
Typeunits:Unit
units:render %f beats
units:symbol beats

Instance units:bpm

Instance units:cent

Instance units:cm

Instance units:coef

Instance units:db

decibels
Typeunits:Unit
units:symbol dB
units:render %f dB

Instance units:degree

degrees
Typeunits:Unit
units:render %f deg
units:symbol deg

Instance units:frame

audio frames
Typeunits:Unit
units:render %f frames
units:symbol frames

Instance units:hz

Instance units:inch

Instance units:khz

Instance units:km

Instance units:m

Instance units:mhz

Instance units:midiNote

MIDI note
Typeunits:Unit
units:symbol note
units:render MIDI note %d

Instance units:mile

Instance units:min

Instance units:mm

Instance units:ms

Instance units:oct

Instance units:pc

Instance units:s

Instance units:semitone12TET

History

Version 2.18 (2014-08-08)
  • Fix identifier typos in documentation.
  • Add show interface so UIs can gracefully degrade to separate windows if hosts can not use their widget directly.
Version 2.16 (2014-01-04)
  • Fix LV2_UI_INVALID_PORT_INDEX identifier in documentation.
Version 1.6 (2013-05-26)
  • Fix crash in forge.h when pushing atoms to a full buffer.
Version 2.14 (2013-03-18)
  • Add idle interface so native UIs and foreign toolkits can drive their event loops.
  • Add ui:updateRate property.
Version 1.4 (2013-01-27)
  • Fix lv2_atom_sequence_end().
  • Remove atom:stringType in favour of owl:onDatatype so generic tools can understand and validate atom literals.
  • Improve atom documentation.
Version 2.0 (2013-01-16)
  • Add state:loadDefaultState feature so plugins can have their default state loaded without hard-coding default state as a special case.
Version 1.10 (2013-01-13)
  • Fix incorrect return type in lv2_event_get().
Version 2.0 (2013-01-10)
  • Make patch:Set a compact message for setting one property.
  • Add patch:readable and patch:writable for describing available properties.
Version 2.0 (2013-01-08)
  • Add logger convenience API.
Version 1.2 (2012-12-21)
  • Fix typo in bufsz:sequenceSize label.
Version 2.12 (2012-12-01)
  • Fix incorrect linker flag in ui:makeSONameResident documentation.
Version 5.8 (2012-10-14)
  • Remove units:name in favour of rdfs:label.
  • Use consistent label style.
Version 5.6 (2012-04-17)
  • Add unit for audio frames.
  • Add header of URI defines.
  • Merge with unified LV2 package.
Version 1.0 (2011-11-21)
  • Initial release.
Version 1.4 (2011-11-21)
  • Update packaging.
  • Deprecate uri-map in favour of urid.
Version 5.4 (2011-11-21)
  • Improve documentation.
  • Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
  • Make units.ttl a valid OWL 2 DL ontology.
  • Update packaging.
Version 2.4 (2011-11-21)
  • Install header to URI-based system path.
  • Add Qt4 and X11 widget types.
  • Make ui.ttl a valid OWL 2 DL ontology.
  • Add pkg-config file.
  • Deprecate ui:makeSONameResident.
Version 2.2 (2011-11-21)
  • Update packaging.
  • Improve documentation.
Version 1.4 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.4 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.4 (2011-11-21)
  • Update packaging.
Version 1.4 (2011-11-21)
  • Improve documentation.
  • Update packaging.
Version 1.2 (2011-05-26)
  • Mark up documentation in HTML using lv2:documentation.
  • Add build system (for installation).
Version 2.2 (2011-05-26)
  • Convert documentation to HTML and use lv2:documentation.
  • Add build system (for installation).
  • Use lv2:Specification to be discovered as an extension.
Version 1.2 (2011-05-26)
  • Switch to ISC license.
  • Add build system for installation.
Version 1.2 (2011-05-26)
  • Switch to ISC license.
  • Add build system for installation.
Version 1.2 (2011-05-26)
  • Use lv2:Specification to be discovered as an extension.
  • Add build system (for installation).
  • Convert documentation to HTML and use lv2:documentation.
Version 1.2 (2011-05-26)
  • Switch to ISC license.
  • Add build system for installation.
Version 1.0 (2010-11-24)
  • Initial release.
Version 1.0 (2010-10-18)
  • Initial release.
Version 2.0 (2010-10-06)
  • Initial release.
Version 5.2 (2010-10-05)
  • Add build system (for installation).
  • Convert documentation to HTML and use lv2:documentation.
Version 5.0 (2010-10-05)
  • Initial release.
  • Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
  • Update packaging.
  • Improve documentation.
Version 2.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.
Version 1.0 (2010-10-04)
  • Initial release.