diff options
Diffstat (limited to 'lv2/lv2plug.in/ns/ext')
89 files changed, 0 insertions, 9195 deletions
diff --git a/lv2/lv2plug.in/ns/ext/atom/atom-test.c b/lv2/lv2plug.in/ns/ext/atom/atom-test.c deleted file mode 100644 index 3159156..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/atom-test.c +++ /dev/null @@ -1,397 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> - -#include "lv2/lv2plug.in/ns/ext/atom/forge.h" -#include "lv2/lv2plug.in/ns/ext/atom/util.h" - -char** uris = NULL; -size_t n_uris = 0; - -static char* -copy_string(const char* str) -{ - const size_t len = strlen(str); - char* dup = (char*)malloc(len + 1); - memcpy(dup, str, len + 1); - return dup; -} - -static LV2_URID -urid_map(LV2_URID_Map_Handle handle, const char* uri) -{ - for (size_t i = 0; i < n_uris; ++i) { - if (!strcmp(uris[i], uri)) { - return i + 1; - } - } - - uris = (char**)realloc(uris, ++n_uris * sizeof(char*)); - uris[n_uris - 1] = copy_string(uri); - return n_uris; -} - -static int -test_fail(const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - fprintf(stderr, "error: "); - vfprintf(stderr, fmt, args); - va_end(args); - return 1; -} - -int -main(void) -{ - LV2_URID_Map map = { NULL, urid_map }; - LV2_Atom_Forge forge; - lv2_atom_forge_init(&forge, &map); - - LV2_URID eg_Object = urid_map(NULL, "http://example.org/Object"); - LV2_URID eg_one = urid_map(NULL, "http://example.org/one"); - LV2_URID eg_two = urid_map(NULL, "http://example.org/two"); - LV2_URID eg_three = urid_map(NULL, "http://example.org/three"); - LV2_URID eg_four = urid_map(NULL, "http://example.org/four"); - LV2_URID eg_true = urid_map(NULL, "http://example.org/true"); - LV2_URID eg_false = urid_map(NULL, "http://example.org/false"); - LV2_URID eg_path = urid_map(NULL, "http://example.org/path"); - LV2_URID eg_uri = urid_map(NULL, "http://example.org/uri"); - LV2_URID eg_urid = urid_map(NULL, "http://example.org/urid"); - LV2_URID eg_string = urid_map(NULL, "http://example.org/string"); - LV2_URID eg_literal = urid_map(NULL, "http://example.org/literal"); - LV2_URID eg_tuple = urid_map(NULL, "http://example.org/tuple"); - LV2_URID eg_vector = urid_map(NULL, "http://example.org/vector"); - LV2_URID eg_vector2 = urid_map(NULL, "http://example.org/vector2"); - LV2_URID eg_seq = urid_map(NULL, "http://example.org/seq"); - -#define BUF_SIZE 1024 -#define NUM_PROPS 15 - - uint8_t buf[BUF_SIZE]; - lv2_atom_forge_set_buffer(&forge, buf, BUF_SIZE); - - LV2_Atom_Forge_Frame obj_frame; - LV2_Atom* obj = lv2_atom_forge_deref( - &forge, lv2_atom_forge_resource(&forge, &obj_frame, 0, eg_Object)); - - // eg_one = (Int)1 - lv2_atom_forge_property_head(&forge, eg_one, 0); - LV2_Atom_Int* one = (LV2_Atom_Int*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_int(&forge, 1)); - if (one->body != 1) { - return test_fail("%d != 1\n", one->body); - } - - // eg_two = (Long)2 - lv2_atom_forge_property_head(&forge, eg_two, 0); - LV2_Atom_Long* two = (LV2_Atom_Long*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_long(&forge, 2)); - if (two->body != 2) { - return test_fail("%ld != 2\n", two->body); - } - - // eg_three = (Float)3.0 - lv2_atom_forge_property_head(&forge, eg_three, 0); - LV2_Atom_Float* three = (LV2_Atom_Float*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_float(&forge, 3.0f)); - if (three->body != 3) { - return test_fail("%f != 3\n", three->body); - } - - // eg_four = (Double)4.0 - lv2_atom_forge_property_head(&forge, eg_four, 0); - LV2_Atom_Double* four = (LV2_Atom_Double*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_double(&forge, 4.0)); - if (four->body != 4) { - return test_fail("%ld != 4\n", four->body); - } - - // eg_true = (Bool)1 - lv2_atom_forge_property_head(&forge, eg_true, 0); - LV2_Atom_Bool* t = (LV2_Atom_Bool*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_bool(&forge, true)); - if (t->body != 1) { - return test_fail("%ld != 1 (true)\n", t->body); - } - - // eg_false = (Bool)0 - lv2_atom_forge_property_head(&forge, eg_false, 0); - LV2_Atom_Bool* f = (LV2_Atom_Bool*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_bool(&forge, false)); - if (f->body != 0) { - return test_fail("%ld != 0 (false)\n", f->body); - } - - // eg_path = (Path)"/foo/bar" - const char* pstr = "/foo/bar"; - const size_t pstr_len = strlen(pstr); - lv2_atom_forge_property_head(&forge, eg_path, 0); - LV2_Atom_String* path = (LV2_Atom_String*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_uri(&forge, pstr, pstr_len)); - char* pbody = (char*)LV2_ATOM_BODY(path); - if (strcmp(pbody, pstr)) { - return test_fail("%s != \"%s\"\n", pbody, pstr); - } - - // eg_uri = (URI)"http://example.org/value" - const char* ustr = "http://example.org/value"; - const size_t ustr_len = strlen(ustr); - lv2_atom_forge_property_head(&forge, eg_uri, 0); - LV2_Atom_String* uri = (LV2_Atom_String*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_uri(&forge, ustr, ustr_len)); - char* ubody = (char*)LV2_ATOM_BODY(uri); - if (strcmp(ubody, ustr)) { - return test_fail("%s != \"%s\"\n", ubody, ustr); - } - - // eg_urid = (URID)"http://example.org/value" - LV2_URID eg_value = urid_map(NULL, "http://example.org/value"); - lv2_atom_forge_property_head(&forge, eg_urid, 0); - LV2_Atom_URID* urid = (LV2_Atom_URID*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_urid(&forge, eg_value)); - if (urid->body != eg_value) { - return test_fail("%u != %u\n", urid->body, eg_value); - } - - // eg_string = (String)"hello" - lv2_atom_forge_property_head(&forge, eg_string, 0); - LV2_Atom_String* string = (LV2_Atom_String*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_string( - &forge, "hello", strlen("hello"))); - char* sbody = (char*)LV2_ATOM_BODY(string); - if (strcmp(sbody, "hello")) { - return test_fail("%s != \"hello\"\n", sbody); - } - - // eg_literal = (Literal)"hello"@fr - lv2_atom_forge_property_head(&forge, eg_literal, 0); - LV2_Atom_Literal* literal = (LV2_Atom_Literal*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_literal( - &forge, "bonjour", strlen("bonjour"), - 0, urid_map(NULL, "http://lexvo.org/id/term/fr"))); - char* lbody = (char*)LV2_ATOM_CONTENTS(LV2_Atom_Literal, literal); - if (strcmp(lbody, "bonjour")) { - return test_fail("%s != \"bonjour\"\n", lbody); - } - - // eg_tuple = "foo",true - lv2_atom_forge_property_head(&forge, eg_tuple, 0); - LV2_Atom_Forge_Frame tuple_frame; - LV2_Atom_Tuple* tuple = (LV2_Atom_Tuple*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_tuple(&forge, &tuple_frame)); - LV2_Atom_String* tup0 = (LV2_Atom_String*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_string( - &forge, "foo", strlen("foo"))); - LV2_Atom_Bool* tup1 = (LV2_Atom_Bool*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_bool(&forge, true)); - lv2_atom_forge_pop(&forge, &tuple_frame); - LV2_Atom* i = lv2_atom_tuple_begin(tuple); - if (lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), tuple->atom.size, i)) { - return test_fail("Tuple iterator is empty\n"); - } - LV2_Atom* tup0i = i; - if (!lv2_atom_equals((LV2_Atom*)tup0, tup0i)) { - return test_fail("Corrupt tuple element 0\n"); - } - i = lv2_atom_tuple_next(i); - if (lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), tuple->atom.size, i)) { - return test_fail("Premature end of tuple iterator\n"); - } - LV2_Atom* tup1i = i; - if (!lv2_atom_equals((LV2_Atom*)tup1, tup1i)) { - return test_fail("Corrupt tuple element 1\n"); - } - i = lv2_atom_tuple_next(i); - if (!lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), tuple->atom.size, i)) { - return test_fail("Tuple iter is not at end\n"); - } - - // eg_vector = (Vector<Int>)1,2,3,4 - lv2_atom_forge_property_head(&forge, eg_vector, 0); - int32_t elems[] = { 1, 2, 3, 4 }; - LV2_Atom_Vector* vector = (LV2_Atom_Vector*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_vector( - &forge, sizeof(int32_t), forge.Int, 4, elems)); - void* vec_body = LV2_ATOM_CONTENTS(LV2_Atom_Vector, vector); - if (memcmp(elems, vec_body, sizeof(elems))) { - return test_fail("Corrupt vector\n"); - } - - // eg_vector2 = (Vector<Int>)1,2,3,4 - lv2_atom_forge_property_head(&forge, eg_vector2, 0); - LV2_Atom_Forge_Frame vec_frame; - LV2_Atom_Vector* vector2 = (LV2_Atom_Vector*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_vector_head( - &forge, &vec_frame, sizeof(int32_t), forge.Int)); - for (unsigned e = 0; e < sizeof(elems) / sizeof(int32_t); ++e) { - lv2_atom_forge_int(&forge, elems[e]); - } - lv2_atom_forge_pop(&forge, &vec_frame); - if (!lv2_atom_equals(&vector->atom, &vector2->atom)) { - return test_fail("Vector != Vector2\n"); - } - - // eg_seq = (Sequence)1, 2 - lv2_atom_forge_property_head(&forge, eg_seq, 0); - LV2_Atom_Forge_Frame seq_frame; - LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)lv2_atom_forge_deref( - &forge, lv2_atom_forge_sequence_head(&forge, &seq_frame, 0)); - lv2_atom_forge_frame_time(&forge, 0); - lv2_atom_forge_int(&forge, 1); - lv2_atom_forge_frame_time(&forge, 1); - lv2_atom_forge_int(&forge, 2); - lv2_atom_forge_pop(&forge, &seq_frame); - - lv2_atom_forge_pop(&forge, &obj_frame); - - // Test equality - LV2_Atom_Int itwo = { { forge.Int, sizeof(int32_t) }, 2 }; - if (lv2_atom_equals((LV2_Atom*)one, (LV2_Atom*)two)) { - return test_fail("1 == 2.0\n"); - } else if (lv2_atom_equals((LV2_Atom*)one, (LV2_Atom*)&itwo)) { - return test_fail("1 == 2\n"); - } else if (!lv2_atom_equals((LV2_Atom*)one, (LV2_Atom*)one)) { - return test_fail("1 != 1\n"); - } - - unsigned n_events = 0; - LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { - if (ev->time.frames != n_events) { - return test_fail("Corrupt event %u has bad time\n", n_events); - } else if (ev->body.type != forge.Int) { - return test_fail("Corrupt event %u has bad type\n", n_events); - } else if (((LV2_Atom_Int*)&ev->body)->body != (int)n_events + 1) { - return test_fail("Event %u != %d\n", n_events, n_events + 1); - } - ++n_events; - } - - unsigned n_props = 0; - LV2_ATOM_OBJECT_FOREACH((LV2_Atom_Object*)obj, prop) { - if (!prop->key) { - return test_fail("Corrupt property %u has no key\n", n_props); - } else if (prop->context) { - return test_fail("Corrupt property %u has context\n", n_props); - } - ++n_props; - } - - if (n_props != NUM_PROPS) { - return test_fail("Corrupt object has %u properties != %u\n", - n_props, NUM_PROPS); - } - - struct { - const LV2_Atom* one; - const LV2_Atom* two; - const LV2_Atom* three; - const LV2_Atom* four; - const LV2_Atom* affirmative; - const LV2_Atom* negative; - const LV2_Atom* path; - const LV2_Atom* uri; - const LV2_Atom* urid; - const LV2_Atom* string; - const LV2_Atom* literal; - const LV2_Atom* tuple; - const LV2_Atom* vector; - const LV2_Atom* vector2; - const LV2_Atom* seq; - } matches; - - memset(&matches, 0, sizeof(matches)); - - LV2_Atom_Object_Query q[] = { - { eg_one, &matches.one }, - { eg_two, &matches.two }, - { eg_three, &matches.three }, - { eg_four, &matches.four }, - { eg_true, &matches.affirmative }, - { eg_false, &matches.negative }, - { eg_path, &matches.path }, - { eg_uri, &matches.uri }, - { eg_urid, &matches.urid }, - { eg_string, &matches.string }, - { eg_literal, &matches.literal }, - { eg_tuple, &matches.tuple }, - { eg_vector, &matches.vector }, - { eg_vector2, &matches.vector2 }, - { eg_seq, &matches.seq }, - LV2_ATOM_OBJECT_QUERY_END - }; - - unsigned n_matches = lv2_atom_object_query((LV2_Atom_Object*)obj, q); - for (int n = 0; n < 2; ++n) { - if (n_matches != n_props) { - return test_fail("Query failed, %u matches != %u\n", - n_matches, n_props); - } else if (!lv2_atom_equals((LV2_Atom*)one, matches.one)) { - return test_fail("Bad match one\n"); - } else if (!lv2_atom_equals((LV2_Atom*)two, matches.two)) { - return test_fail("Bad match two\n"); - } else if (!lv2_atom_equals((LV2_Atom*)three, matches.three)) { - return test_fail("Bad match three\n"); - } else if (!lv2_atom_equals((LV2_Atom*)four, matches.four)) { - return test_fail("Bad match four\n"); - } else if (!lv2_atom_equals((LV2_Atom*)t, matches.affirmative)) { - return test_fail("Bad match true\n"); - } else if (!lv2_atom_equals((LV2_Atom*)f, matches.negative)) { - return test_fail("Bad match false\n"); - } else if (!lv2_atom_equals((LV2_Atom*)path, matches.path)) { - return test_fail("Bad match path\n"); - } else if (!lv2_atom_equals((LV2_Atom*)uri, matches.uri)) { - return test_fail("Bad match URI\n"); - } else if (!lv2_atom_equals((LV2_Atom*)string, matches.string)) { - return test_fail("Bad match string\n"); - } else if (!lv2_atom_equals((LV2_Atom*)literal, matches.literal)) { - return test_fail("Bad match literal\n"); - } else if (!lv2_atom_equals((LV2_Atom*)tuple, matches.tuple)) { - return test_fail("Bad match tuple\n"); - } else if (!lv2_atom_equals((LV2_Atom*)vector, matches.vector)) { - return test_fail("Bad match vector\n"); - } else if (!lv2_atom_equals((LV2_Atom*)vector, matches.vector2)) { - return test_fail("Bad match vector2\n"); - } else if (!lv2_atom_equals((LV2_Atom*)seq, matches.seq)) { - return test_fail("Bad match sequence\n"); - } - memset(&matches, 0, sizeof(matches)); - n_matches = lv2_atom_object_get((LV2_Atom_Object*)obj, - eg_one, &matches.one, - eg_two, &matches.two, - eg_three, &matches.three, - eg_four, &matches.four, - eg_true, &matches.affirmative, - eg_false, &matches.negative, - eg_path, &matches.path, - eg_uri, &matches.uri, - eg_urid, &matches.urid, - eg_string, &matches.string, - eg_literal, &matches.literal, - eg_tuple, &matches.tuple, - eg_vector, &matches.vector, - eg_vector2, &matches.vector2, - eg_seq, &matches.seq, - 0); - } - - printf("All tests passed.\n"); - return 0; -} diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.h b/lv2/lv2plug.in/ns/ext/atom/atom.h deleted file mode 100644 index 8169167..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/atom.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - Copyright 2008-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file atom.h C header for the LV2 Atom extension - <http://lv2plug.in/ns/ext/atom>. -*/ - -#ifndef LV2_ATOM_H -#define LV2_ATOM_H - -#include <stdint.h> -#include <stddef.h> - -#define LV2_ATOM_URI "http://lv2plug.in/ns/ext/atom" -#define LV2_ATOM_PREFIX LV2_ATOM_URI "#" - -#define LV2_ATOM__Atom LV2_ATOM_PREFIX "Atom" -#define LV2_ATOM__AtomPort LV2_ATOM_PREFIX "AtomPort" -#define LV2_ATOM__Blank LV2_ATOM_PREFIX "Blank" -#define LV2_ATOM__Bool LV2_ATOM_PREFIX "Bool" -#define LV2_ATOM__Chunk LV2_ATOM_PREFIX "Chunk" -#define LV2_ATOM__Double LV2_ATOM_PREFIX "Double" -#define LV2_ATOM__Event LV2_ATOM_PREFIX "Event" -#define LV2_ATOM__Float LV2_ATOM_PREFIX "Float" -#define LV2_ATOM__Int LV2_ATOM_PREFIX "Int" -#define LV2_ATOM__Literal LV2_ATOM_PREFIX "Literal" -#define LV2_ATOM__Long LV2_ATOM_PREFIX "Long" -#define LV2_ATOM__Number LV2_ATOM_PREFIX "Number" -#define LV2_ATOM__Object LV2_ATOM_PREFIX "Object" -#define LV2_ATOM__Path LV2_ATOM_PREFIX "Path" -#define LV2_ATOM__Property LV2_ATOM_PREFIX "Property" -#define LV2_ATOM__Resource LV2_ATOM_PREFIX "Resource" -#define LV2_ATOM__Sequence LV2_ATOM_PREFIX "Sequence" -#define LV2_ATOM__Sound LV2_ATOM_PREFIX "Sound" -#define LV2_ATOM__String LV2_ATOM_PREFIX "String" -#define LV2_ATOM__Tuple LV2_ATOM_PREFIX "Tuple" -#define LV2_ATOM__URI LV2_ATOM_PREFIX "URI" -#define LV2_ATOM__URID LV2_ATOM_PREFIX "URID" -#define LV2_ATOM__Vector LV2_ATOM_PREFIX "Vector" -#define LV2_ATOM__atomTransfer LV2_ATOM_PREFIX "atomTransfer" -#define LV2_ATOM__beatTime LV2_ATOM_PREFIX "beatTime" -#define LV2_ATOM__bufferType LV2_ATOM_PREFIX "bufferType" -#define LV2_ATOM__childType LV2_ATOM_PREFIX "childType" -#define LV2_ATOM__eventTransfer LV2_ATOM_PREFIX "eventTransfer" -#define LV2_ATOM__frameTime LV2_ATOM_PREFIX "frameTime" -#define LV2_ATOM__supports LV2_ATOM_PREFIX "supports" -#define LV2_ATOM__timeUnit LV2_ATOM_PREFIX "timeUnit" - -#define LV2_ATOM_REFERENCE_TYPE 0 - -#ifdef __cplusplus -extern "C" { -#endif - -/** This expression will fail to compile if double does not fit in 64 bits. */ -typedef char lv2_atom_assert_double_fits_in_64_bits[ - ((sizeof(double) <= sizeof(uint64_t)) * 2) - 1]; - -/** - Return a pointer to the contents of an Atom. The "contents" of an atom - is the data past the complete type-specific header. - @param type The type of the atom, e.g. LV2_Atom_String. - @param atom A variable-sized atom. -*/ -#define LV2_ATOM_CONTENTS(type, atom) \ - ((void*)((uint8_t*)(atom) + sizeof(type))) - -/** - Const version of LV2_ATOM_CONTENTS. -*/ -#define LV2_ATOM_CONTENTS_CONST(type, atom) \ - ((const void*)((const uint8_t*)(atom) + sizeof(type))) - -/** - Return a pointer to the body of an Atom. The "body" of an atom is the - data just past the LV2_Atom head (i.e. the same offset for all types). -*/ -#define LV2_ATOM_BODY(atom) LV2_ATOM_CONTENTS(LV2_Atom, atom) - -/** - Const version of LV2_ATOM_BODY. -*/ -#define LV2_ATOM_BODY_CONST(atom) LV2_ATOM_CONTENTS_CONST(LV2_Atom, atom) - -/** The header of an atom:Atom. */ -typedef struct { - uint32_t size; /**< Size in bytes, not including type and size. */ - uint32_t type; /**< Type of this atom (mapped URI). */ -} LV2_Atom; - -/** An atom:Int or atom:Bool. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - int32_t body; /**< Integer value. */ -} LV2_Atom_Int; - -/** An atom:Long. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - int64_t body; /**< Integer value. */ -} LV2_Atom_Long; - -/** An atom:Float. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - float body; /**< Floating point value. */ -} LV2_Atom_Float; - -/** An atom:Double. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - double body; /**< Floating point value. */ -} LV2_Atom_Double; - -/** An atom:Bool. May be cast to LV2_Atom. */ -typedef LV2_Atom_Int LV2_Atom_Bool; - -/** An atom:URID. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - uint32_t body; /**< URID. */ -} LV2_Atom_URID; - -/** An atom:String. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - /* Contents (a null-terminated UTF-8 string) follow here. */ -} LV2_Atom_String; - -/** The body of an atom:Literal. */ -typedef struct { - uint32_t datatype; /**< Datatype URID. */ - uint32_t lang; /**< Language URID. */ - /* Contents (a null-terminated UTF-8 string) follow here. */ -} LV2_Atom_Literal_Body; - -/** An atom:Literal. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - LV2_Atom_Literal_Body body; /**< Body. */ -} LV2_Atom_Literal; - -/** An atom:Tuple. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - /* Contents (a series of complete atoms) follow here. */ -} LV2_Atom_Tuple; - -/** The body of an atom:Vector. */ -typedef struct { - uint32_t child_size; /**< The size of each element in the vector. */ - uint32_t child_type; /**< The type of each element in the vector. */ - /* Contents (a series of packed atom bodies) follow here. */ -} LV2_Atom_Vector_Body; - -/** An atom:Vector. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - LV2_Atom_Vector_Body body; /**< Body. */ -} LV2_Atom_Vector; - -/** The body of an atom:Property (e.g. in an atom:Object). */ -typedef struct { - uint32_t key; /**< Key (predicate) (mapped URI). */ - uint32_t context; /**< Context URID (may be, and generally is, 0). */ - LV2_Atom value; /**< Value atom header. */ - /* Value atom body follows here. */ -} LV2_Atom_Property_Body; - -/** An atom:Property. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - LV2_Atom_Property_Body body; /**< Body. */ -} LV2_Atom_Property; - -/** The body of an atom:Object. May be cast to LV2_Atom. */ -typedef struct { - uint32_t id; /**< URID (atom:Resource) or blank ID (atom:Blank). */ - uint32_t otype; /**< Type URID (same as rdf:type, for fast dispatch). */ - /* Contents (a series of property bodies) follow here. */ -} LV2_Atom_Object_Body; - -/** An atom:Object. May be cast to LV2_Atom. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - LV2_Atom_Object_Body body; /**< Body. */ -} LV2_Atom_Object; - -/** The header of an atom:Event. Note this type is NOT an LV2_Atom. */ -typedef struct { - /** Time stamp. Which type is valid is determined by context. */ - union { - int64_t frames; /**< Time in audio frames. */ - double beats; /**< Time in beats. */ - } time; - LV2_Atom body; /**< Event body atom header. */ - /* Body atom contents follow here. */ -} LV2_Atom_Event; - -/** - The body of an atom:Sequence (a sequence of events). - - The unit field is either a URID that described an appropriate time stamp - type, or may be 0 where a default stamp type is known. For - LV2_Descriptor::run(), the default stamp type is audio frames. - - The contents of a sequence is a series of LV2_Atom_Event, each aligned - to 64-bits, e.g.: - <pre> - | Event 1 (size 6) | Event 2 - | | | | | | | | | - | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - |FRAMES |SUBFRMS|TYPE |SIZE |DATADATADATAPAD|FRAMES |SUBFRMS|... - </pre> -*/ -typedef struct { - uint32_t unit; /**< URID of unit of event time stamps. */ - uint32_t pad; /**< Currently unused. */ - /* Contents (a series of events) follow here. */ -} LV2_Atom_Sequence_Body; - -/** An atom:Sequence. */ -typedef struct { - LV2_Atom atom; /**< Atom header. */ - LV2_Atom_Sequence_Body body; /**< Body. */ -} LV2_Atom_Sequence; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_ATOM_H */ diff --git a/lv2/lv2plug.in/ns/ext/atom/atom.ttl b/lv2/lv2plug.in/ns/ext/atom/atom.ttl deleted file mode 100644 index c222ebf..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/atom.ttl +++ /dev/null @@ -1,601 +0,0 @@ -@prefix atom: <http://lv2plug.in/ns/ext/atom#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix ui: <http://lv2plug.in/ns/extensions/ui#> . -@prefix units: <http://lv2plug.in/ns/extensions/units#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/atom> - a owl:Ontology ; - rdfs:seeAlso <atom.h> , - <util.h> , - <forge.h> , - <lv2-atom.doap.ttl> ; - lv2:documentation """ -<p>This specification defines a simple generic data container, called an -<q>Atom</q>. An atom:Atom can contain simple primitive types like integers, -floating point numbers, and strings; as well as structured data like lists and -dictionary-like <q>Objects</q>. An Atom is, with one exception, Plain Old Data -(POD), meaning it can be easily copied (e.g. using <code>memcpy</code>) and is -suitable for use in real-time code.</p> - -<p>Atoms are not limited to the types defined here, but allow implementations -to work with any type of POD data at all. This is possible because Atom types -are URIs, but mapped to integers using the <a href="../urid/urid.html">LV2 -URID</a> extension for performance reasons.</p> - -<p>Since atoms are simple to copy, -communication of any atom is simple to implement without requiring special code -for every type of data. For example, plugins that mutually understand a type -can be used together in a host that does not understand that type, because the -host is only required to copy atoms, not interpret their contents. Similarly, -plugins (such as routers, delays, or data structures) can meaningfully process -atoms of a type unknown to them.</p> - -<p>Atoms can and should be used anywhere values of various types must be stored -or transmitted. The port type atom:AtomPort can be used to transmit atoms via -ports. An atom:AtomPort that contains an atom:Sequence can be used for sample -accurate event communication, such as MIDI, and replaces the earlier <a -href="../event/event.html">LV2 event</a> extension.</p> - -<h3>Serialisation</h3> - -<p>Each Atom type defines a binary format for use at runtime, but also a -serialisation that is natural to express in Turtle format. Thus, this -specification defines a powerful real-time appropriate data model, as well as a -portable way to serialise any data in that model. This is particularly useful -for inter-process communication, saving/restoring state, and describing values -in plugin data files.</p> - -<h3>Custom Atom Types</h3> - -<p>While it is possible to define new Atom types for any binary format, the -standard types defined here are powerful enough to describe almost anything. -Implementations SHOULD build structures out of the types provided here, rather -than define new binary formats (e.g. use atom:Tuple or atom:Object rather than -a new C <code>struct</code> type). Current implementations have support for -serialising all standard types, so new binary formats are an implementation -burden which harms interoperabilty. In particular, plugins SHOULD NOT expect -UI communication or state saving with custom Atom types to work. In general, -new Atom types should only be defined where absolutely necessary due to -performance reasons and serialisation is not a concern.</p> -""" . - -atom:cType - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:label "C type" ; - rdfs:domain rdfs:Class ; - rdfs:range lv2:Symbol ; - rdfs:comment """ -The identifier for a C type describing the binary representation of an Atom of -this type. -""" . - -atom:Atom - a rdfs:Class ; - rdfs:label "Atom" ; - atom:cType "LV2_Atom" ; - lv2:documentation """ -<p>Abstract base class for all atoms. An LV2_Atom has a 32-bit -<code>size</code> and <code>type</code> followed by a body of <code>size</code> -bytes. Atoms MUST be 64-bit aligned.</p> - -<p>All concrete Atom types (subclasses of this class) MUST define a precise -binary layout for their body.</p> - -<p>The <code>type</code> field is the URI of an Atom type mapped to an integer. -Implementations SHOULD gracefully pass through, or ignore, atoms with unknown -types.</p> - -<p>All atoms are POD by definition except references, which as a special case -have <code>type = 0</code>. An Atom MUST NOT contain a Reference. It is safe -to copy any non-reference Atom with a simple <code>memcpy</code>, even if the -implementation does not understand <code>type</code>. Though this extension -reserves the type 0 for references, the details of reference handling are -currently unspecified. A future revision of this extension, or a different -extension, may define how to use non-POD data and references. Implementations -MUST NOT send references to another implementation unless the receiver is -explicitly known to support references (e.g. by supporting a feature).</p> - -<p>The atom with both <code>type</code> <em>and</em> <code>size</code> 0 is -<q>null</q>, which is not considered a Reference.</p> -""" . - -atom:Chunk - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Chunk of memory" ; - owl:onDatatype xsd:base64Binary ; - lv2:documentation """ -<p>A chunk of memory with undefined contents. This type is used to indicate a -certain amount of space is available. For example, output ports with a -variably sized type are connected to a Chunk so the plugin knows the size of -the buffer available for writing.</p> - -<p>The use of a Chunk should be constrained to a local scope, since -interpreting it is impossible without context. However, if serialised to RDF, -a Chunk may be represented directly as an xsd:base64Binary string, e.g.:</p> - -<pre class="turtle-code"> -[] eg:someChunk "vu/erQ=="^^xsd:base64Binary . -</pre> -""" . - -atom:Number - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Number" . - -atom:Int - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Number ; - rdfs:label "Signed 32-bit integer" ; - atom:cType "LV2_Atom_Int" ; - owl:onDatatype xsd:int . - -atom:Long - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Number ; - rdfs:label "Signed 64-bit integer" ; - atom:cType "LV2_Atom_Long" ; - owl:onDatatype xsd:long . - -atom:Float - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Number ; - rdfs:label "32-bit IEEE-754 floating point number" ; - atom:cType "LV2_Atom_Float" ; - owl:onDatatype xsd:float . - -atom:Double - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Number ; - rdfs:label "64-bit IEEE-754 floating point number" ; - atom:cType "LV2_Atom_Double" ; - owl:onDatatype xsd:double . - -atom:Bool - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Boolean" ; - atom:cType "LV2_Atom_Bool" ; - owl:onDatatype xsd:boolean ; - rdfs:comment "An Int where 0 is false and any other value is true." . - -atom:String - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:Atom ; - rdfs:label "String" ; - atom:cType "LV2_Atom_String" ; - owl:onDatatype xsd:string ; - lv2:documentation """ -<p>A UTF-8 encoded string.</p> - -<p>The body of an LV2_Atom_String is a C string in UTF-8 encoding, i.e. an -array of bytes (<code>uint8_t</code>) terminated with a NULL byte -(<code>'\\0'</code>).</p> - -<p>This type is for free-form strings, but SHOULD NOT be used for typed data or -text in any language. Use atom:Literal unless translating the string does not -make sense and the string has no meaningful datatype.</p> -""" . - -atom:Literal - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "String Literal" ; - atom:cType "LV2_Atom_Literal" ; - lv2:documentation """ -<p>A UTF-8 encoded string literal, with an optional datatype or language.</p> - -<p>This type is compatible with rdfs:Literal and is capable of expressing a -string in any language or a value of any type. A Literal has a -<code>datatype</code> and <code>lang</code> followed by string data in UTF-8 -encoding. The length of the string data in bytes is <code>size - -sizeof(LV2_Atom_Literal)</code>, including the terminating NULL character. The -<code>lang</code> field SHOULD be a URI of the form -<http://lexvo.org/id/iso639-3/LANG> or -<http://lexvo.org/id/iso639-1/LANG> where LANG is a 3-character ISO 693-3 -language code, or a 2-character ISO 693-1 language code, respectively.</p> - -<p>A Literal may have a <code>datatype</code> OR a <code>lang</code>, but never -both.</p> - -<p>For example, a Literal can be "Hello" in English:</p> -<pre class="c-code"> -void set_to_hello_in_english(LV2_Atom_Literal* lit) { - lit->atom.type = map(expand("atom:Literal")); - lit->atom.size = 14; - lit->body.datatype = 0; - lit->body.lang = map("http://lexvo.org/id/iso639-1/en"); - memcpy(LV2_ATOM_CONTENTS(LV2_Atom_Literal, lit), - "Hello", - sizeof("Hello")); // Assumes enough space -} -</pre> - -<p>or a Turtle string:</p> -<pre class="c-code"> -void set_to_turtle_string(LV2_Atom_Literal* lit, const char* ttl) { - lit->atom.type = map(expand("atom:Literal")); - lit->atom.size = 64; - lit->body.datatype = map("http://www.w3.org/2008/turtle#turtle"); - lit->body.lang = 0; - memcpy(LV2_ATOM_CONTENTS(LV2_Atom_Literal, lit), - ttl, - strlen(ttl) + 1); // Assumes enough space -} -</pre> -""" . - -atom:Path - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:URI ; - owl:onDatatype atom:URI ; - rdfs:label "File path string" ; - lv2:documentation """ -<p>A local file path.</p> - -<p>A Path is a URI reference with only a path component: no scheme, authority, -query, or fragment. In particular, paths to files in the same bundle may be -cleanly written in Turtle files as a relative URI. However, implementations -may assume any binary Path (e.g. in an event payload) is a valid file path -which can passed to system functions like fopen() directly, without any -character encoding or escape expansion required.</p> - -<p>Any implemenation that creates a Path atom to transmit to another is -responsible for ensuring it is valid. A Path SHOULD always be absolute, unless -there is some mechanism in place that defines a base path. Since this is not -the case for plugin instances, effectively any Path sent to or received from a -plugin instance MUST be absolute.</p> -""" . - -atom:URI - a rdfs:Class , - rdfs:Datatype ; - rdfs:subClassOf atom:String ; - owl:onDatatype xsd:anyURI ; - rdfs:label "URI string" ; - lv2:documentation """ -<p>A URI string. This is useful when a URI is needed but mapping is -inappropriate, for example with temporary or relative URIs. Since the ability -to distinguish URIs from plain strings is often necessary, URIs MUST NOT be -transmitted as atom:String.</p> - -<p>This is not strictly a URI, since UTF-8 is allowed. Escaping and related -issues are the host's responsibility.</p> -""" . - -atom:URID - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Integer ID mapped from a URI" ; - atom:cType "LV2_Atom_URID" ; - lv2:documentation """ -<p>An unsigned 32-bit integer mapped from a URI (e.g. with LV2_URID_Map).</p> -""" . - -atom:Vector - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Vector" ; - atom:cType "LV2_Atom_Vector" ; - lv2:documentation """ -<p>A homogeneous series of atom bodies with equivalent type and size.</p> - -<p>An LV2_Atom_Vector is a 32-bit <code>child_size</code> and -<code>child_type</code> followed by <code>size / child_size</code> atom -bodies.</p> - -<p>For example, an atom:Vector containing 42 elements of type atom:Float:</p> -<pre class="c-code"> -struct VectorOf42Floats { - uint32_t size; // sizeof(LV2_Atom_Vector_Body) + (42 * sizeof(float); - uint32_t type; // map(expand("atom:Vector")) - uint32_t child_size; // sizeof(float) - uint32_t child_type; // map(expand("atom:Float")) - float elems[42]; -}; -</pre> - -<p>Note that it is possible to construct a valid Atom for each element -of the vector, even by an implementation which does not understand -<code>child_type</code>.</p> - -<p>If serialised to RDF, a Vector SHOULD have the form:</p> - -<pre class="turtle-code"> -eg:someVector - a atom:Vector ; - atom:childType atom:Int ; - rdf:value ( - "1"^^xsd:int - "2"^^xsd:int - "3"^^xsd:int - "4"^^xsd:int - ) . -</pre> -""" . - -atom:Tuple - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Tuple" ; - lv2:documentation """ -<p>A series of Atoms with varying <code>type</code> and <code>size</code>.</p> - -<p>The body of a Tuple is simply a series of complete atoms, each aligned to -64 bits.</p> - -<p>If serialised to RDF, a Tuple SHOULD have the form:</p> - -<pre class="turtle-code"> -eg:someVector - a atom:Tuple ; - rdf:value ( - "1"^^xsd:int - "3.5"^^xsd:float - "etc" - ) . -</pre> - -""" . - -atom:Property - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Property" ; - atom:cType "LV2_Atom_Property" ; - lv2:documentation """ -<p>A property of an atom:Object. An LV2_Atom_Property has a URID -<code>key</code> and <code>context</code>, and an Atom <code>value</code>. -This corresponds to an RDF Property, where the <q>key</q> is the <q>predicate</q> -and the <q>value</q> is the object.</p> - -<p>The <code>context</code> field can be used to specify a different context -for each property, where this is useful. Otherwise, it may be 0.</p> - -<p>Properties generally only exist as part of an atom:Object. Accordingly, -they will typically be represented directly as properties in RDF (see -atom:Object). If this is not possible, they may be expressed as partial -reified statements, e.g.:</p> - -<pre class="turtle-code"> -eg:someProperty - rdf:predicate eg:theKey ; - rdf:object eg:theValue . -</pre> -""" . - -atom:Object - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Object" ; - atom:cType "LV2_Atom_Object" ; - lv2:documentation """ -<p>An <q>Object</q> is an atom with a set of properties. This corresponds to -an RDF Resource, and can be thought of as a dictionary with URID keys.</p> - -<p>An LV2_Atom_Object has a uint32_t <code>id</code> and uint32_t -<code>type</code>, followed by a series of atom:Property bodies (without -headers, i.e. LV2_Atom_Property_Body). The LV2_Atom_Object::type field is -semantically equivalent to a property with key rdf:type, but is included in the -structure to allow for fast dispatch.</p> - -<p>This is an abstract Atom type, an Object is always either a atom:Resource -or a atom:Blank.</p> - -<p>If serialised to RDF, an Object SHOULD be represented directly as a -resource, e.g.:</p> - -<pre class="turtle-code"> -eg:someObject - eg:firstPropertyKey "first property value" ; - eg:secondPropertyKey "first loser" ; - eg:andSoOn "and so on" . -</pre> -""" . - -atom:Resource - a rdfs:Class ; - rdfs:subClassOf atom:Object ; - rdfs:label "Resource" ; - atom:cType "LV2_Atom_Object" ; - lv2:documentation """ -<p>An atom:Object where the <code>id</code> field is a URID, i.e. an Object -with a URI.</p> -""" . - -atom:Blank - a rdfs:Class ; - rdfs:subClassOf atom:Object ; - rdfs:label "Blank" ; - atom:cType "LV2_Atom_Object" ; - lv2:documentation """ -<p>An atom:Object where the LV2_Atom_Object::id is a blank node ID (NOT a URI). -The ID of a Blank is valid only within the context the Blank appears in. For -ports this is the context of the associated run() call, i.e. all ports share -the same context so outputs can contain IDs that correspond to IDs of blanks in -the input.</p> -""" . - -atom:Sound - a rdfs:Class ; - rdfs:subClassOf atom:Vector ; - rdfs:label "Sound" ; - atom:cType "LV2_Atom_Sound" ; - lv2:documentation """ -<p>An atom:Vector of atom:Float which represents an audio waveform. The format -is the same as the buffer format for lv2:AudioPort (except the size may be -arbitrary). An atom:Sound inherently depends on the sample rate, which is -assumed to be known from context. Because of this, directly serialising an -atom:Sound is probably a bad idea, use a standard format like WAV instead.</p> -""" . - -atom:frameTime - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:decimal ; - rdfs:label "Frame time" ; - lv2:documentation """ -<p>Time stamp in audio frames. Typically used for events.</p> -""" . - -atom:beatTime - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:decimal ; - rdfs:label "Beat time" ; - lv2:documentation """ -<p>Time stamp in beats. Typically used for events.</p> -""" . - -atom:Event - a rdfs:Class ; - rdfs:label "Event" ; - atom:cType "LV2_Atom_Event" ; - lv2:documentation """ -<p>An atom with a time stamp prefix, typically an element of an atom:Sequence. -Note this is not an Atom type.</p> -""" . - -atom:Sequence - a rdfs:Class ; - rdfs:subClassOf atom:Atom ; - rdfs:label "Sequence" ; - atom:cType "LV2_Atom_Sequence" ; - lv2:documentation """ -<p>A sequence of atom:Event, i.e. a series of time-stamped Atoms.</p> - -<p>LV2_Atom_Sequence_Body.unit describes the time unit for the contained atoms. -If the unit is known from context (e.g. run() stamps are always audio frames), -this field may be zero. Otherwise, it SHOULD be either units:frame or -units:beat, in which case ev.time.frames or ev.time.beats is valid, -respectively.</p> - -<p>If serialised to RDF, a Sequence has a similar form to atom:Vector, but for -brevity the elements may be assumed to be atom:Event, e.g.:</p> - -<pre class="turtle-code"> -eg:someSequence - a atom:Sequence ; - rdf:value ( - [ - atom:frameTime 1 ; - rdf:value "901A01"^^midi:MidiEvent - ] [ - atom:frameTime 3 ; - rdf:value "902B02"^^midi:MidiEvent - ] - ) . -</pre> -""" . - -atom:AtomPort - a rdfs:Class ; - rdfs:subClassOf lv2:Port ; - rdfs:label "Atom Port" ; - lv2:documentation """ -<p>A port which contains an atom:Atom. Ports of this type are connected to an -LV2_Atom with a type specified by atom:bufferType.</p> - -<p>Output ports with a variably sized type MUST be initialised by the host -before every run() to an atom:Chunk with size set to the available space. The -plugin reads this size to know how much space is available for writing. In all -cases, the plugin MUST write a complete atom (including header) to outputs. -However, to be robust, hosts SHOULD initialise output ports to a safe sentinel -(e.g. the null Atom) before calling run().</p> -""" . - -atom:bufferType - a rdf:Property , - owl:ObjectProperty ; - rdfs:domain atom:AtomPort ; - rdfs:label "buffer type" ; - lv2:documentation """ -<p>Indicates that an AtomPort may be connected to a certain Atom type. A port -MAY support several buffer types. The host MUST NOT connect a port to an Atom -with a type not explicitly listed with this property. The value of this -property MUST be a sub-class of atom:Atom. For example, an input port that is -connected directly to an LV2_Atom_Double value is described like so:</p> - -<pre class="turtle-code"> -<plugin> - lv2:port [ - a lv2:InputPort , atom:AtomPort ; - atom:bufferType atom:Double ; - ] . -</pre> - -<p>This property only describes the types a port may be <em>directly</em> -connected to. It says nothing about the expected contents of containers. For -that, use atom:supports.</p> -""" . - -atom:childType - a rdf:Property , - owl:ObjectProperty ; - rdfs:label "child type" ; - rdfs:comment "The type of a container's children." . - -atom:supports - a rdf:Property ; - rdfs:label "supports" ; - lv2:documentation """ -<p>Indicates that a particular Atom type is supported.</p> - -<p>This property is defined loosely, it may be used to indicate that anything -<q>supports</q> an Atom type, wherever that may be useful. It applies -<q>recursively</q> where collections are involved.</p> - -<p>In particular, this property can be used to describe which event types are -expected by a port. For example, a port that receives MIDI events is described -like so:</p> - -<pre class="turtle-code"> -<plugin> - lv2:port [ - a lv2:InputPort , atom:AtomPort ; - atom:bufferType atom:Sequence ; - atom:supports midi:MidiEvent ; - ] . -</pre> -""" . - -atom:eventTransfer - a ui:PortProtocol ; - rdfs:label "event transfer" ; - lv2:documentation """ -<p>Transfer of individual events in a port buffer. Useful as the -<code>format</code> for a LV2UI_Write_Function.</p> - -<p>This protocol applies to ports which contain events, usually in an -atom:Sequence. The host must transfer each individual event to the recipient. -The format of the received data is an LV2_Atom, there is no timestamp -header.</p> -""" . - -atom:atomTransfer - a ui:PortProtocol ; - rdfs:label "atom transfer" ; - lv2:documentation """ -<p>Transfer of the complete atom in a port buffer. Useful as the -<code>format</code> for a LV2UI_Write_Function.</p> - -<p>This protocol applies to atom ports. The host must transfer the complete -atom contained in the port, including header.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/atom/forge.h b/lv2/lv2plug.in/ns/ext/atom/forge.h deleted file mode 100644 index c825806..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/forge.h +++ /dev/null @@ -1,619 +0,0 @@ -/* - Copyright 2008-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file forge.h An API for constructing LV2 atoms. - - This file provides an API for constructing Atoms which makes it relatively - simple to build nested atoms of arbitrary complexity without requiring - dynamic memory allocation. - - The API is based on successively appending the appropriate pieces to build a - complete Atom. The size of containers is automatically updated. Functions - that begin a container return (via their frame argument) a stack frame which - must be popped when the container is finished. - - All output is written to a user-provided buffer or sink function. This - makes it popssible to create create atoms on the stack, on the heap, in LV2 - port buffers, in a ringbuffer, or elsewhere, all using the same API. - - This entire API is realtime safe if used with a buffer or a realtime safe - sink, except lv2_atom_forge_init() which is only realtime safe if the URI - map function is. - - Note these functions are all static inline, do not take their address. - - This header is non-normative, it is provided for convenience. -*/ - -#ifndef LV2_ATOM_FORGE_H -#define LV2_ATOM_FORGE_H - -#include <assert.h> - -#include "lv2/lv2plug.in/ns/ext/atom/atom.h" -#include "lv2/lv2plug.in/ns/ext/atom/util.h" -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -/** Handle for LV2_Atom_Forge_Sink. */ -typedef void* LV2_Atom_Forge_Sink_Handle; - -/** A reference to a chunk of written output. */ -typedef intptr_t LV2_Atom_Forge_Ref; - -/** Sink function for writing output. See lv2_atom_forge_set_sink(). */ -typedef LV2_Atom_Forge_Ref -(*LV2_Atom_Forge_Sink)(LV2_Atom_Forge_Sink_Handle handle, - const void* buf, - uint32_t size); - -/** Function for resolving a reference. See lv2_atom_forge_set_sink(). */ -typedef LV2_Atom* -(*LV2_Atom_Forge_Deref_Func)(LV2_Atom_Forge_Sink_Handle handle, - LV2_Atom_Forge_Ref ref); - -/** A stack frame used for keeping track of nested Atom containers. */ -typedef struct _LV2_Atom_Forge_Frame { - struct _LV2_Atom_Forge_Frame* parent; - LV2_Atom_Forge_Ref ref; -} LV2_Atom_Forge_Frame; - -/** A "forge" for creating atoms by appending to a buffer. */ -typedef struct { - uint8_t* buf; - uint32_t offset; - uint32_t size; - - LV2_Atom_Forge_Sink sink; - LV2_Atom_Forge_Deref_Func deref; - LV2_Atom_Forge_Sink_Handle handle; - - LV2_Atom_Forge_Frame* stack; - - LV2_URID Blank; - LV2_URID Bool; - LV2_URID Chunk; - LV2_URID Double; - LV2_URID Float; - LV2_URID Int; - LV2_URID Long; - LV2_URID Literal; - LV2_URID Path; - LV2_URID Property; - LV2_URID Resource; - LV2_URID Sequence; - LV2_URID String; - LV2_URID Tuple; - LV2_URID URI; - LV2_URID URID; - LV2_URID Vector; -} LV2_Atom_Forge; - -static inline void -lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size); - -/** - Initialise @p forge. - - URIs will be mapped using @p map and stored, a reference to @p map itself is - not held. -*/ -static inline void -lv2_atom_forge_init(LV2_Atom_Forge* forge, LV2_URID_Map* map) -{ - lv2_atom_forge_set_buffer(forge, NULL, 0); - forge->Blank = map->map(map->handle, LV2_ATOM__Blank); - forge->Bool = map->map(map->handle, LV2_ATOM__Bool); - forge->Chunk = map->map(map->handle, LV2_ATOM__Chunk); - forge->Double = map->map(map->handle, LV2_ATOM__Double); - forge->Float = map->map(map->handle, LV2_ATOM__Float); - forge->Int = map->map(map->handle, LV2_ATOM__Int); - forge->Long = map->map(map->handle, LV2_ATOM__Long); - forge->Literal = map->map(map->handle, LV2_ATOM__Literal); - forge->Path = map->map(map->handle, LV2_ATOM__Path); - forge->Property = map->map(map->handle, LV2_ATOM__Property); - forge->Resource = map->map(map->handle, LV2_ATOM__Resource); - forge->Sequence = map->map(map->handle, LV2_ATOM__Sequence); - forge->String = map->map(map->handle, LV2_ATOM__String); - forge->Tuple = map->map(map->handle, LV2_ATOM__Tuple); - forge->URI = map->map(map->handle, LV2_ATOM__URI); - forge->URID = map->map(map->handle, LV2_ATOM__URID); - forge->Vector = map->map(map->handle, LV2_ATOM__Vector); -} - -static inline LV2_Atom* -lv2_atom_forge_deref(LV2_Atom_Forge* forge, LV2_Atom_Forge_Ref ref) -{ - if (forge->buf) { - return (LV2_Atom*)ref; - } else { - return forge->deref(forge->handle, ref); - } -} - -/** - @name Object Stack - @{ -*/ - -/** - Push a stack frame. - This is done automatically by container functions (which take a stack frame - pointer), but may be called by the user to push the top level container when - writing to an existing Atom. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_push(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Frame* frame, - LV2_Atom_Forge_Ref ref) -{ - frame->parent = forge->stack; - frame->ref = ref; - forge->stack = frame; - return ref; -} - -/** Pop a stack frame. This must be called when a container is finished. */ -static inline void -lv2_atom_forge_pop(LV2_Atom_Forge* forge, LV2_Atom_Forge_Frame* frame) -{ - assert(frame == forge->stack); - forge->stack = frame->parent; -} - -/** Return true iff the top of the stack has the given type. */ -static inline bool -lv2_atom_forge_top_is(LV2_Atom_Forge* forge, uint32_t type) -{ - return forge->stack && forge->stack->ref && - (lv2_atom_forge_deref(forge, forge->stack->ref)->type == type); -} - -/** - @} - @name Output Configuration - @{ -*/ - -/** Set the output buffer where @p forge will write atoms. */ -static inline void -lv2_atom_forge_set_buffer(LV2_Atom_Forge* forge, uint8_t* buf, size_t size) -{ - forge->buf = buf; - forge->size = size; - forge->offset = 0; - forge->deref = NULL; - forge->sink = NULL; - forge->handle = NULL; - forge->stack = NULL; -} - -/** - Set the sink function where @p forge will write output. - - The return value of forge functions is an LV2_Atom_Forge_Ref which is an - integer type safe to use as a pointer but is otherwise opaque. The sink - function must return a ref that can be dereferenced to access as least - sizeof(LV2_Atom) bytes of the written data, so sizes can be updated. For - ringbuffers, this should be possible as long as the size of the buffer is a - multiple of sizeof(LV2_Atom), since atoms are always aligned. - - Note that 0 is an invalid reference, so if you are using a buffer offset be - sure to offset it such that 0 is never a valid reference. You will get - confusing errors otherwise. -*/ -static inline void -lv2_atom_forge_set_sink(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Sink sink, - LV2_Atom_Forge_Deref_Func deref, - LV2_Atom_Forge_Sink_Handle handle) -{ - forge->buf = NULL; - forge->size = forge->offset = 0; - forge->deref = deref; - forge->sink = sink; - forge->handle = handle; - forge->stack = NULL; -} - -/** - @} - @name Low Level Output - @{ -*/ - -/** - Write raw output. This is used internally, but is also useful for writing - atom types not explicitly supported by the forge API. Note the caller is - responsible for ensuring the output is approriately padded. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_raw(LV2_Atom_Forge* forge, const void* data, uint32_t size) -{ - LV2_Atom_Forge_Ref out = 0; - if (forge->sink) { - out = forge->sink(forge->handle, data, size); - } else { - out = (LV2_Atom_Forge_Ref)forge->buf + forge->offset; - uint8_t* mem = forge->buf + forge->offset; - if (forge->offset + size > forge->size) { - return 0; - } - forge->offset += size; - memcpy(mem, data, size); - } - for (LV2_Atom_Forge_Frame* f = forge->stack; f; f = f->parent) { - lv2_atom_forge_deref(forge, f->ref)->size += size; - } - return out; -} - -/** Pad output accordingly so next write is 64-bit aligned. */ -static inline void -lv2_atom_forge_pad(LV2_Atom_Forge* forge, uint32_t written) -{ - const uint64_t pad = 0; - const uint32_t pad_size = lv2_atom_pad_size(written) - written; - lv2_atom_forge_raw(forge, &pad, pad_size); -} - -/** Write raw output, padding to 64-bits as necessary. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_write(LV2_Atom_Forge* forge, const void* data, uint32_t size) -{ - LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, data, size); - if (out) { - lv2_atom_forge_pad(forge, size); - } - return out; -} - -/** Write a null-terminated string body. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_string_body(LV2_Atom_Forge* forge, - const char* str, - uint32_t len) -{ - LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, str, len); - if (out && (out = lv2_atom_forge_raw(forge, "", 1))) { - lv2_atom_forge_pad(forge, len + 1); - } - return out; -} - -/** - @} - @name Atom Output - @{ -*/ - -/** Write an atom:Atom header. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_atom(LV2_Atom_Forge* forge, uint32_t size, uint32_t type) -{ - const LV2_Atom a = { size, type }; - return lv2_atom_forge_raw(forge, &a, sizeof(a)); -} - -/** Write a primitive (fixed-size) atom. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_primitive(LV2_Atom_Forge* forge, const LV2_Atom* a) -{ - if (lv2_atom_forge_top_is(forge, forge->Vector)) { - return lv2_atom_forge_raw(forge, LV2_ATOM_BODY(a), a->size); - } else { - return lv2_atom_forge_write(forge, a, sizeof(LV2_Atom) + a->size); - } -} - -/** Write an atom:Int. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_int(LV2_Atom_Forge* forge, int32_t val) -{ - const LV2_Atom_Int a = { { sizeof(val), forge->Int }, val }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom:Long. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_long(LV2_Atom_Forge* forge, int64_t val) -{ - const LV2_Atom_Long a = { { sizeof(val), forge->Long }, val }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom:Float. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_float(LV2_Atom_Forge* forge, float val) -{ - const LV2_Atom_Float a = { { sizeof(val), forge->Float }, val }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom:Double. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_double(LV2_Atom_Forge* forge, double val) -{ - const LV2_Atom_Double a = { { sizeof(val), forge->Double }, val }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom:Bool. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_bool(LV2_Atom_Forge* forge, bool val) -{ - const LV2_Atom_Bool a = { { sizeof(int32_t), forge->Bool }, val ? 1 : 0 }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom:URID. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_urid(LV2_Atom_Forge* forge, LV2_URID id) -{ - const LV2_Atom_URID a = { { sizeof(id), forge->URID }, id }; - return lv2_atom_forge_primitive(forge, &a.atom); -} - -/** Write an atom compatible with atom:String. Used internally. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_typed_string(LV2_Atom_Forge* forge, - uint32_t type, - const char* str, - uint32_t len) -{ - const LV2_Atom_String a = { { len + 1, type } }; - LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, &a, sizeof(a)); - if (out) { - if (!lv2_atom_forge_string_body(forge, str, len)) { - LV2_Atom* atom = lv2_atom_forge_deref(forge, out); - atom->size = atom->type = 0; - out = 0; - } - } - return out; -} - -/** Write an atom:String. Note that @p str need not be NULL terminated. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_string(LV2_Atom_Forge* forge, const char* str, uint32_t len) -{ - return lv2_atom_forge_typed_string(forge, forge->String, str, len); -} - -/** - Write an atom:URI. Note that @p uri need not be NULL terminated. - This does not map the URI, but writes the complete URI string. To write - a mapped URI, use lv2_atom_forge_urid(). -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_uri(LV2_Atom_Forge* forge, const char* uri, uint32_t len) -{ - return lv2_atom_forge_typed_string(forge, forge->URI, uri, len); -} - -/** Write an atom:Path. Note that @p path need not be NULL terminated. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_path(LV2_Atom_Forge* forge, const char* path, uint32_t len) -{ - return lv2_atom_forge_typed_string(forge, forge->Path, path, len); -} - -/** Write an atom:Literal. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_literal(LV2_Atom_Forge* forge, - const char* str, - uint32_t len, - uint32_t datatype, - uint32_t lang) -{ - const LV2_Atom_Literal a = { - { (uint32_t)(sizeof(LV2_Atom_Literal) - sizeof(LV2_Atom) + len + 1), - forge->Literal }, - { datatype, - lang } - }; - LV2_Atom_Forge_Ref out = lv2_atom_forge_raw(forge, &a, sizeof(a)); - if (out) { - if (!lv2_atom_forge_string_body(forge, str, len)) { - LV2_Atom* atom = lv2_atom_forge_deref(forge, out); - atom->size = atom->type = 0; - out = 0; - } - } - return out; -} - -/** Start an atom:Vector. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_vector_head(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Frame* frame, - uint32_t child_size, - uint32_t child_type) -{ - const LV2_Atom_Vector a = { - { sizeof(LV2_Atom_Vector_Body), forge->Vector }, - { child_size, child_type } - }; - return lv2_atom_forge_push( - forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a))); -} - -/** Write a complete atom:Vector. */ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_vector(LV2_Atom_Forge* forge, - uint32_t child_size, - uint32_t child_type, - uint32_t n_elems, - const void* elems) -{ - const LV2_Atom_Vector a = { - { (uint32_t)(sizeof(LV2_Atom_Vector_Body) + n_elems * child_size), - forge->Vector }, - { child_size, child_type } - }; - LV2_Atom_Forge_Ref out = lv2_atom_forge_write(forge, &a, sizeof(a)); - if (out) { - lv2_atom_forge_write(forge, elems, child_size * n_elems); - } - return out; -} - -/** - Write the header of an atom:Tuple. - - The passed frame will be initialised to represent this tuple. To complete - the tuple, write a sequence of atoms, then pop the frame with - lv2_atom_forge_pop(). - - For example: - @code - // Write tuple (1, 2.0) - LV2_Atom_Forge_Frame frame; - LV2_Atom* tup = (LV2_Atom*)lv2_atom_forge_tuple(forge, &frame); - lv2_atom_forge_int32(forge, 1); - lv2_atom_forge_float(forge, 2.0); - lv2_atom_forge_pop(forge, &frame); - @endcode -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_tuple(LV2_Atom_Forge* forge, LV2_Atom_Forge_Frame* frame) -{ - const LV2_Atom_Tuple a = { { 0, forge->Tuple } }; - return lv2_atom_forge_push( - forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a))); -} - -/** - Write the header of an atom:Resource. - - The passed frame will be initialised to represent this object. To complete - the object, write a sequence of properties, then pop the frame with - lv2_atom_forge_pop(). - - For example: - @code - LV2_URID eg_Cat = map("http://example.org/Cat"); - LV2_URID eg_name = map("http://example.org/name"); - - // Write object header - LV2_Atom_Forge_Frame frame; - lv2_atom_forge_resource(forge, &frame, 1, eg_Cat); - - // Write property: eg:name = "Hobbes" - lv2_atom_forge_property_head(forge, eg_name, 0); - lv2_atom_forge_string(forge, "Hobbes", strlen("Hobbes")); - - // Finish object - lv2_atom_forge_pop(forge, &frame); - @endcode -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_resource(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Frame* frame, - LV2_URID id, - LV2_URID otype) -{ - const LV2_Atom_Object a = { - { sizeof(LV2_Atom_Object) - sizeof(LV2_Atom), forge->Resource }, - { id, otype } - }; - return lv2_atom_forge_push( - forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a))); -} - -/** - The same as lv2_atom_forge_resource(), but for object:Blank. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_blank(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Frame* frame, - uint32_t id, - LV2_URID otype) -{ - const LV2_Atom_Object a = { - { sizeof(LV2_Atom_Object) - sizeof(LV2_Atom), forge->Blank }, - { id, otype } - }; - return lv2_atom_forge_push( - forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a))); -} - -/** - Write the header for a property body (likely in an Object). - See lv2_atom_forge_resource() documentation for an example. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_property_head(LV2_Atom_Forge* forge, - LV2_URID key, - LV2_URID context) -{ - const LV2_Atom_Property_Body a = { key, context, { 0, 0 } }; - return lv2_atom_forge_write(forge, &a, 2 * sizeof(uint32_t)); -} - -/** - Write the header for a Sequence. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_sequence_head(LV2_Atom_Forge* forge, - LV2_Atom_Forge_Frame* frame, - uint32_t unit) -{ - const LV2_Atom_Sequence a = { - { sizeof(LV2_Atom_Sequence) - sizeof(LV2_Atom), forge->Sequence }, - { unit, 0 } - }; - return lv2_atom_forge_push( - forge, frame, lv2_atom_forge_write(forge, &a, sizeof(a))); -} - -/** - Write the time stamp header of an Event (in a Sequence) in audio frames. - After this, call the appropriate forge method(s) to write the body. Note - the returned reference is to an LV2_Event which is NOT an Atom. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_frame_time(LV2_Atom_Forge* forge, int64_t frames) -{ - return lv2_atom_forge_write(forge, &frames, sizeof(frames)); -} - -/** - Write the time stamp header of an Event (in a Sequence) in beats. After - this, call the appropriate forge method(s) to write the body. Note the - returned reference is to an LV2_Event which is NOT an Atom. -*/ -static inline LV2_Atom_Forge_Ref -lv2_atom_forge_beat_time(LV2_Atom_Forge* forge, double beats) -{ - return lv2_atom_forge_write(forge, &beats, sizeof(beats)); -} - -/** - @} -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_ATOM_FORGE_H */ diff --git a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl b/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl deleted file mode 100644 index 71b7d95..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/lv2-atom.doap.ttl +++ /dev/null @@ -1,68 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/atom> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Atom" ; - doap:shortdesc "A generic value container and several data types." ; - doap:license <http://opensource.org/licenses/isc> ; - doap:created "2007-00-00" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.6" ; - doap:created "2013-05-26" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.6.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix crash in forge.h when pushing atoms to a full buffer." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2013-01-27" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix lv2_atom_sequence_end()." - ] , [ - rdfs:label "Remove atom:stringType in favour of owl:onDatatype so generic tools can understand and validate atom literals." - ] , [ - rdfs:label "Improve atom documentation." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix implicit conversions in forge.h that are invalid in C++11." - ] , [ - rdfs:label "Fix lv2_atom_object_next() on 32-bit platforms." - ] , [ - rdfs:label "Add lv2_atom_object_body_get()." - ] , [ - rdfs:label "Fix outdated documentation in forge.h." - ] , [ - rdfs:label "Use consistent label style." - ] , [ - rdfs:label "Add LV2_ATOM_CONTENTS_CONST and LV2_ATOM_BODY_CONST." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/atom/manifest.ttl b/lv2/lv2plug.in/ns/ext/atom/manifest.ttl deleted file mode 100644 index 4c94643..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/atom> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 6 ; - rdfs:seeAlso <atom.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/atom/util.h b/lv2/lv2plug.in/ns/ext/atom/util.h deleted file mode 100644 index d247ad8..0000000 --- a/lv2/lv2plug.in/ns/ext/atom/util.h +++ /dev/null @@ -1,400 +0,0 @@ -/* - Copyright 2008-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file util.h Helper functions for the LV2 Atom extension. - - Note these functions are all static inline, do not take their address. - - This header is non-normative, it is provided for convenience. -*/ - -#ifndef LV2_ATOM_UTIL_H -#define LV2_ATOM_UTIL_H - -#include <stdarg.h> -#include <stdint.h> -#include <string.h> - -#include "lv2/lv2plug.in/ns/ext/atom/atom.h" - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -/** Pad a size to 64 bits. */ -static inline uint32_t -lv2_atom_pad_size(uint32_t size) -{ - return (size + 7) & (~7); -} - -/** Return the total size of @p atom, including the header. */ -static inline uint32_t -lv2_atom_total_size(const LV2_Atom* atom) -{ - return sizeof(LV2_Atom) + atom->size; -} - -/** Return true iff @p atom is null. */ -static inline bool -lv2_atom_is_null(const LV2_Atom* atom) -{ - return !atom || (atom->type == 0 && atom->size == 0); -} - -/** Return true iff @p a is equal to @p b. */ -static inline bool -lv2_atom_equals(const LV2_Atom* a, const LV2_Atom* b) -{ - return (a == b) || ((a->type == b->type) && - (a->size == b->size) && - !memcmp(a + 1, b + 1, a->size)); -} - -/** - @name Sequence Iterator - @{ -*/ - -/** Get an iterator pointing to the first event in a Sequence body. */ -static inline LV2_Atom_Event* -lv2_atom_sequence_begin(const LV2_Atom_Sequence_Body* body) -{ - return (LV2_Atom_Event*)(body + 1); -} - -/** Get an iterator pointing to the end of a Sequence body. */ -static inline LV2_Atom_Event* -lv2_atom_sequence_end(const LV2_Atom_Sequence_Body* body, uint32_t size) -{ - return (LV2_Atom_Event*)((uint8_t*)body + lv2_atom_pad_size(size)); -} - -/** Return true iff @p i has reached the end of @p body. */ -static inline bool -lv2_atom_sequence_is_end(const LV2_Atom_Sequence_Body* body, - uint32_t size, - LV2_Atom_Event* i) -{ - return (uint8_t*)i >= ((uint8_t*)body + size); -} - -/** Return an iterator to the element following @p i. */ -static inline LV2_Atom_Event* -lv2_atom_sequence_next(const LV2_Atom_Event* i) -{ - return (LV2_Atom_Event*)((uint8_t*)i - + sizeof(LV2_Atom_Event) - + lv2_atom_pad_size(i->body.size)); -} - -/** - A macro for iterating over all events in a Sequence. - @param seq The sequence to iterate over - @param iter The name of the iterator - - This macro is used similarly to a for loop (which it expands to), e.g.: - @code - LV2_ATOM_SEQUENCE_FOREACH(sequence, ev) { - // Do something with ev (an LV2_Atom_Event*) here... - } - @endcode -*/ -#define LV2_ATOM_SEQUENCE_FOREACH(seq, iter) \ - for (LV2_Atom_Event* (iter) = lv2_atom_sequence_begin(&(seq)->body); \ - !lv2_atom_sequence_is_end(&(seq)->body, (seq)->atom.size, (iter)); \ - (iter) = lv2_atom_sequence_next(iter)) - -/** Like LV2_ATOM_SEQUENCE_FOREACH but for a headerless sequence body. */ -#define LV2_ATOM_SEQUENCE_BODY_FOREACH(body, size, iter) \ - for (LV2_Atom_Event* (iter) = lv2_atom_sequence_begin(body); \ - !lv2_atom_sequence_is_end(body, size, (iter)); \ - (iter) = lv2_atom_sequence_next(iter)) - -/** - @} - @name Tuple Iterator - @{ -*/ - -/** Get an iterator pointing to the first element in @p tup. */ -static inline LV2_Atom* -lv2_atom_tuple_begin(const LV2_Atom_Tuple* tup) -{ - return (LV2_Atom*)(LV2_ATOM_BODY(tup)); -} - -/** Return true iff @p i has reached the end of @p body. */ -static inline bool -lv2_atom_tuple_is_end(const void* body, uint32_t size, LV2_Atom* i) -{ - return (uint8_t*)i >= ((uint8_t*)body + size); -} - -/** Return an iterator to the element following @p i. */ -static inline LV2_Atom* -lv2_atom_tuple_next(const LV2_Atom* i) -{ - return (LV2_Atom*)( - (uint8_t*)i + sizeof(LV2_Atom) + lv2_atom_pad_size(i->size)); -} - -/** - A macro for iterating over all properties of a Tuple. - @param tuple The tuple to iterate over - @param iter The name of the iterator - - This macro is used similarly to a for loop (which it expands to), e.g.: - @code - LV2_ATOMO_TUPLE_FOREACH(tuple, elem) { - // Do something with elem (an LV2_Atom*) here... - } - @endcode -*/ -#define LV2_ATOM_TUPLE_FOREACH(tuple, iter) \ - for (LV2_Atom* (iter) = lv2_atom_tuple_begin(tuple); \ - !lv2_atom_tuple_is_end(LV2_ATOM_BODY(tuple), (tuple)->size, (iter)); \ - (iter) = lv2_atom_tuple_next(iter)) - -/** Like LV2_ATOM_TUPLE_FOREACH but for a headerless tuple body. */ -#define LV2_ATOM_TUPLE_BODY_FOREACH(body, size, iter) \ - for (LV2_Atom* (iter) = (LV2_Atom*)body; \ - !lv2_atom_tuple_is_end(body, size, (iter)); \ - (iter) = lv2_atom_tuple_next(iter)) - -/** - @} - @name Object Iterator - @{ -*/ - -/** Return a pointer to the first property in @p body. */ -static inline LV2_Atom_Property_Body* -lv2_atom_object_begin(const LV2_Atom_Object_Body* body) -{ - return (LV2_Atom_Property_Body*)(body + 1); -} - -/** Return true iff @p i has reached the end of @p obj. */ -static inline bool -lv2_atom_object_is_end(const LV2_Atom_Object_Body* body, - uint32_t size, - LV2_Atom_Property_Body* i) -{ - return (uint8_t*)i >= ((uint8_t*)body + size); -} - -/** Return an iterator to the property following @p i. */ -static inline LV2_Atom_Property_Body* -lv2_atom_object_next(const LV2_Atom_Property_Body* i) -{ - const LV2_Atom* const value = (LV2_Atom*)( - (uint8_t*)i + 2 * sizeof(uint32_t)); - return (LV2_Atom_Property_Body*)( - (uint8_t*)i + lv2_atom_pad_size(sizeof(LV2_Atom_Property_Body) - + value->size)); -} - -/** - A macro for iterating over all properties of an Object. - @param obj The object to iterate over - @param iter The name of the iterator - - This macro is used similarly to a for loop (which it expands to), e.g.: - @code - LV2_ATOM_OBJECT_FOREACH(object, i) { - // Do something with prop (an LV2_Atom_Property_Body*) here... - } - @endcode -*/ -#define LV2_ATOM_OBJECT_FOREACH(obj, iter) \ - for (LV2_Atom_Property_Body* (iter) = lv2_atom_object_begin(&(obj)->body); \ - !lv2_atom_object_is_end(&(obj)->body, (obj)->atom.size, (iter)); \ - (iter) = lv2_atom_object_next(iter)) - -/** Like LV2_ATOM_OBJECT_FOREACH but for a headerless object body. */ -#define LV2_ATOM_OBJECT_BODY_FOREACH(body, size, iter) \ - for (LV2_Atom_Property_Body* (iter) = lv2_atom_object_begin(body); \ - !lv2_atom_object_is_end(body, size, (iter)); \ - (iter) = lv2_atom_object_next(iter)) - -/** - @} - @name Object Query - @{ -*/ - -/** A single entry in an Object query. */ -typedef struct { - uint32_t key; /**< Key to query (input set by user) */ - const LV2_Atom** value; /**< Found value (output set by query function) */ -} LV2_Atom_Object_Query; - -static const LV2_Atom_Object_Query LV2_ATOM_OBJECT_QUERY_END = { 0, NULL }; - -/** - Get an object's values for various keys. - - The value pointer of each item in @p query will be set to the location of - the corresponding value in @p object. Every value pointer in @p query MUST - be initialised to NULL. This function reads @p object in a single linear - sweep. By allocating @p query on the stack, objects can be "queried" - quickly without allocating any memory. This function is realtime safe. - - This function can only do "flat" queries, it is not smart enough to match - variables in nested objects. - - For example: - @code - const LV2_Atom* name = NULL; - const LV2_Atom* age = NULL; - LV2_Atom_Object_Query q[] = { - { urids.eg_name, &name }, - { urids.eg_age, &age }, - LV2_ATOM_OBJECT_QUERY_END - }; - lv2_atom_object_query(obj, q); - // name and age are now set to the appropriate values in obj, or NULL. - @endcode -*/ -static inline int -lv2_atom_object_query(const LV2_Atom_Object* object, - LV2_Atom_Object_Query* query) -{ - int matches = 0; - int n_queries = 0; - - /* Count number of query keys so we can short-circuit when done */ - for (LV2_Atom_Object_Query* q = query; q->key; ++q) { - ++n_queries; - } - - LV2_ATOM_OBJECT_FOREACH(object, prop) { - for (LV2_Atom_Object_Query* q = query; q->key; ++q) { - if (q->key == prop->key && !*q->value) { - *q->value = &prop->value; - if (++matches == n_queries) { - return matches; - } - break; - } - } - } - return matches; -} - -/** - Body only version of lv2_atom_object_get(). -*/ -static inline int -lv2_atom_object_body_get(uint32_t size, const LV2_Atom_Object_Body* body, ...) -{ - int matches = 0; - int n_queries = 0; - - /* Count number of keys so we can short-circuit when done */ - va_list args; - va_start(args, body); - for (n_queries = 0; va_arg(args, uint32_t); ++n_queries) { - if (!va_arg(args, const LV2_Atom**)) { - return -1; - } - } - va_end(args); - - LV2_ATOM_OBJECT_BODY_FOREACH(body, size, prop) { - va_start(args, body); - for (int i = 0; i < n_queries; ++i) { - uint32_t qkey = va_arg(args, uint32_t); - const LV2_Atom** qval = va_arg(args, const LV2_Atom**); - if (qkey == prop->key && !*qval) { - *qval = &prop->value; - if (++matches == n_queries) { - return matches; - } - break; - } - } - va_end(args); - } - return matches; -} - -/** - Variable argument version of lv2_atom_object_query(). - - This is nicer-looking in code, but a bit more error-prone since it is not - type safe and the argument list must be terminated. - - The arguments should be a series of uint32_t key and const LV2_Atom** value - pairs, terminated by a zero key. The value pointers MUST be initialized to - NULL. For example: - - @code - const LV2_Atom* name = NULL; - const LV2_Atom* age = NULL; - lv2_atom_object_get(obj, - uris.name_key, &name, - uris.age_key, &age, - 0); - @endcode -*/ -static inline int -lv2_atom_object_get(const LV2_Atom_Object* object, ...) -{ - int matches = 0; - int n_queries = 0; - - /* Count number of keys so we can short-circuit when done */ - va_list args; - va_start(args, object); - for (n_queries = 0; va_arg(args, uint32_t); ++n_queries) { - if (!va_arg(args, const LV2_Atom**)) { - return -1; - } - } - va_end(args); - - LV2_ATOM_OBJECT_FOREACH(object, prop) { - va_start(args, object); - for (int i = 0; i < n_queries; ++i) { - uint32_t qkey = va_arg(args, uint32_t); - const LV2_Atom** qval = va_arg(args, const LV2_Atom**); - if (qkey == prop->key && !*qval) { - *qval = &prop->value; - if (++matches == n_queries) { - return matches; - } - break; - } - } - va_end(args); - } - return matches; -} - -/** - @} -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_ATOM_UTIL_H */ diff --git a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h deleted file mode 100644 index 20cd8fd..0000000 --- a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright 2007-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_BUF_SIZE_H -#define LV2_BUF_SIZE_H - -#define LV2_BUF_SIZE_URI "http://lv2plug.in/ns/ext/buf-size" -#define LV2_BUF_SIZE_PREFIX LV2_BUF_SIZE_URI "#" - -#define LV2_BUF_SIZE__boundedBlockLength LV2_BUF_SIZE_PREFIX "boundedBlockLength" -#define LV2_BUF_SIZE__fixedBlockLength LV2_BUF_SIZE_PREFIX "fixedBlockLength" -#define LV2_BUF_SIZE__maxBlockLength LV2_BUF_SIZE_PREFIX "maxBlockLength" -#define LV2_BUF_SIZE__minBlockLength LV2_BUF_SIZE_PREFIX "minBlockLength" -#define LV2_BUF_SIZE__powerOf2BlockLength LV2_BUF_SIZE_PREFIX "powerOf2BlockLength" -#define LV2_BUF_SIZE__sequenceSize LV2_BUF_SIZE_PREFIX "sequenceSize" - -#endif /* LV2_BUF_SIZE_H */ diff --git a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl b/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl deleted file mode 100644 index 5e2ec76..0000000 --- a/lv2/lv2plug.in/ns/ext/buf-size/buf-size.ttl +++ /dev/null @@ -1,99 +0,0 @@ -@prefix bufsz: <http://lv2plug.in/ns/ext/buf-size#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix opts: <http://lv2plug.in/ns/ext/options#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/buf-size> - a lv2:Specification ; - rdfs:seeAlso <buf-size.h> , - <lv2-buf-size.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a facility for plugins to get information about the -block length (the sample_count parameter of LV2_Descriptor::run) and -port buffer sizes, as well as several features which can be used to restrict -the block length.</p> - -<p>This extension defines features and properties but has no special purpose -API of its own. The host provides all the relevant information to the plugin -as <a href="../options/options.html#options">options</a>.</p> - -<p>To require restrictions on the block length, plugins can require additional -features: bufsz:boundedBlockLength, bufsz:powerOf2BlockLength, and -bufsz:fixedBlockLength. These features are data-only, that is they merely -indicate a restriction and do not carry any data or API.</p> -""" . - -bufsz:boundedBlockLength - a lv2:Feature ; - lv2:documentation """ -<p>A feature that indicates the host will provide both the bufsz:minBlockLength -and bufsz:maxBlockLength options to the plugin. Plugins that copy data from -audio inputs can require this feature to ensure they know how much space is -required for auxiliary buffers. Note the minimum may be zero, this feature is -mainly useful to ensure a maximum is available.</p> - -<p>All hosts SHOULD support this feature, since it is simple to support and -necessary for any plugins that may need to copy the input.</p> -""" . - -bufsz:fixedBlockLength - a lv2:Feature ; - lv2:documentation """ -<p>A feature that indicates the host will always call LV2_Descriptor::run() -with the same value for sample_count. This length MUST be provided as the -value of both the bufsz:minBlockLength and bufsz:maxBlockLength options.</p> - -<p>Note that requiring this feature may severely limit the number of hosts -capable of running the plugin.</p> -""" . - -bufsz:powerOf2BlockLength - a lv2:Feature ; - lv2:documentation """ -<p>A feature that indicates the host will always call LV2_Descriptor::run() -with a power of two sample_count. Note that this feature does not guarantee -the value is the same each call, to guarantee a fixed power of two block length -plugins must require both this feature and bufsz:fixedBlockLength.</p> - -<p>Note that requiring this feature may severely limit the number of hosts -capable of running the plugin.</p> -""" . - -bufsz:maxBlockLength - a rdf:Property , - owl:DatatypeProperty , - opts:Option ; - rdfs:label "maximum block length" ; - rdfs:range xsd:nonNegativeInteger ; - lv2:documentation """ -<p>The maximum block length the host will ever request the plugin to process at -once, that is, the maximum <code>sample_count</code> parameter that will ever -be passed to LV2_Descriptor::run().</p> -""" . - -bufsz:minBlockLength - a rdf:Property , - owl:DatatypeProperty , - opts:Option ; - rdfs:label "minimum block length" ; - rdfs:range xsd:nonNegativeInteger ; - lv2:documentation """ -<p>The minimum block length the host will ever request the plugin to process at -once, that is, the minimum <code>sample_count</code> parameter that will ever -be passed to LV2_Descriptor::run().</p> -""" . - -bufsz:sequenceSize - a rdf:Property , - owl:DatatypeProperty , - opts:Option ; - rdfs:label "sequence size" ; - rdfs:range xsd:nonNegativeInteger ; - lv2:documentation """ -<p>The maximum size of a sequence, in bytes. This should be provided as an -option by hosts that support event ports (including but not limited to MIDI), -so plugins have the ability to allocate auxiliary buffers large enough to copy -the input.</p> """ . diff --git a/lv2/lv2plug.in/ns/ext/buf-size/lv2-buf-size.doap.ttl b/lv2/lv2plug.in/ns/ext/buf-size/lv2-buf-size.doap.ttl deleted file mode 100644 index a57ebbd..0000000 --- a/lv2/lv2plug.in/ns/ext/buf-size/lv2-buf-size.doap.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/buf-size> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Buf Size Extension" ; - doap:shortdesc "Access to, and restrictions on, buffer sizes." ; - doap:created "2012-08-07" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.2" ; - doap:created "2012-12-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix typo in bufsz:sequenceSize label." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/buf-size/manifest.ttl b/lv2/lv2plug.in/ns/ext/buf-size/manifest.ttl deleted file mode 100644 index 2578336..0000000 --- a/lv2/lv2plug.in/ns/ext/buf-size/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/buf-size> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <buf-size.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/data-access/data-access.h b/lv2/lv2plug.in/ns/ext/data-access/data-access.h deleted file mode 100644 index b19f65f..0000000 --- a/lv2/lv2plug.in/ns/ext/data-access/data-access.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - LV2 Data Access Extension - Copyright 2008-2011 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file data-access.h - C header for the LV2 Extension Data extension - <http://lv2plug.in/ns/ext/data-access>. - - This extension defines a method for (e.g.) plugin UIs to have (possibly - marshalled) access to the extension_data function on a plugin instance. -*/ - -#ifndef LV2_DATA_ACCESS_H -#define LV2_DATA_ACCESS_H - -#define LV2_DATA_ACCESS_URI "http://lv2plug.in/ns/ext/data-access" - -/** - The data field of the LV2_Feature for this extension. - - To support this feature the host must pass an LV2_Feature struct to the - instantiate method with URI "http://lv2plug.in/ns/ext/data-access" - and data pointed to an instance of this struct. -*/ -typedef struct { - /** - A pointer to a method the UI can call to get data (of a type specified - by some other extension) from the plugin. - - This call never is never guaranteed to return anything, UIs should - degrade gracefully if direct access to the plugin data is not possible - (in which case this function will return NULL). - - This is for access to large data that can only possibly work if the UI - and plugin are running in the same process. For all other things, use - the normal LV2 UI communication system. - */ - const void* (*data_access)(const char* uri); -} LV2_Extension_Data_Feature; - -#endif /* LV2_DATA_ACCESS_H */ diff --git a/lv2/lv2plug.in/ns/ext/data-access/data-access.ttl b/lv2/lv2plug.in/ns/ext/data-access/data-access.ttl deleted file mode 100644 index 654b714..0000000 --- a/lv2/lv2plug.in/ns/ext/data-access/data-access.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix da: <http://lv2plug.in/ns/ext/data-access#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/data-access> - a lv2:Feature ; - rdfs:seeAlso <data-access.h> , - <lv2-data-access.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a feature, LV2_Extension_Data_Feature, which provides -access to LV2_Descriptor::extension_data() for plugin UIs or other potentially -remote users of a plugin.</p> - -<p>Note that the use of this extension by UIs violates the important principle -of UI/plugin separation, and is potentially a source of many problems. -Accordingly, <strong>use of this extension is highly discouraged</strong>, and -plugins should not expect hosts to support it, since it is often impossible to -do so.</p> - -<p>To support this feature the host must pass an LV2_Feature struct to the -instantiate method with URI LV2_DATA_ACCESS_URI and data pointed to an instance -of LV2_Extension_Data_Feature.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/data-access/lv2-data-access.doap.ttl b/lv2/lv2plug.in/ns/ext/data-access/lv2-data-access.doap.ttl deleted file mode 100644 index 084d935..0000000 --- a/lv2/lv2plug.in/ns/ext/data-access/lv2-data-access.doap.ttl +++ /dev/null @@ -1,59 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/data-access> - a doap:Project ; - rdfs:seeAlso <data-access.h> , - <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Data Access" ; - doap:shortdesc "Provides access to LV2_Descriptor::extension_data()." ; - doap:created "2008-00-00" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-data-access-1.4.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] , [ - rdfs:label "Improve documentation." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-05-26" ; - doap:file-release <http://lv2plug.in/spec/lv2-data-access-1.2.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add build system for installation." - ] , [ - rdfs:label "Switch to ISC license." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-10-04" ; - doap:file-release <http://lv2plug.in/spec/lv2-data-access-1.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/data-access/manifest.ttl b/lv2/lv2plug.in/ns/ext/data-access/manifest.ttl deleted file mode 100644 index 85e50fc..0000000 --- a/lv2/lv2plug.in/ns/ext/data-access/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/data-access> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 6 ; - rdfs:seeAlso <data-access.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.h b/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.h deleted file mode 100644 index b62f8ef..0000000 --- a/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - Dynamic manifest specification for LV2 - Copyright 2008-2011 Stefano D'Angelo <zanga.mail@gmail.com> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file dynmanifest.h - C header for the LV2 Dynamic Manifest extension - <http://lv2plug.in/ns/ext/dynmanifest>. - Revision: 1.2 -*/ - -#ifndef LV2_DYN_MANIFEST_H_INCLUDED -#define LV2_DYN_MANIFEST_H_INCLUDED - -#include <stdio.h> - -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" - -#define LV2_DYN_MANIFEST_URI "http://lv2plug.in/ns/ext/dynmanifest" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Dynamic manifest generator handle. - - This handle indicates a particular status of a dynamic manifest generator. - The host MUST NOT attempt to interpret it and, unlikely LV2_Handle, it is - NOT even valid to compare this to NULL. The dynamic manifest generator MAY - use it to reference internal data. -*/ -typedef void * LV2_Dyn_Manifest_Handle; - -/** - Generate the dynamic manifest. - - @param handle Pointer to an uninitialized dynamic manifest generator handle. - - @param features NULL terminated array of LV2_Feature structs which represent - the features the host supports. The dynamic manifest generator may refuse to - (re)generate the dynamic manifest if required features are not found here - (however hosts SHOULD NOT use this as a discovery mechanism, instead of - reading the static manifest file). This array must always exist; if a host - has no features, it MUST pass a single element array containing NULL. - - @return 0 on success, otherwise a non-zero error code. The host SHOULD - evaluate the result of the operation by examining the returned value and - MUST NOT try to interpret the value of handle. -*/ -int lv2_dyn_manifest_open(LV2_Dyn_Manifest_Handle * handle, - const LV2_Feature *const * features); - -/** - Fetch a "list" of subject URIs described in the dynamic manifest. - - The dynamic manifest generator has to fill the resource only with the needed - triples to make the host aware of the "objects" it wants to expose. For - example, if the plugin library exposes a regular LV2 plugin, it should - output only a triple like the following: - - <http://www.example.com/plugin/uri> a lv2:Plugin . - - The objects that are elegible for exposure are those that would need to be - represented by a subject node in a static manifest. - - @param handle Dynamic manifest generator handle. - - @param fp FILE * identifying the resource the host has to set up for the - dynamic manifest generator. The host MUST pass a writable, empty resource to - this function, and the dynamic manifest generator MUST ONLY perform write - operations on it at the end of the stream (e.g., using only fprintf(), - fwrite() and similar). - - @return 0 on success, otherwise a non-zero error code. -*/ -int lv2_dyn_manifest_get_subjects(LV2_Dyn_Manifest_Handle handle, - FILE * fp); - -/** - Function that fetches data related to a specific URI. - - The dynamic manifest generator has to fill the resource with data related to - object represented by the given URI. For example, if the library exposes a - regular LV2 plugin whose URI, as retrieved by the host using - lv2_dyn_manifest_get_subjects() is http://www.example.com/plugin/uri, it - should output something like: - - <pre> - <http://www.example.com/plugin/uri> - a lv2:Plugin ; - doap:name "My Plugin" ; - lv2:binary <mylib.so> ; - etc:etc "..." . - </pre> - - @param handle Dynamic manifest generator handle. - - @param fp FILE * identifying the resource the host has to set up for the - dynamic manifest generator. The host MUST pass a writable resource to this - function, and the dynamic manifest generator MUST ONLY perform write - operations on it at the current position of the stream (e.g. using only - fprintf(), fwrite() and similar). - - @param uri URI to get data about (in the "plain" form, i.e., absolute URI - without Turtle prefixes). - - @return 0 on success, otherwise a non-zero error code. -*/ -int lv2_dyn_manifest_get_data(LV2_Dyn_Manifest_Handle handle, - FILE * fp, - const char * uri); - -/** - Function that ends the operations on the dynamic manifest generator. - - This function SHOULD be used by the dynamic manifest generator to perform - cleanup operations, etc. - - Once this function is called, referring to handle will cause undefined - behavior. - - @param handle Dynamic manifest generator handle. -*/ -void lv2_dyn_manifest_close(LV2_Dyn_Manifest_Handle handle); - -#ifdef __cplusplus -} -#endif - -#endif /* LV2_DYN_MANIFEST_H_INCLUDED */ diff --git a/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.ttl b/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.ttl deleted file mode 100644 index 3806374..0000000 --- a/lv2/lv2plug.in/ns/ext/dynmanifest/dynmanifest.ttl +++ /dev/null @@ -1,90 +0,0 @@ -@prefix dman: <http://lv2plug.in/ns/ext/dynmanifest#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/dynmanifest> - a lv2:Specification ; - rdfs:seeAlso <dynmanifest.h> ; - lv2:documentation """ -<p>The LV2 API, on its own, cannot be used to write plugin libraries where data -is dynamically generated at runtime (e.g. API wrappers), since LV2 requires -needed information to be provided in one or more static data (RDF) files. This -API addresses this limitation by extending the LV2 API.</p> - -<p>To detect that a plugin library implements a dynamic manifest generator, -the host checks its static manifest for a description like:</p> - -<pre class="turtle-code"> -<http://example.org/my-dynamic-manifest> - a dman:DynManifest ; - lv2:binary <mydynmanifest.so> . -</pre> - -<p>To load the data, the host loads the library -(e.g. <code>mydynmanifest.so</code>) as usual and fetches the dynamic Turtle -data from it using this API.</p> - -<p>The host is allowed to request regeneration of the dynamic manifest multiple -times, and the plugin library is expected to provide updated data if/when -possible. All data and references provided via this API before the last -regeneration of the dynamic manifest is to be considered invalid by the host, -including plugin descriptors whose URIs were discovered using this API.</p> - -<h3>Accessing Data</h3> - -<p>Whenever a host wants to access data using this API, it could:</p> - -<ol> -<li>Call lv2_dyn_manifest_open().</li> -<li>Create a FILE for functions to write data to (e.g. using tmpfile()).</li> -<li>Get a <q>list</q> of exposed subject URIs using - lv2_dyn_manifest_get_subjects().</li> -<li>Call lv2_dyn_manifest_get_data() for each URI of interest to - get the data related to that URI (which can be written to any FILE).</li> -<li>Call lv2_dyn_manifest_close().</li> -<li>Parse the content of the FILE(s).</li> -<li>Free/delete/unlink the FILE(s).</li> -</ol> - -<p>Each call to the above mentioned dynamic manifest functions MUST write a -complete, valid Turtle document (including all needed prefix definitions) to -the output FILE.</p> - -<p>Each call to lv2_dyn_manifest_open() causes the (re)generation of the -dynamic manifest data, and invalidates all data fetched before the call.</p> - -<p>In case the plugin library uses this same API to access other dynamic -manifests, it MUST implement some mechanism to avoid potentially endless loops -(such as A loads B, B loads A, etc.) and, in case such a loop is detected, the -operation MUST fail. For this purpose, use of a static boolean flag is -suggested.</p> - -<h3>Threading Rules</h3> - -<p>All of the functions defined by this specification belong to the Discovery -class.</p> -""" . - -dman:DynManifest - a rdfs:Class ; - rdfs:label "Dynamic Manifest" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty lv2:binary ; - owl:minCardinality 1 ; - rdfs:comment """ -A DynManifest MUST have at least 1 lv2:binary, which MUST implement all the -functions defined in dynmanifest.h. -""" - ] ; - rdfs:comment """ -The class which represents a dynamic manifest generator. - -There MUST NOT be any instances of dman:DynManifest in the generated manifest. - -All relative URIs in the generated data MUST be relative to the base path -that would be used to parse a normal LV2 manifest (the bundle path). -""" . diff --git a/lv2/lv2plug.in/ns/ext/dynmanifest/lv2-dynmanifest.doap.ttl b/lv2/lv2plug.in/ns/ext/dynmanifest/lv2-dynmanifest.doap.ttl deleted file mode 100644 index 0f24f55..0000000 --- a/lv2/lv2plug.in/ns/ext/dynmanifest/lv2-dynmanifest.doap.ttl +++ /dev/null @@ -1,54 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/dynmanifest> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Dynamic Manifest" ; - doap:homepage <http://naspro.atheme.org> ; - doap:created "2009-06-13" ; - doap:shortdesc "Support for dynamic data generation." ; - doap:programming-language "C" ; - doap:developer <http://lv2plug.in/ns/meta#daste> ; - doap:release [ - doap:revision "1.6" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-11-21" ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Improve documentation." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-04-10" ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/dynmanifest/manifest.ttl b/lv2/lv2plug.in/ns/ext/dynmanifest/manifest.ttl deleted file mode 100644 index 784fb30..0000000 --- a/lv2/lv2plug.in/ns/ext/dynmanifest/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/dynmanifest> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 6 ; - rdfs:seeAlso <dynmanifest.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/event/event-helpers.h b/lv2/lv2plug.in/ns/ext/event/event-helpers.h deleted file mode 100644 index 5420271..0000000 --- a/lv2/lv2plug.in/ns/ext/event/event-helpers.h +++ /dev/null @@ -1,263 +0,0 @@ -/* - Copyright 2008-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file event-helpers.h Helper functions for the LV2 Event extension - <http://lv2plug.in/ns/ext/event>. -*/ - -#ifndef LV2_EVENT_HELPERS_H -#define LV2_EVENT_HELPERS_H - -#include <stdint.h> -#include <stdlib.h> -#include <string.h> - -#include "lv2/lv2plug.in/ns/ext/event/event.h" - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -/** @file - * Helper functions for the LV2 Event extension - * <http://lv2plug.in/ns/ext/event>. - * - * These functions are provided for convenience only, use of them is not - * required for supporting lv2ev (i.e. the events extension is defined by the - * raw buffer format described in lv2_event.h and NOT by this API). - * - * Note that these functions are all static inline which basically means: - * do not take the address of these functions. */ - - -/** Pad a size to 64 bits (for event sizes) */ -static inline uint16_t -lv2_event_pad_size(uint16_t size) -{ - return (size + 7) & (~7); -} - - -/** Initialize (empty, reset..) an existing event buffer. - * The contents of buf are ignored entirely and overwritten, except capacity - * which is unmodified. */ -static inline void -lv2_event_buffer_reset(LV2_Event_Buffer* buf, - uint16_t stamp_type, - uint8_t *data) -{ - buf->data = data; - buf->header_size = sizeof(LV2_Event_Buffer); - buf->stamp_type = stamp_type; - buf->event_count = 0; - buf->size = 0; -} - - -/** Allocate a new, empty event buffer. */ -static inline LV2_Event_Buffer* -lv2_event_buffer_new(uint32_t capacity, uint16_t stamp_type) -{ - const size_t size = sizeof(LV2_Event_Buffer) + capacity; - LV2_Event_Buffer* buf = (LV2_Event_Buffer*)malloc(size); - if (buf != NULL) { - buf->capacity = capacity; - lv2_event_buffer_reset(buf, stamp_type, (uint8_t *)(buf + 1)); - return buf; - } else { - return NULL; - } -} - - -/** An iterator over an LV2_Event_Buffer. - * - * Multiple simultaneous read iterators over a single buffer is fine, - * but changing the buffer invalidates all iterators (e.g. RW Lock). */ -typedef struct { - LV2_Event_Buffer* buf; - uint32_t offset; -} LV2_Event_Iterator; - - -/** Reset an iterator to point to the start of @a buf. - * @return True if @a iter is valid, otherwise false (buffer is empty) */ -static inline bool -lv2_event_begin(LV2_Event_Iterator* iter, - LV2_Event_Buffer* buf) -{ - iter->buf = buf; - iter->offset = 0; - return (buf->size > 0); -} - - -/** Check if @a iter is valid. - * @return True if @a iter is valid, otherwise false (past end of buffer) */ -static inline bool -lv2_event_is_valid(LV2_Event_Iterator* iter) -{ - return (iter->buf && (iter->offset < iter->buf->size)); -} - - -/** Advance @a iter forward one event. - * @a iter must be valid. - * @return True if @a iter is valid, otherwise false (reached end of buffer) */ -static inline bool -lv2_event_increment(LV2_Event_Iterator* iter) -{ - if (!lv2_event_is_valid(iter)) { - return false; - } - - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); - - iter->offset += lv2_event_pad_size(sizeof(LV2_Event) + ev->size); - - return true; -} - - -/** Dereference an event iterator (get the event currently pointed at). - * @a iter must be valid. - * @a data if non-NULL, will be set to point to the contents of the event - * returned. - * @return A Pointer to the event @a iter is currently pointing at, or NULL - * if the end of the buffer is reached (in which case @a data is - * also set to NULL). */ -static inline LV2_Event* -lv2_event_get(LV2_Event_Iterator* iter, - uint8_t** data) -{ - if (!lv2_event_is_valid(iter)) { - return NULL; - } - - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); - - if (data) - *data = (uint8_t*)ev + sizeof(LV2_Event); - - return ev; -} - - -/** Write an event at @a iter. - * The event (if any) pointed to by @a iter will be overwritten, and @a iter - * incremented to point to the following event (i.e. several calls to this - * function can be done in sequence without twiddling iter in-between). - * @return True if event was written, otherwise false (buffer is full). */ -static inline bool -lv2_event_write(LV2_Event_Iterator* iter, - uint32_t frames, - uint32_t subframes, - uint16_t type, - uint16_t size, - const uint8_t* data) -{ - if (!iter->buf) - return false; - - if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + size) - return false; - - LV2_Event* const ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); - - ev->frames = frames; - ev->subframes = subframes; - ev->type = type; - ev->size = size; - memcpy((uint8_t*)ev + sizeof(LV2_Event), data, size); - ++iter->buf->event_count; - - size = lv2_event_pad_size(sizeof(LV2_Event) + size); - iter->buf->size += size; - iter->offset += size; - - return true; -} - - -/** Reserve space for an event in the buffer and return a pointer to - the memory where the caller can write the event data, or NULL if there - is not enough room in the buffer. */ -static inline uint8_t* -lv2_event_reserve(LV2_Event_Iterator* iter, - uint32_t frames, - uint32_t subframes, - uint16_t type, - uint16_t size) -{ - if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + size) - return NULL; - - LV2_Event* const ev = (LV2_Event*)((uint8_t*)iter->buf->data + - iter->offset); - - ev->frames = frames; - ev->subframes = subframes; - ev->type = type; - ev->size = size; - ++iter->buf->event_count; - - size = lv2_event_pad_size(sizeof(LV2_Event) + size); - iter->buf->size += size; - iter->offset += size; - - return (uint8_t*)ev + sizeof(LV2_Event); -} - - -/** Write an event at @a iter. - * The event (if any) pointed to by @a iter will be overwritten, and @a iter - * incremented to point to the following event (i.e. several calls to this - * function can be done in sequence without twiddling iter in-between). - * @return True if event was written, otherwise false (buffer is full). */ -static inline bool -lv2_event_write_event(LV2_Event_Iterator* iter, - const LV2_Event* ev, - const uint8_t* data) -{ - if (iter->buf->capacity - iter->buf->size < sizeof(LV2_Event) + ev->size) - return false; - - LV2_Event* const write_ev = (LV2_Event*)( - (uint8_t*)iter->buf->data + iter->offset); - - *write_ev = *ev; - memcpy((uint8_t*)write_ev + sizeof(LV2_Event), data, ev->size); - ++iter->buf->event_count; - - const uint16_t size = lv2_event_pad_size(sizeof(LV2_Event) + ev->size); - iter->buf->size += size; - iter->offset += size; - - return true; -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_EVENT_HELPERS_H */ - diff --git a/lv2/lv2plug.in/ns/ext/event/event.h b/lv2/lv2plug.in/ns/ext/event/event.h deleted file mode 100644 index aeb1332..0000000 --- a/lv2/lv2plug.in/ns/ext/event/event.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - Copyright 2008-2011 David Robillard <http://drobilla.net> - Copyright 2006-2007 Lars Luthman <lars.luthman@gmail.com> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file event.h - C API for the LV2 Event extension <http://lv2plug.in/ns/ext/event>. - - This extension is a generic transport mechanism for time stamped events - of any type (e.g. MIDI, OSC, ramps, etc). Each port can transport mixed - events of any type; the type of events and timestamps are defined by a URI - which is mapped to an integer by the host for performance reasons. - - This extension requires the host to support the LV2 URI Map extension. - Any host which supports this extension MUST guarantee that any call to - the LV2 URI Map uri_to_id function with the URI of this extension as the - 'map' argument returns a value within the range of uint16_t. -*/ - -#ifndef LV2_EVENT_H -#define LV2_EVENT_H - -#define LV2_EVENT_URI "http://lv2plug.in/ns/ext/event" -#define LV2_EVENT_PREFIX LV2_EVENT_URI "#" - -#define LV2_EVENT__Event LV2_EVENT_PREFIX "Event" -#define LV2_EVENT__EventPort LV2_EVENT_PREFIX "EventPort" -#define LV2_EVENT__FrameStamp LV2_EVENT_PREFIX "FrameStamp" -#define LV2_EVENT__TimeStamp LV2_EVENT_PREFIX "TimeStamp" -#define LV2_EVENT__generatesTimeStamp LV2_EVENT_PREFIX "generatesTimeStamp" -#define LV2_EVENT__generic LV2_EVENT_PREFIX "generic" -#define LV2_EVENT__inheritsEvent LV2_EVENT_PREFIX "inheritsEvent" -#define LV2_EVENT__inheritsTimeStamp LV2_EVENT_PREFIX "inheritsTimeStamp" -#define LV2_EVENT__supportsEvent LV2_EVENT_PREFIX "supportsEvent" -#define LV2_EVENT__supportsTimeStamp LV2_EVENT_PREFIX "supportsTimeStamp" - -#define LV2_EVENT_AUDIO_STAMP 0 - -#include <stdint.h> - -/** - The best Pulses Per Quarter Note for tempo-based uint32_t timestamps. - Equal to 2^12 * 5 * 7 * 9 * 11 * 13 * 17, which is evenly divisble - by all integers from 1 through 18 inclusive, and powers of 2 up to 2^12. -*/ -static const uint32_t LV2_EVENT_PPQN = 3136573440U; - -/** - An LV2 event (header only). - - LV2 events are generic time-stamped containers for any type of event. - The type field defines the format of a given event's contents. - - This struct defines the header of an LV2 event. An LV2 event is a single - chunk of POD (plain old data), usually contained in a flat buffer (see - LV2_EventBuffer below). Unless a required feature says otherwise, hosts may - assume a deep copy of an LV2 event can be created safely using a simple: - - memcpy(ev_copy, ev, sizeof(LV2_Event) + ev->size); (or equivalent) -*/ -typedef struct { - /** - The frames portion of timestamp. The units used here can optionally be - set for a port (with the lv2ev:timeUnits property), otherwise this is - audio frames, corresponding to the sample_count parameter of the LV2 run - method (e.g. frame 0 is the first frame for that call to run). - */ - uint32_t frames; - - /** - The sub-frames portion of timestamp. The units used here can optionally - be set for a port (with the lv2ev:timeUnits property), otherwise this is - 1/(2^32) of an audio frame. - */ - uint32_t subframes; - - /** - The type of this event, as a number which represents some URI - defining an event type. This value MUST be some value previously - returned from a call to the uri_to_id function defined in the LV2 - URI map extension (see lv2_uri_map.h). - There are special rules which must be followed depending on the type - of an event. If the plugin recognizes an event type, the definition - of that event type will describe how to interpret the event, and - any required behaviour. Otherwise, if the type is 0, this event is a - non-POD event and lv2_event_unref MUST be called if the event is - 'dropped' (see above). Even if the plugin does not understand an event, - it may pass the event through to an output by simply copying (and NOT - calling lv2_event_unref). These rules are designed to allow for generic - event handling plugins and large non-POD events, but with minimal hassle - on simple plugins that "don't care" about these more advanced features. - */ - uint16_t type; - - /** - The size of the data portion of this event in bytes, which immediately - follows. The header size (12 bytes) is not included in this value. - */ - uint16_t size; - - /* size bytes of data follow here */ -} LV2_Event; - - -/** - A buffer of LV2 events (header only). - - Like events (which this contains) an event buffer is a single chunk of POD: - the entire buffer (including contents) can be copied with a single memcpy. - The first contained event begins sizeof(LV2_EventBuffer) bytes after the - start of this struct. - - After this header, the buffer contains an event header (defined by struct - LV2_Event), followed by that event's contents (padded to 64 bits), followed - by another header, etc: - - | | | | | | | - | | | | | | | | | | | | | | | | | | | | | | | | | - |FRAMES |SUBFRMS|TYP|LEN|DATA..DATA..PAD|FRAMES | ... -*/ -typedef struct { - /** - The contents of the event buffer. This may or may not reside in the - same block of memory as this header, plugins must not assume either. - The host guarantees this points to at least capacity bytes of allocated - memory (though only size bytes of that are valid events). - */ - uint8_t* data; - - /** - The size of this event header in bytes (including everything). - - This is to allow for extending this header in the future without - breaking binary compatibility. Whenever this header is copied, - it MUST be done using this field (and NOT the sizeof this struct). - */ - uint16_t header_size; - - /** - The type of the time stamps for events in this buffer. - As a special exception, '0' always means audio frames and subframes - (1/UINT32_MAX'th of a frame) in the sample rate passed to instantiate. - - INPUTS: The host must set this field to the numeric ID of some URI - defining the meaning of the frames/subframes fields of contained events - (obtained by the LV2 URI Map uri_to_id function with the URI of this - extension as the 'map' argument, see lv2_uri_map.h). The host must - never pass a plugin a buffer which uses a stamp type the plugin does not - 'understand'. The value of this field must never change, except when - connect_port is called on the input port, at which time the host MUST - have set the stamp_type field to the value that will be used for all - subsequent run calls. - - OUTPUTS: The plugin may set this to any value that has been returned - from uri_to_id with the URI of this extension for a 'map' argument. - When connected to a buffer with connect_port, output ports MUST set this - field to the type of time stamp they will be writing. On any call to - connect_port on an event input port, the plugin may change this field on - any output port, it is the responsibility of the host to check if any of - these values have changed and act accordingly. - */ - uint16_t stamp_type; - - /** - The number of events in this buffer. - - INPUTS: The host must set this field to the number of events contained - in the data buffer before calling run(). The plugin must not change - this field. - - OUTPUTS: The plugin must set this field to the number of events it has - written to the buffer before returning from run(). Any initial value - should be ignored by the plugin. - */ - uint32_t event_count; - - /** - The size of the data buffer in bytes. - This is set by the host and must not be changed by the plugin. - The host is allowed to change this between run() calls. - */ - uint32_t capacity; - - /** - The size of the initial portion of the data buffer containing data. - - INPUTS: The host must set this field to the number of bytes used - by all events it has written to the buffer (including headers) - before calling the plugin's run(). - The plugin must not change this field. - - OUTPUTS: The plugin must set this field to the number of bytes - used by all events it has written to the buffer (including headers) - before returning from run(). - Any initial value should be ignored by the plugin. - */ - uint32_t size; -} LV2_Event_Buffer; - - -/** - Opaque pointer to host data. -*/ -typedef void* LV2_Event_Callback_Data; - - -/** - Non-POD events feature. - - To support this feature the host must pass an LV2_Feature struct to the - plugin's instantiate method with URI "http://lv2plug.in/ns/ext/event" - and data pointed to an instance of this struct. Note this feature - is not mandatory to support the event extension. -*/ -typedef struct { - /** - Opaque pointer to host data. - - The plugin MUST pass this to any call to functions in this struct. - Otherwise, it must not be interpreted in any way. - */ - LV2_Event_Callback_Data callback_data; - - /** - Take a reference to a non-POD event. - - If a plugin receives an event with type 0, it means the event is a - pointer to some object in memory and not a flat sequence of bytes - in the buffer. When receiving a non-POD event, the plugin already - has an implicit reference to the event. If the event is stored AND - passed to an output, lv2_event_ref MUST be called on that event. - If the event is only stored OR passed through, this is not necessary - (as the plugin already has 1 implicit reference). - - @param event An event received at an input that will not be copied to - an output or stored in any way. - - @param context The calling context. Like event types, this is a mapped - URI, see lv2_context.h. Simple plugin with just a run() method should - pass 0 here (the ID of the 'standard' LV2 run context). The host - guarantees that this function is realtime safe iff @a context is - realtime safe. - - PLUGINS THAT VIOLATE THESE RULES MAY CAUSE CRASHES AND MEMORY LEAKS. - */ - uint32_t (*lv2_event_ref)(LV2_Event_Callback_Data callback_data, - LV2_Event* event); - - /** - Drop a reference to a non-POD event. - - If a plugin receives an event with type 0, it means the event is a - pointer to some object in memory and not a flat sequence of bytes - in the buffer. If the plugin does not pass the event through to - an output or store it internally somehow, it MUST call this function - on the event (more information on using non-POD events below). - - @param event An event received at an input that will not be copied to an - output or stored in any way. - - @param context The calling context. Like event types, this is a mapped - URI, see lv2_context.h. Simple plugin with just a run() method should - pass 0 here (the ID of the 'standard' LV2 run context). The host - guarantees that this function is realtime safe iff @a context is - realtime safe. - - PLUGINS THAT VIOLATE THESE RULES MAY CAUSE CRASHES AND MEMORY LEAKS. - */ - uint32_t (*lv2_event_unref)(LV2_Event_Callback_Data callback_data, - LV2_Event* event); -} LV2_Event_Feature; - - -#endif /* LV2_EVENT_H */ diff --git a/lv2/lv2plug.in/ns/ext/event/event.ttl b/lv2/lv2plug.in/ns/ext/event/event.ttl deleted file mode 100644 index 66776f8..0000000 --- a/lv2/lv2plug.in/ns/ext/event/event.ttl +++ /dev/null @@ -1,162 +0,0 @@ -@prefix ev: <http://lv2plug.in/ns/ext/event#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/event> - a owl:Ontology ; - owl:deprecated true ; - rdfs:seeAlso <event.h> , - <event-helpers.h> , - <lv2-event.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a generic time-stamped event port type, which can be -used to create plugins that read and write real-time events, such as MIDI, -OSC, or any other type of event payload. The type(s) of event supported by -a port is defined in the data file for a plugin, for example:</p> -<pre class="turtle-code"> -<http://example.org/some-plugin> - lv2:port [ - a ev:EventPort, lv2:InputPort ; - lv2:index 0 ; - ev:supportsEvent <http://lv2plug.in/ns/ext/midi#MidiEvent> ; - lv2:symbol "midi_input" ; - lv2:name "MIDI input" ; - ] . -</pre> -""" . - -ev:EventPort - a rdfs:Class ; - rdfs:label "Event Port" ; - rdfs:subClassOf lv2:Port ; - rdfs:comment """ -Ports of this type will be connected to a struct of type LV2_Event_Buffer, -defined in event.h. These ports contain a sequence of generic events -(possibly several types mixed in a single stream), the specific types of -which are defined by some URI in another LV2 extension. -""" . - -ev:Event - a rdfs:Class ; - rdfs:label "Event" ; - rdfs:comment """ -A single generic time-stamped event. - -An ev:EventPort contains an LV2_Event_Buffer which contains a sequence -of these events. The binary format of LV2 events is defined by the -LV2_Event struct in event.h. - -Specific event types (e.g. MIDI, OSC) are defined by extensions, and should -be rdfs:subClassOf this class. -""" . - -ev:TimeStamp - a rdfs:Class ; - rdfs:label "Event Time Stamp" ; - rdfs:comment """ -The time stamp of an Event. - -This defines the meaning of the 'frames' and 'subframes' fields of an -LV2_Event (both unsigned 32-bit integers). -""" . - -ev:FrameStamp - a rdfs:Class ; - rdfs:subClassOf ev:TimeStamp ; - rdfs:label "Audio Frame Time Stamp" ; - rdfs:comment """ -The default time stamp unit for an LV2 event: the frames field represents -audio frames (in the sample rate passed to intantiate), and the subframes -field is 1/UINT32_MAX of a frame. -""" . - -ev:generic - a lv2:PortProperty ; - rdfs:label "generic event port" ; - rdfs:comment """ -Indicates that this port does something meaningful for any event type -(e.g. event mixers, delays, serialisers, etc). If this property is set, hosts -should consider the port suitable for any type of event. Otherwise, hosts -should consider the port 'appropriate' only for the specific event types -listed with :supportsEvent. Note that plugins must gracefully handle unknown -event types whether or not this property is present. -""" . - -ev:supportsEvent - a rdf:Property ; - rdfs:domain ev:EventPort ; - rdfs:range rdfs:Class ; - rdfs:label "supports event type" ; - rdfs:comment """ -Indicates that this port supports or "understands" a certain event type. -For input ports, this means the plugin understands and does something useful -with events of this type. For output ports, this means the plugin may generate -events of this type. If the plugin never actually generates events of this type, -but might pass them through from an input, this property should not be set (use -ev:inheritsEvent for that). -Plugins with event input ports must always gracefully handle any type of event, -even if it does not 'support' it. This property should always be set for -event types the plugin understands/generates so hosts can discover plugins -appropriate for a given scenario (e.g. plugins with a MIDI input). -Hosts are not expected to consider event ports suitable for some type of -event if the relevant :supportsEvent property is not set, unless the -ev:generic property for that port is also set. -""" . - -ev:inheritsEvent - a rdf:Property ; - rdfs:domain ev:EventPort , - lv2:OutputPort ; - rdfs:range lv2:Port ; - rdfs:label "inherits event type" ; - rdfs:comment """ -Indicates that this output port might pass through events that arrived at some -other input port (or generate an event of the same type as events arriving at -that input). The host must always check the stamp type of all outputs when -connecting an input, but this property should be set whenever it applies. -""" . - -ev:supportsTimeStamp - a rdf:Property ; - rdfs:domain ev:EventPort , - lv2:InputPort ; - rdfs:range rdfs:Class ; - rdfs:label "supports time stamp type" ; - rdfs:comment """ -Indicates that this port supports or "understands" a certain time stamp type. -Meaningful only for input ports, the host must never connect a port to an -event buffer with a time stamp type that isn't supported by the port. -""" . - -ev:generatesTimeStamp - a rdf:Property ; - rdfs:domain ev:EventPort , - lv2:OutputPort ; - rdfs:range rdfs:Class ; - rdfs:label "generates time stamp type" ; - rdfs:comment """ -Indicates that this port may output a certain time stamp type, regardless of -the time stamp type of any input ports. If the port outputs stamps based on -what type inputs are connected to, this property should not be set (use the -ev:inheritsTimeStamp property for that). Hosts MUST check the time_stamp value -of any output port buffers after a call to connect_port on ANY event input -port on the plugin. If the plugin changes the stamp_type field of an output -event buffer during a call to run(), the plugin must call the -stamp_type_changed function provided by the host in the LV2_Event_Feature -struct, if it is non-NULL. -""" . - -ev:inheritsTimeStamp - a rdf:Property ; - rdfs:domain ev:EventPort , - lv2:OutputPort ; - rdfs:range lv2:Port ; - rdfs:label "inherits time stamp type" ; - rdfs:comment """ -Indicates that this port follows the time stamp type of an input port. -This property is not necessary, but it should be set for outputs that -base their output type on an input port so the host can make more sense -of the plugin and provide a more sensible interface. -""" . diff --git a/lv2/lv2plug.in/ns/ext/event/lv2-event.doap.ttl b/lv2/lv2plug.in/ns/ext/event/lv2-event.doap.ttl deleted file mode 100644 index 64dc567..0000000 --- a/lv2/lv2plug.in/ns/ext/event/lv2-event.doap.ttl +++ /dev/null @@ -1,89 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/event> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Event" ; - doap:shortdesc "A port-based real-time generic event interface." ; - doap:created "2008-00-00" ; - doap:developer <http://drobilla.net/drobilla#me> , - <http://lv2plug.in/ns/meta#larsl> ; - doap:release [ - doap:revision "1.10" ; - doap:created "2013-01-13" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix incorrect return type in lv2_event_get()." - ] - ] - ] , [ - doap:revision "1.8" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Make event iterator gracefully handle optional ports." - ] , [ - rdfs:label "Remove asserts from event-helper.h." - ] , [ - rdfs:label "Use more precise domain and range for EventPort properties." - ] , [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix bug in lv2_event_reserve()." - ] , [ - rdfs:label "Fix incorrect ranges of some properties." - ] , [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-event-1.4.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-05-26" ; - doap:file-release <http://lv2plug.in/spec/lv2-event-1.2.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add build system (for installation)." - ] , [ - rdfs:label "Convert documentation to HTML and use lv2:documentation." - ] , [ - rdfs:label "Use lv2:Specification to be discovered as an extension." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-11-24" ; - doap:file-release <http://lv2plug.in/spec/lv2-event-1.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/event/manifest.ttl b/lv2/lv2plug.in/ns/ext/event/manifest.ttl deleted file mode 100644 index 7e246f7..0000000 --- a/lv2/lv2plug.in/ns/ext/event/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/event> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 10 ; - rdfs:seeAlso <event.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/instance-access/instance-access.h b/lv2/lv2plug.in/ns/ext/instance-access/instance-access.h deleted file mode 100644 index 06d8dde..0000000 --- a/lv2/lv2plug.in/ns/ext/instance-access/instance-access.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - LV2 Instance Access Extension - Copyright 2008-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_INSTANCE_ACCESS_H -#define LV2_INSTANCE_ACCESS_H - -#define LV2_INSTANCE_ACCESS_URI "http://lv2plug.in/ns/ext/instance-access" - -/** - @file instance-access.h - C header for the LV2 Instance Access extension - <http://lv2plug.in/ns/ext/instance-access>. - - This extension defines a method for (e.g.) plugin UIs to get a direct - handle to an LV2 plugin instance (LV2_Handle), if possible. - - To support this feature the host must pass an LV2_Feature struct to the - UI instantiate method with URI "http://lv2plug.in/ns/ext/instance-access" - and data pointed directly to the LV2_Handle of the plugin instance. -*/ - -#endif /* LV2_INSTANCE_ACCESS_H */ - diff --git a/lv2/lv2plug.in/ns/ext/instance-access/instance-access.ttl b/lv2/lv2plug.in/ns/ext/instance-access/instance-access.ttl deleted file mode 100644 index 5656345..0000000 --- a/lv2/lv2plug.in/ns/ext/instance-access/instance-access.ttl +++ /dev/null @@ -1,22 +0,0 @@ -@prefix ia: <http://lv2plug.in/ns/ext/instance-access#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/instance-access> - a lv2:Feature ; - rdfs:seeAlso <instance-access.h> , - <lv2-instance-access.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a feature which allows plugin UIs to get a direct -handle to an LV2 plugin instance (LV2_Handle), if possible.</p> - -<p>Note that the use of this extension by UIs violates the important principle -of UI/plugin separation, and is potentially a source of many problems. -Accordingly, <strong>use of this extension is highly discouraged</strong>, and -plugins should not expect hosts to support it, since it is often impossible to -do so.</p> - -<p>To support this feature the host must pass an LV2_Feature struct to the UI -instantiate method with URI LV2_INSTANCE_ACCESS_URI and data pointed directly -to the LV2_Handle of the plugin instance.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/instance-access/lv2-instance-access.doap.ttl b/lv2/lv2plug.in/ns/ext/instance-access/lv2-instance-access.doap.ttl deleted file mode 100644 index 2c7cba8..0000000 --- a/lv2/lv2plug.in/ns/ext/instance-access/lv2-instance-access.doap.ttl +++ /dev/null @@ -1,58 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/instance-access> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Instance Access" ; - doap:shortdesc "Provides access to the LV2_Handle of a plugin." ; - doap:created "2010-10-04" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-instance-access-1.4.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] , [ - rdfs:label "Improve documentation." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-05-26" ; - doap:file-release <http://lv2plug.in/spec/lv2-instance-access-1.2.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add build system for installation." - ] , [ - rdfs:label "Switch to ISC license." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-10-04" ; - doap:file-release <http://lv2plug.in/spec/lv2-instance-access-1.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/instance-access/manifest.ttl b/lv2/lv2plug.in/ns/ext/instance-access/manifest.ttl deleted file mode 100644 index cee5dbf..0000000 --- a/lv2/lv2plug.in/ns/ext/instance-access/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/instance-access> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 6 ; - rdfs:seeAlso <instance-access.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/log/log.h b/lv2/lv2plug.in/ns/ext/log/log.h deleted file mode 100644 index 2279fa3..0000000 --- a/lv2/lv2plug.in/ns/ext/log/log.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file log.h C header for the LV2 Log extension - <http://lv2plug.in/ns/ext/log>. -*/ - -#ifndef LV2_LOG_H -#define LV2_LOG_H - -#define LV2_LOG_URI "http://lv2plug.in/ns/ext/log" -#define LV2_LOG_PREFIX LV2_LOG_URI "#" - -#define LV2_LOG__Entry LV2_LOG_PREFIX "Entry" -#define LV2_LOG__Error LV2_LOG_PREFIX "Error" -#define LV2_LOG__Note LV2_LOG_PREFIX "Note" -#define LV2_LOG__Trace LV2_LOG_PREFIX "Trace" -#define LV2_LOG__Warning LV2_LOG_PREFIX "Warning" -#define LV2_LOG__log LV2_LOG_PREFIX "log" - -#include <stdarg.h> - -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __GNUC__ -/** Allow type checking of printf-like functions. */ -# define LV2_LOG_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1))) -#else -# define LV2_LOG_FUNC(fmt, arg1) -#endif - -/** - Opaque data to host data for LV2_Log_Log. -*/ -typedef void* LV2_Log_Handle; - -/** - Log feature (LV2_LOG__log) -*/ -typedef struct _LV2_Log { - /** - Opaque pointer to host data. - - This MUST be passed to methods in this struct whenever they are called. - Otherwise, it must not be interpreted in any way. - */ - LV2_Log_Handle handle; - - /** - Log a message, passing format parameters directly. - - The API of this function matches that of the standard C printf function, - except for the addition of the first two parameters. This function may - be called from any non-realtime context, or from any context if @p type - is @ref LV2_LOG__Trace. - */ - LV2_LOG_FUNC(3, 4) - int (*printf)(LV2_Log_Handle handle, - LV2_URID type, - const char* fmt, ...); - - /** - Log a message, passing format parameters in a va_list. - - The API of this function matches that of the standard C vprintf - function, except for the addition of the first two parameters. This - function may be called from any non-realtime context, or from any - context if @p type is @ref LV2_LOG__Trace. - */ - LV2_LOG_FUNC(3, 0) - int (*vprintf)(LV2_Log_Handle handle, - LV2_URID type, - const char* fmt, - va_list ap); -} LV2_Log_Log; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_LOG_H */ diff --git a/lv2/lv2plug.in/ns/ext/log/log.ttl b/lv2/lv2plug.in/ns/ext/log/log.ttl deleted file mode 100644 index 26e18cc..0000000 --- a/lv2/lv2plug.in/ns/ext/log/log.ttl +++ /dev/null @@ -1,63 +0,0 @@ -@prefix log: <http://lv2plug.in/ns/ext/log#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/log> - a lv2:Specification ; - rdfs:seeAlso <log.h> , - <lv2-log.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a feature, log:log, which allows plugins to print log -messages with an API much like the standard C printf functions. This allows, -for example, plugin logs to be nicely presented to the user in a graphical user -interface.</p> - -<p>Different log levels (e.g. <q>error</q> or <q>information</q>) are defined -by URI and passed as an LV2_URID. This document defines the typical levels -which should be sufficient, but implementations may define and use additional -levels to suit their needs.</p> -""" . - -log:Entry - a rdfs:Class ; - lv2:documentation """ -<p>A log entry. Subclasses of this class can be passed to LV2_Log_Log methods -to describe the nature of the log message.</p>""" . - -log:Error - a rdfs:Class ; - rdfs:subClassOf log:Entry ; - rdfs:comment "An error" . - -log:Note - a rdfs:Class ; - rdfs:subClassOf log:Entry ; - rdfs:comment "An informative message" . - -log:Warning - a rdfs:Class ; - rdfs:subClassOf log:Entry ; - rdfs:comment "A warning" . - -log:Trace - a rdfs:Class ; - rdfs:subClassOf log:Entry ; - lv2:documentation """ -<p>A debugging trace. These entries should not be displayed during normal -operation, but the host may implement an option to display them for debugging -purposes.</p> - -<p>This entry type is special in that it may be written to in a real-time -thread. It is assumed that if debug tracing is enabled, real-time -considerations are not a concern.</p> -""" . - -log:log - a lv2:Feature ; - lv2:documentation """ -<p>A feature which plugins may use to log messages. To support this feature, -the host must pass an LV2_Feature to LV2_Descriptor::instantiate() with URI -LV2_LOG__log and data pointed to an instance of LV2_Log_Log.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/log/logger.h b/lv2/lv2plug.in/ns/ext/log/logger.h deleted file mode 100644 index 88ca0aa..0000000 --- a/lv2/lv2plug.in/ns/ext/log/logger.h +++ /dev/null @@ -1,146 +0,0 @@ -/* - Copyright 2012-2013 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file logger.h Convenience API for easy logging in plugin code. - - This file provides simple wrappers for the most common log operations for - use in plugin implementations. If host support for logging is not - available, then these functions will print to stderr instead. - - This header is non-normative, it is provided for convenience. -*/ - -#ifndef LV2_ATOM_LOGGER_H -#define LV2_ATOM_LOGGER_H - -#include <stdio.h> -#include <string.h> - -#include "lv2/lv2plug.in/ns/ext/log/log.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Logger convenience API state. -*/ -typedef struct { - LV2_Log_Log* log; - - LV2_URID Error; - LV2_URID Note; - LV2_URID Trace; - LV2_URID Warning; -} LV2_Log_Logger; - -/** - Initialise @p logger. - - URIs will be mapped using @p map and stored, a reference to @p map itself is - not held. Both @p map and @p log may be NULL when unsupported by the host, - in which case the implementation will fall back to printing to stderr. -*/ -static inline void -lv2_log_logger_init(LV2_Log_Logger* logger, - LV2_URID_Map* map, - LV2_Log_Log* log) -{ - memset(logger, 0, sizeof(LV2_Log_Logger)); - logger->log = log; - if (map) { - logger->Error = map->map(map->handle, LV2_LOG__Error); - logger->Note = map->map(map->handle, LV2_LOG__Note); - logger->Trace = map->map(map->handle, LV2_LOG__Trace); - logger->Warning = map->map(map->handle, LV2_LOG__Warning); - } -} - -/** - Log a message to the host, or stderr if support is unavailable. -*/ -LV2_LOG_FUNC(3, 0) -static inline int -lv2_log_vprintf(LV2_Log_Logger* logger, - LV2_URID type, - const char* fmt, - va_list args) -{ - if (logger->log) { - return logger->log->vprintf(logger->log->handle, type, fmt, args); - } else { - return vfprintf(stderr, fmt, args); - } -} - -/** Log an error via lv2_log_vprintf(). */ -LV2_LOG_FUNC(2, 3) -static inline int -lv2_log_error(LV2_Log_Logger* logger, const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - const int ret = lv2_log_vprintf(logger, logger->Error, fmt, args); - va_end(args); - return ret; -} - -/** Log a note via lv2_log_vprintf(). */ -LV2_LOG_FUNC(2, 3) -static inline int -lv2_log_note(LV2_Log_Logger* logger, const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - const int ret = lv2_log_vprintf(logger, logger->Note, fmt, args); - va_end(args); - return ret; -} - -/** Log a trace via lv2_log_vprintf(). */ -LV2_LOG_FUNC(2, 3) -static inline int -lv2_log_trace(LV2_Log_Logger* logger, const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - const int ret = lv2_log_vprintf(logger, logger->Trace, fmt, args); - va_end(args); - return ret; -} - -/** Log a warning via lv2_log_vprintf(). */ -LV2_LOG_FUNC(2, 3) -static inline int -lv2_log_warning(LV2_Log_Logger* logger, const char* fmt, ...) -{ - va_list args; - va_start(args, fmt); - const int ret = lv2_log_vprintf(logger, logger->Warning, fmt, args); - va_end(args); - return ret; -} - -/** - @} -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_LOG_LOGGER_H */ diff --git a/lv2/lv2plug.in/ns/ext/log/lv2-log.doap.ttl b/lv2/lv2plug.in/ns/ext/log/lv2-log.doap.ttl deleted file mode 100644 index 9de67dd..0000000 --- a/lv2/lv2plug.in/ns/ext/log/lv2-log.doap.ttl +++ /dev/null @@ -1,42 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/log> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Log" ; - doap:shortdesc "A feature for writing log messages." ; - doap:created "2012-01-12" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "2.1" ; - doap:created "2013-12-15" ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add missing include <string.h> to logger.h for memset." - ] - ] - ] , [ - doap:revision "2.0" ; - doap:created "2013-01-08" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add logger convenience API." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/log/manifest.ttl b/lv2/lv2plug.in/ns/ext/log/manifest.ttl deleted file mode 100644 index c76008b..0000000 --- a/lv2/lv2plug.in/ns/ext/log/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/log> - a lv2:Specification ; - lv2:minorVersion 2 ; - lv2:microVersion 1 ; - rdfs:seeAlso <log.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/midi/lv2-midi.doap.ttl b/lv2/lv2plug.in/ns/ext/midi/lv2-midi.doap.ttl deleted file mode 100644 index 32ee007..0000000 --- a/lv2/lv2plug.in/ns/ext/midi/lv2-midi.doap.ttl +++ /dev/null @@ -1,84 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/midi> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 MIDI" ; - doap:shortdesc "A normalised definition of raw MIDI." ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:created "2006-00-00" ; - doap:developer <http://lv2plug.in/ns/meta#larsl> , - <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.8" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] , [ - rdfs:label "Add midi:binding and midi:channel predicates." - ] , [ - rdfs:label "Add midi:HexByte datatype for status bytes and masks." - ] , [ - rdfs:label "Remove non-standard midi:Tick message type." - ] , [ - rdfs:label "Add C definitions for message types and standard controllers." - ] , [ - rdfs:label "Fix definition of SystemExclusive status byte." - ] - ] - ] , [ - doap:revision "1.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add class definitions for various message types." - ] , [ - rdfs:label "Document how to serialise a MidiEvent to a string." - ] , [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-midi-1.4.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] , [ - rdfs:label "Improve documentation." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-05-26" ; - doap:file-release <http://lv2plug.in/spec/lv2-midi-1.2.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add build system for installation." - ] , [ - rdfs:label "Switch to ISC license." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-10-04" ; - doap:file-release <http://lv2plug.in/spec/lv2-midi-1.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/midi/manifest.ttl b/lv2/lv2plug.in/ns/ext/midi/manifest.ttl deleted file mode 100644 index 43d4b54..0000000 --- a/lv2/lv2plug.in/ns/ext/midi/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/midi> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 8 ; - rdfs:seeAlso <midi.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/midi/midi.h b/lv2/lv2plug.in/ns/ext/midi/midi.h deleted file mode 100644 index 2c53c49..0000000 --- a/lv2/lv2plug.in/ns/ext/midi/midi.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file midi.h - C definitions for the LV2 MIDI extension <http://lv2plug.in/ns/ext/midi>. -*/ - -#ifndef LV2_MIDI_H -#define LV2_MIDI_H - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -#define LV2_MIDI_URI "http://lv2plug.in/ns/ext/midi" -#define LV2_MIDI_PREFIX LV2_MIDI_URI "#" - -#define LV2_MIDI__ActiveSense LV2_MIDI_PREFIX "ActiveSense" -#define LV2_MIDI__Aftertouch LV2_MIDI_PREFIX "Aftertouch" -#define LV2_MIDI__Bender LV2_MIDI_PREFIX "Bender" -#define LV2_MIDI__ChannelPressure LV2_MIDI_PREFIX "ChannelPressure" -#define LV2_MIDI__Chunk LV2_MIDI_PREFIX "Chunk" -#define LV2_MIDI__Clock LV2_MIDI_PREFIX "Clock" -#define LV2_MIDI__Continue LV2_MIDI_PREFIX "Continue" -#define LV2_MIDI__Controller LV2_MIDI_PREFIX "Controller" -#define LV2_MIDI__MidiEvent LV2_MIDI_PREFIX "MidiEvent" -#define LV2_MIDI__NoteOff LV2_MIDI_PREFIX "NoteOff" -#define LV2_MIDI__NoteOn LV2_MIDI_PREFIX "NoteOn" -#define LV2_MIDI__ProgramChange LV2_MIDI_PREFIX "ProgramChange" -#define LV2_MIDI__QuarterFrame LV2_MIDI_PREFIX "QuarterFrame" -#define LV2_MIDI__Reset LV2_MIDI_PREFIX "Reset" -#define LV2_MIDI__SongPosition LV2_MIDI_PREFIX "SongPosition" -#define LV2_MIDI__SongSelect LV2_MIDI_PREFIX "SongSelect" -#define LV2_MIDI__Start LV2_MIDI_PREFIX "Start" -#define LV2_MIDI__Stop LV2_MIDI_PREFIX "Stop" -#define LV2_MIDI__SystemCommon LV2_MIDI_PREFIX "SystemCommon" -#define LV2_MIDI__SystemExclusive LV2_MIDI_PREFIX "SystemExclusive" -#define LV2_MIDI__SystemMessage LV2_MIDI_PREFIX "SystemMessage" -#define LV2_MIDI__SystemRealtime LV2_MIDI_PREFIX "SystemRealtime" -#define LV2_MIDI__Tick LV2_MIDI_PREFIX "Tick" -#define LV2_MIDI__TuneRequest LV2_MIDI_PREFIX "TuneRequest" -#define LV2_MIDI__VoiceMessage LV2_MIDI_PREFIX "VoiceMessage" -#define LV2_MIDI__benderValue LV2_MIDI_PREFIX "benderValue" -#define LV2_MIDI__binding LV2_MIDI_PREFIX "binding" -#define LV2_MIDI__byteNumber LV2_MIDI_PREFIX "byteNumber" -#define LV2_MIDI__channel LV2_MIDI_PREFIX "channel" -#define LV2_MIDI__chunk LV2_MIDI_PREFIX "chunk" -#define LV2_MIDI__controllerNumber LV2_MIDI_PREFIX "controllerNumber" -#define LV2_MIDI__controllerValue LV2_MIDI_PREFIX "controllerValue" -#define LV2_MIDI__noteNumber LV2_MIDI_PREFIX "noteNumber" -#define LV2_MIDI__pressure LV2_MIDI_PREFIX "pressure" -#define LV2_MIDI__programNumber LV2_MIDI_PREFIX "programNumber" -#define LV2_MIDI__property LV2_MIDI_PREFIX "property" -#define LV2_MIDI__songNumber LV2_MIDI_PREFIX "songNumber" -#define LV2_MIDI__songPosition LV2_MIDI_PREFIX "songPosition" -#define LV2_MIDI__status LV2_MIDI_PREFIX "status" -#define LV2_MIDI__statusMask LV2_MIDI_PREFIX "statusMask" -#define LV2_MIDI__velocity LV2_MIDI_PREFIX "velocity" - -/** - MIDI Message Type. - - This includes both voice messages (which have a channel) and system messages - (which do not), as well as a sentinel value for invalid messages. To get - the type of a message suitable for use in a switch statement, use - lv2_midi_get_type() on the status byte. -*/ -typedef enum { - LV2_MIDI_MSG_INVALID = 0, /**< Invalid Message */ - LV2_MIDI_MSG_NOTE_OFF = 0x80, /**< Note Off */ - LV2_MIDI_MSG_NOTE_ON = 0x90, /**< Note On */ - LV2_MIDI_MSG_NOTE_PRESSURE = 0xA0, /**< Note Pressure */ - LV2_MIDI_MSG_CONTROLLER = 0xB0, /**< Controller */ - LV2_MIDI_MSG_PGM_CHANGE = 0xC0, /**< Program Change */ - LV2_MIDI_MSG_CHANNEL_PRESSURE = 0xD0, /**< Channel Pressure */ - LV2_MIDI_MSG_BENDER = 0xE0, /**< Pitch Bender */ - LV2_MIDI_MSG_SYSTEM_EXCLUSIVE = 0xF0, /**< System Exclusive Begin */ - LV2_MIDI_MSG_MTC_QUARTER = 0xF1, /**< MTC Quarter Frame */ - LV2_MIDI_MSG_SONG_POS = 0xF2, /**< Song Position */ - LV2_MIDI_MSG_SONG_SELECT = 0xF3, /**< Song Select */ - LV2_MIDI_MSG_TUNE_REQUEST = 0xF6, /**< Tune Request */ - LV2_MIDI_MSG_CLOCK = 0xF8, /**< Clock */ - LV2_MIDI_MSG_START = 0xFA, /**< Start */ - LV2_MIDI_MSG_CONTINUE = 0xFB, /**< Continue */ - LV2_MIDI_MSG_STOP = 0xFC, /**< Stop */ - LV2_MIDI_MSG_ACTIVE_SENSE = 0xFE, /**< Active Sensing */ - LV2_MIDI_MSG_RESET = 0xFF /**< Reset */ -} LV2_Midi_Message_Type; - -/** - Standard MIDI Controller Numbers. -*/ -typedef enum { - LV2_MIDI_CTL_MSB_BANK = 0x00, /**< Bank Selection */ - LV2_MIDI_CTL_MSB_MODWHEEL = 0x01, /**< Modulation */ - LV2_MIDI_CTL_MSB_BREATH = 0x02, /**< Breath */ - LV2_MIDI_CTL_MSB_FOOT = 0x04, /**< Foot */ - LV2_MIDI_CTL_MSB_PORTAMENTO_TIME = 0x05, /**< Portamento Time */ - LV2_MIDI_CTL_MSB_DATA_ENTRY = 0x06, /**< Data Entry */ - LV2_MIDI_CTL_MSB_MAIN_VOLUME = 0x07, /**< Main Volume */ - LV2_MIDI_CTL_MSB_BALANCE = 0x08, /**< Balance */ - LV2_MIDI_CTL_MSB_PAN = 0x0A, /**< Panpot */ - LV2_MIDI_CTL_MSB_EXPRESSION = 0x0B, /**< Expression */ - LV2_MIDI_CTL_MSB_EFFECT1 = 0x0C, /**< Effect1 */ - LV2_MIDI_CTL_MSB_EFFECT2 = 0x0D, /**< Effect2 */ - LV2_MIDI_CTL_MSB_GENERAL_PURPOSE1 = 0x10, /**< General Purpose 1 */ - LV2_MIDI_CTL_MSB_GENERAL_PURPOSE2 = 0x11, /**< General Purpose 2 */ - LV2_MIDI_CTL_MSB_GENERAL_PURPOSE3 = 0x12, /**< General Purpose 3 */ - LV2_MIDI_CTL_MSB_GENERAL_PURPOSE4 = 0x13, /**< General Purpose 4 */ - LV2_MIDI_CTL_LSB_BANK = 0x20, /**< Bank Selection */ - LV2_MIDI_CTL_LSB_MODWHEEL = 0x21, /**< Modulation */ - LV2_MIDI_CTL_LSB_BREATH = 0x22, /**< Breath */ - LV2_MIDI_CTL_LSB_FOOT = 0x24, /**< Foot */ - LV2_MIDI_CTL_LSB_PORTAMENTO_TIME = 0x25, /**< Portamento Time */ - LV2_MIDI_CTL_LSB_DATA_ENTRY = 0x26, /**< Data Entry */ - LV2_MIDI_CTL_LSB_MAIN_VOLUME = 0x27, /**< Main Volume */ - LV2_MIDI_CTL_LSB_BALANCE = 0x28, /**< Balance */ - LV2_MIDI_CTL_LSB_PAN = 0x2A, /**< Panpot */ - LV2_MIDI_CTL_LSB_EXPRESSION = 0x2B, /**< Expression */ - LV2_MIDI_CTL_LSB_EFFECT1 = 0x2C, /**< Effect1 */ - LV2_MIDI_CTL_LSB_EFFECT2 = 0x2D, /**< Effect2 */ - LV2_MIDI_CTL_LSB_GENERAL_PURPOSE1 = 0x30, /**< General Purpose 1 */ - LV2_MIDI_CTL_LSB_GENERAL_PURPOSE2 = 0x31, /**< General Purpose 2 */ - LV2_MIDI_CTL_LSB_GENERAL_PURPOSE3 = 0x32, /**< General Purpose 3 */ - LV2_MIDI_CTL_LSB_GENERAL_PURPOSE4 = 0x33, /**< General Purpose 4 */ - LV2_MIDI_CTL_SUSTAIN = 0x40, /**< Sustain Pedal */ - LV2_MIDI_CTL_PORTAMENTO = 0x41, /**< Portamento */ - LV2_MIDI_CTL_SOSTENUTO = 0x42, /**< Sostenuto */ - LV2_MIDI_CTL_SOFT_PEDAL = 0x43, /**< Soft Pedal */ - LV2_MIDI_CTL_LEGATO_FOOTSWITCH = 0x44, /**< Legato Foot Switch */ - LV2_MIDI_CTL_HOLD2 = 0x45, /**< Hold2 */ - LV2_MIDI_CTL_SC1_SOUND_VARIATION = 0x46, /**< SC1 Sound Variation */ - LV2_MIDI_CTL_SC2_TIMBRE = 0x47, /**< SC2 Timbre */ - LV2_MIDI_CTL_SC3_RELEASE_TIME = 0x48, /**< SC3 Release Time */ - LV2_MIDI_CTL_SC4_ATTACK_TIME = 0x49, /**< SC4 Attack Time */ - LV2_MIDI_CTL_SC5_BRIGHTNESS = 0x4A, /**< SC5 Brightness */ - LV2_MIDI_CTL_SC6 = 0x4B, /**< SC6 */ - LV2_MIDI_CTL_SC7 = 0x4C, /**< SC7 */ - LV2_MIDI_CTL_SC8 = 0x4D, /**< SC8 */ - LV2_MIDI_CTL_SC9 = 0x4E, /**< SC9 */ - LV2_MIDI_CTL_SC10 = 0x4F, /**< SC10 */ - LV2_MIDI_CTL_GENERAL_PURPOSE5 = 0x50, /**< General Purpose 5 */ - LV2_MIDI_CTL_GENERAL_PURPOSE6 = 0x51, /**< General Purpose 6 */ - LV2_MIDI_CTL_GENERAL_PURPOSE7 = 0x52, /**< General Purpose 7 */ - LV2_MIDI_CTL_GENERAL_PURPOSE8 = 0x53, /**< General Purpose 8 */ - LV2_MIDI_CTL_PORTAMENTO_CONTROL = 0x54, /**< Portamento Control */ - LV2_MIDI_CTL_E1_REVERB_DEPTH = 0x5B, /**< E1 Reverb Depth */ - LV2_MIDI_CTL_E2_TREMOLO_DEPTH = 0x5C, /**< E2 Tremolo Depth */ - LV2_MIDI_CTL_E3_CHORUS_DEPTH = 0x5D, /**< E3 Chorus Depth */ - LV2_MIDI_CTL_E4_DETUNE_DEPTH = 0x5E, /**< E4 Detune Depth */ - LV2_MIDI_CTL_E5_PHASER_DEPTH = 0x5F, /**< E5 Phaser Depth */ - LV2_MIDI_CTL_DATA_INCREMENT = 0x60, /**< Data Increment */ - LV2_MIDI_CTL_DATA_DECREMENT = 0x61, /**< Data Decrement */ - LV2_MIDI_CTL_NRPN_LSB = 0x62, /**< Non-registered Parameter Number */ - LV2_MIDI_CTL_NRPN_MSB = 0x63, /**< Non-registered Parameter Number */ - LV2_MIDI_CTL_RPN_LSB = 0x64, /**< Registered Parameter Number */ - LV2_MIDI_CTL_RPN_MSB = 0x65, /**< Registered Parameter Number */ - LV2_MIDI_CTL_ALL_SOUNDS_OFF = 0x78, /**< All Sounds Off */ - LV2_MIDI_CTL_RESET_CONTROLLERS = 0x79, /**< Reset Controllers */ - LV2_MIDI_CTL_LOCAL_CONTROL_SWITCH = 0x7A, /**< Local Control Switch */ - LV2_MIDI_CTL_ALL_NOTES_OFF = 0x7B, /**< All Notes Off */ - LV2_MIDI_CTL_OMNI_OFF = 0x7C, /**< Omni Off */ - LV2_MIDI_CTL_OMNI_ON = 0x7D, /**< Omni On */ - LV2_MIDI_CTL_MONO1 = 0x7E, /**< Mono1 */ - LV2_MIDI_CTL_MONO2 = 0x7F /**< Mono2 */ -} LV2_Midi_Controller; - -/** - Return true iff @p msg is a MIDI voice message (which has a channel). -*/ -static inline bool -lv2_midi_is_voice_message(const uint8_t* msg) { - return msg[0] >= 0x80 && msg[0] < 0xF0; -} - -/** - Return true iff @p msg is a MIDI system message (which has no channel). -*/ -static inline bool -lv2_midi_is_system_message(const uint8_t* msg) { - switch (msg[0]) { - case 0xF4: case 0xF5: case 0xF7: case 0xF9: case 0xFD: - return false; - default: - return (msg[0] & 0xF0) == 0xF0; - } -} - -/** - Return the type of a MIDI message. - @param msg Pointer to the start (status byte) of a MIDI message. -*/ -static inline LV2_Midi_Message_Type -lv2_midi_message_type(const uint8_t* msg) { - if (lv2_midi_is_voice_message(msg)) { - return (LV2_Midi_Message_Type)(msg[0] & 0xF0); - } else if (lv2_midi_is_system_message(msg)) { - return (LV2_Midi_Message_Type)msg[0]; - } else { - return LV2_MIDI_MSG_INVALID; - } -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_MIDI_H */ diff --git a/lv2/lv2plug.in/ns/ext/midi/midi.ttl b/lv2/lv2plug.in/ns/ext/midi/midi.ttl deleted file mode 100644 index 483b193..0000000 --- a/lv2/lv2plug.in/ns/ext/midi/midi.ttl +++ /dev/null @@ -1,383 +0,0 @@ -@prefix atom: <http://lv2plug.in/ns/ext/atom#> . -@prefix ev: <http://lv2plug.in/ns/ext/event#> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix midi: <http://lv2plug.in/ns/ext/midi#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/midi> - a owl:Ontology ; - rdfs:seeAlso <midi.h> , - <lv2-midi.doap.ttl> ; - lv2:documentation """ -<p>This specification defines a data type for a MIDI message, midi:MidiEvent, -which is normalised for fast and convenient real-time processing. MIDI is the -<q>Musical Instrument Digital Interface</q>, a ubiquitous binary standard for -controlling digital music devices.</p> - -<p>For plugins that process MIDI (or other situations where MIDI is sent via a -generic transport) the main type defined here, midi:MidiEvent, can be mapped to -an integer and used as the type of an LV2 <a -href="../atom/atom.html#Atom">Atom</a> or <a -href="../event/event.html#Event">Event</a>.</p> - -<p>This specification also defines a complete human and machine readable -description of the MIDI standard (except for standard controller numbers). -These descriptions are detailed enough to express any MIDI message as -properties.</p> -""" . - -midi:ActiveSense - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Active Sense Message" ; - midi:status "FE"^^xsd:hexBinary . - -midi:Aftertouch - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Aftertouch Message" ; - midi:statusMask "A0"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:noteNumber - ] , [ - midi:byteNumber 1 ; - midi:property midi:pressure - ] . - -midi:Bender - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Bender Message" ; - midi:statusMask "E0"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 , - 1 ; - midi:property midi:benderValue - ] . - -midi:ChannelPressure - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Channel Pressure Message" ; - midi:statusMask "D0"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:pressure - ] . - -midi:Chunk - a rdfs:Class ; - rdfs:comment "A series of contiguous bytes (usually one) in a message." . - -midi:Clock - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Clock Message" ; - midi:status "F8"^^xsd:hexBinary . - -midi:Continue - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Continue Message" ; - midi:status "FB"^^xsd:hexBinary . - -midi:Controller - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Controller Change Message" ; - midi:statusMask "B0"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:controllerNumber - ] , [ - midi:byteNumber 1 ; - midi:property midi:controllerValue - ] . - -midi:HexByte - a rdfs:Datatype ; - owl:onDatatype xsd:hexBinary ; - owl:withRestrictions ( - [ - xsd:maxInclusive "FF" - ] - ) ; - rdfs:comment "A hexadecimal byte, which is a xsd:hexBinary value <= FF" . - -midi:MidiEvent - a rdfs:Class , - rdfs:Datatype ; - rdfs:label "MIDI Message" ; - rdfs:subClassOf ev:Event , - atom:Atom ; - owl:onDatatype xsd:hexBinary ; - lv2:documentation """ -<p>A single raw MIDI message (i.e. a sequence of bytes).</p> - -<p>This is equivalent to a standard MIDI messages, except with the following -restrictions to simplify handling:</p> -<ul> - <li>Running status is not allowed, every message must have its own status - byte.</li> - - <li>Note On messages with velocity 0 are not allowed. These messages are - equivalent to Note Off in standard MIDI streams, but here only proper Note - Off messages are allowed.</li> - - <li>"Realtime messages" (status bytes 0xF8 to 0xFF) are allowed, but may - not occur inside other messages like they can in standard MIDI streams.</li> - - <li>All messages are complete valid MIDI messages. This means, for example, - that only the first byte in each event (the status byte) may have the eighth - bit set, that Note On and Note Off events are always 3 bytes long, etc. - Where messages are communicated, the writer is responsible for writing valid - messages, and the reader may assume that all events are valid.</li> -</ul> - -<p>If a midi:MidiEvent is serialised to a string, the format should be -xsd:hexBinary, e.g. (in Turtle notation):</p> - -<pre class="turtle-code"> -[] eg:someEvent "901A01"^^midi:MidiEvent . -</pre> -""" . - -midi:NoteOff - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Note Off Message" ; - midi:statusMask "80"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:noteNumber - ] , [ - midi:byteNumber 1 ; - midi:property midi:velocity - ] . - -midi:NoteOn - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Note On Message" ; - midi:statusMask "90"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:noteNumber - ] , [ - midi:byteNumber 1 ; - midi:property midi:velocity - ] . - -midi:ProgramChange - a rdfs:Class ; - rdfs:subClassOf midi:VoiceMessage ; - rdfs:label "Program Change Message" ; - midi:statusMask "C0"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 ; - midi:property midi:programNumber - ] . - -midi:QuarterFrame - a rdfs:Class ; - rdfs:subClassOf midi:SystemCommon ; - rdfs:label "Quarter Frame Message" ; - midi:status "F1"^^xsd:hexBinary . - -midi:Reset - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Reset Message" ; - midi:status "FF"^^xsd:hexBinary . - -midi:SongPosition - a rdfs:Class ; - rdfs:subClassOf midi:SystemCommon ; - rdfs:label "Song Position Pointer Message" ; - midi:status "F2"^^xsd:hexBinary ; - midi:chunk [ - midi:byteNumber 0 , - 1 ; - midi:property midi:songPosition - ] . - -midi:SongSelect - a rdfs:Class ; - rdfs:subClassOf midi:SystemCommon ; - rdfs:label "Song Select Message" ; - midi:status "F3"^^xsd:hexBinary . - -midi:Start - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Start Message" ; - midi:status "FA"^^xsd:hexBinary . - -midi:Stop - a rdfs:Class ; - rdfs:subClassOf midi:SystemRealtime ; - rdfs:label "Stop Message" ; - midi:status "FC"^^xsd:hexBinary . - -midi:SystemCommon - a rdfs:Class ; - rdfs:subClassOf midi:SystemMessage ; - rdfs:label "System Common Message" . - -midi:SystemExclusive - a rdfs:Class ; - rdfs:subClassOf midi:SystemMessage ; - rdfs:label "System Exclusive Message" ; - midi:status "F0"^^xsd:hexBinary . - -midi:SystemMessage - a rdfs:Class ; - rdfs:subClassOf midi:MidiEvent ; - rdfs:label "System Message" ; - midi:statusMask "F0"^^xsd:hexBinary . - -midi:SystemRealtime - a rdfs:Class ; - rdfs:subClassOf midi:SystemMessage ; - rdfs:label "System Realtime Message" . - -midi:TuneRequest - a rdfs:Class ; - rdfs:subClassOf midi:SystemCommon ; - rdfs:label "Tune Request Message" ; - midi:status "F6"^^xsd:hexBinary . - -midi:VoiceMessage - a rdfs:Class ; - rdfs:subClassOf midi:MidiEvent ; - rdfs:label "Voice Message;" ; - midi:statusMask "F0"^^xsd:hexBinary . - -midi:benderValue - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:short ; - rdfs:comment "The value of a pitch bender (-8192 to 8192)." . - -midi:binding - a rdf:Property , - owl:ObjectProperty ; - rdfs:range midi:MidiEvent ; - lv2:documentation """ -<p>The MIDI event to bind a parameter to. This describes which MIDI events -should be used to control a port, parameter, or other object. The binding -should be a midi:MidiEvent but the property that represents the control value may -be omitted. For example, to bind to the value of controller 17:</p> - -<pre class="turtle-code"> -port midi:binding [ - a midi:Controller ; - midi:controllerNumber 17 -] . -</pre> -""" . - -midi:byteNumber - a rdf:Property , - owl:DatatypeProperty ; - rdfs:domain midi:Chunk ; - rdfs:range xsd:unsignedByte ; - rdfs:comment "The 0-based index of a byte which is part of this chunk." . - -midi:channel - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:unsignedByte ; - rdfs:comment "The channel number of a MIDI message." . - -midi:chunk - a rdf:Property ; - rdfs:range xsd:byte , - xsd:hexBinary ; - rdfs:comment "A chunk of a MIDI message." . - -midi:controllerNumber - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "The numeric ID of a controller (0 to 127)." . - -midi:controllerValue - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "The value of a controller (0 to 127)." . - -midi:noteNumber - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "The numeric ID of a note (0 to 127)." . - -midi:pressure - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "Key pressure (0 to 127)." . - -midi:programNumber - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "The numeric ID of a program (0 to 127)." . - -midi:property - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain midi:Chunk ; - rdfs:range rdf:Property ; - rdfs:comment "The property this chunk represents." . - -midi:songNumber - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:byte ; - rdfs:comment "The numeric ID of a song (0 to 127)." . - -midi:songPosition - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range xsd:short ; - rdfs:comment "Song position in MIDI beats (16th notes) (-8192 to 8192)." . - -midi:status - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range midi:HexByte ; - rdfs:comment "The exact status byte for a message of this type." . - -midi:statusMask - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range midi:HexByte ; - rdfs:comment """ -The status byte for a message of this type on channel 1, i.e. a status byte -with the lower nibble set to zero.""" . - -midi:velocity - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:range midi:HexByte ; - rdfs:comment "The velocity of a note message (0 to 127)." . diff --git a/lv2/lv2plug.in/ns/ext/morph/lv2-morph.doap.ttl b/lv2/lv2plug.in/ns/ext/morph/lv2-morph.doap.ttl deleted file mode 100644 index 73abdc2..0000000 --- a/lv2/lv2plug.in/ns/ext/morph/lv2-morph.doap.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/morph> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Morph Extension" ; - doap:shortdesc "Ports that can dynamically change type." ; - doap:created "2012-05-22" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.0" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/morph/manifest.ttl b/lv2/lv2plug.in/ns/ext/morph/manifest.ttl deleted file mode 100644 index 40b0f2b..0000000 --- a/lv2/lv2plug.in/ns/ext/morph/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/morph> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 0 ; - rdfs:seeAlso <morph.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/morph/morph.h b/lv2/lv2plug.in/ns/ext/morph/morph.h deleted file mode 100644 index 6739d39..0000000 --- a/lv2/lv2plug.in/ns/ext/morph/morph.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_MORPH_H -#define LV2_MORPH_H - -#include <stdint.h> - -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" - -#define LV2_MORPH_URI "http://lv2plug.in/ns/ext/morph" -#define LV2_MORPH_PREFIX LV2_MORPH_URI "#" - -#define LV2_MORPH__AutoMorphPort LV2_MORPH_PREFIX "AutoMorphPort" -#define LV2_MORPH__MorphPort LV2_MORPH_PREFIX "MorphPort" -#define LV2_MORPH__interface LV2_MORPH_PREFIX "interface" -#define LV2_MORPH__supportsType LV2_MORPH_PREFIX "supportsType" -#define LV2_MORPH__currentType LV2_MORPH_PREFIX "currentType" - -#endif /* LV2_MORPH_H */ diff --git a/lv2/lv2plug.in/ns/ext/morph/morph.ttl b/lv2/lv2plug.in/ns/ext/morph/morph.ttl deleted file mode 100644 index 9457089..0000000 --- a/lv2/lv2plug.in/ns/ext/morph/morph.ttl +++ /dev/null @@ -1,86 +0,0 @@ -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix morph: <http://lv2plug.in/ns/ext/morph#> . -@prefix opts: <http://lv2plug.in/ns/ext/options#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/morph> - a owl:Ontology ; - rdfs:seeAlso <morph.h> , - <lv2-morph.doap.ttl> , - <../../meta/meta.ttl> ; - lv2:documentation """ -<p>This extension defines two port types: morph:MorphPort, which has a -host-configurable type, and morph:AutoMorphPort, which may automatically change -type when a MorphPort's type is changed. These ports always have a default -type and work normally work in hosts that are unaware of this extension. Thus, -this extension provides a backwards compatibility mechanism which allows -plugins to use new port types but gracefully fall back to a default type in -hosts that do not support them.</p> - -<p>This extension only defines port types and properties for describing morph -ports. The actual run-time switching is done via the opts:interface API.</p> -""" . - -morph:MorphPort - a rdfs:Class , - owl:Class ; - rdfs:subClassOf lv2:Port ; - rdfs:label "Morph Port" ; - lv2:documentation """ -<p>Ports of this type MUST have another type which defines the default buffer -format (e.g. lv2:ControlPort) but can be dynamically changed to a different -type in hosts that support opts:interface.</p> - -<p>The host may change the type of a MorphPort by setting its morph:currentType -with LV2_Options_Interface::set(). If the plugin has any morph:AutoMorphPort -ports, the host MUST check their types after changing any port type since they -may have changed.</p> """ . - -morph:AutoMorphPort - a rdfs:Class , - owl:Class ; - rdfs:subClassOf lv2:Port ; - rdfs:label "Auto Morph Port" ; - lv2:documentation """ -<p>Ports of this type MUST have another type which defines the default buffer -format (e.g. lv2:ControlPort) but may dynamically change types based on the -configured types of any morph:MorphPort ports on the same plugin instance.</p> - -<p>The type of a port may only change in response to a host call to -LV2_Options_Interface::set(). Whenever any port type on the instance changes, -the host MUST check the type of all morph:AutoMorphPort ports with -LV2_Options_Interface::get() before calling run() again, since they may have -changed. If the type of any port is zero, it means the current configuration -is invalid and the plugin may not be run (unless that port is -lv2:connectionOptional and connected to NULL).</p> - -<p>This is mainly useful for outputs whose type depends on the type of -corresponding inputs.</p> -""" . - -morph:supportsType - a rdf:Property , - owl:ObjectProperty ; - rdfs:domain morph:MorphPort ; - rdfs:label "supports type" ; - lv2:documentation """ -<p>Indicates that a port supports being switched to a certain type. A -MorphPort MUST list each type it supports being switched to in the plugin data -using this property.</p> -""" . - -morph:currentType - a rdf:Property , - opts:Option , - owl:ObjectProperty ; - rdfs:domain morph:MorphPort ; - rdfs:label "current type" ; - lv2:documentation """ -<p>The currently active type of the port. This is for dynamic use as an option -and SHOULD NOT be listed in the static plugin data.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/options/lv2-options.doap.ttl b/lv2/lv2plug.in/ns/ext/options/lv2-options.doap.ttl deleted file mode 100644 index 6b99ef3..0000000 --- a/lv2/lv2plug.in/ns/ext/options/lv2-options.doap.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/options> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Options" ; - doap:shortdesc "Instantiation time options." ; - doap:created "2012-08-20" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.2" ; - doap:created "2013-01-10" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Set the range of opts:requiredOption and opts:supportedOption to opts:Option." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/options/manifest.ttl b/lv2/lv2plug.in/ns/ext/options/manifest.ttl deleted file mode 100644 index c0c3315..0000000 --- a/lv2/lv2plug.in/ns/ext/options/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/options> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <options.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/options/options.h b/lv2/lv2plug.in/ns/ext/options/options.h deleted file mode 100644 index 1a71a3e..0000000 --- a/lv2/lv2plug.in/ns/ext/options/options.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_OPTIONS_H -#define LV2_OPTIONS_H - -#include <stdint.h> - -#include "lv2/lv2plug.in/ns/ext/urid/urid.h" -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" - -#define LV2_OPTIONS_URI "http://lv2plug.in/ns/ext/options" -#define LV2_OPTIONS_PREFIX LV2_OPTIONS_URI "#" - -#define LV2_OPTIONS__Option LV2_OPTIONS_PREFIX "Option" -#define LV2_OPTIONS__interface LV2_OPTIONS_PREFIX "interface" -#define LV2_OPTIONS__options LV2_OPTIONS_PREFIX "options" -#define LV2_OPTIONS__requiredOption LV2_OPTIONS_PREFIX "requiredOption" -#define LV2_OPTIONS__supportedOption LV2_OPTIONS_PREFIX "supportedOption" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - The context of an Option, which defines the subject it applies to. -*/ -typedef enum { - /** - This option applies to the instance itself. The subject must be - ignored. - */ - LV2_OPTIONS_INSTANCE, - - /** - This option applies to some named resource. The subject is a URI mapped - to an integer (a LV2_URID, like the key) - */ - LV2_OPTIONS_RESOURCE, - - /** - This option applies to some blank node. The subject is a blank node - identifier, which is valid only within the current local scope. - */ - LV2_OPTIONS_BLANK, - - /** - This option applies to a port on the instance. The subject is the - port's index. - */ - LV2_OPTIONS_PORT -} LV2_Options_Context; - -/** - An option. - - This is a property with a subject, also known as a triple or statement. - - This struct is useful anywhere a statement needs to be passed where no - memory ownership issues are present (since the value is a const pointer). - - Options can be passed to an instance via the feature LV2_OPTIONS__options - with data pointed to an array of options terminated by a zeroed option, or - accessed/manipulated using LV2_Options_Interface. -*/ -typedef struct _LV2_Options_Option { - LV2_Options_Context context; /**< Context (type of subject). */ - uint32_t subject; /**< Subject. */ - LV2_URID key; /**< Key (property). */ - uint32_t size; /**< Size of value in bytes. */ - LV2_URID type; /**< Type of value (datatype). */ - const void* value; /**< Pointer to value (object). */ -} LV2_Options_Option; - -/** A status code for option functions. */ -typedef enum { - LV2_OPTIONS_SUCCESS = 0, /**< Completed successfully. */ - LV2_OPTIONS_ERR_UNKNOWN = 1, /**< Unknown error. */ - LV2_OPTIONS_ERR_BAD_SUBJECT = 1 << 1, /**< Invalid/unsupported subject. */ - LV2_OPTIONS_ERR_BAD_KEY = 1 << 2, /**< Invalid/unsupported key. */ - LV2_OPTIONS_ERR_BAD_VALUE = 1 << 3 /**< Invalid/unsupported value. */ -} LV2_Options_Status; - -/** - Interface for dynamically setting options (LV2_OPTIONS__interface). -*/ -typedef struct _LV2_Options_Interface { - /** - Get the given options. - - Each element of the passed options array MUST have type, subject, and - key set. All other fields (size, type, value) MUST be initialised to - zero, and are set to the option value if such an option is found. - - This function is in the "instantiation" LV2 threading class, so no other - instance functions may be called concurrently. - - @return Bitwise OR of LV2_Options_Status values. - */ - uint32_t (*get)(LV2_Handle instance, - LV2_Options_Option* options); - - /** - Set the given options. - - This function is in the "instantiation" LV2 threading class, so no other - instance functions may be called concurrently. - - @return Bitwise OR of LV2_Options_Status values. - */ - uint32_t (*set)(LV2_Handle instance, - const LV2_Options_Option* options); -} LV2_Options_Interface; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_OPTIONS_H */ diff --git a/lv2/lv2plug.in/ns/ext/options/options.ttl b/lv2/lv2plug.in/ns/ext/options/options.ttl deleted file mode 100644 index e4aea32..0000000 --- a/lv2/lv2plug.in/ns/ext/options/options.ttl +++ /dev/null @@ -1,105 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix opts: <http://lv2plug.in/ns/ext/options#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/options> - a owl:Ontology ; - rdfs:seeAlso <options.h> , - <../../meta/meta.ttl> , - <lv2-options.doap.ttl> ; - lv2:documentation """ - -<p>This extension defines a facility for <q>options</q>, which are dynamic -properties that may be changed at run time.</p> - -<p>There are two facilities for passing options to an instance: opts:options -allows passing options at instantiation time, and the opts:interface interface -allows options to be dynamically set and retrieved after instantiation.</p> - -<p>Note that this extension is only for allowing hosts to configure plugins, -and is not a <q>live</q> control mechanism. For real-time control, use -event-based control via an atom:AtomPort with an atom:Sequence buffer.</p> - -<p>Instances may indicate they <q>require</q> an option with the -opts:requiredOption property, or that they optionally <q>support</q> an option -with the opts:supportedOption property.</p> -""" . - -opts:Option - a rdfs:Class ; - rdfs:label "Option" ; - rdfs:subClassOf rdf:Property ; - lv2:documentation """ -<p>A property intended to be used as a static option for an instance.</p> - -<p>It is not required for a property to explicitly be an Option in order to be -used as such. However, properties which are primarily intended for use as -options, or are at least particularly useful as options, should be explicitly -given this type for documentation purposes, and to assist hosts in discovering -option definitions.</p> -""" . - -opts:interface - a lv2:ExtensionData ; - lv2:documentation """ -<p>An interface (LV2_Options_Interface) for dynamically setting and getting -options. Note this is intended for use by the host for configuring plugins -only, and and is <em>not</em> a <q>live</q> plugin control mechanism.</p> - -<p>The plugin data file should describe this like so:</p> -<pre class="turtle-code"> -@prefix opts: <http://lv2plug.in/ns/ext/options#> . - -<plugin> - a lv2:Plugin ; - lv2:extensionData opts:interface . -</pre> -""" . - -opts:options - a lv2:Feature ; - rdfs:label "options" ; - lv2:documentation """ -<p>The feature used to provide options to an instance.</p> - -<p>To implement this feature, hosts MUST pass an LV2_Feature to the appropriate -instantiate method with this URI and data pointed to an array of -LV2_Options_Option terminated by an element with both key and value set to -zero. The instance should cast this data pointer to <code>const -LV2_Options_Option*</code> and scan the array for any options of interest. The -instance MUST NOT modify the options array in any way.</p> - -<p>Note that requiring this feature may reduce the number of compatible hosts. -Unless some options are strictly required by the instance, this feature SHOULD -be listed as a lv2:optionalFeature.</p> -""" . - -opts:requiredOption - a rdf:Property , - owl:ObjectProperty ; - rdfs:range opts:Option ; - rdfs:label "required option" ; - lv2:documentation """ -<p>An option required by the instance to function at all. The host MUST pass a -value for the specified option via opts:options in order to create an -instance.</p> - -<p>Note that use of this property may reduce the number of compatible hosts. -Wherever possible, it is better to list options with opts:supportedOption and -fall back to a reasonable default value if it is not provided.</p> -""" . - -opts:supportedOption - a rdf:Property , - owl:ObjectProperty ; - rdfs:range opts:Option ; - rdfs:label "supported option" ; - lv2:documentation """ -<p>An option supported or <q>understood</q> by the instance. The host SHOULD -provide a value for the specified option if one is known, or provide the user -an opportunity to specify one if one is Indicates that the instance host MUST -pass a value for the specified option in order to instantiate the instance.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/parameters/lv2-parameters.doap.ttl b/lv2/lv2plug.in/ns/ext/parameters/lv2-parameters.doap.ttl deleted file mode 100644 index 58c61d2..0000000 --- a/lv2/lv2plug.in/ns/ext/parameters/lv2-parameters.doap.ttl +++ /dev/null @@ -1,38 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/parameters> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Parameters" ; - doap:release [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] , [ - rdfs:label "Add param:sampleRate." - ] , [ - rdfs:label "Add parameters.h of URI defines for convenience." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] ; - doap:created "2009-00-00" ; - doap:shortdesc "Common parameters for audio processing." ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:developer <http://lv2plug.in/ns/meta#larsl> . diff --git a/lv2/lv2plug.in/ns/ext/parameters/manifest.ttl b/lv2/lv2plug.in/ns/ext/parameters/manifest.ttl deleted file mode 100644 index e9b6700..0000000 --- a/lv2/lv2plug.in/ns/ext/parameters/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/parameters> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <parameters.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/parameters/parameters.h b/lv2/lv2plug.in/ns/ext/parameters/parameters.h deleted file mode 100644 index 9c06bab..0000000 --- a/lv2/lv2plug.in/ns/ext/parameters/parameters.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_PARAMETERS_H -#define LV2_PARAMETERS_H - -#define LV2_PARAMETERS_URI "http://lv2plug.in/ns/ext/parameters" -#define LV2_PARAMETERS_PREFIX LV2_PARAMETERS_URI "#" - -#define LV2_PARAMETERS__CompressorControls LV2_PARAMETERS_PREFIX "CompressorControls" -#define LV2_PARAMETERS__ControlGroup LV2_PARAMETERS_PREFIX "ControlGroup" -#define LV2_PARAMETERS__EnvelopeControls LV2_PARAMETERS_PREFIX "EnvelopeControls" -#define LV2_PARAMETERS__FilterControls LV2_PARAMETERS_PREFIX "FilterControls" -#define LV2_PARAMETERS__OscillatorControls LV2_PARAMETERS_PREFIX "OscillatorControls" -#define LV2_PARAMETERS__amplitude LV2_PARAMETERS_PREFIX "amplitude" -#define LV2_PARAMETERS__attack LV2_PARAMETERS_PREFIX "attack" -#define LV2_PARAMETERS__bypass LV2_PARAMETERS_PREFIX "bypass" -#define LV2_PARAMETERS__cutoffFrequency LV2_PARAMETERS_PREFIX "cutoffFrequency" -#define LV2_PARAMETERS__decay LV2_PARAMETERS_PREFIX "decay" -#define LV2_PARAMETERS__delay LV2_PARAMETERS_PREFIX "delay" -#define LV2_PARAMETERS__dryLevel LV2_PARAMETERS_PREFIX "dryLevel" -#define LV2_PARAMETERS__frequency LV2_PARAMETERS_PREFIX "frequency" -#define LV2_PARAMETERS__gain LV2_PARAMETERS_PREFIX "gain" -#define LV2_PARAMETERS__hold LV2_PARAMETERS_PREFIX "hold" -#define LV2_PARAMETERS__pulseWidth LV2_PARAMETERS_PREFIX "pulseWidth" -#define LV2_PARAMETERS__ratio LV2_PARAMETERS_PREFIX "ratio" -#define LV2_PARAMETERS__release LV2_PARAMETERS_PREFIX "release" -#define LV2_PARAMETERS__resonance LV2_PARAMETERS_PREFIX "resonance" -#define LV2_PARAMETERS__sampleRate LV2_PARAMETERS_PREFIX "sampleRate" -#define LV2_PARAMETERS__sustain LV2_PARAMETERS_PREFIX "sustain" -#define LV2_PARAMETERS__threshold LV2_PARAMETERS_PREFIX "threshold" -#define LV2_PARAMETERS__waveform LV2_PARAMETERS_PREFIX "waveform" -#define LV2_PARAMETERS__wetDryRatio LV2_PARAMETERS_PREFIX "wetDryRatio" -#define LV2_PARAMETERS__wetLevel LV2_PARAMETERS_PREFIX "wetLevel" - -#endif /* LV2_PARAMETERS_H */ diff --git a/lv2/lv2plug.in/ns/ext/parameters/parameters.ttl b/lv2/lv2plug.in/ns/ext/parameters/parameters.ttl deleted file mode 100644 index 8f05f74..0000000 --- a/lv2/lv2plug.in/ns/ext/parameters/parameters.ttl +++ /dev/null @@ -1,188 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix param: <http://lv2plug.in/ns/ext/parameters#> . -@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/parameters> - a lv2:Specification ; - rdfs:seeAlso <../../meta/meta.ttl> , - <lv2-parameters.doap.ttl> ; - lv2:documentation """ -<p>This vocabulary describes parameters common in audio processing software. A -<q>parameter</q> is purely a metadata concept, unrelated to any particular code -mechanism. Parameters are used to assign meaning to controls (e.g. using -lv2:designation for ports) so they can be used more intelligently or presented -to the user more efficiently.</p> """ . - -param:ControlGroup - a rdfs:Class ; - rdfs:subClassOf pg:Group ; - rdfs:comment """ -A group representing a set of associated controls. -""" . - -param:amplitude - a lv2:Parameter ; - rdfs:label "amplitude" . - -param:attack - a lv2:Parameter ; - rdfs:label "attack" ; - rdfs:comment "The duration of an envelope's attack stage." . - -param:cutoffFrequency - a lv2:Parameter ; - rdfs:label "cutoff frequency" . - -param:decay - a lv2:Parameter ; - rdfs:label "decay" ; - rdfs:comment "The duration of an envelope's decay stage." . - -param:delay - a lv2:Parameter ; - rdfs:label "delay" ; - rdfs:comment "The duration of an envelope's delay stage." . - -param:frequency - a lv2:Parameter ; - rdfs:label "frequency" . - -param:hold - a lv2:Parameter ; - rdfs:label "hold" ; - rdfs:comment "The duration of an envelope's hold stage." . - -param:pulseWidth - a lv2:Parameter ; - rdfs:label "pulse width" ; - rdfs:comment "The width of a pulse of a rectangular waveform." . - -param:ratio - a lv2:Parameter ; - rdfs:label "ratio" ; - rdfs:comment "Compression ration." . - -param:release - a lv2:Parameter ; - rdfs:label "release" ; - rdfs:comment "The duration of an envelope's release stage." . - -param:resonance - a lv2:Parameter ; - rdfs:label "resonance" ; - rdfs:comment "The resonance of a filter." . - -param:sustain - a lv2:Parameter ; - rdfs:label "sustain" ; - rdfs:comment "The level (not duration) of an envelope's sustain stage." . - -param:threshold - a lv2:Parameter ; - rdfs:label "threshold" ; - rdfs:comment "Compression threshold." . - -param:waveform - a lv2:Parameter ; - rdfs:label "waveform" . - -param:gain - a lv2:Parameter ; - rdfs:label "gain" ; - rdfs:comment "A factor which controls an output level." . - -param:wetDryRatio - a lv2:Parameter ; - rdfs:label "wet/dry ratio" ; - lv2:documentation """ -<p>The ratio between processed and bypass components in output signal. The dry -and wet percentages can be calculated from the following equations:</p> - -<pre class="c-code"> - dry = (wetDryRatio.maximum - wetDryRatio.value) / wetDryRatio.maximum - wet = wetDryRatio.value / wetDryRatio.maximum -</pre> - -<p>Typically, maximum value of 1 or 100 and minimum value of 0 should be -used.</p> -""" . - -param:wetLevel - a lv2:Parameter ; - rdfs:label "wet level" ; - rdfs:comment "The level of the processed component of a signal." . - -param:dryLevel - a lv2:Parameter ; - rdfs:label "dry level" ; - rdfs:comment "The level of the unprocessed component of a signal." . - -param:bypass - a lv2:Parameter ; - rdfs:label "bypass" ; - rdfs:comment "A boolean parameter that disabled processing if true." . - -param:sampleRate - a lv2:Parameter ; - rdfs:label "sample rate" ; - rdfs:comment "A sample rate in Hz." . - -param:EnvelopeControls - a rdfs:Class ; - rdfs:subClassOf param:ControlGroup ; - rdfs:label "DAHDSR Envelope Controls" ; - pg:element [ - lv2:index 0 ; - lv2:designation param:delay - ] , [ - lv2:index 1 ; - lv2:designation param:attack - ] , [ - lv2:index 2 ; - lv2:designation param:hold - ] , [ - lv2:index 3 ; - lv2:designation param:decay - ] , [ - lv2:index 4 ; - lv2:designation param:sustain - ] , [ - lv2:index 5 ; - lv2:designation param:release - ] . - -param:OscillatorControls - a rdfs:Class ; - rdfs:subClassOf param:ControlGroup ; - rdfs:label "Oscillator Controls" ; - pg:element [ - lv2:designation param:frequency - ] , [ - lv2:designation param:amplitude - ] , [ - lv2:designation param:waveform - ] , [ - lv2:designation param:pulseWidth - ] . - -param:FilterControls - a rdfs:Class ; - rdfs:subClassOf param:ControlGroup ; - rdfs:label "Filter Controls" ; - pg:element [ - lv2:designation param:cutoffFrequency - ] , [ - lv2:designation param:resonance - ] . - -param:CompressorControls - a rdfs:Class ; - rdfs:subClassOf param:ControlGroup ; - rdfs:label "Compressor Controls" ; - pg:element [ - lv2:designation param:threshold - ] , [ - lv2:designation param:ratio - ] . diff --git a/lv2/lv2plug.in/ns/ext/patch/lv2-patch.doap.ttl b/lv2/lv2plug.in/ns/ext/patch/lv2-patch.doap.ttl deleted file mode 100644 index a2f3e79..0000000 --- a/lv2/lv2plug.in/ns/ext/patch/lv2-patch.doap.ttl +++ /dev/null @@ -1,36 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/patch> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:created "2012-02-09" ; - doap:license <http://opensource.org/licenses/isc> ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:name "LV2 Patch" ; - doap:shortdesc "Messages for accessing and manipulating properties." ; - doap:release [ - doap:revision "2.0" ; - doap:created "2013-01-10" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Make patch:Set a compact message for setting one property." - ] , [ - rdfs:label "Add patch:readable and patch:writable for describing available properties." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/patch/manifest.ttl b/lv2/lv2plug.in/ns/ext/patch/manifest.ttl deleted file mode 100644 index fcc06be..0000000 --- a/lv2/lv2plug.in/ns/ext/patch/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/patch> - a lv2:Specification ; - lv2:minorVersion 2 ; - lv2:microVersion 0 ; - rdfs:seeAlso <patch.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/patch/patch.h b/lv2/lv2plug.in/ns/ext/patch/patch.h deleted file mode 100644 index 1a7a893..0000000 --- a/lv2/lv2plug.in/ns/ext/patch/patch.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file patch.h C header for the LV2 Patch extension - <http://lv2plug.in/ns/ext/patch>. - - The patch extension is purely data, this header merely defines URIs - for convenience. -*/ - -#ifndef LV2_PATCH_H -#define LV2_PATCH_H - -#define LV2_PATCH_URI "http://lv2plug.in/ns/ext/patch" -#define LV2_PATCH_PREFIX LV2_PATCH_URI "#" - -#define LV2_PATCH__Ack LV2_PATCH_PREFIX "Ack" -#define LV2_PATCH__Delete LV2_PATCH_PREFIX "Delete" -#define LV2_PATCH__Error LV2_PATCH_PREFIX "Error" -#define LV2_PATCH__Get LV2_PATCH_PREFIX "Get" -#define LV2_PATCH__Message LV2_PATCH_PREFIX "Message" -#define LV2_PATCH__Move LV2_PATCH_PREFIX "Move" -#define LV2_PATCH__Patch LV2_PATCH_PREFIX "Patch" -#define LV2_PATCH__Post LV2_PATCH_PREFIX "Post" -#define LV2_PATCH__Put LV2_PATCH_PREFIX "Put" -#define LV2_PATCH__Request LV2_PATCH_PREFIX "Request" -#define LV2_PATCH__Response LV2_PATCH_PREFIX "Response" -#define LV2_PATCH__Set LV2_PATCH_PREFIX "Set" -#define LV2_PATCH__add LV2_PATCH_PREFIX "add" -#define LV2_PATCH__body LV2_PATCH_PREFIX "body" -#define LV2_PATCH__destination LV2_PATCH_PREFIX "destination" -#define LV2_PATCH__property LV2_PATCH_PREFIX "property" -#define LV2_PATCH__readable LV2_PATCH_PREFIX "readable" -#define LV2_PATCH__remove LV2_PATCH_PREFIX "remove" -#define LV2_PATCH__request LV2_PATCH_PREFIX "request" -#define LV2_PATCH__subject LV2_PATCH_PREFIX "subject" -#define LV2_PATCH__value LV2_PATCH_PREFIX "value" -#define LV2_PATCH__wildcard LV2_PATCH_PREFIX "wildcard" -#define LV2_PATCH__writable LV2_PATCH_PREFIX "writable" - -#endif /* LV2_PATCH_H */ diff --git a/lv2/lv2plug.in/ns/ext/patch/patch.ttl b/lv2/lv2plug.in/ns/ext/patch/patch.ttl deleted file mode 100644 index ae1a0e3..0000000 --- a/lv2/lv2plug.in/ns/ext/patch/patch.ttl +++ /dev/null @@ -1,367 +0,0 @@ -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix patch: <http://lv2plug.in/ns/ext/patch#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/patch> - a owl:Ontology ; - rdfs:seeAlso <patch.h> , - <lv2-patch.doap.ttl> ; - lv2:documentation """ -<p>This vocabulary defines messages which can be used to access and manipulate -properties. It is designed to provide a dynamic control interface for LV2 -plugins, but is useful in many contexts.</p> - -<p>The main feature of this design is that the messages themselves are -described in the same format as the data they work with. In particular, -messages can be serialised as a binary <a -href="../atom/atom.html#Object">Object</a> or in Turtle (or any other RDF -serialisation).</p> - -<p>The idea behind using a property-based interface for control is to prevent -an an explosion of message types. Instead of a custom message for each action, -control is achieved via manipulating properties (which are likely already -defined for other reasons). Note, however, that this is purely conceptual; -there is no requirement that the receiver actually implement a store of -resources with properties.</p> - -<p>For example, consider an object that can blink. Rather than define a -specific interface to control this (e.g. <code>obj.start_blinking(); -obj.stop_blinking()</code>), set a <q>blinking</q> property to true or false -(e.g. <code>obj.set(blinking, true)</code>) to achieve the desired behaviour. -One benefit of this approach is that a persistent state model is available -<q>for free</q>: simply serialise the <q>blinking</q> property.</p> - -<p>This specification is strictly metadata and does not define any binary -mechanism, though it can be completely expressed by standard types in the <a -href="../atom/atom.html">LV2 Atom</a> extension. Thus, hosts can be expected -to be capable of transmitting it between plugins, or between a plugin and its -UI, making it a good choice for advanced plugin control.</p> -""" . - -patch:Ack - a rdfs:Class ; - rdfs:subClassOf patch:Response ; - rdfs:label "Ack" ; - lv2:documentation """ -<p>An acknowledgement that a request has been successfully processed. This is -returned as a reply when a specific reply type is not necessary or -appropriate.</p> -""" . - -patch:Delete - a rdfs:Class ; - rdfs:subClassOf patch:Request ; - rdfs:label "Delete" ; - lv2:documentation """ -<p>Request the subject(s) be deleted.</p> -""" . - -patch:Error - a rdfs:Class ; - rdfs:subClassOf patch:Response ; - rdfs:label "Error" ; - lv2:documentation """ -<p>A response indicating an error processing a request.</p> -""" . - -patch:Get - a rdfs:Class ; - rdfs:subClassOf patch:Request ; - rdfs:label "Get" ; - lv2:documentation """ -<p>Request a description of the subject.</p> - -<p>The detail of the response is not specified, it may be a flat description of -all the properties of the subject, or a more expressive description with -several subjects. A good choice is a <q><a -href="http://www.w3.org/Submission/CBD/">concise bounded description</a></q>, -i.e. a description which recursively includes all properties with blank node -values.</p> - -<p>The response should have the same patch:subject property as the request, and -a patch:body that is a description of that subject. For example:</p> -<pre class="turtle-code"> -<get-request> - a patch:Get ; - patch:subject <something> . -</pre> - -<p>Could result in:</p> -<pre class="turtle-code"> -[] - a patch:Response ; - patch:request <get-request> ; - patch:subject <something> ; - patch:body [ - eg:name "Something" ; - eg:ratio 1.6180339887 ; - ] . -</pre> - -<p>Note the use of blank nodes is not required; the value of patch:body may be -the actual resource node. Depending on the transport and syntax used this may -be preferable. However, the patch:subject property is required regardless. For -example, the same response could be written:</p> - -<pre class="turtle-code"> -<something> - eg:name "Something" ; - eg:ratio 1.6180339887 . - -[] - a patch:Response ; - patch:request <get-request> ; - patch:subject <something> ; - patch:body <something> . -</pre> -""" . - -patch:Insert - a rdfs:Class ; - rdfs:subClassOf patch:Request ; - rdfs:label "Insert" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:subject - ] ; - lv2:documentation """ -<p>Insert the patch:body at patch:subject. If the subject does not exist, it is -created. If the subject does already exist, it is added to. This request only -adds properties, it never removes them. The user must take care that multiple -values are not set for properties which should only have one value.</p> -""" . - -patch:Message - a rdfs:Class ; - rdfs:label "Message" . - -patch:Move - a rdfs:Class ; - rdfs:subClassOf patch:Request ; - rdfs:label "Move" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:subject - ] , [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:destination - ] ; - lv2:documentation """ -<p>Move the patch:subject to patch:destination. After this, patch:destination has -the description patch:subject had prior to this request's execution, and -patch:subject does not exist any more.It is an error if the subject does not -exist or the destination already exists.</p> -""" . - -patch:Patch - a rdfs:Class ; - rdfs:subClassOf patch:Request , - [ - a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty patch:subject - ] ; - lv2:documentation """ -<p>A method for modifying the properties of an object.</p> - -<p>This method always has at least one patch:subject, and exactly one patch:add -and patch:remove property. The value of patch:add and patch:remove are nodes -which have the properties to add or remove from the subject(s), respectively. -The special value patch:wildcard may be used as the value of a remove property -to remove all properties with the given predicate. For example:</p> - -<pre class="turtle-code"> -[] - a patch:Patch ; - patch:subject <something> ; - patch:add [ - eg:name "New name" ; - eg:age 42 ; - ] ; - patch:remove [ - eg:name "Old name" ; - eg:age patch:wildcard ; # Remove all old eg:age properties - ] . -</pre> -""" . - -patch:Put - a rdfs:Class ; - rdfs:subClassOf patch:Request ; - rdfs:label "Put" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:subject - ] ; - lv2:documentation """ -<p>Put the patch:body as the patch:subject. If the subject does not already exist, -it is created. If the subject does already exist, the patch:body is considered -an updated version of it, and the previous version is replaced.</p> -""" . - -patch:Request - a rdfs:Class ; - rdfs:label "Request" ; - rdfs:subClassOf patch:Message ; - lv2:documentation """ -<p>A request. A request may have a patch:subject property, which indicates which -resource the request applies to. The subject may be omitted in contexts where -it is implicit (e.g. the recipient is the subject).</p> -""" . - -patch:Response - a rdfs:Class ; - rdfs:subClassOf patch:Message ; - rdfs:label "Response" ; - lv2:documentation """ -<p>A response to a method.</p> -""" . - -patch:Set - a rdfs:Class ; - rdfs:subClassOf patch:Request , - [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:property - ] , [ - a owl:Restriction ; - owl:cardinality 1 ; - owl:onProperty patch:value - ] ; - lv2:documentation """ -<p>A compact message for setting one property to a specific value.</p> - -<p>This is equivalent to a patch:Patch which removes <em>all</em> pre-existing -values for the property before setting the new value. For example:</p> - -<pre class="turtle-code"> -[] - a patch:Set ; - patch:subject <something> ; - patch:property eg:name ; - patch:value "New name" . -</pre> - -<p>Which is equivalent to:</p> -<pre class="turtle-code"> -[] - a patch:Patch ; - patch:subject <something> ; - patch:add [ - eg:name "New name" ; - ] ; - patch:remove [ - eg:name patch:wildcard ; - ] . -</pre> -""" . - -patch:add - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Message . - -patch:body - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Message ; - lv2:documentation """ -<p>The body of a message.</p> - -<p>The details of this property's value depend on the type of message it is a -part of.</p> -""" . - -patch:destination - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Message . - -patch:property - a rdf:Property ; - rdfs:label "property" ; - rdfs:range rdf:Property ; - lv2:documentation """ -<p>The property this message applies to.</p> -""" . - -patch:readable - a rdf:Property ; - rdfs:label "readable" ; - rdfs:range rdf:Property ; - lv2:documentation """ -<p>Indicates that the subject may have a property that can be read via a -patch:Get message. See the similar property patch:writable for details.</p> -""" . - -patch:remove - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Message . - -patch:request - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Response ; - rdfs:range patch:Request ; - lv2:documentation """ -<p>The request this is a response to.</p> -""" . - -patch:subject - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain patch:Message . - -patch:value - a rdf:Property ; - rdfs:label "value" ; - rdfs:range rdf:Property ; - lv2:documentation """ -<p>The value of a property in a patch:Set message.</p> -""" . - -patch:wildcard - a rdfs:Resource ; - rdfs:comment """ -A wildcard which matches any resource. This makes it possible to describe the removal of all values for a given property. -""" . - -patch:writable - a rdf:Property ; - rdfs:label "writable" ; - rdfs:range rdf:Property ; - lv2:documentation """ -<p>Indicates that subject may have a property that can be written via a patch -message. This is used to list supported properties, e.g. so user interfaces -can present appropriate controls. For example:</p> - -<pre class="turtle-code"> -@prefix eg: <http://example.org/> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -eg:title - a rdf:Property ; - rdfs:label "title" ; - rdfs:range xsd:string . - -eg:plugin - patch:writable eg:title . -</pre> -""" . diff --git a/lv2/lv2plug.in/ns/ext/port-groups/lv2-port-groups.doap.ttl b/lv2/lv2plug.in/ns/ext/port-groups/lv2-port-groups.doap.ttl deleted file mode 100644 index 87a2ee7..0000000 --- a/lv2/lv2plug.in/ns/ext/port-groups/lv2-port-groups.doap.ttl +++ /dev/null @@ -1,35 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/port-groups> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Port Groups" ; - doap:shortdesc "Multi-channel groups of LV2 ports." ; - doap:created "2008-00-00" ; - doap:developer <http://lv2plug.in/ns/meta#larsl> , - <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/port-groups/manifest.ttl b/lv2/lv2plug.in/ns/ext/port-groups/manifest.ttl deleted file mode 100644 index fa893c6..0000000 --- a/lv2/lv2plug.in/ns/ext/port-groups/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/port-groups> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <port-groups.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/port-groups/port-groups.h b/lv2/lv2plug.in/ns/ext/port-groups/port-groups.h deleted file mode 100644 index 4dd8cf4..0000000 --- a/lv2/lv2plug.in/ns/ext/port-groups/port-groups.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file port-groups.h - C definitions for the LV2 Port Groups extension - <http://lv2plug.in/ns/ext/port-groups>. -*/ - -#ifndef LV2_PORT_GROUPS_H -#define LV2_PORT_GROUPS_H - -#define LV2_PORT_GROUPS_URI "http://lv2plug.in/ns/ext/port-groups" -#define LV2_PORT_GROUPS_PREFIX LV2_PORT_GROUPS_URI "#" - -#define LV2_PORT_GROUPS__DiscreteGroup LV2_PORT_GROUPS_PREFIX "DiscreteGroup" -#define LV2_PORT_GROUPS__Element LV2_PORT_GROUPS_PREFIX "Element" -#define LV2_PORT_GROUPS__FivePointOneGroup LV2_PORT_GROUPS_PREFIX "FivePointOneGroup" -#define LV2_PORT_GROUPS__FivePointZeroGroup LV2_PORT_GROUPS_PREFIX "FivePointZeroGroup" -#define LV2_PORT_GROUPS__FourPointZeroGroup LV2_PORT_GROUPS_PREFIX "FourPointZeroGroup" -#define LV2_PORT_GROUPS__Group LV2_PORT_GROUPS_PREFIX "Group" -#define LV2_PORT_GROUPS__InputGroup LV2_PORT_GROUPS_PREFIX "InputGroup" -#define LV2_PORT_GROUPS__MidSideGroup LV2_PORT_GROUPS_PREFIX "MidSideGroup" -#define LV2_PORT_GROUPS__MonoGroup LV2_PORT_GROUPS_PREFIX "MonoGroup" -#define LV2_PORT_GROUPS__OutputGroup LV2_PORT_GROUPS_PREFIX "OutputGroup" -#define LV2_PORT_GROUPS__SevenPointOneGroup LV2_PORT_GROUPS_PREFIX "SevenPointOneGroup" -#define LV2_PORT_GROUPS__SevenPointOneWideGroup LV2_PORT_GROUPS_PREFIX "SevenPointOneWideGroup" -#define LV2_PORT_GROUPS__SixPointOneGroup LV2_PORT_GROUPS_PREFIX "SixPointOneGroup" -#define LV2_PORT_GROUPS__StereoGroup LV2_PORT_GROUPS_PREFIX "StereoGroup" -#define LV2_PORT_GROUPS__ThreePointZeroGroup LV2_PORT_GROUPS_PREFIX "ThreePointZeroGroup" -#define LV2_PORT_GROUPS__center LV2_PORT_GROUPS_PREFIX "center" -#define LV2_PORT_GROUPS__centerLeft LV2_PORT_GROUPS_PREFIX "centerLeft" -#define LV2_PORT_GROUPS__centerRight LV2_PORT_GROUPS_PREFIX "centerRight" -#define LV2_PORT_GROUPS__element LV2_PORT_GROUPS_PREFIX "element" -#define LV2_PORT_GROUPS__group LV2_PORT_GROUPS_PREFIX "group" -#define LV2_PORT_GROUPS__left LV2_PORT_GROUPS_PREFIX "left" -#define LV2_PORT_GROUPS__lowFrequencyEffects LV2_PORT_GROUPS_PREFIX "lowFrequencyEffects" -#define LV2_PORT_GROUPS__mainInput LV2_PORT_GROUPS_PREFIX "mainInput" -#define LV2_PORT_GROUPS__mainOutput LV2_PORT_GROUPS_PREFIX "mainOutput" -#define LV2_PORT_GROUPS__rearCenter LV2_PORT_GROUPS_PREFIX "rearCenter" -#define LV2_PORT_GROUPS__rearLeft LV2_PORT_GROUPS_PREFIX "rearLeft" -#define LV2_PORT_GROUPS__rearRight LV2_PORT_GROUPS_PREFIX "rearRight" -#define LV2_PORT_GROUPS__right LV2_PORT_GROUPS_PREFIX "right" -#define LV2_PORT_GROUPS__side LV2_PORT_GROUPS_PREFIX "side" -#define LV2_PORT_GROUPS__sideChainOf LV2_PORT_GROUPS_PREFIX "sideChainOf" -#define LV2_PORT_GROUPS__sideLeft LV2_PORT_GROUPS_PREFIX "sideLeft" -#define LV2_PORT_GROUPS__sideRight LV2_PORT_GROUPS_PREFIX "sideRight" -#define LV2_PORT_GROUPS__source LV2_PORT_GROUPS_PREFIX "source" -#define LV2_PORT_GROUPS__subGroupOf LV2_PORT_GROUPS_PREFIX "subGroupOf" - -#endif /* LV2_PORT_GROUPS_H */ diff --git a/lv2/lv2plug.in/ns/ext/port-groups/port-groups.ttl b/lv2/lv2plug.in/ns/ext/port-groups/port-groups.ttl deleted file mode 100644 index e02ec7b..0000000 --- a/lv2/lv2plug.in/ns/ext/port-groups/port-groups.ttl +++ /dev/null @@ -1,724 +0,0 @@ -@prefix amb: <http://ambisonics.ch/standards/channels/> . -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix pg: <http://lv2plug.in/ns/ext/port-groups#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/port-groups> - a owl:Ontology ; - rdfs:seeAlso <../../meta/meta.ttl> , - <lv2-port-groups.doap.ttl> . - -pg:Group - a rdfs:Class ; - rdfs:label "Port Group" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty lv2:symbol ; - owl:cardinality 1 ; - rdfs:comment """ -A pg:Group MUST have exactly one string lv2:symbol. This symbol must be -unique according to the same rules as the lv2:symbol for an lv2:Port, where -group symbols and port symbols reside in the same namespace. In other words, -a group on a plugin MUST NOT have the same symbol as another group or a port -on that plugin. This makes it possible to uniquely reference a port or group -on a plugin with a single identifier and no context. -""" - ] ; - rdfs:comment """ -A set of ports/channels/controls/etc that are are logically grouped together, -e.g. two audio ports in a group may form a stereo stream. In order to avoid -the need to define large numbers of identical group definitions, a group -definition may be shared. For example, a plugin collection may define a single -URI for a pg:StereoGroup with the symbol "input" and use it in many plugins. -""" . - -pg:InputGroup - a rdfs:Class ; - rdfs:subClassOf pg:Group ; - rdfs:label "Input Group" ; - rdfs:comment "A group which contains exclusively inputs." . - -pg:OutputGroup - a rdfs:Class ; - rdfs:subClassOf pg:Group ; - rdfs:label "Output Group" ; - rdfs:comment "A group which contains exclusively outputs." . - -pg:Element - a rdfs:Class ; - rdfs:label "Element" ; - rdfs:comment "An ordered element of a group." ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty lv2:designation ; - owl:cardinality 1 ; - rdfs:comment "An element MUST have exactly one lv2:designation." - ] ; - rdfs:comment """ -An element of a group, which has a designation and an optional index. -""" . - -pg:element - a rdf:Property , - owl:ObjectProperty ; - rdfs:range pg:Element ; - rdfs:label "element" ; - rdfs:comment """ -Indicates that a group has a certain element (a parameter or channel -designation with a possible index). -""" . - -pg:sideChainOf - a rdf:Property , - owl:ObjectProperty ; - rdfs:label "side-chain of" ; - rdfs:comment """ -Indicates that this port or group should be considered a "side chain" of -some other port or group. The precise definition of "side chain" depends -on the plugin, but in general this group should be considered a modifier to -some other group, rather than an independent input itself. -""" . - -pg:subGroupOf - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain pg:Group ; - rdfs:range pg:Group ; - rdfs:label "sub-group of" ; - rdfs:comment """ -Indicates that this group is a child of another group. This property has no -meaning with respect to plugin execution, but the host may find this -information useful (e.g. to provide a compact user interface). Note that being -a sub-group does not relax the restriction that the group MUST have a unique -symbol with respect to the plugin. -""" . - -pg:source - a rdf:Property , - owl:ObjectProperty ; - rdfs:domain pg:OutputGroup ; - rdfs:range pg:InputGroup ; - rdfs:label "source" ; - rdfs:comment """ -Indicates that this port or group should be considered the "result" of -some other port or group. This property only makes sense on groups with -outputs when the source is a group with inputs. This can be used to convey -a relationship between corresponding input and output groups with different -types, e.g. a mono->stereo plugin. -""" . - -pg:mainInput - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain lv2:Plugin ; - rdfs:range pg:InputGroup ; - rdfs:label "main input" ; - rdfs:comment """ -Indicates that this group should be considered the "main" input, i.e. the -primary task is processing the signal in this group. A plugin MUST NOT have -more than one pg:mainInput property. -""" . - -pg:mainOutput - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain lv2:Plugin ; - rdfs:range pg:OutputGroup ; - rdfs:label "main output" ; - rdfs:comment """ -Indicates that this group should be considered the "main" output. The main -output group SHOULD have the main input group as a pg:source. -""" . - -pg:group - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:domain lv2:Port ; - rdfs:range pg:Group ; - rdfs:label "group" ; - rdfs:comment """ -Indicates that this port is a part of a group of ports on the plugin. The port -should also have an lv2:designation property to define its designation within -that group. -""" . - -pg:DiscreteGroup - a rdfs:Class ; - rdfs:subClassOf pg:Group ; - rdfs:comment """ -"Discrete" channel configurations. These groups are divided into channels -where each represents a particular speaker location. The position of sound -in one of these groups depends on a particular speaker configuration. -""" . - -pg:left - a lv2:Channel ; - rdfs:label "left" . - -pg:right - a lv2:Channel ; - rdfs:label "right" . - -pg:center - a lv2:Channel ; - rdfs:label "center" . - -pg:side - a lv2:Channel ; - rdfs:label "side" . - -pg:centerLeft - a lv2:Channel ; - rdfs:label "center left" . - -pg:centerRight - a lv2:Channel ; - rdfs:label "center right" . - -pg:sideLeft - a lv2:Channel ; - rdfs:label "side left" . - -pg:sideRight - a lv2:Channel ; - rdfs:label "side right" . - -pg:rearLeft - a lv2:Channel ; - rdfs:label "rear left" . - -pg:rearRight - a lv2:Channel ; - rdfs:label "rear right" . - -pg:rearCenter - a lv2:Channel ; - rdfs:label "rear center" . - -pg:lowFrequencyEffects - a lv2:Channel ; - rdfs:label "low-frequency effects" . - -pg:MonoGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "Mono" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:center - ] . - -pg:StereoGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "Stereo" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:right - ] . - -pg:MidSideGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "Mid-Side Stereo" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:center - ] , [ - lv2:index 1 ; - lv2:designation pg:side - ] . - -pg:ThreePointZeroGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "3.0 Surround" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:right - ] , [ - lv2:index 2 ; - lv2:designation pg:rearCenter - ] . - -pg:FourPointZeroGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "4.0 Surround (Quadraphonic)" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:center - ] , [ - lv2:index 2 ; - lv2:designation pg:right - ] , [ - lv2:index 3 ; - lv2:designation pg:rearCenter - ] . - -pg:FivePointZeroGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "5.0 Surround (3-2 stereo)" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:center - ] , [ - lv2:index 2 ; - lv2:designation pg:right - ] , [ - lv2:index 3 ; - lv2:designation pg:rearLeft - ] , [ - lv2:index 4 ; - lv2:designation pg:rearRight - ] . - -pg:FivePointOneGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "5.1 Surround (3-2 stereo)" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:center - ] , [ - lv2:index 2 ; - lv2:designation pg:right - ] , [ - lv2:index 3 ; - lv2:designation pg:rearLeft - ] , [ - lv2:index 4 ; - lv2:designation pg:rearRight - ] , [ - lv2:index 5 ; - lv2:designation pg:lowFrequencyEffects - ] . - -pg:SixPointOneGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "6.1 Surround" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:center - ] , [ - lv2:index 2 ; - lv2:designation pg:right - ] , [ - lv2:index 3 ; - lv2:designation pg:sideLeft - ] , [ - lv2:index 4 ; - lv2:designation pg:sideRight - ] , [ - lv2:index 5 ; - lv2:designation pg:rearCenter - ] , [ - lv2:index 6 ; - lv2:designation pg:lowFrequencyEffects - ] . - -pg:SevenPointOneGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "7.1 Surround" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:center - ] , [ - lv2:index 2 ; - lv2:designation pg:right - ] , [ - lv2:index 3 ; - lv2:designation pg:sideLeft - ] , [ - lv2:index 4 ; - lv2:designation pg:sideRight - ] , [ - lv2:index 5 ; - lv2:designation pg:rearLeft - ] , [ - lv2:index 6 ; - lv2:designation pg:rearRight - ] , [ - lv2:index 7 ; - lv2:designation pg:lowFrequencyEffects - ] . - -pg:SevenPointOneWideGroup - a rdfs:Class ; - rdfs:subClassOf pg:DiscreteGroup ; - rdfs:label "7.1 Surround (Wide)" ; - pg:element [ - lv2:index 0 ; - lv2:designation pg:left - ] , [ - lv2:index 1 ; - lv2:designation pg:centerLeft - ] , [ - lv2:index 2 ; - lv2:designation pg:center - ] , [ - lv2:index 3 ; - lv2:designation pg:centerRight - ] , [ - lv2:index 4 ; - lv2:designation pg:right - ] , [ - lv2:index 5 ; - lv2:designation pg:rearLeft - ] , [ - lv2:index 6 ; - lv2:designation pg:rearRight - ] , [ - lv2:index 7 ; - lv2:designation pg:lowFrequencyEffects - ] . - -amb:ACN0 - a lv2:Channel . - -amb:ACN1 - a lv2:Channel . - -amb:ACN2 - a lv2:Channel . - -amb:ACN3 - a lv2:Channel . - -amb:ACN4 - a lv2:Channel . - -amb:ACN5 - a lv2:Channel . - -amb:ACN6 - a lv2:Channel . - -amb:ACN7 - a lv2:Channel . - -amb:ACN8 - a lv2:Channel . - -amb:ACN9 - a lv2:Channel . - -amb:ACN10 - a lv2:Channel . - -amb:ACN11 - a lv2:Channel . - -amb:ACN12 - a lv2:Channel . - -amb:ACN13 - a lv2:Channel . - -amb:ACN14 - a lv2:Channel . - -amb:ACN15 - a lv2:Channel . - -pg:AmbisonicGroup - a rdfs:Class ; - rdfs:subClassOf pg:Group ; - rdfs:comment """ -"Ambisonic" channel configurations. These groups are divided into channels -which together represent a position in an abstract n-dimensional space. -The position of sound in one of these groups does not depend on a particular -speaker configuration; a decoder can be used to convert an ambisonic stream -for any speaker configuration. -""" . - -pg:AmbisonicBH1P0Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 1 and peripheral order 0." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN3 - ] . - -pg:AmbisonicBH1P1Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 1 and peripheral order 1." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] . - -pg:AmbisonicBH2P0Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 0." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN8 - ] . - -pg:AmbisonicBH2P1Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 1." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN8 - ] . - -pg:AmbisonicBH2P2Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 2 and peripheral order 2." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN5 - ] , [ - lv2:index 6 ; - lv2:designation amb:ACN6 - ] , [ - lv2:index 7 ; - lv2:designation amb:ACN7 - ] , [ - lv2:index 8 ; - lv2:designation amb:ACN8 - ] . - -pg:AmbisonicBH3P0Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 0." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN8 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN9 - ] , [ - lv2:index 6 ; - lv2:designation amb:ACN15 - ] . - -pg:AmbisonicBH3P1Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 1." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN8 - ] , [ - lv2:index 6 ; - lv2:designation amb:ACN9 - ] , [ - lv2:index 7 ; - lv2:designation amb:ACN15 - ] . - -pg:AmbisonicBH3P2Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 2." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN5 - ] , [ - lv2:index 6 ; - lv2:designation amb:ACN6 - ] , [ - lv2:index 7 ; - lv2:designation amb:ACN7 - ] , [ - lv2:index 8 ; - lv2:designation amb:ACN8 - ] , [ - lv2:index 9 ; - lv2:designation amb:ACN9 - ] , [ - lv2:index 10 ; - lv2:designation amb:ACN15 - ] . - -pg:AmbisonicBH3P3Group - a rdfs:Class ; - rdfs:subClassOf pg:AmbisonicGroup ; - rdfs:label "Ambisonic B stream of horizontal order 3 and peripheral order 3." ; - pg:element [ - lv2:index 0 ; - lv2:designation amb:ACN0 - ] , [ - lv2:index 1 ; - lv2:designation amb:ACN1 - ] , [ - lv2:index 2 ; - lv2:designation amb:ACN2 - ] , [ - lv2:index 3 ; - lv2:designation amb:ACN3 - ] , [ - lv2:index 4 ; - lv2:designation amb:ACN4 - ] , [ - lv2:index 5 ; - lv2:designation amb:ACN5 - ] , [ - lv2:index 6 ; - lv2:designation amb:ACN6 - ] , [ - lv2:index 7 ; - lv2:designation amb:ACN7 - ] , [ - lv2:index 8 ; - lv2:designation amb:ACN8 - ] , [ - lv2:index 9 ; - lv2:designation amb:ACN9 - ] , [ - lv2:index 10 ; - lv2:designation amb:ACN10 - ] , [ - lv2:index 11 ; - lv2:designation amb:ACN11 - ] , [ - lv2:index 12 ; - lv2:designation amb:ACN12 - ] , [ - lv2:index 13 ; - lv2:designation amb:ACN13 - ] , [ - lv2:index 14 ; - lv2:designation amb:ACN14 - ] , [ - lv2:index 15 ; - lv2:designation amb:ACN15 - ] . diff --git a/lv2/lv2plug.in/ns/ext/port-props/lv2-port-props.doap.ttl b/lv2/lv2plug.in/ns/ext/port-props/lv2-port-props.doap.ttl deleted file mode 100644 index 7188aab..0000000 --- a/lv2/lv2plug.in/ns/ext/port-props/lv2-port-props.doap.ttl +++ /dev/null @@ -1,34 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/port-props> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Port Properties" ; - doap:created "2009-01-01" ; - doap:shortdesc "Various port properties." ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:developer <http://lv2plug.in/ns/meta#kfoltman> ; - doap:release [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/port-props/manifest.ttl b/lv2/lv2plug.in/ns/ext/port-props/manifest.ttl deleted file mode 100644 index 27f15c9..0000000 --- a/lv2/lv2plug.in/ns/ext/port-props/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/port-props> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <port-props.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/port-props/port-props.h b/lv2/lv2plug.in/ns/ext/port-props/port-props.h deleted file mode 100644 index 11274cc..0000000 --- a/lv2/lv2plug.in/ns/ext/port-props/port-props.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file port-props.h - C definitions for the LV2 Port Props extension - <http://lv2plug.in/ns/ext/port-props>. -*/ - -#ifndef LV2_PORT_PROPS_H -#define LV2_PORT_PROPS_H - -#define LV2_PORT_PROPS_URI "http://lv2plug.in/ns/ext/port-props" -#define LV2_PORT_PROPS_PREFIX LV2_PORT_PROPS_URI "#" - -#define LV2_PORT_PROPS__causesArtifacts LV2_PORT_PROPS_PREFIX "causesArtifacts" -#define LV2_PORT_PROPS__continuousCV LV2_PORT_PROPS_PREFIX "continuousCV" -#define LV2_PORT_PROPS__discreteCV LV2_PORT_PROPS_PREFIX "discreteCV" -#define LV2_PORT_PROPS__displayPriority LV2_PORT_PROPS_PREFIX "displayPriority" -#define LV2_PORT_PROPS__expensive LV2_PORT_PROPS_PREFIX "expensive" -#define LV2_PORT_PROPS__hasStrictBounds LV2_PORT_PROPS_PREFIX "hasStrictBounds" -#define LV2_PORT_PROPS__logarithmic LV2_PORT_PROPS_PREFIX "logarithmic" -#define LV2_PORT_PROPS__notAutomatic LV2_PORT_PROPS_PREFIX "notAutomatic" -#define LV2_PORT_PROPS__notOnGUI LV2_PORT_PROPS_PREFIX "notOnGUI" -#define LV2_PORT_PROPS__rangeSteps LV2_PORT_PROPS_PREFIX "rangeSteps" -#define LV2_PORT_PROPS__supportsStrictBounds LV2_PORT_PROPS_PREFIX "supportsStrictBounds" -#define LV2_PORT_PROPS__trigger LV2_PORT_PROPS_PREFIX "trigger" - -#endif /* LV2_PORT_PROPS_H */ diff --git a/lv2/lv2plug.in/ns/ext/port-props/port-props.ttl b/lv2/lv2plug.in/ns/ext/port-props/port-props.ttl deleted file mode 100644 index 7eb7e7d..0000000 --- a/lv2/lv2plug.in/ns/ext/port-props/port-props.ttl +++ /dev/null @@ -1,177 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix pprops: <http://lv2plug.in/ns/ext/port-props#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/port-props> - a owl:Ontology ; - rdfs:seeAlso <lv2-port-props.doap.ttl> ; - lv2:documentation """ -<p>This vocabulary defines various properties for plugin ports, which can be -used to better describe how a plugin can be controlled. Using this metadata, -hosts can build better UIs for plugins, and provide more advanced automatic -functionality.</p> -""" . - -pprops:trigger - a lv2:PortProperty ; - rdfs:label "trigger" ; - rdfs:comment """ -Indicates that the data item corresponds to a momentary event that has been -detected (control output ports) or is to be triggered (control input ports). -For input ports, the port needs to be reset to lv2:default value after run() -function of the plugin has returned. If the control port is assigned a GUI -widget by the host, the widget should be of auto-off (momentary, one-shot) type -- for example, a push button if the port is also declared as lv2:toggled, or a -series of push button or auto-clear input box with a "Send" button if the port -is also lv2:integer. -""" . - -pprops:supportsStrictBounds - a lv2:Feature ; - rdfs:label "supports strict bounds" ; - rdfs:comment """ -Indicates use of host support for pprops:hasStrictBounds port property. A -plugin that specifies it as optional feature can omit value clamping for -hasStrictBounds ports, if the feature is supported by the host. When specified -as required feature, it indicates that the plugin does not do any clamping for -input ports that have a pprops:hasStrictBounds property. -""" . - -pprops:hasStrictBounds - a lv2:PortProperty ; - rdfs:label "has strict bounds" ; - rdfs:comment """ -For hosts that support pprops:supportsStrictBounds, this indicates that the -value of the port should never exceed the port's minimum and maximum control -points. For input ports, it moves the responsibility for limiting the range of -values to host, if it supports pprops:supportsStrictBounds. For output ports, -it indicates that values within specified range are to be expected, and -breaking that should be considered by the host as error in plugin -implementation. -""" . - -pprops:expensive - a lv2:PortProperty ; - rdfs:label "changes are expensive" ; - rdfs:comment """ -Input ports only. Indicates that any changes to the port value may trigger -expensive background calculation (e.g. regenerate some lookup tables in a -background thread). Any value changes may have not have immediate effect, or -may cause silence or diminished-quality version of the output until background -processing is finished. Ports having this property are typically not well -suited for connection to outputs of other plugins, and should not be offered as -connection targets or for automation by default. -""" . - -pprops:causesArtifacts - a lv2:PortProperty ; - rdfs:label "changes cause artifacts" ; - rdfs:comment """ -Input ports only. Indicates that any changes to the port value may produce -slight artifacts to produced audio signals (zipper noise and other results of -signal discontinuities). Connecting ports of this type to continuous signals -is not recommended, and when presenting a list of automation targets, those -ports may be marked as artifact-producing. -""" . - -pprops:continuousCV - a lv2:PortProperty ; - rdfs:label "smooth modulation signal" ; - rdfs:comment """ -Indicates that the port carries a "smooth" modulation signal. Control input -ports of this type are well-suited for being connected to sources of smooth -signals (knobs with smoothing, modulation rate oscillators, output ports with -continuousCV type, etc.). Typically, the plugin with ports which have this -property will implement appropriate smoothing to avoid audio artifacts. For -output ports, this property suggests the value of the port is likely to change -frequently, and describes a smooth signal (e.g. successive values may be -considered points along a curve). -""" . - -pprops:discreteCV - a lv2:PortProperty ; - rdfs:label "discrete modulation signal" ; - rdfs:comment """ -Indicates that the port carries a "discrete" modulation signal. Input ports of -this type are well-suited for being connected to sources of discrete signals -(switches, buttons, classifiers, event detectors, etc.). May be combined with -pprops:trigger property. For output ports, this property suggests the value of -the port describe discrete values that should be interpreted as steps (and not -points along a curve). -""" . - -pprops:logarithmic - a lv2:PortProperty ; - rdfs:label "logarithmic scale" ; - rdfs:comment """ -Indicates that port value behaviour within specified range (bounds) is a value -using logarithmic scale. The lower and upper bounds must be specified, and -must be of the same sign. -""" . - -pprops:notAutomatic - a lv2:PortProperty ; - rdfs:label "not intended as a CV input" ; - rdfs:comment """ -Indicates that the port is not primarily intended to be fed with modulation -signals from external sources (other plugins, etc.). It is merely a UI hint -and hosts may allow the user to override it. -""" . - -pprops:notOnGUI - a lv2:PortProperty ; - rdfs:label "not on GUI" ; - rdfs:comment """ -Indicates that the port is not primarily intended to be represented by a -separate control in the user interface window (or any similar mechanism used -for direct, immediate control of control ports). It is merely a UI hint and -hosts may allow the user to override it. -""" . - -pprops:displayPriority - a rdf:Property ; - rdfs:domain lv2:Port ; - rdfs:range xsd:nonNegativeInteger ; - rdfs:label "display priority" ; - rdfs:comment """ -Indicates how important a port is to controlling the plugin. If a host can -only display some ports of a plugin, it should prefer ports with a higher -display priority. Priorities do not need to be unique, and are only meaningful -when compared to each other. -""" . - -pprops:rangeSteps - a rdf:Property ; - rdfs:domain lv2:Port ; - rdfs:range xsd:nonNegativeInteger ; - rdfs:label "number of value steps" ; - lv2:documentation """ -<p>This value indicates into how many evenly-divided points the (control) port -range should be divided for step-wise control. This may be used for changing -the value with step-based controllers like arrow keys, mouse wheel, rotary -encoders, etc.</p> - -<p>Note that when used with a pprops:logarithmic port, the steps are -logarithmic too, and port value can be calculated as:</p> - -<pre class="c-code"> -value = lower * pow(upper / lower, step / (steps - 1)) -</pre> - -<p>and the step from value is:</p> - -<pre class="c-code"> -step = (steps - 1) * log(value / lower) / log(upper / lower) -</pre> - -<p>where:</p> -<ul> -<li><code>value</code> is the port value</li> -<li><code>step</code> is the step number (0..steps)</li> -<li><code>steps</code> is the number of steps (= value of :rangeSteps property)</li> -<li><code>lower</code> and <code>upper</code> are the bounds</li> -</ul> -""" . diff --git a/lv2/lv2plug.in/ns/ext/presets/lv2-presets.doap.ttl b/lv2/lv2plug.in/ns/ext/presets/lv2-presets.doap.ttl deleted file mode 100644 index e5bca3a..0000000 --- a/lv2/lv2plug.in/ns/ext/presets/lv2-presets.doap.ttl +++ /dev/null @@ -1,60 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/presets> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 Presets" ; - doap:shortdesc "Presets for LV2 plugins. " ; - doap:created "2009-00-00" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "2.8" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "2.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add pset:preset property for describing the preset currently applied to a plugin instance." - ] , [ - rdfs:label "Remove pset:appliesTo property, use lv2:appliesTo instead." - ] , [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "2.2" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-presets-2.2.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] , [ - rdfs:label "Improve documentation." - ] - ] - ] , [ - doap:revision "2.0" ; - doap:created "2010-10-04" ; - doap:file-release <http://lv2plug.in/spec/lv2-presets-2.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/presets/manifest.ttl b/lv2/lv2plug.in/ns/ext/presets/manifest.ttl deleted file mode 100644 index d1fc482..0000000 --- a/lv2/lv2plug.in/ns/ext/presets/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/presets> - a lv2:Specification ; - lv2:minorVersion 2 ; - lv2:microVersion 8 ; - rdfs:seeAlso <presets.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/presets/presets.h b/lv2/lv2plug.in/ns/ext/presets/presets.h deleted file mode 100644 index 4851feb..0000000 --- a/lv2/lv2plug.in/ns/ext/presets/presets.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file presets.h - - C definitions for the LV2 Presets extension - <http://lv2plug.in/ns/ext/presets>. -*/ - -#ifndef LV2_PRESETS_H -#define LV2_PRESETS_H - -#define LV2_PRESETS_URI "http://lv2plug.in/ns/ext/presets" -#define LV2_PRESETS_PREFIX LV2_PRESETS_URI "#" - -#define LV2_PRESETS__Preset LV2_PRESETS_PREFIX "Preset" -#define LV2_PRESETS__preset LV2_PRESETS_PREFIX "preset" -#define LV2_PRESETS__value LV2_PRESETS_PREFIX "value" - -#endif /* LV2_PRESETS_H */ diff --git a/lv2/lv2plug.in/ns/ext/presets/presets.ttl b/lv2/lv2plug.in/ns/ext/presets/presets.ttl deleted file mode 100644 index ef505c8..0000000 --- a/lv2/lv2plug.in/ns/ext/presets/presets.ttl +++ /dev/null @@ -1,84 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix pset: <http://lv2plug.in/ns/ext/presets#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/presets> - a owl:Ontology ; - rdfs:seeAlso <lv2-presets.doap.ttl> ; - lv2:documentation """ -<p>This vocabulary describes a format for presets (i.e. named sets of control -values and possibly other state) for LV2 plugins. The structure of a -pset:Preset is deliberately identical to that of an lv2:Plugin, and can be -thought of as a plugin template or overlay.</p> - -<p>Presets may be defined in any bundle, including the plugin's bundle, -separate third party preset bundles, or user preset bundles saved by hosts. -Since preset data tends to be large, it is recommended that plugins describe -presets in a separate file(s) to avoid slowing down hosts. The manifest.ttl of -a bundle containing presets should list the presets like so:</p> - -<pre class="turtle-code"> -eg:mypreset - a pset:Preset ; - lv2:appliesTo eg:myplugin ; - rdfs:seeAlso <mypreset.ttl> . -</pre> -""" . - -pset:Preset - a rdfs:Class ; - rdfs:subClassOf lv2:PluginBase ; - rdfs:label "LV2 Preset" ; - rdfs:subClassOf [ - a owl:Restriction ; - owl:onProperty rdfs:label ; - owl:someValuesFrom xsd:string ; - rdfs:comment "A Preset MUST have at least one string rdfs:label." - ] ; - lv2:documentation """ -<p>A Preset for an LV2 Plugin. The structure of a Preset deliberately mirrors that -of a plugin, so existing predicates can be used to describe any data associated with -the preset. For example:</p> - -<pre class="turtle-code"> -@prefix eg: <http://example.org/> . - -eg:mypreset - a pset:Preset ; - rdfs:label "One louder" ; - lv2:appliesTo eg:myplugin ; - lv2:port [ - lv2:symbol "volume1" ; - pset:value 11.0 - ] , [ - lv2:symbol "volume2" ; - pset:value 11.0 - ] . -</pre> - -<p>A Preset SHOULD have at least one lv2:appliesTo property. Each Port on a -Preset MUST have at least a lv2:symbol property and a pset:value property.</p> -""" . - -pset:value - a rdf:Property ; - rdfs:domain lv2:Port ; - rdfs:label "value" ; - rdfs:comment """ -Specifies the value of a Port on some Preset. This property is used -in a similar way to e.g. lv2:default. -""" . - -pset:preset - a rdf:Property ; - rdfs:domain lv2:PluginBase ; - rdfs:range pset:Preset ; - rdfs:label "preset" ; - lv2:documentation """ -<p>Specifies the preset currently applied to a plugin instance. This property -may be useful for saving state, or notifying a plugin instance at run-time -about a preset change.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/resize-port/lv2-resize-port.doap.ttl b/lv2/lv2plug.in/ns/ext/resize-port/lv2-resize-port.doap.ttl deleted file mode 100644 index 7617a2c..0000000 --- a/lv2/lv2plug.in/ns/ext/resize-port/lv2-resize-port.doap.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/resize-port> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Resize Port Extension" ; - doap:shortdesc "Dynamically sized LV2 port buffers." ; - doap:created "2007-00-00" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/resize-port/manifest.ttl b/lv2/lv2plug.in/ns/ext/resize-port/manifest.ttl deleted file mode 100644 index 21569ae..0000000 --- a/lv2/lv2plug.in/ns/ext/resize-port/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/resize-port> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 0 ; - rdfs:seeAlso <resize-port.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/resize-port/resize-port.h b/lv2/lv2plug.in/ns/ext/resize-port/resize-port.h deleted file mode 100644 index fa3abd7..0000000 --- a/lv2/lv2plug.in/ns/ext/resize-port/resize-port.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright 2007-2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -#ifndef LV2_RESIZE_PORT_H -#define LV2_RESIZE_PORT_H - -#include <stddef.h> -#include <stdint.h> - -#define LV2_RESIZE_PORT_URI "http://lv2plug.in/ns/ext/resize-port" -#define LV2_RESIZE_PORT_PREFIX LV2_RESIZE_PORT_URI "#" - -#define LV2_RESIZE_PORT__asLargeAs LV2_RESIZE_PORT_PREFIX "asLargeAs" -#define LV2_RESIZE_PORT__minimumSize LV2_RESIZE_PORT_PREFIX "minimumSize" -#define LV2_RESIZE_PORT__resize LV2_RESIZE_PORT_PREFIX "resize" - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -/** A status code for state functions. */ -typedef enum { - LV2_RESIZE_PORT_SUCCESS = 0, /**< Completed successfully. */ - LV2_RESIZE_PORT_ERR_UNKNOWN = 1, /**< Unknown error. */ - LV2_RESIZE_PORT_ERR_NO_SPACE = 2 /**< Insufficient space. */ -} LV2_Resize_Port_Status; - -typedef void* LV2_Resize_Port_Feature_Data; - -typedef struct { - LV2_Resize_Port_Feature_Data data; - - /** - Resize a port buffer to at least @a size bytes. - - This function MAY return an error, in which case the port buffer was not - resized and the port is still connected to the same location. Plugins - MUST gracefully handle this situation. - - This function is in the audio threading class. - - The host MUST preserve the contents of the port buffer when resizing. - - Plugins MAY resize a port many times in a single run callback. Hosts - SHOULD make this as inexpensive as possible. - */ - LV2_Resize_Port_Status (*resize)(LV2_Resize_Port_Feature_Data data, - uint32_t index, - size_t size); -} LV2_Resize_Port_Resize; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_RESIZE_PORT_H */ - diff --git a/lv2/lv2plug.in/ns/ext/resize-port/resize-port.ttl b/lv2/lv2plug.in/ns/ext/resize-port/resize-port.ttl deleted file mode 100644 index 6688f90..0000000 --- a/lv2/lv2plug.in/ns/ext/resize-port/resize-port.ttl +++ /dev/null @@ -1,64 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix rsz: <http://lv2plug.in/ns/ext/resize-port#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/resize-port> - a lv2:Specification ; - rdfs:seeAlso <resize-port.h> , - <lv2-resize-port.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a feature, rsz:resize, which allows plugins to -dynamically resize their output port buffers.</p> - -<p>In addition to the dynamic feature, there are properties which describe the -space required for a particular port buffer which can be used statically in -data files.</p> -""" . - -rsz:resize - a lv2:Feature ; - lv2:documentation """ -<p>A feature to resize output port buffers in LV2_Plugin_Descriptor::run().</p> - -<p>To support this feature, the host must pass an LV2_Feature to the plugin's -instantiate method with URI LV2_RESIZE_PORT__resize and a pointer to a -LV2_Resize_Port_Resize structure. This structure provides a resize_port -function which plugins may use to resize output port buffers as necessary.</p> -""" . - -rsz:asLargeAs - a rdf:Property , - owl:DatatypeProperty ; - rdfs:domain lv2:Port ; - rdfs:range lv2:Symbol ; - rdfs:label "as large as" ; - lv2:documentation """ -<p>Indicates that a port requires at least as much buffer space as the port -with the given symbol on the same plugin instance. This may be used for any -ports, but is generally most useful to indicate an output port must be at least -as large as some input port (because it will copy from it). If a port is -asLargeAs several ports, it is asLargeAs the largest such port (not the sum of -those ports' sizes).</p> - -<p>The host guarantees that whenever an ObjectPort's run method is called, any -output O that is obj:asLargeAs an input I is connected to a buffer large enough -to copy I, or NULL if the port is lv2:connectionOptional.</p> -""" . - -rsz:minimumSize - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain lv2:Port ; - rdfs:range xsd:nonNegativeInteger ; - rdfs:label "minimum size" ; - rdfs:comment """ -Indicates that a port requires a buffer at least this large, in bytes. Any -host that supports the resize-port feature MUST connect any port with a -minimumSize specified to a buffer at least as large as the value given for this -property. Any host, especially those that do NOT support dynamic port -resizing, SHOULD do so or reduced functionality may result. -""" . diff --git a/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl b/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl deleted file mode 100644 index 9e699ad..0000000 --- a/lv2/lv2plug.in/ns/ext/state/lv2-state.doap.ttl +++ /dev/null @@ -1,46 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/state> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:created "2010-11-09" ; - doap:name "LV2 State" ; - doap:shortdesc "An interface for LV2 plugins to save and restore state." ; - doap:license <http://opensource.org/licenses/isc> ; - doap:developer <http://lv2plug.in/ns/meta#paniq> , - <http://drobilla.net/drobilla#me> ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "2.0" ; - doap:created "2013-01-16" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.4.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add state:loadDefaultState feature so plugins can have their default state loaded without hard-coding default state as a special case." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/state/manifest.ttl b/lv2/lv2plug.in/ns/ext/state/manifest.ttl deleted file mode 100644 index c2aec02..0000000 --- a/lv2/lv2plug.in/ns/ext/state/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/state> - a lv2:Specification ; - lv2:minorVersion 2 ; - lv2:microVersion 0 ; - rdfs:seeAlso <state.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/state/state.h b/lv2/lv2plug.in/ns/ext/state/state.h deleted file mode 100644 index 6d055f5..0000000 --- a/lv2/lv2plug.in/ns/ext/state/state.h +++ /dev/null @@ -1,352 +0,0 @@ -/* - Copyright 2010-2012 David Robillard <http://drobilla.net> - Copyright 2010 Leonard Ritter <paniq@paniq.org> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file state.h - C API for the LV2 State extension <http://lv2plug.in/ns/ext/state>. -*/ - -#ifndef LV2_STATE_H -#define LV2_STATE_H - -#include <stddef.h> -#include <stdint.h> - -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" - -#define LV2_STATE_URI "http://lv2plug.in/ns/ext/state" -#define LV2_STATE_PREFIX LV2_STATE_URI "#" - -#define LV2_STATE__State LV2_STATE_PREFIX "State" -#define LV2_STATE__interface LV2_STATE_PREFIX "interface" -#define LV2_STATE__loadDefaultState LV2_STATE_PREFIX "loadDefaultState" -#define LV2_STATE__makePath LV2_STATE_PREFIX "makePath" -#define LV2_STATE__mapPath LV2_STATE_PREFIX "mapPath" -#define LV2_STATE__state LV2_STATE_PREFIX "state" - -#ifdef __cplusplus -extern "C" { -#else -# include <stdbool.h> -#endif - -typedef void* LV2_State_Handle; -typedef void* LV2_State_Map_Path_Handle; -typedef void* LV2_State_Make_Path_Handle; - -/** - Flags describing value characteristics. - - These flags are used along with the value's type URI to determine how to - (de-)serialise the value data, or whether it is even possible to do so. -*/ -typedef enum { - /** - Plain Old Data. - - Values with this flag contain no pointers or references to other areas - of memory. It is safe to copy POD values with a simple memcpy and store - them for the duration of the process. A POD value is not necessarily - safe to trasmit between processes or machines (e.g. filenames are POD), - see LV2_STATE_IS_PORTABLE for details. - - Implementations MUST NOT attempt to copy or serialise a non-POD value if - they do not understand its type (and thus know how to correctly do so). - */ - LV2_STATE_IS_POD = 1, - - /** - Portable (architecture independent) data. - - Values with this flag are in a format that is usable on any - architecture. A portable value saved on one machine can be restored on - another machine regardless of architecture. The format of portable - values MUST NOT depend on architecture-specific properties like - endianness or alignment. Portable values MUST NOT contain filenames. - */ - LV2_STATE_IS_PORTABLE = 1 << 1, - - /** - Native data. - - This flag is used by the host to indicate that the saved data is only - going to be used locally in the currently running process (e.g. for - instance duplication or snapshots), so the plugin should use the most - efficient representation possible and not worry about serialisation - and portability. - */ - LV2_STATE_IS_NATIVE = 1 << 2 -} LV2_State_Flags; - -/** A status code for state functions. */ -typedef enum { - LV2_STATE_SUCCESS = 0, /**< Completed successfully. */ - LV2_STATE_ERR_UNKNOWN = 1, /**< Unknown error. */ - LV2_STATE_ERR_BAD_TYPE = 2, /**< Failed due to unsupported type. */ - LV2_STATE_ERR_BAD_FLAGS = 3, /**< Failed due to unsupported flags. */ - LV2_STATE_ERR_NO_FEATURE = 4, /**< Failed due to missing features. */ - LV2_STATE_ERR_NO_PROPERTY = 5 /**< Failed due to missing property. */ -} LV2_State_Status; - -/** - A host-provided function to store a property. - @param handle Must be the handle passed to LV2_State_Interface.save(). - @param key The key to store @p value under (URID). - @param value Pointer to the value to be stored. - @param size The size of @p value in bytes. - @param type The type of @p value (URID). - @param flags LV2_State_Flags for @p value. - @return 0 on success, otherwise a non-zero error code. - - The host passes a callback of this type to LV2_State_Interface.save(). This - callback is called repeatedly by the plugin to store all the properties that - describe its current state. - - DO NOT INVENT NONSENSE URI SCHEMES FOR THE KEY. Best is to use keys from - existing vocabularies. If nothing appropriate is available, use http URIs - that point to somewhere you can host documents so documentation can be made - resolvable (e.g. a child of the plugin or project URI). If this is not - possible, invent a URN scheme, e.g. urn:myproj:whatever. The plugin MUST - NOT pass an invalid URI key. - - The host MAY fail to store a property for whatever reason, but SHOULD - store any property that is LV2_STATE_IS_POD and LV2_STATE_IS_PORTABLE. - Implementations SHOULD use the types from the LV2 Atom extension - (http://lv2plug.in/ns/ext/atom) wherever possible. The plugin SHOULD - attempt to fall-back and avoid the error if possible. - - Note that @p size MUST be > 0, and @p value MUST point to a valid region of - memory @p size bytes long (this is required to make restore unambiguous). - - The plugin MUST NOT attempt to use this function outside of the - LV2_State_Interface.restore() context. -*/ -typedef LV2_State_Status (*LV2_State_Store_Function)( - LV2_State_Handle handle, - uint32_t key, - const void* value, - size_t size, - uint32_t type, - uint32_t flags); - -/** - A host-provided function to retrieve a property. - @param handle Must be the handle passed to LV2_State_Interface.restore(). - @param key The key of the property to retrieve (URID). - @param size (Output) If non-NULL, set to the size of the restored value. - @param type (Output) If non-NULL, set to the type of the restored value. - @param flags (Output) If non-NULL, set to the flags for the restored value. - @return A pointer to the restored value (object), or NULL if no value - has been stored under @p key. - - A callback of this type is passed by the host to - LV2_State_Interface.restore(). This callback is called repeatedly by the - plugin to retrieve any properties it requires to restore its state. - - The returned value MUST remain valid until LV2_State_Interface.restore() - returns. The plugin MUST NOT attempt to use this function, or any value - returned from it, outside of the LV2_State_Interface.restore() context. -*/ -typedef const void* (*LV2_State_Retrieve_Function)( - LV2_State_Handle handle, - uint32_t key, - size_t* size, - uint32_t* type, - uint32_t* flags); - -/** - LV2 Plugin State Interface. - - When the plugin's extension_data is called with argument - LV2_STATE__interface, the plugin MUST return an LV2_State_Interface - structure, which remains valid for the lifetime of the plugin. - - The host can use the contained function pointers to save and restore the - state of a plugin instance at any time, provided the threading restrictions - of the functions are met. - - Stored data is only guaranteed to be compatible between instances of plugins - with the same URI (i.e. if a change to a plugin would cause a fatal error - when restoring state saved by a previous version of that plugin, the plugin - URI MUST change just as it must when ports change incompatibly). Plugin - authors should consider this possibility, and always store sensible data - with meaningful types to avoid such problems in the future. -*/ -typedef struct _LV2_State_Interface { - /** - Save plugin state using a host-provided @p store callback. - - @param instance The instance handle of the plugin. - @param store The host-provided store callback. - @param handle An opaque pointer to host data which MUST be passed as the - handle parameter to @p store if it is called. - @param flags Flags describing desired properties of this save. These - flags may be used to determine the most appropriate values to store. - @param features Extensible parameter for passing any additional - features to be used for this save. - - The plugin is expected to store everything necessary to completely - restore its state later. Plugins SHOULD store simple POD data whenever - possible, and consider the possibility of state being restored much - later on a different machine. - - The @p handle pointer and @p store function MUST NOT be used - beyond the scope of save(). - - This function has its own special threading class: it may not be called - concurrently with any "Instantiation" function, but it may be called - concurrently with functions in any other class, unless the definition of - that class prohibits it (e.g. it may not be called concurrently with a - "Discovery" function, but it may be called concurrently with an "Audio" - function. The plugin is responsible for any locking or lock-free - techniques necessary to make this possible. - - Note that in the simple case where state is only modified by restore(), - there are no synchronization issues since save() is never called - concurrently with restore() (though run() may read it during a save). - - Plugins that dynamically modify state while running, however, must take - care to do so in such a way that a concurrent call to save() will save a - consistent representation of plugin state for a single instant in time. - */ - LV2_State_Status (*save)(LV2_Handle instance, - LV2_State_Store_Function store, - LV2_State_Handle handle, - uint32_t flags, - const LV2_Feature *const * features); - - /** - Restore plugin state using a host-provided @p retrieve callback. - - @param instance The instance handle of the plugin. - @param retrieve The host-provided retrieve callback. - @param handle An opaque pointer to host data which MUST be passed as the - handle parameter to @p retrieve if it is called. - @param flags Currently unused. - @param features Extensible parameter for passing any additional - features to be used for this restore. - - The plugin MAY assume a restored value was set by a previous call to - LV2_State_Interface.save() by a plugin with the same URI. - - The plugin MUST gracefully fall back to a default value when a value can - not be retrieved. This allows the host to reset the plugin state with - an empty map. - - The @p handle pointer and @p store function MUST NOT be used - beyond the scope of restore(). - - This function is in the "Instantiation" threading class as defined by - LV2. This means it MUST NOT be called concurrently with any other - function on the same plugin instance. - */ - LV2_State_Status (*restore)(LV2_Handle instance, - LV2_State_Retrieve_Function retrieve, - LV2_State_Handle handle, - uint32_t flags, - const LV2_Feature *const * features); -} LV2_State_Interface; - -/** - Feature data for state:mapPath (LV2_STATE__mapPath). -*/ -typedef struct { - /** - Opaque host data. - */ - LV2_State_Map_Path_Handle handle; - - /** - Map an absolute path to an abstract path for use in plugin state. - @param handle MUST be the @p handle member of this struct. - @param absolute_path The absolute path of a file. - @return An abstract path suitable for use in plugin state. - - The plugin MUST use this function to map any paths that will be stored - in plugin state. The returned value is an abstract path which MAY not - be an actual file system path; @ref absolute_path() MUST be used to map - it to an actual path in order to use the file. - - Plugins MUST NOT make any assumptions about abstract paths except that - they can be mapped back to the absolute path of the "same" file (though - not necessarily the same original path) using @ref absolute_path(). - - This function may only be called within the context of - LV2_State_Interface methods. The caller is responsible for freeing the - returned value with free(). - */ - char* (*abstract_path)(LV2_State_Map_Path_Handle handle, - const char* absolute_path); - - /** - Map an abstract path from plugin state to an absolute path. - @param handle MUST be the @p handle member of this struct. - @param abstract_path An abstract path (e.g. a path from plugin state). - @return An absolute file system path. - - The plugin MUST use this function in order to actually open or otherwise - use any paths loaded from plugin state. - - This function may only be called within the context of - LV2_State_Interface methods. The caller is responsible for freeing the - returned value with free(). - */ - char* (*absolute_path)(LV2_State_Map_Path_Handle handle, - const char* abstract_path); -} LV2_State_Map_Path; - -/** - Feature data for state:makePath (@ref LV2_STATE__makePath). -*/ -typedef struct { - /** - Opaque host data. - */ - LV2_State_Make_Path_Handle handle; - - /** - Return a path the plugin may use to create a new file. - @param handle MUST be the @p handle member of this struct. - @param path The path of the new file within a namespace unique to this - plugin instance. - @return The absolute path to use for the new file. - - This function can be used by plugins to create files and directories, - either at state saving time (if this feature is passed to - LV2_State_Interface.save()) or any time (if this feature is passed to - LV2_Descriptor.instantiate()). - - The host MUST do whatever is necessary for the plugin to be able to - create a file at the returned path (e.g. using fopen), including - creating any leading directories. - - If this function is passed to LV2_Descriptor.instantiate(), it may be - called from any non-realtime context. If it is passed to - LV2_State_Interface.save(), it may only be called within the dynamic - scope of that function call. - - The caller is responsible for freeing the returned value with free(). - */ - char* (*path)(LV2_State_Make_Path_Handle handle, - const char* path); -} LV2_State_Make_Path; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_STATE_H */ diff --git a/lv2/lv2plug.in/ns/ext/state/state.ttl b/lv2/lv2plug.in/ns/ext/state/state.ttl deleted file mode 100644 index 699ef45..0000000 --- a/lv2/lv2plug.in/ns/ext/state/state.ttl +++ /dev/null @@ -1,349 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix state: <http://lv2plug.in/ns/ext/state#> . - -<http://lv2plug.in/ns/ext/state> - a lv2:Specification ; - rdfs:seeAlso <state.h> , - <../../meta/meta.ttl> , - <lv2-state.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a simple mechanism which allows hosts to save and -restore a plugin instance's state. The goal is for an instance's state to be -<em>completely</em> described by port values (as with all LV2 plugins) and a -simple dictionary.</p> - -<p>The <q>state</q> defined here is conceptually a key:value dictionary, with -URI keys and values of any type. For performance reasons the key and value -type are actually a <q>URID</q>, a URI mapped to an integer. A single -key:value pair is called a <q>property</q>.</p> - -<p>This state model is simple yet has many benefits:</p> -<ul> - <li>Both fast and extensible thanks to URID keys.</li> - <li>No limitations on possible value types.</li> - <li>Easy to serialise in almost any format.</li> - <li>Easy to store in a typical <q>map</q> or <q>dictionary</q> data - structure.</li> - <li>Elegantly described in Turtle, so state can be described in LV2 data - files (including presets).</li> - <li>Does not impose any file formats, data structures, or file system - requirements.</li> - <li>Suitable for portable persistent state as well as fast in-memory - snapshots.</li> - <li>Keys <em>may</em> be well-defined and used meaningfully across several - implementations.</li> - <li>State <em>may</em> be dynamic, but plugins are not required to have a - dynamic dictionary data structure available.</li> -</ul> - -<p>To implement state, the plugin provides a state:interface to the host. To -save or restore, the host calls LV2_State_Interface::save() or -LV2_State_Interface::restore(), passing a callback to be used for handling a -single property. The host is free to implement property storage and retrieval -in any way.</p> - -<p>Since value types are defined by URI, any type is possible. However, a set -of standard types is defined by the <a href="../atom/atom.html">LV2 Atom</a> -extension. Use of these types is recommended. Hosts MUST implement at least -<a href="../atom/atom.html#String">atom:String</a>, which is simply a C -string.</p> - -<h3>Referring to Files</h3> - -<p>Plugins may need to refer to existing files (e.g. loaded samples) in their -state. This is done by storing the file's path as a property just like any -other value. However, there are some rules which MUST be followed when storing -paths, see state:mapPath for details. Plugins MUST use the type <a -href="../atom/atom.html#Path">atom:Path</a> for all paths in their state.</p> - -<p>Plugins are strongly encouraged to avoid creating files, instead storing all -state as properties. However, occasionally the ability to create files is -necessary. To make this possible, the host can provide the feature -state:makePath which allocates paths for plugin-created files. Plugins MUST -NOT create files in any other locations.</p> - -<h3>Plugin Code Example</h3> - -<pre class="c-code"> - -/* Namespace for this plugin's keys. This SHOULD be something that could be - published as a document, even if that document does not exist right now. -*/ -#define NS_MY "http://example.org/myplugin/schema#" - -#define DEFAULT_GREETING "Hello" - -LV2_Handle -my_instantiate(...) -{ - MyPlugin* plugin = ...; - plugin->uris.atom_String = map_uri(LV2_ATOM__String); - plugin->uris.my_greeting = map_uri(NS_MY "greeting"); - plugin->state.greeting = strdup(DEFAULT_GREETING); - return plugin; -} - -LV2_State_Status -my_save(LV2_Handle instance, - LV2_State_Store_Function store, - LV2_State_Handle handle, - uint32_t flags, - const LV2_Feature *const * features) -{ - MyPlugin* plugin = (MyPlugin*)instance; - const char* greeting = plugin->state.greeting; - - store(handle, - plugin->uris.my_greeting, - greeting, - strlen(greeting) + 1, // Careful! Need space for terminator - plugin->uris.atom_String, - LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE); - - return LV2_STATE_SUCCESS; -} - -LV2_State_Status -my_restore(LV2_Handle instance, - LV2_State_Retrieve_Function retrieve, - LV2_State_Handle handle, - uint32_t flags, - const LV2_Feature *const * features) -{ - MyPlugin* plugin = (MyPlugin*)instance; - - size_t size; - uint32_t type; - uint32_t flags; - const char* greeting = retrieve( - handle, plugin->uris.my_greeting, &size, &type, &flags); - - if (greeting) { - free(plugin->state->greeting); - plugin->state->greeting = strdup(greeting); - } else { - plugin->state->greeting = strdup(DEFAULT_GREETING); - } - - return LV2_STATE_SUCCESS; -} - -const void* -my_extension_data(const char* uri) -{ - static const LV2_State_Interface state_iface = { my_save, my_restore }; - if (!strcmp(uri, LV2_STATE__interface)) { - return &state_iface; - } -} -</pre> - -<h3>Host Code Example</h3> - -<pre class="c-code"> -LV2_State_Status -store_callback(LV2_State_Handle handle, - uint32_t key, - const void* value, - size_t size, - uint32_t type, - uint32_t flags) -{ - if ((flags & LV2_STATE_IS_POD)) { - /* We only care about POD since we're keeping state in memory only. - For disk or network use, LV2_STATE_IS_PORTABLE must also be checked. - */ - Map* state_map = (Map*)handle; - state_map->insert(key, Value(copy(value), size, type)); - return 0; - } else { - return 1; /* Non-POD events are unsupported. */ - } -} - -Map -get_plugin_state(LV2_Handle instance) -{ - LV2_State* state = instance.extension_data(LV2_STATE__interface); - Map state_map; - /** Request a fast/native/POD save, since we're just copying in memory */ - state.save(instance, store_callback, &state_map, - LV2_STATE_IS_POD|LV2_STATE_IS_NATIVE); - return state_map; -} -</pre> - -<h3>Extensions to this Specification</h3> - -<p>It is likely that other interfaces for working with plugin state will be -developed as needed. This is encouraged, however everything SHOULD work within -the state <em>model</em> defined here. That is, <strong>do not complicate the -state model</strong>. Implementations can assume the following:</p> - -<ul> -<li>The current port values and state dictionary completely describe a plugin -instance, at least well enough that saving and restoring will yield an -<q>identical</q> instance from the user's perspective.</li> -<li>Hosts are not expected to save and/or restore any other attributes of a -plugin instance.</li> -</ul> - -<h3>The <q>Property Principle</q></h3> - -<p>The main benefit of this meaningful state model is that it can double as a -plugin control/query mechanism. For plugins that require more advanced control -than simple control ports, instead of defining a set of commands, define -properties whose values can be set appropriately. This provides both a way to -control and save that state <q>for free</q>, since there is no need to define -commands <em>and</em> a set of properties for storing their effects. In -particular, this is a good way for UIs to achieve more advanced control of -plugins.</p> - -<p>This <q>property principle</q> is summed up in the phrase: -<q>Don't stop; set playing to false</q>.</p> - -<p>This extension does not define a dynamic mechanism for state access and -manipulation. The <a href="../patch/patch.html">LV2 Patch</a> extension -defines a generic set of messages which can be used to access or manipulate -properties, and the <a href="../atom/atom.html">LV2 Atom</a> extension defines -a port type and data container capable of transmitting those messages.</p> -""" . - -state:interface - a lv2:ExtensionData ; - lv2:documentation """ -<p>A structure (LV2_State_Interface) which contains functions to be called by -the host to save and restore state. In order to support this extension, the -plugin must return a valid LV2_State_Interface from -LV2_Descriptor::extension_data() when it is called with URI -LV2_STATE__interface.</p> - -<p>The plugin data file should describe this like so:</p> -<pre class="turtle-code"> -@prefix state: <http://lv2plug.in/ns/ext/state#> . - -<plugin> - a lv2:Plugin ; - lv2:extensionData state:interface . -</pre> -""" . - -state:State - a rdfs:Class ; - rdfs:label "State" ; - lv2:documentation """ -<p>A state dictionary. This type should be used wherever instance state is -described. The properties of a resource with this type correspond directly to -the properties of the state dictionary (except the property that states it has -this type).</p> -""" . - -state:loadDefaultState - a lv2:Feature ; - lv2:documentation """ -<p>This feature indicates that the plugin has default state listed with the -state:state property which should be loaded by the host before running the -plugin. Requiring this feature allows plugins to implement a single state -loading mechanism which works for initialisation as well as restoration, -without having to hard-code default state.</p> - -<p>To support this feature, the host MUST <q>restore</q> the default state -after instantiating the plugin but before calling run().</p> -""" . - -state:state - a rdf:Property ; - rdfs:label "state" ; - rdfs:range state:State ; - lv2:documentation """ -<p>The state of this instance. This property may be used anywhere a state -needs to be described, for example:</p> - -<pre class="turtle-code"> -@prefix eg: <http://example.org/> . - -<plugin-instance> - state:state [ - eg:somekey "some value" ; - eg:someotherkey "some other value" ; - eg:favourite-number 2 - ] . -</pre> -""" . - -state:mapPath - a lv2:Feature ; - rdfs:label "map file paths" ; - lv2:documentation """ -<p>This feature maps absolute paths to/from <q>abstract paths</q> which are -stored in state. To support this feature a host must pass an LV2_Feature with -URI LV2_STATE__mapPath and data pointed to an LV2_State_Map_Path to the -plugin's LV2_State_Interface methods.</p> - -<p>The plugin MUST map <em>all</em> paths stored in its state (including those -inside any files in its state). This is necessary to enable host to handle -file system references correctly, e.g. for distribution or archival.</p> - -<p>For example, a plugin may write a path to a state file like so:</p> - -<pre class="c-code"> -void write_path(LV2_State_Map_Path* map_path, FILE* myfile, const char* path) -{ - char* abstract_path = map_path->abstract_path(map_path->handle, path); - fprintf(myfile, "%s", abstract_path); - free(abstract_path); -} -</pre> - -<p>Then, later reload the path like so:</p> - -<pre class="c-code"> -char* read_path(LV2_State_Map_Path* map_path, FILE* myfile) -{ - /* Obviously this is not production quality code! */ - char abstract_path[1024]; - fscanf(myfile, "%s", abstract_path); - return map_path->absolute_path(map_path->handle, abstract_path); -} -</pre> -""" . - -state:makePath - a lv2:Feature ; - rdfs:label "create new file paths" ; - lv2:documentation """ -<p>This feature allows plugins to create new files and/or directories. To -support this feature the host passes an LV2_Feature with URI -LV2_STATE__makePath and data pointed to an LV2_State_Make_Path to the plugin. -The host may make this feature available only during save by passing it to -LV2_State_Interface::save(), or available any time by passing it to -LV2_Descriptor::instantiate(). If passed to LV2_State_Interface::save(), the -feature MUST NOT be used beyond the scope of that call.</p> - -<p>The plugin is guaranteed a hierarchical namespace unique to that plugin -instance, and may expect the returned path to have the requested path as a -suffix. There is <em>one</em> such namespace, even if the feature is passed to -both LV2_Descriptor::instantiate() <em>and</em> LV2_State_Interface::save(). -Beyond this, the plugin MUST NOT make any assumptions about the returned -paths.</p> - -<p>Like any other paths, the plugin MUST map these paths using state:mapPath -before storing them in state. The plugin MUST NOT assume these paths will be -available across a save/restore otherwise, i.e. only mapped paths saved to -state are persistent, any other created paths are temporary.</p> - -<p>For example, a plugin may create a file in a subdirectory like so:</p> - -<pre class="c-code"> -char* save_myfile(LV2_State_Make_Path* make_path) -{ - char* path = make_path->path(make_path->handle, "foo/bar/myfile.txt"); - FILE* myfile = fopen(path, 'w'); - fprintf(myfile, "I am some data"); - fclose(myfile); - return path; -} -</pre> -""" . diff --git a/lv2/lv2plug.in/ns/ext/time/lv2-time.doap.ttl b/lv2/lv2plug.in/ns/ext/time/lv2-time.doap.ttl deleted file mode 100644 index 2471415..0000000 --- a/lv2/lv2plug.in/ns/ext/time/lv2-time.doap.ttl +++ /dev/null @@ -1,33 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/time> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Time" ; - doap:shortdesc "Properties for describing time." ; - doap:created "2011-10-05" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.2" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Use consistent label style." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/time/manifest.ttl b/lv2/lv2plug.in/ns/ext/time/manifest.ttl deleted file mode 100644 index b31ed3b..0000000 --- a/lv2/lv2plug.in/ns/ext/time/manifest.ttl +++ /dev/null @@ -1,9 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/time> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 2 ; - rdfs:seeAlso <time.ttl> . - diff --git a/lv2/lv2plug.in/ns/ext/time/time.h b/lv2/lv2plug.in/ns/ext/time/time.h deleted file mode 100644 index 3bb0614..0000000 --- a/lv2/lv2plug.in/ns/ext/time/time.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - Copyright 2011 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file time.h C header for the LV2 Time extension - <http://lv2plug.in/ns/ext/time>. -*/ - -#ifndef LV2_TIME_H -#define LV2_TIME_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define LV2_TIME_URI "http://lv2plug.in/ns/ext/time" - -#define LV2_TIME__Time LV2_TIME_URI "#Time" -#define LV2_TIME__Position LV2_TIME_URI "#Position" -#define LV2_TIME__Rate LV2_TIME_URI "#Rate" -#define LV2_TIME__position LV2_TIME_URI "#position" -#define LV2_TIME__barBeat LV2_TIME_URI "#barBeat" -#define LV2_TIME__bar LV2_TIME_URI "#bar" -#define LV2_TIME__beat LV2_TIME_URI "#beat" -#define LV2_TIME__beatUnit LV2_TIME_URI "#beatUnit" -#define LV2_TIME__beatsPerBar LV2_TIME_URI "#beatsPerBar" -#define LV2_TIME__beatsPerMinute LV2_TIME_URI "#beatsPerMinute" -#define LV2_TIME__frame LV2_TIME_URI "#frame" -#define LV2_TIME__framesPerSecond LV2_TIME_URI "#framesPerSecond" -#define LV2_TIME__speed LV2_TIME_URI "#speed" - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* LV2_TIME_H */ diff --git a/lv2/lv2plug.in/ns/ext/time/time.ttl b/lv2/lv2plug.in/ns/ext/time/time.ttl deleted file mode 100644 index 383cb4d..0000000 --- a/lv2/lv2plug.in/ns/ext/time/time.ttl +++ /dev/null @@ -1,138 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix time: <http://lv2plug.in/ns/ext/time#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/time> - a owl:Ontology ; - rdfs:seeAlso <time.h> , - <lv2-time.doap.ttl> ; - lv2:documentation """ -<p>This is a vocabulary for precisely describing a position in time and the -passage of time itself, in both real and musical terms.</p> - -<p>In addition to real time (e.g. seconds), two units of time are used: -<q>frames</q> and <q>beats</q>. A frame is a numbered quantum of time. Frame -time is related to real-time by the <q>frame rate</q> or <q>sample rate</q>, -time:framesPerSecond. A beat is a single pulse of musical time. Beat time is -related to real-time by the <q>tempo</q>, time:beatsPerMinute.</p> - -<p>Musical time additionally has a <q>meter</q> which describes passage of time -in terms of musical <q>bars</q>. A bar is a higher level grouping of beats. -The meter describes how many beats are in one bar.</p> -""" . - -time:Time - a rdfs:Class ; - rdfs:subClassOf time:Position ; - rdfs:label "Time" ; - rdfs:comment "A point in time in some unit/dimension." . - -time:Position - a rdfs:Class ; - rdfs:label "Position" ; - lv2:documentation """ -<p>A point in time and/or the speed at which time is passing. A position is -both a point and a speed, which precisely defines a time within a timeline.</p> -""" . - -time:Rate - a rdfs:Class ; - rdfs:subClassOf time:Position ; - rdfs:label "Rate" ; - lv2:documentation """ -<p>The rate of passage of time in terms of one unit with respect to -another.</p> """ . - -time:position - a rdf:Property , - owl:ObjectProperty , - owl:FunctionalProperty ; - rdfs:range time:Position ; - rdfs:label "position" . - -time:barBeat - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Time ; - rdfs:range xsd:float ; - rdfs:label "beat within bar" ; - rdfs:comment "The beat number within the bar, from 0 to beatsPerBar." . - -time:bar - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Time ; - rdfs:range xsd:long ; - rdfs:label "bar" . - -time:beat - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Time ; - rdfs:range xsd:double ; - rdfs:label "beat" . - -time:beatUnit - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Rate ; - rdfs:range xsd:nonNegativeInteger ; - lv2:documentation """ -<p>Beat unit, the note value that counts as one beat. This is the bottom number -in a time signature: 2 for half note, 4 for quarter note, and so on.</p> -""" . - -time:beatsPerBar - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Rate ; - rdfs:range xsd:float ; - rdfs:label "beats per bar" . - -time:beatsPerMinute - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Rate ; - rdfs:range xsd:float ; - rdfs:label "beats per minute" ; - rdfs:comment "Tempo in beats per minute." . - -time:frame - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Time ; - rdfs:range xsd:long ; - rdfs:label "frame" . - -time:framesPerSecond - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Rate ; - rdfs:range xsd:float ; - rdfs:label "frames per second" ; - rdfs:comment "Frame rate in frames per second." . - -time:speed - a rdf:Property , - owl:DatatypeProperty , - owl:FunctionalProperty ; - rdfs:domain time:Rate ; - rdfs:range xsd:float ; - rdfs:label "speed" ; - lv2:documentation """ -<p>The rate of the progress of time as a fraction of normal speed. For -example, a rate of 0.0 is stopped, 1.0 is rolling at normal speed, 0.5 is -rolling at half speed, -1.0 is reverse, and so on. -</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/uri-map/lv2-uri-map.doap.ttl b/lv2/lv2plug.in/ns/ext/uri-map/lv2-uri-map.doap.ttl deleted file mode 100644 index 504c092..0000000 --- a/lv2/lv2plug.in/ns/ext/uri-map/lv2-uri-map.doap.ttl +++ /dev/null @@ -1,60 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/uri-map> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:created "2008-00-00" ; - doap:developer <http://lv2plug.in/ns/meta#larsl> , - <http://drobilla.net/drobilla#me> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 URI Map" ; - doap:shortdesc "A feature for mapping URIs to integers." ; - doap:release [ - doap:revision "1.6" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.4" ; - doap:created "2011-11-21" ; - dcs:blame <http://drobilla.net/drobilla#me> ; - doap:file-release <http://lv2plug.in/spec/lv2-uri-map-1.4.tar.bz2> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Update packaging." - ] , [ - rdfs:label "Deprecate uri-map in favour of urid." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2011-05-26" ; - dcs:blame <http://drobilla.net/drobilla#me> ; - doap:file-release <http://lv2plug.in/spec/lv2-uri-map-1.2.tar.bz2> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add build system (for installation)." - ] , [ - rdfs:label "Mark up documentation in HTML using lv2:documentation." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2010-10-18" ; - doap:file-release <http://lv2plug.in/spec/lv2-uri-map-1.0.tar.gz> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/uri-map/manifest.ttl b/lv2/lv2plug.in/ns/ext/uri-map/manifest.ttl deleted file mode 100644 index 87087b6..0000000 --- a/lv2/lv2plug.in/ns/ext/uri-map/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/uri-map> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 6 ; - rdfs:seeAlso <uri-map.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/uri-map/uri-map.h b/lv2/lv2plug.in/ns/ext/uri-map/uri-map.h deleted file mode 100644 index d1dc2f7..0000000 --- a/lv2/lv2plug.in/ns/ext/uri-map/uri-map.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright 2008-2011 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file - C header for the LV2 URI Map extension <http://lv2plug.in/ns/ext/uri-map>. - - This extension defines a simple mechanism for plugins to map URIs to - integers, usually for performance reasons (e.g. processing events typed by - URIs in real time). The expected use case is for plugins to map URIs to - integers for things they 'understand' at instantiation time, and store those - values for use in the audio thread without doing any string comparison. - This allows the extensibility of RDF with the performance of integers (or - centrally defined enumerations). -*/ - -#ifndef LV2_URI_MAP_H -#define LV2_URI_MAP_H - -#define LV2_URI_MAP_URI "http://lv2plug.in/ns/ext/uri-map" - -#include <stdint.h> - -/** - Opaque pointer to host data. -*/ -typedef void* LV2_URI_Map_Callback_Data; - -/** - URI Map Feature. - - To support this feature the host must pass an LV2_Feature struct to the - plugin's instantiate method with URI "http://lv2plug.in/ns/ext/uri-map" - and data pointed to an instance of this struct. -*/ -typedef struct { - /** - Opaque pointer to host data. - - The plugin MUST pass this to any call to functions in this struct. - Otherwise, it must not be interpreted in any way. - */ - LV2_URI_Map_Callback_Data callback_data; - - /** - Get the numeric ID of a URI from the host. - - @param callback_data Must be the callback_data member of this struct. - @param map The 'context' of this URI. Certain extensions may define a - URI that must be passed here with certain restrictions on the return - value (e.g. limited range). This value may be NULL if the plugin needs - an ID for a URI in general. Extensions SHOULD NOT define a context - unless there is a specific need to do so, e.g. to restrict the range of - the returned value. - @param uri The URI to be mapped to an integer ID. - - This function is referentially transparent; any number of calls with the - same arguments is guaranteed to return the same value over the life of a - plugin instance (though the same URI may return different values with a - different map parameter). However, this function is not necessarily very - fast: plugins SHOULD cache any IDs they might need in performance - critical situations. - - The return value 0 is reserved and indicates that an ID for that URI - could not be created for whatever reason. Extensions MAY define more - precisely what this means in a certain context, but in general plugins - SHOULD handle this situation as gracefully as possible. However, hosts - SHOULD NOT return 0 from this function in non-exceptional circumstances - (e.g. the URI map SHOULD be dynamic). Hosts that statically support only - a fixed set of URIs should not expect plugins to function correctly. - */ - uint32_t (*uri_to_id)(LV2_URI_Map_Callback_Data callback_data, - const char* map, - const char* uri); -} LV2_URI_Map_Feature; - -#endif /* LV2_URI_MAP_H */ diff --git a/lv2/lv2plug.in/ns/ext/uri-map/uri-map.ttl b/lv2/lv2plug.in/ns/ext/uri-map/uri-map.ttl deleted file mode 100644 index 7f6b0e7..0000000 --- a/lv2/lv2plug.in/ns/ext/uri-map/uri-map.ttl +++ /dev/null @@ -1,24 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix umap: <http://lv2plug.in/ns/ext/uri-map#> . - -<http://lv2plug.in/ns/ext/uri-map> - a lv2:Feature ; - owl:deprecated true ; - rdfs:seeAlso <uri-map.h> , - <lv2-uri-map.doap.ttl> ; - lv2:documentation """ -<p><span class="warning">This extension is deprecated.</span> New -implementations should use <a href="../urid/urid.html">LV2 URID</a> -instead.</p> - -<p>This extension defines a simple mechanism for plugins to map URIs to -integers, usually for performance reasons (e.g. processing events typed by URIs -in real time). The expected use case is for plugins to map URIs to integers -for things they 'understand' at instantiation time, and store those values for -use in the audio thread without doing any string comparison. This allows the -extensibility of RDF with the performance of integers (or centrally defined -enumerations).</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/urid/lv2-urid.doap.ttl b/lv2/lv2plug.in/ns/ext/urid/lv2-urid.doap.ttl deleted file mode 100644 index 99505e6..0000000 --- a/lv2/lv2plug.in/ns/ext/urid/lv2-urid.doap.ttl +++ /dev/null @@ -1,47 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/urid> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:license <http://opensource.org/licenses/isc> ; - doap:name "LV2 URID" ; - doap:shortdesc "Features for mapping URIs to and from integers." ; - doap:created "2011-07-22" ; - doap:developer <http://lv2plug.in/ns/meta#gabrbedd> ; - doap:maintainer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.4" ; - doap:created "2012-10-14" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.2.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Fix typo in urid:unmap documentation." - ] - ] - ] , [ - doap:revision "1.2" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Add feature struct names." - ] , [ - rdfs:label "Merge with unified LV2 package." - ] - ] - ] , [ - doap:revision "1.0" ; - doap:created "2011-11-21" ; - doap:file-release <http://lv2plug.in/spec/lv2-urid-1.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/urid/manifest.ttl b/lv2/lv2plug.in/ns/ext/urid/manifest.ttl deleted file mode 100644 index 19b5832..0000000 --- a/lv2/lv2plug.in/ns/ext/urid/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/urid> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 4 ; - rdfs:seeAlso <urid.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/urid/urid.h b/lv2/lv2plug.in/ns/ext/urid/urid.h deleted file mode 100644 index b4be712..0000000 --- a/lv2/lv2plug.in/ns/ext/urid/urid.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - Copyright 2008-2012 David Robillard <http://drobilla.net> - Copyright 2011 Gabriel M. Beddingfield <gabrbedd@gmail.com> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file urid.h - C header for the LV2 URID extension <http://lv2plug.in/ns/ext/urid> -*/ - -#ifndef LV2_URID_H -#define LV2_URID_H - -#define LV2_URID_URI "http://lv2plug.in/ns/ext/urid" -#define LV2_URID_PREFIX LV2_URID_URI "#" - -#define LV2_URID__map LV2_URID_PREFIX "map" -#define LV2_URID__unmap LV2_URID_PREFIX "unmap" - -/* Legacy defines */ -#define LV2_URID_MAP_URI LV2_URID__map -#define LV2_URID_UNMAP_URI LV2_URID__unmap - -#include <stdint.h> - -/** - Opaque pointer to host data for LV2_URID_Map. -*/ -typedef void* LV2_URID_Map_Handle; - -/** - Opaque pointer to host data for LV2_URID_Unmap. -*/ -typedef void* LV2_URID_Unmap_Handle; - -/** - URI mapped to an integer. -*/ -typedef uint32_t LV2_URID; - -/** - URID Map Feature (LV2_URID__map) -*/ -typedef struct _LV2_URID_Map { - /** - Opaque pointer to host data. - - This MUST be passed to map_uri() whenever it is called. - Otherwise, it must not be interpreted in any way. - */ - LV2_URID_Map_Handle handle; - - /** - Get the numeric ID of a URI. - - If the ID does not already exist, it will be created. - - This function is referentially transparent; any number of calls with the - same arguments is guaranteed to return the same value over the life of a - plugin instance. Note, however, that several URIs MAY resolve to the - same ID if the host considers those URIs equivalent. - - This function is not necessarily very fast or RT-safe: plugins SHOULD - cache any IDs they might need in performance critical situations. - - The return value 0 is reserved and indicates that an ID for that URI - could not be created for whatever reason. However, hosts SHOULD NOT - return 0 from this function in non-exceptional circumstances (i.e. the - URI map SHOULD be dynamic). - - @param handle Must be the callback_data member of this struct. - @param uri The URI to be mapped to an integer ID. - */ - LV2_URID (*map)(LV2_URID_Map_Handle handle, - const char* uri); -} LV2_URID_Map; - -/** - URI Unmap Feature (LV2_URID__unmap) -*/ -typedef struct _LV2_URID_Unmap { - /** - Opaque pointer to host data. - - This MUST be passed to unmap() whenever it is called. - Otherwise, it must not be interpreted in any way. - */ - LV2_URID_Unmap_Handle handle; - - /** - Get the URI for a previously mapped numeric ID. - - Returns NULL if @p urid is not yet mapped. Otherwise, the corresponding - URI is returned in a canonical form. This MAY not be the exact same - string that was originally passed to LV2_URID_Map::map(), but it MUST be - an identical URI according to the URI syntax specification (RFC3986). A - non-NULL return for a given @p urid will always be the same for the life - of the plugin. Plugins that intend to perform string comparison on - unmapped URIs SHOULD first canonicalise URI strings with a call to - map_uri() followed by a call to unmap_uri(). - - @param handle Must be the callback_data member of this struct. - @param urid The ID to be mapped back to the URI string. - */ - const char* (*unmap)(LV2_URID_Unmap_Handle handle, - LV2_URID urid); -} LV2_URID_Unmap; - -#endif /* LV2_URID_H */ diff --git a/lv2/lv2plug.in/ns/ext/urid/urid.ttl b/lv2/lv2plug.in/ns/ext/urid/urid.ttl deleted file mode 100644 index 29b196a..0000000 --- a/lv2/lv2plug.in/ns/ext/urid/urid.ttl +++ /dev/null @@ -1,39 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix urid: <http://lv2plug.in/ns/ext/urid#> . - -<http://lv2plug.in/ns/ext/urid> - a lv2:Specification ; - rdfs:seeAlso <urid.h> , - <lv2-urid.doap.ttl> ; - lv2:documentation """ -<p>This extension defines a simple mechanism for plugins to map URIs to and -from integers, usually for performance reasons (e.g. processing events typed by -URIs in real time). Typically, plugins map URIs to integers for things they -"understand" at instantiation time, and store those values for use in the audio -thread without doing any string comparison. This allows for the extensibility -of RDF but with the performance of integers.</p> - -<p>This extension is intended as an improved and simplified replacement for the -<a href="../uri-map/uri-map.html">uri-map</a> extension, since the <q>map</q> -context parameter has been found problematic. This extension is functionally -equivalent to the uri-map extension with a NULL context. New implementations -are encouraged to use this extension for URI mapping.</p> -""" . - -urid:map - a lv2:Feature ; - lv2:documentation """ -<p>A feature which is used to map URIs to integers. To support this feature, -the host must pass an LV2_Feature to LV2_Descriptor::instantiate() with URI -LV2_URID__map and data pointed to an instance of LV2_URID_Map.</p> -""" . - -urid:unmap - a lv2:Feature ; - lv2:documentation """ -<p>A feature which is used to unmap URIs previously mapped to integers by -urid:map. To support this feature, the host must pass an LV2_Feature to -LV2_Descriptor::instantiate() with URI LV2_URID__unmap and data pointed to -an instance of LV2_URID_Unmap.</p> -""" . diff --git a/lv2/lv2plug.in/ns/ext/worker/lv2-worker.doap.ttl b/lv2/lv2plug.in/ns/ext/worker/lv2-worker.doap.ttl deleted file mode 100644 index 18acf5f..0000000 --- a/lv2/lv2plug.in/ns/ext/worker/lv2-worker.doap.ttl +++ /dev/null @@ -1,23 +0,0 @@ -@prefix dcs: <http://ontologi.es/doap-changeset#> . -@prefix doap: <http://usefulinc.com/ns/doap#> . -@prefix foaf: <http://xmlns.com/foaf/0.1/> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/worker> - a doap:Project ; - rdfs:seeAlso <../../meta/meta.ttl> ; - doap:name "LV2 Worker" ; - doap:shortdesc "Support for a non-realtime plugin worker method." ; - doap:created "2012-03-22" ; - doap:developer <http://drobilla.net/drobilla#me> ; - doap:release [ - doap:revision "1.0" ; - doap:created "2012-04-17" ; - doap:file-release <http://lv2plug.in/spec/lv2-1.0.0.tar.bz2> ; - dcs:blame <http://drobilla.net/drobilla#me> ; - dcs:changeset [ - dcs:item [ - rdfs:label "Initial release." - ] - ] - ] . diff --git a/lv2/lv2plug.in/ns/ext/worker/manifest.ttl b/lv2/lv2plug.in/ns/ext/worker/manifest.ttl deleted file mode 100644 index 02cf27f..0000000 --- a/lv2/lv2plug.in/ns/ext/worker/manifest.ttl +++ /dev/null @@ -1,8 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . - -<http://lv2plug.in/ns/ext/worker> - a lv2:Specification ; - lv2:minorVersion 1 ; - lv2:microVersion 0 ; - rdfs:seeAlso <worker.ttl> . diff --git a/lv2/lv2plug.in/ns/ext/worker/worker.h b/lv2/lv2plug.in/ns/ext/worker/worker.h deleted file mode 100644 index 74ac45b..0000000 --- a/lv2/lv2plug.in/ns/ext/worker/worker.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - Copyright 2012 David Robillard <http://drobilla.net> - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -*/ - -/** - @file worker.h C header for the LV2 Worker extension - <http://lv2plug.in/ns/ext/worker>. -*/ - -#ifndef LV2_WORKER_H -#define LV2_WORKER_H - -#include <stdint.h> - -#include "lv2/lv2plug.in/ns/lv2core/lv2.h" - -#define LV2_WORKER_URI "http://lv2plug.in/ns/ext/worker" -#define LV2_WORKER_PREFIX LV2_WORKER_URI "#" - -#define LV2_WORKER__interface LV2_WORKER_PREFIX "interface" -#define LV2_WORKER__schedule LV2_WORKER_PREFIX "schedule" - -/** - A status code for worker functions. -*/ -typedef enum { - LV2_WORKER_SUCCESS = 0, /**< Completed successfully. */ - LV2_WORKER_ERR_UNKNOWN = 1, /**< Unknown error. */ - LV2_WORKER_ERR_NO_SPACE = 2 /**< Failed due to lack of space. */ -} LV2_Worker_Status; - -typedef void* LV2_Worker_Respond_Handle; - -/** - A function to respond to run() from the worker method. - - The @p data MUST be safe for the host to copy and later pass to - work_response(), and the host MUST guarantee that it will be eventually - passed to work_response() if this function returns LV2_WORKER_SUCCESS. -*/ -typedef LV2_Worker_Status (*LV2_Worker_Respond_Function)( - LV2_Worker_Respond_Handle handle, - uint32_t size, - const void* data); - -/** - LV2 Plugin Worker Interface. - - This is the interface provided by the plugin to implement a worker method. - The plugin's extension_data() method should return an LV2_Worker_Interface - when called with LV2_WORKER__interface as its argument. -*/ -typedef struct _LV2_Worker_Interface { - /** - The worker method. This is called by the host in a non-realtime context - as requested, possibly with an arbitrary message to handle. - - A response can be sent to run() using @p respond. The plugin MUST NOT - make any assumptions about which thread calls this method, other than - the fact that there are no real-time requirements. - - @param instance The LV2 instance this is a method on. - @param respond A function for sending a response to run(). - @param handle Must be passed to @p respond if it is called. - @param size The size of @p data. - @param data Data from run(), or NULL. - */ - LV2_Worker_Status (*work)(LV2_Handle instance, - LV2_Worker_Respond_Function respond, - LV2_Worker_Respond_Handle handle, - uint32_t size, - const void* data); - - /** - Handle a response from the worker. This is called by the host in the - run() context when a response from the worker is ready. - - @param instance The LV2 instance this is a method on. - @param size The size of @p body. - @param body Message body, or NULL. - */ - LV2_Worker_Status (*work_response)(LV2_Handle instance, - uint32_t size, - const void* body); - - /** - Called when all responses for this cycle have been delivered. - - Since work_response() may be called after run() finished, this provides - a hook for code that must run after the cycle is completed. - - This field may be NULL if the plugin has no use for it. Otherwise, the - host MUST call it after every run(), regardless of whether or not any - responses were sent that cycle. - */ - LV2_Worker_Status (*end_run)(LV2_Handle instance); -} LV2_Worker_Interface; - -typedef void* LV2_Worker_Schedule_Handle; - -typedef struct _LV2_Worker_Schedule { - /** - Opaque host data. - */ - LV2_Worker_Schedule_Handle handle; - - /** - Request from run() that the host call the worker. - - This function is in the audio threading class. It should be called from - run() to request that the host call the work() method in a non-realtime - context with the given arguments. - - This function is always safe to call from run(), but it is not - guaranteed that the worker is actually called from a different thread. - In particular, when free-wheeling (e.g. for offline rendering), the - worker may be executed immediately. This allows single-threaded - processing with sample accuracy and avoids timing problems when run() is - executing much faster or slower than real-time. - - Plugins SHOULD be written in such a way that if the worker runs - immediately, and responses from the worker are delivered immediately, - the effect of the work takes place immediately with sample accuracy. - - The @p data MUST be safe for the host to copy and later pass to work(), - and the host MUST guarantee that it will be eventually passed to work() - if this function returns LV2_WORKER_SUCCESS. - - @param handle The handle field of this struct. - @param size The size of @p data. - @param data Message to pass to work(), or NULL. - */ - LV2_Worker_Status (*schedule_work)(LV2_Worker_Schedule_Handle handle, - uint32_t size, - const void* data); -} LV2_Worker_Schedule; - -#endif /* LV2_WORKER_H */ diff --git a/lv2/lv2plug.in/ns/ext/worker/worker.ttl b/lv2/lv2plug.in/ns/ext/worker/worker.ttl deleted file mode 100644 index 8ab330d..0000000 --- a/lv2/lv2plug.in/ns/ext/worker/worker.ttl +++ /dev/null @@ -1,57 +0,0 @@ -@prefix lv2: <http://lv2plug.in/ns/lv2core#> . -@prefix owl: <http://www.w3.org/2002/07/owl#> . -@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . -@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . -@prefix work: <http://lv2plug.in/ns/ext/worker#> . -@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . - -<http://lv2plug.in/ns/ext/worker> - a owl:Ontology ; - rdfs:seeAlso <worker.h> , - <lv2-worker.doap.ttl> ; - lv2:documentation """ -<p>This extension allows plugins to have a non-realtime worker method, with -thread sychronisation and communication issues handled by the host. This -allows plugins to perform non-realtime actions (such as loading files) using a -simple and portable API without having to worry about the complexities of -multi-threading.</p> - -<p>Because the worker thread is implemented by the host, many plugins can share -the same thread and communication buffers, which reduces bloat and fixed -per-plugin buffer size limitations. The host has the power to implement -threads in a suitable way, while plugins are simpler and thus less -error-prone.</p> - -<p>This interface is designed to gracefully handle single-threaded synchronous -execution, in which case the host may simply run all work immediately. This -makes it possible for the same plugin code to work with sample accuracy for -offline rendering, or in real-time with non-real-time work taking place in a -separate thread.</p> -""" . - -work:interface - a lv2:ExtensionData ; - lv2:documentation """ -<p>The interface provided by the plugin to implement a worker. To implement -this extension, the plugin must return a valid LV2_Worker_Interface from -LV2_Descriptor::extension_data() when it is called with URI -LV2_WORKER__interface.</p> - -<p>The plugin data file should describe this like so:</p> -<pre class="turtle-code"> -@prefix work: <http://lv2plug.in/ns/ext/worker#> . - -<plugin> - a lv2:Plugin ; - lv2:extensionData work:interface . -</pre> -""" . - -work:schedule - a lv2:Feature ; - lv2:documentation """ -<p>A feature which provides functions for use by the plugin to implement a -worker method. To support this feature, the host must pass an LV2_Feature to -LV2_Descriptor::instantiate() with URI LV2_WORKER__schedule and data pointed to -an instance of LV2_Worker_Schedule.</p> -""" . |