Contents

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

Documentation

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:factor
units:to
In range ofunits:prefixConversion
units:conversion

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:symbol beats
units:render %f 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:symbol deg
units:render %f deg

Instance units:frame

audio frames
Typeunits:Unit
units:symbol frames
units:render %f 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

Releases

Version 5.8 (2012-10-14)
  • Remove units:name in favour of rdfs:label.
  • Use consistent label style.
Version 5.6 (2012-04-17)
  • Merge with unified LV2 package.
  • Add header of URI defines.
  • Add unit for audio frames.
Version 5.4 (2011-11-21)
  • Update packaging.
  • 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.
Version 5.2 (2010-10-05)
  • Convert documentation to HTML and use lv2:documentation.
  • Add build system (for installation).
Version 5.0 (2010-10-05)
  • Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
  • Initial release.
  • Improve documentation.
  • Update packaging.