This is a vocabulary for units typically used for control values in audio processing.

For example, to say that a gain control is in decibels:

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

eg:plugin lv2:port [
    a            lv2:ControlPort , lv2:InputPort ;
    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:ControlPort , lv2:InputPort ;
    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 convert between units where possible. The units defined in this extension include conversion definitions where it makes sense to do so.

Index

ClassesPropertiesInstances

Classes

Conversion

Class
LabelConversion
In domain offactor
to
In range ofconversion
prefixConversion

A conversion from one unit to another.

Restriction on to
owl:cardinality 1
A conversion MUST have exactly 1 units:to property.

Unit

Class
LabelUnit
In domain ofconversion
prefixConversion
render
symbol
In range ofto
unit

A unit for a control value.

Properties

conversion

Property
Labelconversion
DomainUnit
RangeConversion
TypeObject Property

A conversion from this unit to another.

factor

Property
Labelconversion factor
DomainConversion
TypeDatatype Property

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

prefixConversion

Property
Labelprefix conversion
Sub-property ofconversion
DomainUnit
RangeConversion
TypeObject Property

A conversion from this unit to another with the same base but a different prefix.

render

Property
Labelunit format string
DomainUnit
Rangexsd:string
TypeDatatype Property

A printf format string for rendering a value (e.g., "%f dB").

symbol

Property
Labelunit symbol
DomainUnit
Rangexsd:string
TypeDatatype Property

The abbreviated symbol for this unit (e.g., "dB").

to

Property
Labelconversion target
DomainConversion
RangeUnit
TypeObject Property

The target unit this conversion converts to.

unit

Property
Labelunit
RangeUnit
TypeObject Property

The unit used by the value of a port or parameter.

Instances

bar

Instance
Labelbars
TypeUnit
render %f bars
symbol bars

Musical bars or measures.

beat

Instance
Labelbeats
TypeUnit
render %f beats
symbol beats

Musical beats.

bpm

Instance
Labelbeats per minute
TypeUnit
prefixConversion
factor 0.0166666666
to hz
render %f BPM
symbol BPM

Beats Per Minute (BPM), the standard unit for musical tempo.

cent

Instance
Labelcents
TypeUnit
conversion
factor 0.01
to semitone12TET
render %f ct
symbol ct

Cents (hundredths of semitones).

cm

Instance
Labelcentimetres
TypeUnit
conversion
factor 0.3937
to inch
prefixConversion
factor 0.01
to m
prefixConversion
factor 10
to mm
prefixConversion
factor 0.00001
to km
render %f cm
symbol cm

Centimetres (hundredths of metres).

coef

Instance
Labelcoefficient
TypeUnit
conversion
factor 100
to pc
render * %f
symbol

A scale coefficient where 1 is unity, or 100 percent.

db

Instance
Labeldecibels
TypeUnit
render %f dB
symbol dB

Decibels, a logarithmic relative unit where 0 is unity.

degree

Instance
Labeldegrees
TypeUnit
render %f deg
symbol deg

An angle where 360 degrees is one full rotation.

frame

Instance
Labelaudio frames
TypeUnit
render %f frames
symbol frames

Audio frames or samples.

hz

Instance
Labelhertz
TypeUnit
prefixConversion
factor 0.001
to khz
prefixConversion
factor 0.000001
to mhz
render %f Hz
symbol Hz

Hertz, or inverse seconds, the SI derived unit for frequency.

inch

Instance
Labelinches
TypeUnit
conversion
factor 0.0254
to m
render %f"
symbol in

An inch, defined as exactly 0.0254 metres.

khz

Instance
Labelkilohertz
TypeUnit
prefixConversion
factor 1000
to hz
prefixConversion
factor 0.001
to mhz
render %f kHz
symbol kHz

Kilohertz (thousands of Hertz).

km

Instance
Labelkilometres
TypeUnit
conversion
factor 0.62138818
to mile
prefixConversion
factor 1000
to m
prefixConversion
factor 100000
to cm
prefixConversion
factor 1000000
to mm
render %f km
symbol km

Kilometres (thousands of metres).

m

Instance
Labelmetres
TypeUnit
conversion
factor 39.37
to inch
prefixConversion
factor 100
to cm
prefixConversion
factor 1000
to mm
prefixConversion
factor 0.001
to km
render %f m
symbol m

Metres, the SI base unit for length.

mhz

Instance
Labelmegahertz
TypeUnit
prefixConversion
factor 1000000
to hz
prefixConversion
factor 0.001
to khz
render %f MHz
symbol MHz

Megahertz (millions of Hertz).

midiNote

Instance
LabelMIDI note
TypeUnit
render MIDI note %d
symbol note

A MIDI note number.

mile

Instance
Labelmiles
TypeUnit
conversion
factor 1609.344
to m
render %f mi
symbol mi

A mile, defined as exactly 1609.344 metres.

min

Instance
Labelminutes
TypeUnit
conversion
factor 60.0
to s
render %f mins
symbol min

Minutes (60s of seconds and 60ths of an hour).

mm

Instance
Labelmillimetres
TypeUnit
conversion
factor 0.03937
to inch
prefixConversion
factor 0.001
to m
prefixConversion
factor 0.1
to cm
prefixConversion
factor 0.000001
to km
render %f mm
symbol mm

Millimetres (thousandths of metres).

ms

Instance
Labelmilliseconds
TypeUnit
prefixConversion
factor 0.001
to s
render %f ms
symbol ms

Milliseconds (thousandths of seconds).

oct

Instance
Labeloctaves
TypeUnit
conversion
factor 12.0
to semitone12TET
render %f octaves
symbol oct

Octaves, relative musical pitch where +1 octave doubles the frequency.

pc

Instance
Labelpercent
TypeUnit
conversion
factor 0.01
to coef
render %f%%
symbol %

Percentage, a ratio as a fraction of 100.

s

Instance
Labelseconds
TypeUnit
conversion
factor 0.0166666666
to min
prefixConversion
factor 1000
to ms
render %f s
symbol s

Seconds, the SI base unit for time.

semitone12TET

Instance
Labelsemitones
TypeUnit
conversion
factor 0.083333333
to oct
render %f semi
symbol semi

A semitone in the 12-tone equal temperament scale.