From 4e3a82b0de3646e74e40695d2537bb5071682318 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Apr 2012 23:43:59 +0000 Subject: Save properties with pretty numbers so normal LV2 tools can read patches. Fix running as a plugin. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4279 a436a847-0d15-0410-975c-d299462d15a1 --- bundles/StereoInOut.ingen/StereoInOut.ttl | 102 ++++++++++++++++++++++++++++++ bundles/StereoInOut.ingen/manifest.ttl | 16 +++++ bundles/ingen.lv2/ingen.ttl | 5 +- bundles/ingen.lv2/manifest.ttl | 13 ++++ src/gui/ingen_gui_lv2.cpp | 2 +- src/serialisation/Serialiser.cpp | 4 +- wscript | 9 ++- 7 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 bundles/StereoInOut.ingen/StereoInOut.ttl create mode 100644 bundles/StereoInOut.ingen/manifest.ttl create mode 100644 bundles/ingen.lv2/manifest.ttl diff --git a/bundles/StereoInOut.ingen/StereoInOut.ttl b/bundles/StereoInOut.ingen/StereoInOut.ttl new file mode 100644 index 00000000..f250e7c1 --- /dev/null +++ b/bundles/StereoInOut.ingen/StereoInOut.ttl @@ -0,0 +1,102 @@ +@prefix rdf: . +@prefix atom: . +@prefix doap: . +@prefix ingen: . +@prefix lv2: . +@prefix lv2ev: . +@prefix midi: . +@prefix owl: . +@prefix rdfs: . +@prefix xsd: . + +<> + ingen:edge [ + ingen:head ; + ingen:tail + ] , [ + ingen:head ; + ingen:tail + ] , [ + ingen:head ; + ingen:tail + ] ; + ingen:polyphony 1 ; + ingen:ui ; + lv2:extensionData ; + lv2:port , + , + , + , + , + ; + lv2:symbol "StereoInOut" ; + doap:name "StereoInOut" ; + a ingen:Patch , + lv2:Plugin . + + + ingen:activity 0.0 ; + ingen:canvasX 12.0 ; + ingen:canvasY 96.69999695 ; + ingen:polyphonic false ; + lv2:index 2 ; + lv2:name "Audio In 1" ; + lv2:symbol "audio_in_1" ; + a lv2:AudioPort , + lv2:InputPort . + + + ingen:activity 0.0 ; + ingen:canvasX 12.0 ; + ingen:canvasY 12.0 ; + ingen:polyphonic false ; + lv2:index 3 ; + lv2:name "Audio In 2" ; + lv2:symbol "audio_in_2" ; + a lv2:AudioPort , + lv2:InputPort . + + + ingen:activity 0.0 ; + ingen:canvasX 12.0 ; + ingen:canvasY 96.69999695 ; + ingen:polyphonic false ; + lv2:index 4 ; + lv2:name "Audio Out 1" ; + lv2:symbol "audio_out_1" ; + a lv2:AudioPort , + lv2:OutputPort . + + + ingen:activity 0.0 ; + ingen:canvasX 12.0 ; + ingen:canvasY 12.0 ; + ingen:polyphonic false ; + lv2:index 5 ; + lv2:name "Audio Out 2" ; + lv2:symbol "audio_out_2" ; + a lv2:AudioPort , + lv2:OutputPort . + + + ingen:canvasX 23.0 ; + ingen:canvasY 181.3999939 ; + ingen:polyphonic false ; + atom:bufferType atom:Sequence ; + lv2:index 0 ; + lv2:name "Control" ; + lv2:portProperty lv2:connectionOptional ; + lv2:symbol "control_in" ; + a atom:AtomPort , + lv2:InputPort . + + + ingen:canvasX 148.3999939 ; + ingen:canvasY 181.3999939 ; + ingen:polyphonic false ; + atom:bufferType atom:Sequence ; + lv2:index 1 ; + lv2:name "Control" ; + lv2:symbol "control_out" ; + a atom:AtomPort , + lv2:OutputPort . diff --git a/bundles/StereoInOut.ingen/manifest.ttl b/bundles/StereoInOut.ingen/manifest.ttl new file mode 100644 index 00000000..af5bd996 --- /dev/null +++ b/bundles/StereoInOut.ingen/manifest.ttl @@ -0,0 +1,16 @@ +@prefix rdf: . +@prefix atom: . +@prefix doap: . +@prefix ingen: . +@prefix lv2: . +@prefix lv2ev: . +@prefix midi: . +@prefix owl: . +@prefix rdfs: . +@prefix xsd: . + + + lv2:binary ; + a ingen:Patch , + lv2:Plugin ; + rdfs:seeAlso . diff --git a/bundles/ingen.lv2/ingen.ttl b/bundles/ingen.lv2/ingen.ttl index 2a1c0dce..d581e458 100644 --- a/bundles/ingen.lv2/ingen.ttl +++ b/bundles/ingen.lv2/ingen.ttl @@ -1,11 +1,12 @@ -@prefix ingen: . @prefix doap: . @prefix foaf: . +@prefix ingen: . @prefix lv2: . +@prefix owl: . @prefix rdf: . @prefix rdfs: . +@prefix ui: . @prefix xsd: . -@prefix owl: . a foaf:Person ; diff --git a/bundles/ingen.lv2/manifest.ttl b/bundles/ingen.lv2/manifest.ttl new file mode 100644 index 00000000..ea2f62fe --- /dev/null +++ b/bundles/ingen.lv2/manifest.ttl @@ -0,0 +1,13 @@ +@prefix ingen: . +@prefix owl: . +@prefix rdfs: . +@prefix ui: . + +ingen: + a owl:Ontology ; + rdfs:seeAlso . + +ingen:PatchUIGtk2 + a ui:GtkUI ; + ui:binary ; + rdfs:comment "The Ingen patcher interface." . diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index 2a583d39..ae70e441 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -28,7 +28,7 @@ #include "App.hpp" #include "PatchBox.hpp" -#define INGEN_LV2_UI_URI "http://drobilla.net/ns/ingen#ui" +#define INGEN_LV2_UI_URI "http://drobilla.net/ns/ingen#PatchUIGtk2" /** A sink that writes atoms to a port via the UI extension. */ struct IngenLV2AtomSink : public Ingen::Shared::AtomSink { diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index c26be7be..d0d0e0d8 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -348,7 +348,7 @@ Serialiser::Impl::serialise_patch(SharedPtr patch, _model->add_statement(patch_id, Sord::URI(world, LV2_UI__ui), - Sord::URI(world, "http://drobilla.net/ns/ingen#ui")); + Sord::URI(world, "http://drobilla.net/ns/ingen#PatchUIGtk2")); const URIs& uris = *_world.uris().get(); @@ -556,6 +556,8 @@ Serialiser::Impl::serialise_properties(const GraphObject* o, (SerdStatementSink)sord_inserter_write_statement, NULL, inserter); + sratom_set_pretty_numbers(sratom, true); + typedef GraphObject::Properties::const_iterator iterator; for (iterator v = props.begin(); v != props.end(); ++v) { const Sord::URI key(_model->world(), v->first.str()); diff --git a/wscript b/wscript index 114e8104..f78164f1 100644 --- a/wscript +++ b/wscript @@ -169,8 +169,13 @@ def build(bld): os.path.join(bld.env['DATADIR'], 'icons', 'hicolor', s, 'apps', 'ingen.png'), 'icons/' + s + '/ingen.png') - # Template patches/plugins bundle bld.install_files('${LV2DIR}/ingen.lv2/', - bld.path.ant_glob('ingen.lv2/*')) + bld.path.ant_glob('bundles/ingen.lv2/*')) + + for i in ['StereoInOut.ingen']: + bld.install_files('${LV2DIR}/%s/' % str(i), + bld.path.ant_glob('bundles/%s/*' % str(i))) + bld.symlink_as('${LV2DIR}/%s/libingen_lv2.so' % str(i), + bld.env['LV2DIR'] + '/ingen.lv2/libingen_lv2.so') bld.add_post_fun(autowaf.run_ldconfig) -- cgit v1.2.1