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 (db)
@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 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
Conversion
ClassLabel | Conversion |
---|---|
In domain of | factor |
to | |
In range of | conversion |
prefixConversion |
- Restriction on to
- owl:cardinality 1
A conversion MUST have exactly 1 units:to property.
Unit
ClassLabel | Unit |
---|---|
In domain of | conversion |
prefixConversion | |
render | |
symbol | |
In range of | to |
unit |
A unit for LV2 port data
Properties
conversion
PropertyLabel | conversion |
---|---|
Domain | Unit |
Range | Conversion |
Type | Object Property |
A conversion from this unit to another.
factor
PropertyLabel | conversion factor |
---|---|
Domain | Conversion |
Type | Datatype Property |
The factor to multiply the source value by in order to convert to the target unit.
prefixConversion
PropertyLabel | prefix conversion |
---|---|
Sub-property of | conversion |
Domain | Unit |
Range | Conversion |
Type | Object Property |
A conversion from this unit to the same unit but with a different SI prefix (e.g. Hz to kHz).
render
PropertyLabel | unit format string |
---|---|
Domain | Unit |
Range | xsd:string |
Type | Datatype Property |
A printf format string for rendering a value (eg. "%f dB").
symbol
PropertyLabel | unit symbol |
---|---|
Domain | Unit |
Range | xsd:string |
Type | Datatype Property |
The abbreviated symbol for the unit (e.g. dB).
to
PropertyLabel | conversion target |
---|---|
Domain | Conversion |
Range | Unit |
Type | Object Property |
The target unit this conversion converts to.
Instances
cm
InstanceType | Unit | ||||
---|---|---|---|---|---|
conversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
render | %f cm | ||||
symbol | cm |
hz
Instancekhz
Instancekm
InstanceType | Unit | ||||
---|---|---|---|---|---|
conversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
render | %f km | ||||
symbol | km |
m
InstanceType | Unit | ||||
---|---|---|---|---|---|
conversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
render | %f m | ||||
symbol | m |
mhz
Instancemm
InstanceType | Unit | ||||
---|---|---|---|---|---|
conversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
prefixConversion |
| ||||
render | %f mm | ||||
symbol | mm |
s
InstanceHistory
- Version 5.12 (2019-02-03)
- Fix outdated port description in documentation.
- Remove overly restrictive domain from units:unit.
- Version 5.10 (2015-04-07)
- Fix non-existent port type in examples.
- Add lv2:Parameter to domain of units:unit.
- 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 5.4 (2011-11-21)
- Make units.ttl a valid OWL 2 DL ontology.
- 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 5.2 (2010-10-05)
- Add build system (for installation).
- Convert documentation to HTML and use lv2:documentation.
- Version 5.0 (2010-10-05)
- Update packaging.
- Improve documentation.
- Initial release.
- Define used but undefined resources (units:name, units:render, units:symbol, units:Conversion, units:conversion, units:prefixConversion, units:to, and units:factor).
A conversion from one unit to another.