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 ;
        units:name   "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, name, 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

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

Property units:conversion

A conversion from this unit to another.
OWL TypeObject Property
Domainunits:Unit
Rangeunits:Conversion

Property units:factor

The factor to multiple the source value by in order to convert to the target unit.
OWL TypeDatatype Property
Domainunits:Conversion

Property units:name

A display name for the unit (e.g. decibels).
OWL TypeDatatype Property
Domainunits:Unit
Rangexsd:string

Property units:prefixConversion

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

The target unit this conversion converts to.
OWL TypeObject Property
Domainunits:Conversion
Rangeunits:Unit

Property units:unit

Relates a port to the unit of its data
OWL TypeObject Property
Domainlv2:Port
Rangeunits:Unit

Instance units:bar

Instance units:beat

Instance units:bpm

Instance units:cent

Instance units:cm

Instance units:coef

Instance units:db

Instance units:degree

Instance units:frame

Typeunits:Unit
units:name audio frame
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

Typeunits:Unit
units:name MIDI note
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.6 (2012-04-17)
  • Add header of URI defines.
  • Add unit for audio frames.
  • Merge with unified LV2 package.
Version 5.4 (2011-11-21)
  • Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
  • Update packaging.
  • Make units.ttl a valid OWL 2 DL ontology.
  • Improve documentation.
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)
  • Initial release.
  • Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
  • Improve documentation.
  • Update packaging.