LV2 Units extension

URI:
http://lv2plug.in/ns/extensions/units
Revision:
5 (2009-11-10)
Maintainer(s):
Steve Harris
Dave Robillard
Namespaces:
doaphttp://usefulinc.com/ns/doap#
lv2http://lv2plug.in/ns/lv2core#
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
rdfshttp://www.w3.org/2000/01/rdf-schema#
unitshttp://lv2plug.in/ns/extensions/units#

About this Document

This document describes "LV2 Units extension" (http://lv2plug.in/ns/extensions/units), an LV2 related specification. Comments are welcome, please direct discussion to devel@lists.lv2plug.in.

See also:

Contents

  1. Description
  2. Index
  3. Documentation
  4. References

1. Description

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

For example, to say that the port use the gain unit defined as units:db (decibels):
@prefix : <http://lv2plug.in/ns/extensions/units#> .

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


Using the same form, plugins may also specify one-off units inline, to give better display hints to hosts:
lv2:port [
    a            lv2:ControlRateInputPort ;
    lv2:datatype lv2:Float ;
    lv2:index    0 ;
    lv2:symbol   "frob" ;
    lv2:name     "frob level" ;
    units:unit [
        a            units:NonSIUnit ;
        units:name   "frobnication" ;
        units:symbol "fr" ;
        units:render "%f f"
    ]
]
Units are defined by a number of properties:

units:name
A display name for the unit (eg. decibels)
units:symbol
The abbreviated symbol for the unit (eg. dB)
units:render
A printf(3) string to be used to render the numerical value (eg. "%f dB")
units:conversion
Defines a conversion into another unit, commonly the SI unit for the unit class (eg. units:conversion [ units:to units:m ; units:factor 1000 ]). conversions are expressed as either factors (multiplicand for the conversion) or offsets (addend for the conversion).

2. Index

Classes
Unit,
Properties
unit,
Instances
bar, beat, bpm, cent, cm, coef, db, degree, hz, inch, khz, km, m, mhz, midiNote, mile, min, mm, ms, oct, pc, s, semitone12TET,

3. Reference

Class units:Unit

A unit for LV2 port data
In range of
units:unit

Property units:unit

Relates a port to the unit of its data
Domain
lv2:Port
Range
units: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:hz

Instance units:inch

Instance units:khz

Instance units:km

Instance units:m

Instance units:mhz

Instance units:midiNote

Instance units:mile

Instance units:min

Instance units:mm

Instance units:ms

Instance units:oct

Instance units:pc

Instance units:s

Instance units:semitone12TET

4. References

IETF RFC 2119
RFC 2119: Key words for use in RFCs to Indicate Requirement Levels . Internet Engineering Task Force, 1997.


Automatically generated from units.ttl by lv2specgen at 2009-11-12 01:12 UTC

This document is content-negotiated. If you request it with Accept: application/x-turtle you will get the description in Turtle. Also supported: application/rdf+xml, application/json, text/plain