LV2 Units
type: Ontology
comment: Units for LV2 values.

Unit
type: Class
comment: A unit for a control value.

unit
type: Property
type: ObjectProperty
range: Unit
comment: The unit used by the value of a port or parameter.

unit format string
type: Property
type: DatatypeProperty
domain: Unit
range: string
comment: A printf format string for rendering a value (e.g., "%f dB").

unit symbol
type: Property
type: DatatypeProperty
domain: Unit
range: string
comment: The abbreviated symbol for this unit (e.g., "dB").

Conversion
type: Class
subclass of: Restriction
  on property: conversion target
  cardinality: 1
  comment: A conversion MUST have exactly 1 units:to property.
comment: A conversion from one unit to another.

conversion
type: Property
type: ObjectProperty
domain: Unit
range: Conversion
comment: A conversion from this unit to another.

prefix conversion
type: Property
type: ObjectProperty
sub property of: conversion
domain: Unit
range: Conversion
comment: A conversion from this unit to another with the same base but a different prefix.

conversion target
type: Property
type: ObjectProperty
domain: Conversion
range: Unit
comment: The target unit this conversion converts to.

conversion factor
type: Property
type: DatatypeProperty
domain: Conversion
comment: The factor to multiply the source value by in order to convert to the target unit.

seconds
type: Unit
conversion:
  conversion factor: 0.0166666666
  conversion target: minutes
comment: Seconds, the SI base unit for time.
prefix conversion:
  conversion factor: 1000
  conversion target: milliseconds
unit format string: %f s
unit symbol: s

milliseconds
type: Unit
comment: Milliseconds (thousandths of seconds).
prefix conversion:
  conversion factor: 0.001
  conversion target: seconds
unit format string: %f ms
unit symbol: ms

minutes
type: Unit
conversion:
  conversion factor: 60.0
  conversion target: seconds
comment: Minutes (60s of seconds and 60ths of an hour).
unit format string: %f mins
unit symbol: min

bars
type: Unit
comment: Musical bars or measures.
unit format string: %f bars
unit symbol: bars

beats
type: Unit
comment: Musical beats.
unit format string: %f beats
unit symbol: beats

audio frames
type: Unit
comment: Audio frames or samples.
unit format string: %f frames
unit symbol: frames

metres
type: Unit
conversion:
  conversion factor: 39.37
  conversion target: inches
comment: Metres, the SI base unit for length.
prefix conversion:
  conversion factor: 100
  conversion target: centimetres
prefix conversion:
  conversion factor: 1000
  conversion target: millimetres
prefix conversion:
  conversion factor: 0.001
  conversion target: kilometres
unit format string: %f m
unit symbol: m

centimetres
type: Unit
conversion:
  conversion factor: 0.3937
  conversion target: inches
comment: Centimetres (hundredths of metres).
prefix conversion:
  conversion factor: 0.01
  conversion target: metres
prefix conversion:
  conversion factor: 10
  conversion target: millimetres
prefix conversion:
  conversion factor: 0.00001
  conversion target: kilometres
unit format string: %f cm
unit symbol: cm

millimetres
type: Unit
conversion:
  conversion factor: 0.03937
  conversion target: inches
comment: Millimetres (thousandths of metres).
prefix conversion:
  conversion factor: 0.001
  conversion target: metres
prefix conversion:
  conversion factor: 0.1
  conversion target: centimetres
prefix conversion:
  conversion factor: 0.000001
  conversion target: kilometres
unit format string: %f mm
unit symbol: mm

kilometres
type: Unit
conversion:
  conversion factor: 0.62138818
  conversion target: miles
comment: Kilometres (thousands of metres).
prefix conversion:
  conversion factor: 1000
  conversion target: metres
prefix conversion:
  conversion factor: 100000
  conversion target: centimetres
prefix conversion:
  conversion factor: 1000000
  conversion target: millimetres
unit format string: %f km
unit symbol: km

inches
type: Unit
conversion:
  conversion factor: 0.0254
  conversion target: metres
comment: An inch, defined as exactly 0.0254 metres.
unit format string: %f"
unit symbol: in

miles
type: Unit
conversion:
  conversion factor: 1609.344
  conversion target: metres
comment: A mile, defined as exactly 1609.344 metres.
unit format string: %f mi
unit symbol: mi

decibels
type: Unit
comment: Decibels, a logarithmic relative unit where 0 is unity.
unit format string: %f dB
unit symbol: dB

percent
type: Unit
conversion:
  conversion factor: 0.01
  conversion target: coefficient
comment: Percentage, a ratio as a fraction of 100.
unit format string: %f%%
unit symbol: %

coefficient
type: Unit
conversion:
  conversion factor: 100
  conversion target: percent
comment: A scale coefficient where 1 is unity, or 100 percent.
unit format string: * %f

hertz
type: Unit
comment: Hertz, or inverse seconds, the SI derived unit for frequency.
prefix conversion:
  conversion factor: 0.001
  conversion target: kilohertz
prefix conversion:
  conversion factor: 0.000001
  conversion target: megahertz
unit format string: %f Hz
unit symbol: Hz

kilohertz
type: Unit
comment: Kilohertz (thousands of Hertz).
prefix conversion:
  conversion factor: 1000
  conversion target: hertz
prefix conversion:
  conversion factor: 0.001
  conversion target: megahertz
unit format string: %f kHz
unit symbol: kHz

megahertz
type: Unit
comment: Megahertz (millions of Hertz).
prefix conversion:
  conversion factor: 1000000
  conversion target: hertz
prefix conversion:
  conversion factor: 0.001
  conversion target: kilohertz
unit format string: %f MHz
unit symbol: MHz

beats per minute
type: Unit
comment: Beats Per Minute (BPM), the standard unit for musical tempo.
prefix conversion:
  conversion factor: 0.0166666666
  conversion target: hertz
unit format string: %f BPM
unit symbol: BPM

octaves
type: Unit
conversion:
  conversion factor: 12.0
  conversion target: semitones
comment: Octaves, relative musical pitch where +1 octave doubles the frequency.
unit format string: %f octaves
unit symbol: oct

cents
type: Unit
conversion:
  conversion factor: 0.01
  conversion target: semitones
comment: Cents (hundredths of semitones).
unit format string: %f ct
unit symbol: ct

semitones
type: Unit
conversion:
  conversion factor: 0.083333333
  conversion target: octaves
comment: A semitone in the 12-tone equal temperament scale.
unit format string: %f semi
unit symbol: semi

degrees
type: Unit
comment: An angle where 360 degrees is one full rotation.
unit format string: %f deg
unit symbol: deg

MIDI note
type: Unit
comment: A MIDI note number.
unit format string: MIDI note %d
unit symbol: note