aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2022-08-19 18:26:29 +0200
committerHanspeter Portner <dev@open-music-kontrollers.ch>2022-08-19 18:26:29 +0200
commit8273142cd702583cb3662fbe0e2fd5d4075ee703 (patch)
tree14fc3a9d786c6e059adb1e7063c3058360e0a736
parent23391a199d0d1e95eb46c545a3fc030accef070e (diff)
downloadsynthpod-master.tar.xz
use static uris for everythingHEADmaster
-rw-r--r--VERSION2
-rw-r--r--app/meson.build2
-rw-r--r--app/synthpod_app.c56
-rw-r--r--app/synthpod_app_mod.c83
-rw-r--r--app/synthpod_app_port.c58
-rw-r--r--app/synthpod_app_private.h3
-rw-r--r--app/synthpod_app_state.c222
-rw-r--r--app/synthpod_app_ui.c308
-rw-r--r--app/synthpod_app_worker.c20
-rw-r--r--bin/synthpod_stat.c92
-rw-r--r--include/synthpod_patcher.h183
-rw-r--r--include/synthpod_private.h1905
-rw-r--r--include/synthpod_stat.h81
-rw-r--r--plugins/synthpod_common_d2tk.c134
-rw-r--r--plugins/synthpod_common_nk.c690
-rw-r--r--sandbox_ui.lv2/meson.build2
16 files changed, 1062 insertions, 2779 deletions
diff --git a/VERSION b/VERSION
index 30e4bb8b..ee7435c4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.1.6503
+0.1.6505
diff --git a/app/meson.build b/app/meson.build
index 64ced28c..87ef319c 100644
--- a/app/meson.build
+++ b/app/meson.build
@@ -7,7 +7,7 @@ srcs = ['synthpod_app.c',
join_paths('..', 'bin', 'synthpod_stat.c')
]
-incs = [inc_incs, app_incs, canvas_incs, xpress_incs, osc_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs]
+incs = [inc_incs, app_incs, canvas_incs, xpress_incs, osc_incs, canvas_incs, extui_incs, ardour_incs, varchunk_incs, crossclock_incs]
deps = [m_dep, rt_dep, lv2_dep, thread_dep, lilv_dep, sratom_dep, serd_dep]
app = static_library('synthpod_app', srcs,
diff --git a/app/synthpod_app.c b/app/synthpod_app.c
index d23899cb..f17ed2a4 100644
--- a/app/synthpod_app.c
+++ b/app/synthpod_app.c
@@ -192,7 +192,7 @@ _sp_app_automation_out(sp_app_t *app, LV2_Atom_Forge *forge, auto_t *automation,
ref = lv2_atom_forge_frame_time(forge, frames);
if(ref)
- ref = lv2_atom_forge_atom(forge, 3, app->regs.port.midi.urid);
+ ref = lv2_atom_forge_atom(forge, 3, MIDI__MidiEvent);
if(ref)
ref = lv2_atom_forge_write(forge, msg, 3);
}
@@ -332,14 +332,14 @@ _sp_app_process_single_run(mod_t *mod, uint32_t nsamples)
continue;
}
- if(obj->body.otype == app->regs.patch.set.urid)
+ if(obj->body.otype == PATCH__Set)
{
const LV2_Atom_URID *patch_property = NULL;
const LV2_Atom *patch_value = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.property.urid, &patch_property,
- app->regs.patch.value.urid, &patch_value,
+ PATCH__property, &patch_property,
+ PATCH__value, &patch_value,
0);
if(!patch_property || (patch_property->atom.type != ATOM__URID) || !patch_value)
@@ -372,12 +372,12 @@ _sp_app_process_single_run(mod_t *mod, uint32_t nsamples)
t0 = ev->time.frames;
}
}
- else if(obj->body.otype == app->regs.patch.put.urid)
+ else if(obj->body.otype == PATCH__Put)
{
const LV2_Atom_Object *patch_body = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.body.urid, &patch_body,
+ PATCH__body, &patch_body,
0);
if(!patch_body || !lv2_atom_forge_is_object_type(&forge, patch_body->atom.type))
@@ -455,12 +455,12 @@ _sync_midi_automation_to_ui(sp_app_t *app, mod_t *mod, auto_t *automation)
{
const LV2_URID subj = 0; //FIXME
const int32_t sn = 0; //FIXME
- const LV2_URID prop = app->regs.synthpod.automation_list.urid;
+ const LV2_URID prop = SYNTHPOD__automationList;
port_t *port = &mod->ports[automation->index]; //FIXME handle prop
LV2_Atom_Forge_Frame frame [3];
LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(
- &app->regs, &app->forge, &frame[0], subj, sn, prop);
+ &app->forge, &frame[0], subj, sn, prop);
if(ref)
ref = _sp_app_forge_midi_automation(app, &frame[2], mod, port, automation);
@@ -489,12 +489,12 @@ _sync_osc_automation_to_ui(sp_app_t *app, mod_t *mod, auto_t *automation)
{
const LV2_URID subj = 0; //FIXME
const int32_t sn = 0; //FIXME
- const LV2_URID prop = app->regs.synthpod.automation_list.urid;
+ const LV2_URID prop = SYNTHPOD__automationList;
port_t *port = &mod->ports[automation->index]; //FIXME handle prop
LV2_Atom_Forge_Frame frame [3];
LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(
- &app->regs, &app->forge, &frame[0], subj, sn, prop);
+ &app->forge, &frame[0], subj, sn, prop);
if(ref)
ref = _sp_app_forge_osc_automation(app, &frame[2], mod, port, automation);
@@ -579,8 +579,8 @@ _sp_app_process_single_post(mod_t *mod, uint32_t nsamples, bool sparse_update_ti
{
LV2_Atom_Forge_Frame frame [3];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(&app->regs, &app->forge, &frame[0],
- mod->urn, 0, app->regs.idisp.surface.urid); //TODO seqn
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(&app->forge, &frame[0],
+ mod->urn, 0, INLINEDISPLAY__surface); //TODO seqn
if(ref)
ref = lv2_atom_forge_tuple(&app->forge, &frame[1]);
if(ref)
@@ -945,7 +945,7 @@ sp_app_new(const LilvWorld *world, sp_app_driver_t *driver, void *data)
app->plugs = lilv_world_get_all_plugins(app->world);
lv2_atom_forge_init(&app->forge, app->driver->map);
- sp_regs_init(&app->regs, app->world, app->driver->map);
+ sp_regs_init(app->regs, app->world);
_sp_app_populate(app);
@@ -1036,7 +1036,7 @@ sp_app_run_pre(sp_app_t *app, uint32_t nsamples)
{
LV2_Atom_Sequence *seq = PORT_BASE_ALIGNED(port);
seq->atom.size = sizeof(LV2_Atom_Sequence_Body); // empty sequence
- seq->atom.type = app->regs.port.sequence.urid;
+ seq->atom.type = ATOM__Sequence;
seq->body.unit = 0;
seq->body.pad = 0;
}
@@ -1222,7 +1222,7 @@ sp_app_run_post(sp_app_t *app, uint32_t nsamples)
: app->dsp_master.concurrent;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, 0, 0, app->regs.synthpod.cpus_used.urid,
+ &app->forge, 0, 0, SYNTHPOD__CPUsUsed,
sizeof(int32_t), ATOM__Int, &cpus_used); //TODO subj, seqn
if(ref)
{
@@ -1258,7 +1258,7 @@ sp_app_run_post(sp_app_t *app, uint32_t nsamples)
LV2_Atom_Forge_Frame frame [1];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], mod->urn, 0, app->regs.synthpod.module_profiling.urid); //TODO seqn
+ &app->forge, &frame[0], mod->urn, 0, SYNTHPOD__moduleProfiling); //TODO seqn
if(ref)
ref = lv2_atom_forge_vector(&app->forge, sizeof(float), ATOM__Float, 3, vec);
if(ref)
@@ -1296,7 +1296,7 @@ sp_app_run_post(sp_app_t *app, uint32_t nsamples)
LV2_Atom_Forge_Frame frame [1];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], 0, 0, app->regs.synthpod.dsp_profiling.urid); //TODO subj, seqn
+ &app->forge, &frame[0], 0, 0, SYNTHPOD__DSPProfiling); //TODO subj, seqn
if(ref)
ref = lv2_atom_forge_vector(&app->forge, sizeof(float), ATOM__Float, 3, vec);
if(ref)
@@ -1370,7 +1370,7 @@ sp_app_free(sp_app_t *app)
for(unsigned m=0; m<app->num_mods; m++)
_sp_app_mod_del(app, app->mods[m]);
- sp_regs_deinit(&app->regs);
+ sp_regs_deinit(app->regs);
if(!app->embedded)
lilv_world_free(app->world);
@@ -1460,7 +1460,7 @@ sp_app_nominal_block_length(sp_app_t *app, uint32_t nsamples)
const LV2_Options_Option options [2] = {{
.context = LV2_OPTIONS_INSTANCE,
.subject = 0, // is ignored
- .key = app->regs.bufsz.min_block_length.urid,
+ .key = BUF_SIZE__minBlockLength,
.size = sizeof(int32_t),
.type = ATOM__Int,
.value = &app->driver->min_block_size
@@ -1479,7 +1479,7 @@ sp_app_nominal_block_length(sp_app_t *app, uint32_t nsamples)
const LV2_Options_Option options [2] = {{
.context = LV2_OPTIONS_INSTANCE,
.subject = 0, // is ignored
- .key = app->regs.bufsz.nominal_block_length.urid,
+ .key = BUF_SIZE__nominalBlockLength,
.size = sizeof(int32_t),
.type = ATOM__Int,
.value = &nominal_block_length
@@ -1509,10 +1509,10 @@ int
sp_app_com_event(sp_app_t *app, LV2_URID otype)
{
// it is a com event, if it is not an official port protocol
- if( (otype == app->regs.port.float_protocol.urid)
- || (otype == app->regs.port.peak_protocol.urid)
- || (otype == app->regs.port.atom_transfer.urid)
- || (otype == app->regs.port.event_transfer.urid) )
+ if( (otype == UI__floatProtocol)
+ || (otype == UI__peakProtocol)
+ || (otype == ATOM__atomTransfer)
+ || (otype == ATOM__eventTransfer) )
return 0;
return 1;
@@ -1583,7 +1583,7 @@ sp_app_log_error(sp_app_t *app, const char *fmt, ...)
int ret;
va_start (args, fmt);
- ret = app->driver->log->vprintf(app->driver->log->handle, app->regs.log.error.urid, fmt, args);
+ ret = app->driver->log->vprintf(app->driver->log->handle, LOG__Error, fmt, args);
va_end(args);
return ret;
@@ -1596,7 +1596,7 @@ sp_app_log_note(sp_app_t *app, const char *fmt, ...)
int ret;
va_start (args, fmt);
- ret = app->driver->log->vprintf(app->driver->log->handle, app->regs.log.note.urid, fmt, args);
+ ret = app->driver->log->vprintf(app->driver->log->handle, LOG__Note, fmt, args);
va_end(args);
return ret;
@@ -1609,7 +1609,7 @@ sp_app_log_warning(sp_app_t *app, const char *fmt, ...)
int ret;
va_start (args, fmt);
- ret = app->driver->log->vprintf(app->driver->log->handle, app->regs.log.warning.urid, fmt, args);
+ ret = app->driver->log->vprintf(app->driver->log->handle, LOG__Warning, fmt, args);
va_end(args);
return ret;
@@ -1622,7 +1622,7 @@ sp_app_log_trace(sp_app_t *app, const char *fmt, ...)
int ret;
va_start (args, fmt);
- ret = app->driver->log->vprintf(app->driver->log->handle, app->regs.log.trace.urid, fmt, args);
+ ret = app->driver->log->vprintf(app->driver->log->handle, LOG__Trace, fmt, args);
va_end(args);
return ret;
diff --git a/app/synthpod_app_mod.c b/app/synthpod_app_mod.c
index f7eeb8ea..d10348de 100644
--- a/app/synthpod_app_mod.c
+++ b/app/synthpod_app_mod.c
@@ -23,6 +23,7 @@
#define ANSI_COLOR_BOLD "\x1b[1m"
#define ANSI_COLOR_RESET "\x1b[0m"
+#define NODE(KEY) app->regs[KEY]
//tools.ietf.org/html/rfc4122 version 4
static void
@@ -641,42 +642,42 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
// populate options
mod->opts.options[0].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[0].subject = 0;
- mod->opts.options[0].key = app->regs.bufsz.max_block_length.urid;
+ mod->opts.options[0].key = BUF_SIZE__maxBlockLength;
mod->opts.options[0].size = sizeof(int32_t);
mod->opts.options[0].type = ATOM__Int;
mod->opts.options[0].value = &app->driver->max_block_size;
mod->opts.options[1].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[1].subject = 0;
- mod->opts.options[1].key = app->regs.bufsz.min_block_length.urid;
+ mod->opts.options[1].key = BUF_SIZE__minBlockLength;
mod->opts.options[1].size = sizeof(int32_t);
mod->opts.options[1].type = ATOM__Int;
mod->opts.options[1].value = &app->driver->min_block_size;
mod->opts.options[2].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[2].subject = 0;
- mod->opts.options[2].key = app->regs.bufsz.sequence_size.urid;
+ mod->opts.options[2].key = BUF_SIZE__sequenceSize;
mod->opts.options[2].size = sizeof(int32_t);
mod->opts.options[2].type = ATOM__Int;
mod->opts.options[2].value = &app->driver->seq_size;
mod->opts.options[3].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[3].subject = 0;
- mod->opts.options[3].key = app->regs.bufsz.nominal_block_length.urid;
+ mod->opts.options[3].key = BUF_SIZE__nominalBlockLength;
mod->opts.options[3].size = sizeof(int32_t);
mod->opts.options[3].type = ATOM__Int;
mod->opts.options[3].value = &app->driver->max_block_size; // set to max by default
mod->opts.options[4].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[4].subject = 0;
- mod->opts.options[4].key = app->regs.param.sample_rate.urid;
+ mod->opts.options[4].key = PARAMETERS__sampleRate;
mod->opts.options[4].size = sizeof(float);
mod->opts.options[4].type = ATOM__Float;
mod->opts.options[4].value = &app->driver->sample_rate;
mod->opts.options[5].context = LV2_OPTIONS_INSTANCE;
mod->opts.options[5].subject = 0;
- mod->opts.options[5].key = app->regs.ui.update_rate.urid;
+ mod->opts.options[5].key = UI__updateRate;
mod->opts.options[5].size = sizeof(float);
mod->opts.options[5].type = ATOM__Float;
mod->opts.options[5].value = &app->driver->update_rate;
@@ -716,11 +717,9 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
mod->opts.iface = lilv_instance_get_extension_data(mod->inst,
LV2_OPTIONS__interface);
const bool has_ro_canvas_graph = lilv_world_ask(app->world,
- lilv_plugin_get_uri(mod->plug), app->regs.patch.readable.node,
- app->regs.canvas.graph.node);
+ lilv_plugin_get_uri(mod->plug), NODE(PATCH__readable), NODE(CVAS__graph));
const bool has_rw_canvas_graph = lilv_world_ask(app->world,
- lilv_plugin_get_uri(mod->plug), app->regs.patch.writable.node,
- app->regs.canvas.graph.node);
+ lilv_plugin_get_uri(mod->plug), NODE(PATCH__writable), NODE(CVAS__graph));
if(has_ro_canvas_graph || has_rw_canvas_graph)
{
//sp_app_log_note(app, "%s: detected canvas:graph parameter\n", __func__);
@@ -732,9 +731,9 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
}
mod->state.iface = lilv_instance_get_extension_data(mod->inst,
LV2_STATE__interface);
- mod->system_ports = lilv_plugin_has_feature(plug, app->regs.synthpod.system_ports.node);
- const bool load_default_state = lilv_plugin_has_feature(plug, app->regs.state.load_default_state.node);
- const bool thread_safe_restore = lilv_plugin_has_feature(plug, app->regs.state.thread_safe_restore.node);
+ mod->system_ports = lilv_plugin_has_feature(plug, NODE(SYNTHPOD__systemPorts));
+ const bool load_default_state = lilv_plugin_has_feature(plug, NODE(STATE__loadDefaultState));
+ const bool thread_safe_restore = lilv_plugin_has_feature(plug, NODE(STATE__threadSafeRestore));
if(mod->state.iface) // plugins with state:interface need bypassing upon preset load
mod->needs_bypassing = true;
@@ -763,24 +762,24 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->mod = mod;
tar->index = i;
tar->symbol = lilv_node_as_string(lilv_port_get_symbol(plug, port));
- tar->direction = lilv_port_is_a(plug, port, app->regs.port.input.node)
+ tar->direction = lilv_port_is_a(plug, port, NODE(CORE__InputPort))
? PORT_DIRECTION_INPUT
: PORT_DIRECTION_OUTPUT;
// register system ports
if(mod->system_ports)
{
- if(lilv_port_is_a(plug, port, app->regs.synthpod.control_port.node))
+ if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__ControlPort)))
tar->sys.type = SYSTEM_PORT_CONTROL;
- else if(lilv_port_is_a(plug, port, app->regs.synthpod.audio_port.node))
+ else if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__AudioPort)))
tar->sys.type = SYSTEM_PORT_AUDIO;
- else if(lilv_port_is_a(plug, port, app->regs.synthpod.cv_port.node))
+ else if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__CVPort)))
tar->sys.type = SYSTEM_PORT_CV;
- else if(lilv_port_is_a(plug, port, app->regs.synthpod.midi_port.node))
+ else if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__MIDIPort)))
tar->sys.type = SYSTEM_PORT_MIDI;
- else if(lilv_port_is_a(plug, port, app->regs.synthpod.osc_port.node))
+ else if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__OSCPort)))
tar->sys.type = SYSTEM_PORT_OSC;
- else if(lilv_port_is_a(plug, port, app->regs.synthpod.com_port.node))
+ else if(lilv_port_is_a(plug, port, NODE(SYNTHPOD__ComPort)))
tar->sys.type = SYSTEM_PORT_COM;
else
tar->sys.type = SYSTEM_PORT_NONE;
@@ -793,7 +792,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
const char *designation = NULL;
const LilvNode *port_symbol_node = lilv_port_get_symbol(plug, port);
LilvNode *port_name_node = lilv_port_get_name(plug, port);
- LilvNode *port_designation= lilv_port_get(plug, port, app->regs.core.designation.node);
+ LilvNode *port_designation= lilv_port_get(plug, port, NODE(CORE__designation));
asprintf(&short_name, "#%"PRIu32"_%s",
mod->urn, lilv_node_as_string(port_symbol_node));
@@ -824,30 +823,30 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->sys.data = NULL;
}
- if(lilv_port_is_a(plug, port, app->regs.port.audio.node))
+ if(lilv_port_is_a(plug, port, NODE(CORE__AudioPort)))
{
tar->size = app->driver->max_block_size * sizeof(float);
tar->type = PORT_TYPE_AUDIO;
- tar->protocol = app->regs.port.peak_protocol.urid;
+ tar->protocol = UI__peakProtocol;
tar->driver = &audio_port_driver;
}
- else if(lilv_port_is_a(plug, port, app->regs.port.cv.node))
+ else if(lilv_port_is_a(plug, port, NODE(CORE__CVPort)))
{
tar->size = app->driver->max_block_size * sizeof(float);
tar->type = PORT_TYPE_CV;
- tar->protocol = app->regs.port.peak_protocol.urid;
+ tar->protocol = UI__peakProtocol;
tar->driver = &cv_port_driver;
}
- else if(lilv_port_is_a(plug, port, app->regs.port.control.node))
+ else if(lilv_port_is_a(plug, port, NODE(CORE__ControlPort)))
{
tar->size = sizeof(float);
tar->type = PORT_TYPE_CONTROL;
- tar->protocol = app->regs.port.float_protocol.urid;
+ tar->protocol = UI__floatProtocol;
tar->driver = &control_port_driver;
control_port_t *control = &tar->control;
- control->is_integer = lilv_port_has_property(plug, port, app->regs.port.integer.node);
- control->is_toggled = lilv_port_has_property(plug, port, app->regs.port.toggled.node);
+ control->is_integer = lilv_port_has_property(plug, port, NODE(CORE__integer));
+ control->is_toggled = lilv_port_has_property(plug, port, NODE(CORE__toggled));
control->lock = (atomic_flag)ATOMIC_FLAG_INIT;
LilvNode *dflt_node;
@@ -863,24 +862,24 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
lilv_node_free(min_node);
lilv_node_free(max_node);
}
- else if(lilv_port_is_a(plug, port, app->regs.port.atom.node))
+ else if(lilv_port_is_a(plug, port, NODE(ATOM__AtomPort)))
{
tar->size = app->driver->seq_size;
tar->type = PORT_TYPE_ATOM;
- tar->protocol = app->regs.port.event_transfer.urid; //FIXME handle atom_transfer
+ tar->protocol = ATOM__eventTransfer; //FIXME handle atom_transfer
tar->driver = &seq_port_driver; // FIXME handle atom_port_driver
tar->atom.buffer_type = PORT_BUFFER_TYPE_SEQUENCE; //FIXME properly discover this
// does this port support patch:Message?
- tar->atom.patchable = lilv_port_supports_event(plug, port, app->regs.patch.message.node);
+ tar->atom.patchable = lilv_port_supports_event(plug, port, NODE(PATCH__Message));
// check whether this is a control port
const LilvPort *control_port = lilv_plugin_get_port_by_designation(plug,
tar->direction == PORT_DIRECTION_INPUT
- ? app->regs.port.input.node
- : app->regs.port.output.node
- , app->regs.core.control.node);
+ ? NODE(CORE__InputPort)
+ : NODE(CORE__OutputPort)
+ , NODE(CORE__ControlPort));
(void)control_port; //TODO use this?
}
else
@@ -895,7 +894,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
}
// get minimum port size if specified
- LilvNode *minsize = lilv_port_get(plug, port, app->regs.port.minimum_size.node);
+ LilvNode *minsize = lilv_port_get(plug, port, NODE(RESIZE_PORT__minimumSize));
if(minsize)
{
tar->size = lilv_node_as_int(minsize);
@@ -923,7 +922,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->size = dbg_sz;
tar->type = PORT_TYPE_ATOM;
- tar->protocol = app->regs.port.event_transfer.urid;
+ tar->protocol = ATOM__eventTransfer;
tar->driver = &seq_port_driver;
tar->atom.buffer_type = PORT_BUFFER_TYPE_SEQUENCE;
@@ -947,7 +946,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->size = dbg_sz;
tar->type = PORT_TYPE_ATOM;
- tar->protocol = app->regs.port.event_transfer.urid;
+ tar->protocol = ATOM__eventTransfer;
tar->driver = &seq_port_driver;
tar->atom.buffer_type = PORT_BUFFER_TYPE_SEQUENCE;
@@ -971,7 +970,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->size = app->driver->seq_size;
tar->type = PORT_TYPE_ATOM;
- tar->protocol = app->regs.port.event_transfer.urid;
+ tar->protocol = ATOM__eventTransfer;
tar->driver = &seq_port_driver;
tar->atom.buffer_type = PORT_BUFFER_TYPE_SEQUENCE;
@@ -995,7 +994,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
tar->size = app->driver->seq_size;
tar->type = PORT_TYPE_ATOM;
- tar->protocol = app->regs.port.event_transfer.urid;
+ tar->protocol = ATOM__eventTransfer;
tar->driver = &seq_port_driver;
tar->atom.buffer_type = PORT_BUFFER_TYPE_SEQUENCE;
@@ -1046,7 +1045,7 @@ _sp_app_mod_add(sp_app_t *app, const char *uri, LV2_URID urn, uint32_t created,
}
// load presets
- mod->presets = lilv_plugin_get_related(plug, app->regs.pset.preset.node);
+ mod->presets = lilv_plugin_get_related(plug, NODE(PRESETS__Preset));
// spawn worker thread
if(mod->worker.iface || mod->idisp.iface)
@@ -1199,7 +1198,7 @@ _sp_app_mod_eject(sp_app_t *app, mod_t *mod)
transmit_module_del_t *trans = _sp_app_to_ui_request(app, size);
if(trans)
{
- _sp_transmit_module_del_fill(&app->regs, &app->forge, trans, size, mod->uid);
+ _sp_transmit_module_del_fill(&app->forge, trans, size, mod->uid);
_sp_app_to_ui_advance(app, size);
}
#endif
diff --git a/app/synthpod_app_port.c b/app/synthpod_app_port.c
index 823bdb8b..aa57a10f 100644
--- a/app/synthpod_app_port.c
+++ b/app/synthpod_app_port.c
@@ -179,7 +179,7 @@ _dsp_master_reorder(sp_app_t *app)
: app->dsp_master.concurrent;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, 0, 0, app->regs.synthpod.cpus_used.urid,
+ &app->forge, 0, 0, SYNTHPOD__CPUsUsed,
sizeof(int32_t), ATOM__Int, &cpus_used); //TODO subj, seqn
if(ref)
{
@@ -605,10 +605,10 @@ _sp_app_automate(sp_app_t *app, mod_t *mod, auto_t *automation, double value,
LV2_Atom_Forge_Ref ref;
ref = lv2_atom_forge_frame_time(&app->forge, frames)
- && lv2_atom_forge_object(&app->forge, &obj_frame, 0, app->regs.patch.set.urid)
- && lv2_atom_forge_key(&app->forge, app->regs.patch.property.urid)
+ && lv2_atom_forge_object(&app->forge, &obj_frame, 0, PATCH__Set)
+ && lv2_atom_forge_key(&app->forge, PATCH__property)
&& lv2_atom_forge_urid(&app->forge, automation->property)
- && lv2_atom_forge_key(&app->forge, app->regs.patch.value.urid);
+ && lv2_atom_forge_key(&app->forge, PATCH__value);
if(ref)
{
if(automation->range == ATOM__Bool)
@@ -661,7 +661,7 @@ _sp_app_automate_event(sp_app_t *app, mod_t *mod, const LV2_Atom_Event *ev,
int do_route = 0;
//printf("got automation\n");
- if( (atom->type == app->regs.port.midi.urid)
+ if( (atom->type == MIDI__MidiEvent)
&& (atom->size == 3) ) // we're only interested in controller events
{
const uint8_t *msg = LV2_ATOM_BODY_CONST(atom);
@@ -946,17 +946,17 @@ __realtime static LV2_Atom_Forge_Ref
_patch_notification_internal(sp_app_t *app, port_t *source_port,
uint32_t size, LV2_URID type, const void *body)
{
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&app->forge, source_port->symbol, strlen(source_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.rdf.value.urid);
+ ref = lv2_atom_forge_key(&app->forge, RDF__value);
if(ref)
ref = lv2_atom_forge_atom(&app->forge, size, type);
if(ref)
@@ -974,8 +974,8 @@ _patch_notification_add(sp_app_t *app, port_t *source_port,
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- if(synthpod_patcher_add_object(&app->regs, &app->forge, &frame[0],
- 0, 0, app->regs.synthpod.notification_list.urid) //TODO subject
+ if(synthpod_patcher_add_object(&app->forge, &frame[0],
+ 0, 0, SYNTHPOD__notificationList) //TODO subject
&& lv2_atom_forge_object(&app->forge, &frame[2], 0, proto)
&& _patch_notification_internal(app, source_port, size, type, body) )
{
@@ -986,13 +986,13 @@ _patch_notification_add(sp_app_t *app, port_t *source_port,
// dsp debug out
lv2_atom_object_get((const LV2_Atom_Object *)answer,
- app->regs.patch.add.urid, &patch_add,
+ PATCH__add, &patch_add,
0);
if(patch_add)
{
lv2_atom_object_get(patch_add,
- app->regs.synthpod.notification_list.urid, &obj,
+ SYNTHPOD__notificationList, &obj,
0);
}
@@ -1046,7 +1046,7 @@ _port_float_protocol_update(sp_app_t *app, port_t *port, uint32_t nsamples)
if(needs_update)
{
// for nk
- _patch_notification_add(app, port, app->regs.port.float_protocol.urid,
+ _patch_notification_add(app, port, UI__floatProtocol,
sizeof(float), ATOM__Float, &new_val);
}
}
@@ -1114,7 +1114,7 @@ _port_peak_protocol_update(sp_app_t *app, port_t *port, uint32_t nsamples)
.body = data.peak
}
};
- _patch_notification_add(app, port, app->regs.port.peak_protocol.urid,
+ _patch_notification_add(app, port, UI__peakProtocol,
tup.header.atom.size, tup.header.atom.type, &tup.period_start);
}
}
@@ -1131,7 +1131,7 @@ _port_atom_transfer_update(sp_app_t *app, port_t *port, uint32_t nsamples)
return;
// for nk
- _patch_notification_add(app, port, app->regs.port.atom_transfer.urid,
+ _patch_notification_add(app, port, ATOM__atomTransfer,
atom->size, atom->type, LV2_ATOM_BODY_CONST(atom));
}
@@ -1152,7 +1152,7 @@ _port_event_transfer_update(sp_app_t *app, port_t *port, uint32_t nsamples)
const LV2_Atom *atom = &ev->body;
// for nk
- _patch_notification_add(app, port, app->regs.port.event_transfer.urid,
+ _patch_notification_add(app, port, ATOM__eventTransfer,
atom->size, atom->type, LV2_ATOM_BODY_CONST(atom));
}
}
@@ -1166,25 +1166,25 @@ _port_event_transfer_update(sp_app_t *app, port_t *port, uint32_t nsamples)
{
/*FIXME
const LV2_Atom_URID *destination = NULL;
- lv2_atom_object_get(obj, app->regs.patch.destination.urid, &destination, NULL);
+ lv2_atom_object_get(obj, PATCH__destination, &destination, NULL);
if(destination && (destination->atom.type == ATOM__URID)
- && (destination->body == app->regs.core.plugin.urid) )
+ && (destination->body == CORE__Plugin) )
continue; // ignore feedback messages
*/
- if( (obj->body.otype == app->regs.patch.set.urid)
- || (obj->body.otype == app->regs.patch.get.urid)
- || (obj->body.otype == app->regs.patch.put.urid)
- || (obj->body.otype == app->regs.patch.patch.urid)
- || (obj->body.otype == app->regs.patch.insert.urid)
- || (obj->body.otype == app->regs.patch.move.urid)
- || (obj->body.otype == app->regs.patch.copy.urid)
- || (obj->body.otype == app->regs.patch.delete.urid)
- || (obj->body.otype == app->regs.patch.error.urid)
- || (obj->body.otype == app->regs.patch.ack.urid) ) //TODO support more patch messages
+ if( (obj->body.otype == PATCH__Set)
+ || (obj->body.otype == PATCH__Get)
+ || (obj->body.otype == PATCH__Put)
+ || (obj->body.otype == PATCH__Patch)
+ || (obj->body.otype == PATCH__Insert)
+ || (obj->body.otype == PATCH__Move)
+ || (obj->body.otype == PATCH__Copy)
+ || (obj->body.otype == PATCH__Delete)
+ || (obj->body.otype == PATCH__Error)
+ || (obj->body.otype == PATCH__Ack) ) //TODO support more patch messages
{
// for nk
- _patch_notification_add(app, port, app->regs.port.event_transfer.urid,
+ _patch_notification_add(app, port, ATOM__eventTransfer,
obj->atom.size, obj->atom.type, &obj->body);
}
}
diff --git a/app/synthpod_app_private.h b/app/synthpod_app_private.h
index fe1ea066..eba736a5 100644
--- a/app/synthpod_app_private.h
+++ b/app/synthpod_app_private.h
@@ -464,7 +464,8 @@ struct _sp_app_t {
LilvWorld *world;
const LilvPlugins *plugs;
- reg_t regs;
+ LilvNode *regs [STAT_URID_MAX];
+
LV2_Atom_Forge forge;
unsigned num_mods;
diff --git a/app/synthpod_app_state.c b/app/synthpod_app_state.c
index a228cf64..fa1bbf50 100644
--- a/app/synthpod_app_state.c
+++ b/app/synthpod_app_state.c
@@ -405,18 +405,18 @@ _sp_app_state_preset_save(sp_app_t *app, mod_t *mod, const char *uri)
/*FIXME for lilv 0.24
const char *comment = "this is a comment";
- lilv_state_set_metadata(state, app->regs.rdfs.comment.urid,
+ lilv_state_set_metadata(state, RDFS__comment,
comment, strlen(comment)+1, ATOM__String,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
const char *license = "http://opensource.org/licenses/Artistic-2.0";
- lilv_state_set_metadata(state, app->regs.doap.license.urid,
+ lilv_state_set_metadata(state, DOAP__license,
license, strlen(license)+1, ATOM__URI,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
const LV2_URID bank = app->driver->map->map(app->driver->map->handle,
"http://open-music-kontrollers.ch/banks#Bank1");
- lilv_state_set_metadata(state, app->regs.pset.preset_bank.urid,
+ lilv_state_set_metadata(state, PRESETS__bank,
&bank, sizeof(LV2_URID), ATOM__URID,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
*/
@@ -427,7 +427,7 @@ _sp_app_state_preset_save(sp_app_t *app, mod_t *mod, const char *uri)
lilv_state_free(state);
// reload presets for this module
- mod->presets = _preset_reload(app->world, &app->regs, mod->plug,
+ mod->presets = _preset_reload(app->world, app->regs, mod->plug,
mod->presets, bndl);
}
else
@@ -737,13 +737,13 @@ _sp_app_state_bundle_save(sp_app_t *app, const char *bundle_path)
lv2_atom_forge_set_sink(forge, _sink, _deref, &ser);
if( ser.buf
- && lv2_atom_forge_object(forge, &pset_frame, app->regs.synthpod.state.urid, app->regs.pset.preset.urid)
- && lv2_atom_forge_key(forge, app->regs.core.applies_to.urid)
- && lv2_atom_forge_urid(forge, app->regs.synthpod.stereo.urid)
- && lv2_atom_forge_key(forge, app->regs.core.applies_to.urid)
- && lv2_atom_forge_urid(forge, app->regs.synthpod.monoatom.urid)
- && lv2_atom_forge_key(forge, app->regs.rdfs.see_also.urid)
- && lv2_atom_forge_urid(forge, app->regs.synthpod.state.urid) )
+ && lv2_atom_forge_object(forge, &pset_frame, SYNTHPOD__state, PRESETS__Preset)
+ && lv2_atom_forge_key(forge, CORE__appliesTo)
+ && lv2_atom_forge_urid(forge, SYNTHPOD__stereo)
+ && lv2_atom_forge_key(forge, CORE__appliesTo)
+ && lv2_atom_forge_urid(forge, SYNTHPOD__monoatom)
+ && lv2_atom_forge_key(forge, RDFS__seeAlso)
+ && lv2_atom_forge_urid(forge, SYNTHPOD__state) )
{
lv2_atom_forge_pop(forge, &pset_frame);
@@ -778,17 +778,17 @@ _sp_app_state_bundle_save(sp_app_t *app, const char *bundle_path)
}
if( ser.buf
- && lv2_atom_forge_object(forge, &pset_frame, app->regs.synthpod.null.urid, app->regs.pset.preset.urid)
- && lv2_atom_forge_key(forge, app->regs.core.applies_to.urid)
- && lv2_atom_forge_urid(forge, app->regs.synthpod.stereo.urid)
- && lv2_atom_forge_key(forge, app->regs.core.applies_to.urid)
- && lv2_atom_forge_urid(forge, app->regs.synthpod.monoatom.urid)
+ && lv2_atom_forge_object(forge, &pset_frame, SYNTHPOD__null, PRESETS__Preset)
+ && lv2_atom_forge_key(forge, CORE__appliesTo)
+ && lv2_atom_forge_urid(forge, SYNTHPOD__stereo)
+ && lv2_atom_forge_key(forge, CORE__appliesTo)
+ && lv2_atom_forge_urid(forge, SYNTHPOD__monoatom)
- && lv2_atom_forge_key(forge, app->regs.rdfs.label.urid)
+ && lv2_atom_forge_key(forge, RDFS__label)
&& lv2_atom_forge_string(forge, rdfs_label ? rdfs_label : app->bundle_path,
rdfs_label ? strlen(rdfs_label) : strlen(app->bundle_path) )
- && lv2_atom_forge_key(forge, app->regs.state.state.urid)
+ && lv2_atom_forge_key(forge, STATE__state)
&& lv2_atom_forge_object(forge, &state_frame, 0, 0) )
{
// store state
@@ -909,19 +909,19 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
// store visibility
const int32_t visibility = sp_app_visibility_get(app);
- store(hndl, app->regs.synthpod.visibility.urid,
+ store(hndl, SYNTHPOD__visibility,
&visibility, sizeof(int32_t), ATOM__Bool,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
// store minor version
const int32_t minor_version = SYNTHPOD_MINOR_VERSION;
- store(hndl, app->regs.core.minor_version.urid,
+ store(hndl, CORE__minorVersion,
&minor_version, sizeof(int32_t), ATOM__Int,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
// store micro version
const int32_t micro_version = SYNTHPOD_MICRO_VERSION;
- store(hndl, app->regs.core.micro_version.urid,
+ store(hndl, CORE__microVersion,
&micro_version, sizeof(int32_t), ATOM__Int,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
@@ -979,42 +979,42 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
&& lv2_atom_forge_key(forge, mod->urn)
&& lv2_atom_forge_object(forge, &mod_frame, 0, uri_urid) )
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_position_x.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__modulePositionX)
&& lv2_atom_forge_float(forge, mod->pos.x);
if(ref)
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_position_y.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__modulePositionY)
&& lv2_atom_forge_float(forge, mod->pos.y);
}
if(ref && strlen(mod->alias))
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_alias.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__moduleAlias)
&& lv2_atom_forge_string(forge, mod->alias, strlen(mod->alias));
}
if(ref && mod->ui)
{
- ref = lv2_atom_forge_key(forge, app->regs.ui.ui.urid)
+ ref = lv2_atom_forge_key(forge, UI__ui)
&& lv2_atom_forge_urid(forge, mod->ui);
}
if(ref && mod->visible)
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_visible.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__moduleVisible)
&& lv2_atom_forge_urid(forge, mod->visible);
}
if(ref && mod->disabled)
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_disabled.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__moduleDisabled)
&& lv2_atom_forge_bool(forge, mod->disabled);
}
if(ref)
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.module_created.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__moduleCreated)
&& lv2_atom_forge_int(forge, mod->created);
}
@@ -1034,7 +1034,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
const LV2_Atom *atom = (const LV2_Atom *)ser.buf;
if(ref && atom)
{
- store(hndl, app->regs.synthpod.module_list.urid,
+ store(hndl, SYNTHPOD__moduleList,
LV2_ATOM_BODY_CONST(atom), atom->size, atom->type,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
}
@@ -1074,15 +1074,15 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
if( ref
&& lv2_atom_forge_object(forge, &source_frame, 0, 0) )
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.source_module.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sourceModule)
&& lv2_atom_forge_urid(forge, source_port->mod->urn)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_symbol.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceSymbol)
&& lv2_atom_forge_string(forge, source_port->symbol, strlen(source_port->symbol))
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_module.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkModule)
&& lv2_atom_forge_urid(forge, port->mod->urn)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_symbol.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkSymbol)
&& lv2_atom_forge_string(forge, port->symbol, strlen(port->symbol))
- && lv2_atom_forge_key(forge, app->regs.param.gain.urid)
+ && lv2_atom_forge_key(forge, PARAMETERS__gain)
&& lv2_atom_forge_float(forge, source->gain);
if(ref)
@@ -1103,7 +1103,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
const LV2_Atom *atom = (const LV2_Atom *)ser.buf;
if(ref && atom)
{
- store(hndl, app->regs.synthpod.connection_list.urid,
+ store(hndl, SYNTHPOD__connectionList,
LV2_ATOM_BODY_CONST(atom), atom->size, atom->type,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
}
@@ -1165,13 +1165,13 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
if( ref
&& lv2_atom_forge_object(forge, &source_frame, 0, 0) )
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.source_module.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sourceModule)
&& lv2_atom_forge_urid(forge, src_mod->urn)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_module.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkModule)
&& lv2_atom_forge_urid(forge, snk_mod->urn)
- && lv2_atom_forge_key(forge, app->regs.synthpod.node_position_x.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__nodePositionX)
&& lv2_atom_forge_float(forge, x)
- && lv2_atom_forge_key(forge, app->regs.synthpod.node_position_y.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__nodePositionY)
&& lv2_atom_forge_float(forge, y);
if(ref)
@@ -1190,7 +1190,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
const LV2_Atom *atom = (const LV2_Atom *)ser.buf;
if(ref && atom)
{
- store(hndl, app->regs.synthpod.node_list.urid,
+ store(hndl, SYNTHPOD__nodeList,
LV2_ATOM_BODY_CONST(atom), atom->size, atom->type,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
}
@@ -1224,47 +1224,47 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
LV2_Atom_Forge_Frame auto_frame;
if( ref
- && lv2_atom_forge_object(forge, &auto_frame, 0, app->regs.midi.Controller.urid) )
+ && lv2_atom_forge_object(forge, &auto_frame, 0, MIDI__Controller) )
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.sink_module.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sinkModule)
&& lv2_atom_forge_urid(forge, mod->urn)
- && lv2_atom_forge_key(forge, app->regs.midi.channel.urid)
+ && lv2_atom_forge_key(forge, MIDI__channel)
&& lv2_atom_forge_int(forge, mauto->channel)
- && lv2_atom_forge_key(forge, app->regs.midi.controller_number.urid)
+ && lv2_atom_forge_key(forge, MIDI__controllerNumber)
&& lv2_atom_forge_int(forge, mauto->controller)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_min.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceMinimum)
&& lv2_atom_forge_double(forge, automation->a)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_max.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceMaximum)
&& lv2_atom_forge_double(forge, automation->b)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_min.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkMinimum)
&& lv2_atom_forge_double(forge, automation->c)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_max.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkMaximum)
&& lv2_atom_forge_double(forge, automation->d)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_enabled.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceEnabled)
&& lv2_atom_forge_bool(forge, automation->src_enabled)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_enabled.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkEnabled)
&& lv2_atom_forge_bool(forge, automation->snk_enabled);
if(ref)
{
if(automation->property)
{
- ref = lv2_atom_forge_key(forge, app->regs.patch.property.urid)
+ ref = lv2_atom_forge_key(forge, PATCH__property)
&& lv2_atom_forge_urid(forge, automation->property)
- && lv2_atom_forge_key(forge, app->regs.rdfs.range.urid)
+ && lv2_atom_forge_key(forge, RDFS__range)
&& lv2_atom_forge_urid(forge, automation->range);
}
else
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.sink_symbol.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sinkSymbol)
&& lv2_atom_forge_string(forge, port->symbol, strlen(port->symbol));
}
}
@@ -1279,44 +1279,44 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
LV2_Atom_Forge_Frame auto_frame;
if( ref
- && lv2_atom_forge_object(forge, &auto_frame, 0, app->regs.osc.message.urid) )
+ && lv2_atom_forge_object(forge, &auto_frame, 0, OSC__Message) )
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.sink_module.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sinkModule)
&& lv2_atom_forge_urid(forge, mod->urn)
- && lv2_atom_forge_key(forge, app->regs.osc.path.urid)
+ && lv2_atom_forge_key(forge, OSC__messagePath)
&& lv2_atom_forge_string(forge, oauto->path, strlen(oauto->path))
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_min.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceMinimum)
&& lv2_atom_forge_double(forge, automation->a)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_max.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceMaximum)
&& lv2_atom_forge_double(forge, automation->b)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_min.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkMinimum)
&& lv2_atom_forge_double(forge, automation->c)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_max.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkMaximum)
&& lv2_atom_forge_double(forge, automation->d)
- && lv2_atom_forge_key(forge, app->regs.synthpod.source_enabled.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sourceEnabled)
&& lv2_atom_forge_bool(forge, automation->src_enabled)
- && lv2_atom_forge_key(forge, app->regs.synthpod.sink_enabled.urid)
+ && lv2_atom_forge_key(forge, SYNTHPOD__sinkEnabled)
&& lv2_atom_forge_bool(forge, automation->snk_enabled);
if(ref)
{
if(automation->property)
{
- ref = lv2_atom_forge_key(forge, app->regs.patch.property.urid)
+ ref = lv2_atom_forge_key(forge, PATCH__property)
&& lv2_atom_forge_urid(forge, automation->property)
- && lv2_atom_forge_key(forge, app->regs.rdfs.range.urid)
+ && lv2_atom_forge_key(forge, RDFS__range)
&& lv2_atom_forge_urid(forge, automation->range);
}
else
{
- ref = lv2_atom_forge_key(forge, app->regs.synthpod.sink_symbol.urid)
+ ref = lv2_atom_forge_key(forge, SYNTHPOD__sinkSymbol)
&& lv2_atom_forge_string(forge, port->symbol, strlen(port->symbol));
}
}
@@ -1337,7 +1337,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
const LV2_Atom *atom = (const LV2_Atom *)ser.buf;
if(ref && atom)
{
- store(hndl, app->regs.synthpod.automation_list.urid,
+ store(hndl, SYNTHPOD__automationList,
LV2_ATOM_BODY_CONST(atom), atom->size, atom->type,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
}
@@ -1348,22 +1348,22 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
free(ser.buf);
// spod:graphPositionX
- store(hndl, app->regs.synthpod.graph_position_x.urid,
+ store(hndl, SYNTHPOD__graphPositionX,
&app->pos.x, sizeof(float), ATOM__Float,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
// spod:graphPositionY
- store(hndl, app->regs.synthpod.graph_position_y.urid,
+ store(hndl, SYNTHPOD__graphPositionY,
&app->pos.y, sizeof(float), ATOM__Float,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
// spod:columnEnabled
- store(hndl, app->regs.synthpod.column_enabled.urid,
+ store(hndl, SYNTHPOD__columnEnabled,
&app->column_enabled, sizeof(int32_t), ATOM__Bool,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
// spod:rowEnabled
- store(hndl, app->regs.synthpod.row_enabled.urid,
+ store(hndl, SYNTHPOD__rowEnabled,
&app->row_enabled, sizeof(int32_t), ATOM__Bool,
LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE);
@@ -1393,13 +1393,13 @@ _mod_inject(sp_app_t *app, int32_t mod_uid, LV2_URID mod_urn, const LV2_Atom_Obj
const LV2_Atom_Bool *mod_disabled = NULL;
const LV2_Atom_Int *mod_created = NULL;
lv2_atom_object_get(mod_obj,
- app->regs.synthpod.module_position_x.urid, &mod_pos_x,
- app->regs.synthpod.module_position_y.urid, &mod_pos_y,
- app->regs.synthpod.module_alias.urid, &mod_alias,
- app->regs.ui.ui.urid, &mod_ui,
- app->regs.synthpod.module_visible.urid, &mod_visible,
- app->regs.synthpod.module_disabled.urid, &mod_disabled,
- app->regs.synthpod.module_created.urid, &mod_created,
+ SYNTHPOD__modulePositionX, &mod_pos_x,
+ SYNTHPOD__modulePositionY, &mod_pos_y,
+ SYNTHPOD__moduleAlias, &mod_alias,
+ UI__ui, &mod_ui,
+ SYNTHPOD__moduleVisible, &mod_visible,
+ SYNTHPOD__moduleDisabled, &mod_disabled,
+ SYNTHPOD__moduleCreated, &mod_created,
0);
const uint32_t created = mod_created && (mod_created->atom.type == ATOM__Int)
@@ -1472,17 +1472,17 @@ sp_app_stash(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
LV2_State_Handle hndl, uint32_t flags, const LV2_Feature *const *features)
{
const LV2_URID keys [11] = {
- app->regs.core.minor_version.urid,
- app->regs.core.micro_version.urid,
- app->regs.synthpod.module_list.urid,
- app->regs.synthpod.connection_list.urid,
- app->regs.synthpod.node_list.urid,
- app->regs.synthpod.automation_list.urid,
- app->regs.synthpod.graph.urid,
- app->regs.synthpod.graph_position_x.urid,
- app->regs.synthpod.graph_position_y.urid,
- app->regs.synthpod.column_enabled.urid,
- app->regs.synthpod.row_enabled.urid
+ CORE__minorVersion,
+ CORE__microVersion,
+ SYNTHPOD__moduleList,
+ SYNTHPOD__connectionList,
+ SYNTHPOD__nodeList,
+ SYNTHPOD__automationList,
+ SYNTHPOD__graph,
+ SYNTHPOD__graphPositionX,
+ SYNTHPOD__graphPositionY,
+ SYNTHPOD__columnEnabled,
+ SYNTHPOD__rowEnabled
};
const unsigned num_keys = sizeof(keys) / sizeof(LV2_URID);
@@ -1546,7 +1546,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
uint32_t type;
// retrieve visibility
- const int32_t *visibility = retrieve(hndl, app->regs.synthpod.visibility.urid,
+ const int32_t *visibility = retrieve(hndl, SYNTHPOD__visibility,
&size, &type, &_flags);
if(visibility && (type == ATOM__Bool) && (size == sizeof(int32_t)) )
{
@@ -1554,7 +1554,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
}
// retrieve minor version
- const int32_t *minor_version = retrieve(hndl, app->regs.core.minor_version.urid,
+ const int32_t *minor_version = retrieve(hndl, CORE__minorVersion,
&size, &type, &_flags);
if(minor_version && (type == ATOM__Int) && (size == sizeof(int32_t)) )
{
@@ -1562,7 +1562,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
}
// retrieve micro version
- const int32_t *micro_version = retrieve(hndl, app->regs.core.micro_version.urid,
+ const int32_t *micro_version = retrieve(hndl, CORE__microVersion,
&size, &type, &_flags);
if(micro_version && (type == ATOM__Int) && (size == sizeof(int32_t)) )
{
@@ -1570,7 +1570,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
}
// retrieve spod:moduleList
- const LV2_Atom_Object_Body *mod_list_body = retrieve(hndl, app->regs.synthpod.module_list.urid,
+ const LV2_Atom_Object_Body *mod_list_body = retrieve(hndl, SYNTHPOD__moduleList,
&size, &type, &_flags);
if( mod_list_body
&& (type == ATOM__Object)
@@ -1587,7 +1587,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
mod_t *mod = _mod_inject(app, mod_index, mod_urn, mod_obj, map_path);
if(!mod)
{
- mod_obj->body.otype = app->regs.synthpod.placeholder.urid;
+ mod_obj->body.otype = SYNTHPOD__placeholder;
mod = _mod_inject(app, mod_index, mod_urn, mod_obj, map_path);
if(!mod)
{
@@ -1608,7 +1608,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invaild moduleList\n", __func__);
// retrieve spod:connectionList
- const LV2_Atom_Object_Body *conn_list_body = retrieve(hndl, app->regs.synthpod.connection_list.urid,
+ const LV2_Atom_Object_Body *conn_list_body = retrieve(hndl, SYNTHPOD__connectionList,
&size, &type, &_flags);
if( conn_list_body
&& (type == ATOM__Tuple)
@@ -1628,7 +1628,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invaild connectionList\n", __func__);
// retrieve spod:nodeList
- const LV2_Atom_Object_Body *node_list_body = retrieve(hndl, app->regs.synthpod.node_list.urid,
+ const LV2_Atom_Object_Body *node_list_body = retrieve(hndl, SYNTHPOD__nodeList,
&size, &type, &_flags);
if( node_list_body
&& (type == ATOM__Tuple)
@@ -1648,7 +1648,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invaild nodeList \n", __func__);
// retrieve spod:automationList
- const LV2_Atom_Object_Body *auto_list_body = retrieve(hndl, app->regs.synthpod.automation_list.urid,
+ const LV2_Atom_Object_Body *auto_list_body = retrieve(hndl, SYNTHPOD__automationList,
&size, &type, &_flags);
if( auto_list_body
&& (type == ATOM__Tuple)
@@ -1668,7 +1668,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invaild automationList\n", __func__);
// retrieve spod:graphPositionX
- const float *graph_position_x_body = retrieve(hndl, app->regs.synthpod.graph_position_x.urid,
+ const float *graph_position_x_body = retrieve(hndl, SYNTHPOD__graphPositionX,
&size, &type, &_flags);
if( graph_position_x_body
&& (type == ATOM__Float)
@@ -1680,7 +1680,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invalid graphPositionX\n", __func__);
// retrieve spod:graphPositionY
- const float *graph_position_y_body = retrieve(hndl, app->regs.synthpod.graph_position_y.urid,
+ const float *graph_position_y_body = retrieve(hndl, SYNTHPOD__graphPositionY,
&size, &type, &_flags);
if( graph_position_y_body
&& (type == ATOM__Float)
@@ -1692,7 +1692,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invalid graphPositionY\n", __func__);
// retrieve spod:columnEnabled
- const int32_t *column_enabled = retrieve(hndl, app->regs.synthpod.column_enabled.urid,
+ const int32_t *column_enabled = retrieve(hndl, SYNTHPOD__columnEnabled,
&size, &type, &_flags);
if( column_enabled
&& (type == ATOM__Bool)
@@ -1704,7 +1704,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invalid columnEnabled\n", __func__);
// retrieve spod:rowEnabled
- const int32_t *row_enabled = retrieve(hndl, app->regs.synthpod.row_enabled.urid,
+ const int32_t *row_enabled = retrieve(hndl, SYNTHPOD__rowEnabled,
&size, &type, &_flags);
if( row_enabled
&& (type == ATOM__Bool)
@@ -1716,7 +1716,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
sp_app_log_error(app, "%s: invalid rowEnabled\n", __func__);
// retrieve spod:graph // XXX old save format
- const LV2_Atom_Object_Body *graph_body = retrieve(hndl, app->regs.synthpod.graph.urid,
+ const LV2_Atom_Object_Body *graph_body = retrieve(hndl, SYNTHPOD__graph,
&size, &type, &_flags);
if( graph_body
&& (type == ATOM__Tuple)
@@ -1734,7 +1734,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
const LV2_Atom_Int *mod_index = NULL;
lv2_atom_object_get(mod_obj,
- app->regs.core.index.urid, &mod_index,
+ CORE__index, &mod_index,
0);
if(!mod_index || (mod_index->atom.type != ATOM__Int) )
@@ -1744,7 +1744,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
mod_t *mod = _mod_inject(app, mod_index->body, mod_urn, mod_obj, map_path);
if(!mod)
{
- mod_obj->body.otype = app->regs.synthpod.placeholder.urid;
+ mod_obj->body.otype = SYNTHPOD__placeholder;
mod = _mod_inject(app, mod_index->body, mod_urn, mod_obj, map_path);
if(mod)
{
@@ -1765,7 +1765,7 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
const LV2_Atom_Int *mod_index = NULL;
lv2_atom_object_get(mod_obj,
- app->regs.core.index.urid, &mod_index,
+ CORE__index, &mod_index,
0);
if(!mod_index || (mod_index->atom.type != ATOM__Int) )
@@ -1779,14 +1779,14 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
{
const LV2_Atom_Object *port_obj = (const LV2_Atom_Object *)&item->value;
- if( (item->key != app->regs.core.port.urid)
+ if( (item->key != CORE__port)
|| !lv2_atom_forge_is_object_type(&app->forge, port_obj->atom.type)
- || (port_obj->body.otype != app->regs.core.Port.urid) )
+ || (port_obj->body.otype != CORE__Port) )
continue;
const LV2_Atom_String *port_symbol = NULL;
lv2_atom_object_get(port_obj,
- app->regs.core.symbol.urid, &port_symbol,
+ CORE__symbol, &port_symbol,
0);
if(!port_symbol || (port_symbol->atom.type != ATOM__String) )
@@ -1806,16 +1806,16 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
{
const LV2_Atom_Object *source_obj = (const LV2_Atom_Object *)&sub->value;
- if( (sub->key != app->regs.core.port.urid)
+ if( (sub->key != CORE__port)
|| !lv2_atom_forge_is_object_type(&app->forge, source_obj->atom.type)
- || (source_obj->body.otype != app->regs.core.Port.urid) )
+ || (source_obj->body.otype != CORE__Port) )
continue;
const LV2_Atom_String *source_symbol = NULL;
const LV2_Atom_Int *source_index = NULL;
lv2_atom_object_get(source_obj,
- app->regs.core.symbol.urid, &source_symbol,
- app->regs.core.index.urid, &source_index,
+ CORE__symbol, &source_symbol,
+ CORE__index, &source_index,
0);
if( !source_symbol || (source_symbol->atom.type != ATOM__String)
diff --git a/app/synthpod_app_ui.c b/app/synthpod_app_ui.c
index a01d31c3..91b9f9d4 100644
--- a/app/synthpod_app_ui.c
+++ b/app/synthpod_app_ui.c
@@ -103,7 +103,7 @@ _sp_app_ui_set_modlist(sp_app_t *app, LV2_URID subj, int32_t seqn)
{
LV2_Atom_Forge_Frame frame [2];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], subj, seqn, app->regs.synthpod.module_list.urid);
+ &app->forge, &frame[0], subj, seqn, SYNTHPOD__moduleList);
if(ref)
ref = lv2_atom_forge_tuple(&app->forge, &frame[1]);
for(unsigned m = 0; m < app->num_mods; m++)
@@ -136,70 +136,70 @@ _sp_app_forge_midi_automation(sp_app_t *app, LV2_Atom_Forge_Frame *frame,
const midi_auto_t *mauto = &automation->midi;
LV2_Atom_Forge_Ref ref;
- ref = lv2_atom_forge_object(&app->forge, frame, 0, app->regs.midi.Controller.urid);
+ ref = lv2_atom_forge_object(&app->forge, frame, 0, MIDI__Controller);
if(ref)
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, mod->urn);
if(automation->property)
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.patch.property.urid);
+ ref = lv2_atom_forge_key(&app->forge, PATCH__property);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, automation->property);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.rdfs.range.urid);
+ ref = lv2_atom_forge_key(&app->forge, RDFS__range);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, automation->range);
}
else
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&app->forge, port->symbol, strlen(port->symbol));
}
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.midi.channel.urid);
+ ref = lv2_atom_forge_key(&app->forge, MIDI__channel);
if(ref)
ref = lv2_atom_forge_int(&app->forge, mauto->channel);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.midi.controller_number.urid);
+ ref = lv2_atom_forge_key(&app->forge, MIDI__controllerNumber);
if(ref)
ref = lv2_atom_forge_int(&app->forge, mauto->controller);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_min.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceMinimum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->a);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_max.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceMaximum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->b);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_min.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkMinimum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->c);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_max.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkMaximum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->d);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_enabled.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceEnabled);
if(ref)
ref = lv2_atom_forge_bool(&app->forge, automation->src_enabled);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_enabled.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkEnabled);
if(ref)
ref = lv2_atom_forge_bool(&app->forge, automation->snk_enabled);
}
@@ -216,65 +216,65 @@ _sp_app_forge_osc_automation(sp_app_t *app, LV2_Atom_Forge_Frame *frame,
const osc_auto_t *oauto = &automation->osc;
LV2_Atom_Forge_Ref ref;
- ref = lv2_atom_forge_object(&app->forge, frame, 0, app->regs.osc.message.urid);
+ ref = lv2_atom_forge_object(&app->forge, frame, 0, OSC__Message);
if(ref)
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, mod->urn);
if(automation->property)
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.patch.property.urid);
+ ref = lv2_atom_forge_key(&app->forge, PATCH__property);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, automation->property);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.rdfs.range.urid);
+ ref = lv2_atom_forge_key(&app->forge, RDFS__range);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, automation->range);
}
else
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&app->forge, port->symbol, strlen(port->symbol));
}
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.osc.path.urid);
+ ref = lv2_atom_forge_key(&app->forge, OSC__messagePath);
if(ref)
ref = lv2_atom_forge_string(&app->forge, oauto->path, strlen(oauto->path));
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_min.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceMinimum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->a);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_max.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceMaximum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->b);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_min.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkMinimum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->c);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_max.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkMaximum);
if(ref)
ref = lv2_atom_forge_double(&app->forge, automation->d);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_enabled.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceEnabled);
if(ref)
ref = lv2_atom_forge_bool(&app->forge, automation->src_enabled);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_enabled.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkEnabled);
if(ref)
ref = lv2_atom_forge_bool(&app->forge, automation->snk_enabled);
}
@@ -294,9 +294,9 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
const LV2_Atom_URID *property = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.subject.urid, &subject,
- app->regs.patch.sequence_number.urid, &seqn,
- app->regs.patch.property.urid, &property,
+ PATCH__subject, &subject,
+ PATCH__sequenceNumber, &seqn,
+ PATCH__property, &property,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -312,18 +312,18 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
{
//printf("\tpatch:property <%s>\n", app->driver->unmap->unmap(app->driver->unmap->handle, prop));
- if(prop == app->regs.synthpod.module_list.urid)
+ if(prop == SYNTHPOD__moduleList)
{
_sp_app_ui_set_modlist(app, subj, sn);
}
- else if(prop == app->regs.synthpod.connection_list.urid)
+ else if(prop == SYNTHPOD__connectionList)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Frame frame [3];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], subj, sn, prop);
+ &app->forge, &frame[0], subj, sn, prop);
if(ref)
ref = lv2_atom_forge_tuple(&app->forge, &frame[1]);
for(unsigned m = 0; m < app->num_mods; m++)
@@ -345,27 +345,27 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
ref = lv2_atom_forge_object(&app->forge, &frame[2], 0, 0);
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, source->port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_symbol.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceSymbol);
if(ref)
ref = lv2_atom_forge_string(&app->forge, source->port->symbol, strlen(source->port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&app->forge, port->symbol, strlen(port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.param.gain.urid);
+ ref = lv2_atom_forge_key(&app->forge, PARAMETERS__gain);
if(ref)
ref = lv2_atom_forge_float(&app->forge, source->gain);
}
@@ -390,14 +390,14 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.node_list.urid)
+ else if(prop == SYNTHPOD__nodeList)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Frame frame [3];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], subj, sn, prop);
+ &app->forge, &frame[0], subj, sn, prop);
if(ref)
ref = lv2_atom_forge_tuple(&app->forge, &frame[1]);
for(unsigned m1 = 0; m1 < app->num_mods; m1++)
@@ -443,22 +443,22 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
ref = lv2_atom_forge_object(&app->forge, &frame[2], 0, 0);
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.source_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sourceModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, src_mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, snk_mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.node_position_x.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__nodePositionX);
if(ref)
ref = lv2_atom_forge_float(&app->forge, x);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.node_position_y.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__nodePositionY);
if(ref)
ref = lv2_atom_forge_float(&app->forge, y);
}
@@ -482,7 +482,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.pset.preset.urid)
+ else if(prop == PRESETS__Preset)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
@@ -490,7 +490,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
const LV2_URID bundle_urid = app->driver->map->map(app->driver->map->handle, app->bundle_path); //FIXME store bundle path as URID
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(uint32_t), ATOM__URID, &bundle_urid);
if(ref)
{
@@ -506,7 +506,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.automation_list.urid)
+ else if(prop == SYNTHPOD__automationList)
{
//printf("patch:Get for spod:automationList\n");
@@ -515,7 +515,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [3];
LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(
- &app->regs, &app->forge, &frame[0], subj, sn, prop);
+ &app->forge, &frame[0], subj, sn, prop);
if(ref)
ref = lv2_atom_forge_tuple(&app->forge, &frame[1]);
@@ -556,14 +556,14 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.graph_position_x.urid)
+ else if(prop == SYNTHPOD__graphPositionX)
{
//printf("patch:Get for spod:graphPositionX\n");
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(float), ATOM__Float, &app->pos.x);
if(ref)
{
@@ -579,14 +579,14 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.graph_position_y.urid)
+ else if(prop == SYNTHPOD__graphPositionY)
{
//printf("patch:Get for spod:graphPositionY\n");
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(float), ATOM__Float, &app->pos.y);
if(ref)
{
@@ -602,14 +602,14 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.column_enabled.urid)
+ else if(prop == SYNTHPOD__columnEnabled)
{
//printf("patch:Get for spod:columnEnabled\n");
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Bool, &app->column_enabled);
if(ref)
{
@@ -625,14 +625,14 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.row_enabled.urid)
+ else if(prop == SYNTHPOD__rowEnabled)
{
//printf("patch:Get for spod:rowEnabled\n");
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Bool, &app->row_enabled);
if(ref)
{
@@ -648,7 +648,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.cpus_available.urid)
+ else if(prop == SYNTHPOD__CPUsAvailable)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
@@ -656,7 +656,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
const int32_t cpus_available = app->dsp_master.num_slaves + 1;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Int, &cpus_available);
if(ref)
{
@@ -672,7 +672,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.cpus_used.urid)
+ else if(prop == SYNTHPOD__CPUsUsed)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
@@ -682,7 +682,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
: app->dsp_master.concurrent;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Int, &cpus_used);
if(ref)
{
@@ -698,7 +698,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.period_size.urid)
+ else if(prop == SYNTHPOD__periodSize)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
@@ -706,7 +706,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
const int32_t period_size = app->driver->max_block_size;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Int, &period_size);
if(ref)
{
@@ -722,7 +722,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
_sp_app_to_ui_overflow(app);
}
}
- else if(prop == app->regs.synthpod.num_periods.urid)
+ else if(prop == SYNTHPOD__numPeriods)
{
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
@@ -730,7 +730,7 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
const int32_t num_periods = app->driver->num_periods;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, subj, sn, prop,
+ &app->forge, subj, sn, prop,
sizeof(int32_t), ATOM__Int, &num_periods);
if(ref)
{
@@ -761,29 +761,29 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [2];
LV2_Atom_Forge_Ref ref = synthpod_patcher_put_object(
- &app->regs, &app->forge, &frame[0], subj, sn);
+ &app->forge, &frame[0], subj, sn);
if(ref)
ref = lv2_atom_forge_object(&app->forge, &frame[1], 0, 0);
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.core.plugin.urid);
+ ref = lv2_atom_forge_key(&app->forge, CORE__Plugin);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, mod->plug_urid);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.module_position_x.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__modulePositionX);
if(ref)
ref = lv2_atom_forge_float(&app->forge, mod->pos.x);
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.module_position_y.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__modulePositionY);
if(ref)
ref = lv2_atom_forge_float(&app->forge, mod->pos.y);
if(strlen(mod->alias))
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.synthpod.module_alias.urid);
+ ref = lv2_atom_forge_key(&app->forge, SYNTHPOD__moduleAlias);
if(ref)
ref = lv2_atom_forge_string(&app->forge, mod->alias, strlen(mod->alias));
}
@@ -791,13 +791,13 @@ _sp_app_from_ui_patch_get(sp_app_t *app, const LV2_Atom *atom)
if(mod->ui)
{
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.ui.ui.urid);
+ ref = lv2_atom_forge_key(&app->forge, UI__ui);
if(ref)
ref = lv2_atom_forge_urid(&app->forge, mod->ui);
}
if(ref)
- ref = lv2_atom_forge_key(&app->forge, app->regs.ui.instance_access.urid);
+ ref = lv2_atom_forge_key(&app->forge, INSTANCE_ACCESS);
if(ref)
ref = lv2_atom_forge_long(&app->forge, (intptr_t)mod->inst);
}
@@ -835,10 +835,10 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
const LV2_Atom *value = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.subject.urid, &subject,
- app->regs.patch.sequence_number.urid, &seqn,
- app->regs.patch.property.urid, &property,
- app->regs.patch.value.urid, &value,
+ PATCH__subject, &subject,
+ PATCH__sequenceNumber, &seqn,
+ PATCH__property, &property,
+ PATCH__value, &value,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -855,19 +855,19 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
mod_t *mod = _mod_find_by_urn(app, subj);
if(mod)
{
- if( (prop == app->regs.synthpod.module_position_x.urid)
+ if( (prop == SYNTHPOD__modulePositionX)
&& (value->type == ATOM__Float) )
{
mod->pos.x = ((const LV2_Atom_Float *)value)->body;
_sp_app_order(app);
}
- else if( (prop == app->regs.synthpod.module_position_y.urid)
+ else if( (prop == SYNTHPOD__modulePositionY)
&& (value->type == ATOM__Float) )
{
mod->pos.y = ((const LV2_Atom_Float *)value)->body;
_sp_app_order(app);
}
- else if( (prop == app->regs.synthpod.module_alias.urid)
+ else if( (prop == SYNTHPOD__moduleAlias)
&& (value->type == ATOM__String) )
{
strncpy(mod->alias, LV2_ATOM_BODY_CONST(value), ALIAS_MAX - 1);
@@ -889,12 +889,12 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
}
}
}
- else if( (prop == app->regs.ui.ui.urid)
+ else if( (prop == UI__ui)
&& (value->type == ATOM__URID) )
{
mod->ui = ((const LV2_Atom_URID *)value)->body;
}
- else if( (prop == app->regs.pset.preset.urid)
+ else if( (prop == PRESETS__Preset)
&& (value->type == ATOM__URID) )
{
if(app->block_state == BLOCKING_STATE_RUN)
@@ -947,14 +947,14 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
}
}
}
- else if( (prop == app->regs.idisp.surface.urid)
+ else if( (prop == INLINEDISPLAY__surface)
&& (value->type == ATOM__Bool) )
{
mod->idisp.subscribed = ((const LV2_Atom_Bool *)value)->body;
_sp_app_mod_queue_draw(mod); // trigger update
}
- else if( (prop == app->regs.synthpod.module_reinstantiate.urid)
+ else if( (prop == SYNTHPOD__moduleReinstantiate)
&& (value->type == ATOM__Bool) )
{
if(app->block_state == BLOCKING_STATE_RUN)
@@ -1012,22 +1012,22 @@ _sp_app_from_ui_patch_set(sp_app_t *app, const LV2_Atom *atom)
}
else if(prop && value)// is for host
{
- if( (prop == app->regs.synthpod.graph_position_x.urid)
+ if( (prop == SYNTHPOD__graphPositionX)
&& (value->type == ATOM__Float) )
{
app->pos.x = ((const LV2_Atom_Float *)value)->body;
}
- else if( (prop == app->regs.synthpod.graph_position_y.urid)
+ else if( (prop == SYNTHPOD__graphPositionY)
&& (value->type == ATOM__Float) )
{
app->pos.y = ((const LV2_Atom_Float *)value)->body;
}
- else if( (prop == app->regs.synthpod.column_enabled.urid)
+ else if( (prop == SYNTHPOD__columnEnabled)
&& (value->type == ATOM__Bool) )
{
app->column_enabled = ((const LV2_Atom_Bool *)value)->body;
}
- else if( (prop == app->regs.synthpod.row_enabled.urid)
+ else if( (prop == SYNTHPOD__rowEnabled)
&& (value->type == ATOM__Bool) )
{
app->row_enabled = ((const LV2_Atom_Bool *)value)->body;
@@ -1047,9 +1047,9 @@ _sp_app_from_ui_patch_copy(sp_app_t *app, const LV2_Atom *atom)
const LV2_Atom_URID *destination = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.subject.urid, &subject,
- app->regs.patch.sequence_number.urid, &seqn,
- app->regs.patch.destination.urid, &destination,
+ PATCH__subject, &subject,
+ PATCH__sequenceNumber, &seqn,
+ PATCH__destination, &destination,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -1205,11 +1205,11 @@ _connection_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom_Float *link_gain = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.source_module.urid, &src_module,
- app->regs.synthpod.source_symbol.urid, &src_symbol,
- app->regs.synthpod.sink_module.urid, &snk_module,
- app->regs.synthpod.sink_symbol.urid, &snk_symbol,
- app->regs.param.gain.urid, &link_gain,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sourceSymbol, &src_symbol,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__sinkSymbol, &snk_symbol,
+ PARAMETERS__gain, &link_gain,
0);
const LV2_URID src_urn = src_module
@@ -1237,8 +1237,8 @@ _connection_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- LV2_Atom_Forge_Ref ref = synthpod_patcher_add_atom(&app->regs, &app->forge,
- 0, 0, app->regs.synthpod.connection_list.urid, &obj->atom); //TODO subject
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_add_atom(&app->forge,
+ 0, 0, SYNTHPOD__connectionList, &obj->atom); //TODO subject
if(ref)
{
_sp_app_to_ui_advance_atom(app, answer);
@@ -1267,10 +1267,10 @@ _connection_list_rem(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom *snk_symbol = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.source_module.urid, &src_module,
- app->regs.synthpod.source_symbol.urid, &src_symbol,
- app->regs.synthpod.sink_module.urid, &snk_module,
- app->regs.synthpod.sink_symbol.urid, &snk_symbol,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sourceSymbol, &src_symbol,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__sinkSymbol, &snk_symbol,
0);
const LV2_URID src_urn = src_module
@@ -1296,8 +1296,8 @@ _connection_list_rem(sp_app_t *app, const LV2_Atom_Object *obj)
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_atom(&app->regs, &app->forge,
- 0, 0, app->regs.synthpod.connection_list.urid, &obj->atom); //TODO subject
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_atom(&app->forge,
+ 0, 0, SYNTHPOD__connectionList, &obj->atom); //TODO subject
if(ref)
{
_sp_app_to_ui_advance_atom(app, answer);
@@ -1326,10 +1326,10 @@ _node_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom_Float *pos_y = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.source_module.urid, &src_module,
- app->regs.synthpod.sink_module.urid, &snk_module,
- app->regs.synthpod.node_position_x.urid, &pos_x,
- app->regs.synthpod.node_position_y.urid, &pos_y,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__nodePositionX, &pos_x,
+ SYNTHPOD__nodePositionY, &pos_y,
0);
const LV2_URID src_urn = src_module
@@ -1383,8 +1383,8 @@ _subscription_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom *src_symbol = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.sink_module.urid, &src_module,
- app->regs.synthpod.sink_symbol.urid, &src_symbol,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
0);
const LV2_URID src_urn = src_module
@@ -1418,8 +1418,8 @@ _subscription_list_rem(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom *src_symbol = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.sink_module.urid, &src_module,
- app->regs.synthpod.sink_symbol.urid, &src_symbol,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
0);
const LV2_URID src_urn = src_module
@@ -1450,9 +1450,9 @@ _notification_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom *snk_value = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.sink_module.urid, &snk_module,
- app->regs.synthpod.sink_symbol.urid, &snk_symbol,
- app->regs.rdf.value.urid, &snk_value,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__sinkSymbol, &snk_symbol,
+ RDF__value, &snk_value,
0);
const LV2_URID snk_urn = snk_module
@@ -1466,7 +1466,7 @@ _notification_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
if(snk_port)
{
- if( (snk_proto == app->regs.port.float_protocol.urid)
+ if( (snk_proto == UI__floatProtocol)
&& (snk_value->type == ATOM__Float) )
{
const float val = ((const LV2_Atom_Float *)snk_value)->body;
@@ -1488,7 +1488,7 @@ _notification_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
}
}
}
- else if( (snk_proto == app->regs.port.event_transfer.urid)
+ else if( (snk_proto == ATOM__eventTransfer)
&& (snk_port->type == PORT_TYPE_ATOM) )
{
//printf("got atom:eventTransfer\n");
@@ -1510,7 +1510,7 @@ _notification_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
__func__, snk_port->symbol);
}
}
- else if( (snk_proto == app->regs.port.atom_transfer.urid)
+ else if( (snk_proto == ATOM__atomTransfer)
&& (snk_port->type == PORT_TYPE_ATOM) )
{
//printf("got atom:atomTransfer\n");
@@ -1591,9 +1591,9 @@ _automation_list_rem(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom_URID *src_property = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.sink_module.urid, &src_module,
- app->regs.synthpod.sink_symbol.urid, &src_symbol,
- app->regs.patch.property.urid, &src_property,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
+ PATCH__property, &src_property,
0);
const LV2_URID src_urn = src_module
@@ -1647,20 +1647,20 @@ _automation_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
const LV2_Atom_Bool *is_learning = NULL;
lv2_atom_object_get(obj,
- app->regs.synthpod.sink_module.urid, &src_module,
- app->regs.synthpod.sink_symbol.urid, &src_symbol,
- app->regs.patch.property.urid, &src_property,
- app->regs.rdfs.range.urid, &src_range,
- app->regs.midi.channel.urid, &src_channel,
- app->regs.midi.controller_number.urid, &src_controller,
- app->regs.osc.path.urid, &src_path,
- app->regs.synthpod.source_min.urid, &src_min,
- app->regs.synthpod.source_max.urid, &src_max,
- app->regs.synthpod.sink_min.urid, &snk_min,
- app->regs.synthpod.sink_max.urid, &snk_max,
- app->regs.synthpod.source_enabled.urid, &src_enabled,
- app->regs.synthpod.sink_enabled.urid, &snk_enabled,
- app->regs.synthpod.learning.urid, &is_learning,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
+ PATCH__property, &src_property,
+ RDFS__range, &src_range,
+ MIDI__channel, &src_channel,
+ MIDI__controllerNumber, &src_controller,
+ OSC__messagePath, &src_path,
+ SYNTHPOD__sourceMinimum, &src_min,
+ SYNTHPOD__sourceMaximum, &src_max,
+ SYNTHPOD__sinkMinimum, &snk_min,
+ SYNTHPOD__sinkMaximum, &snk_max,
+ SYNTHPOD__sourceEnabled, &src_enabled,
+ SYNTHPOD__sinkEnabled, &snk_enabled,
+ SYNTHPOD__learning, &is_learning,
0);
const LV2_URID src_urn = src_module
@@ -1702,13 +1702,13 @@ _automation_list_add(sp_app_t *app, const LV2_Atom_Object *obj)
_automation_refresh_mul_add(automation);
- if(obj->body.otype == app->regs.midi.Controller.urid)
+ if(obj->body.otype == MIDI__Controller)
{
automation->type = AUTO_TYPE_MIDI;
automation->midi.channel = src_channel ? src_channel->body : -1;
automation->midi.controller = src_controller ? src_controller->body : -1;
}
- else if(obj->body.otype == app->regs.osc.message.urid)
+ else if(obj->body.otype == OSC__Message)
{
automation->type = AUTO_TYPE_OSC;
if(src_path)
@@ -1796,10 +1796,10 @@ _sp_app_from_ui_patch_patch(sp_app_t *app, const LV2_Atom *atom)
const LV2_Atom_Object *rem = NULL;
lv2_atom_object_get(obj,
- app->regs.patch.subject.urid, &subject,
- app->regs.patch.sequence_number.urid, &seqn,
- app->regs.patch.add.urid, &add,
- app->regs.patch.remove.urid, &rem,
+ PATCH__subject, &subject,
+ PATCH__sequenceNumber, &seqn,
+ PATCH__add, &add,
+ PATCH__remove, &rem,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -1816,32 +1816,32 @@ _sp_app_from_ui_patch_patch(sp_app_t *app, const LV2_Atom *atom)
{
//printf("got patch:remove: %s\n", app->driver->unmap->unmap(app->driver->unmap->handle, prop->key));
- if( (prop->key == app->regs.synthpod.connection_list.urid)
+ if( (prop->key == SYNTHPOD__connectionList)
&& (prop->value.type == ATOM__Object) )
{
_connection_list_rem(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.node_list.urid)
+ else if( (prop->key == SYNTHPOD__nodeList)
&& (prop->value.type == ATOM__Object) )
{
//FIXME never reached
}
- else if( (prop->key == app->regs.synthpod.subscription_list.urid)
+ else if( (prop->key == SYNTHPOD__subscriptionList)
&& (prop->value.type == ATOM__Object) )
{
_subscription_list_rem(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.notification_list.urid)
+ else if( (prop->key == SYNTHPOD__notificationList)
&& (prop->value.type == ATOM__Object) )
{
//FIXME never reached
}
- else if( (prop->key == app->regs.synthpod.module_list.urid)
+ else if( (prop->key == SYNTHPOD__moduleList)
&& (prop->value.type == ATOM__URID) )
{
_mod_list_rem(app, (const LV2_Atom_URID *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.automation_list.urid)
+ else if( (prop->key == SYNTHPOD__automationList)
&& (prop->value.type == ATOM__Object) )
{
_automation_list_rem(app, (const LV2_Atom_Object *)&prop->value);
@@ -1852,32 +1852,32 @@ _sp_app_from_ui_patch_patch(sp_app_t *app, const LV2_Atom *atom)
{
//printf("got patch:add: %s\n", app->driver->unmap->unmap(app->driver->unmap->handle, prop->key));
- if( (prop->key == app->regs.synthpod.connection_list.urid)
+ if( (prop->key == SYNTHPOD__connectionList)
&& (prop->value.type == ATOM__Object) )
{
_connection_list_add(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.node_list.urid)
+ else if( (prop->key == SYNTHPOD__nodeList)
&& (prop->value.type == ATOM__Object) )
{
_node_list_add(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.subscription_list.urid)
+ else if( (prop->key == SYNTHPOD__subscriptionList)
&& (prop->value.type == ATOM__Object) )
{
_subscription_list_add(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.notification_list.urid)
+ else if( (prop->key == SYNTHPOD__notificationList)
&& (prop->value.type == ATOM__Object) )
{
_notification_list_add(app, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.module_list.urid)
+ else if( (prop->key == SYNTHPOD__moduleList)
&& (prop->value.type == ATOM__URID) )
{
_mod_list_add(app, (const LV2_Atom_URID *)&prop->value);
}
- else if( (prop->key == app->regs.synthpod.automation_list.urid)
+ else if( (prop->key == SYNTHPOD__automationList)
&& (prop->value.type == ATOM__Object) )
{
_automation_list_add(app, (const LV2_Atom_Object *)&prop->value);
@@ -1899,13 +1899,13 @@ sp_app_from_ui(sp_app_t *app, const LV2_Atom *atom)
if(lv2_atom_forge_is_object_type(&app->forge, obj->atom.type))
{
- if(obj->body.otype == app->regs.patch.get.urid)
+ if(obj->body.otype == PATCH__Get)
return _sp_app_from_ui_patch_get(app, &obj->atom);
- else if(obj->body.otype == app->regs.patch.set.urid)
+ else if(obj->body.otype == PATCH__Set)
return _sp_app_from_ui_patch_set(app, &obj->atom);
- else if(obj->body.otype == app->regs.patch.copy.urid)
+ else if(obj->body.otype == PATCH__Copy)
return _sp_app_from_ui_patch_copy(app, &obj->atom);
- else if(obj->body.otype == app->regs.patch.patch.urid)
+ else if(obj->body.otype == PATCH__Patch)
return _sp_app_from_ui_patch_patch(app, &obj->atom);
else
sp_app_log_trace(app, "%s: unknown object type\n", __func__);
diff --git a/app/synthpod_app_worker.c b/app/synthpod_app_worker.c
index 78ccb335..b2c0cb7b 100644
--- a/app/synthpod_app_worker.c
+++ b/app/synthpod_app_worker.c
@@ -61,7 +61,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
transmit_module_supported_t *trans = _sp_app_to_ui_request(app, size);
if(trans)
{
- _sp_transmit_module_supported_fill(&app->regs, &app->forge, trans, size,
+ _sp_transmit_module_supported_fill(&app->forge, trans, size,
job->status, job->uri);
_sp_app_to_ui_advance(app, size);
}
@@ -87,8 +87,8 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- LV2_Atom_Forge_Ref ref = synthpod_patcher_add(&app->regs, &app->forge,
- 0, 0, app->regs.synthpod.module_list.urid, //TODO subject
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_add(&app->forge,
+ 0, 0, SYNTHPOD__moduleList, //TODO subject
sizeof(uint32_t), ATOM__URID, &mod->urn);
if(ref)
{
@@ -115,8 +115,8 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- LV2_Atom_Forge_Ref ref = synthpod_patcher_remove(&app->regs, &app->forge,
- 0, 0, app->regs.synthpod.module_list.urid, //TODO subject
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_remove(&app->forge,
+ 0, 0, SYNTHPOD__moduleList, //TODO subject
sizeof(uint32_t), ATOM__URID, &urn);
if(ref)
{
@@ -168,7 +168,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
{
const int64_t dsp_instance = (intptr_t )mod->inst;
LV2_Atom_Forge_Ref ref = synthpod_patcher_set(
- &app->regs, &app->forge, mod->urn, 0, app->regs.ui.instance_access.urid, //FIXME seqnum
+ &app->forge, mod->urn, 0, INSTANCE_ACCESS, //FIXME seqnum
sizeof(int64_t), ATOM__Long, &dsp_instance);
if(ref)
{
@@ -221,7 +221,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
transmit_module_preset_load_t *trans = _sp_app_to_ui_request(app, size);
if(trans)
{
- _sp_transmit_module_preset_load_fill(&app->regs, &app->forge, trans, size,
+ _sp_transmit_module_preset_load_fill(&app->forge, trans, size,
mod->uid, NULL);
_sp_app_to_ui_advance(app, size);
}
@@ -241,7 +241,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
LV2_Atom *answer = _sp_app_to_ui_request_atom(app);
if(answer)
{
- LV2_Atom_Forge_Ref ref = synthpod_patcher_copy(&app->regs, &app->forge,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_copy(&app->forge,
job->mod->urn, 0, job->urn);
if(ref)
{
@@ -288,7 +288,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
transmit_bundle_load_t *trans = _sp_app_to_ui_request(app, size);
if(trans)
{
- _sp_transmit_bundle_load_fill(&app->regs, &app->forge, trans, size,
+ _sp_transmit_bundle_load_fill(&app->forge, trans, size,
job->status, job->uri);
_sp_app_to_ui_advance(app, size);
}
@@ -324,7 +324,7 @@ sp_app_from_worker(sp_app_t *app, uint32_t len, const void *data)
transmit_bundle_save_t *trans = _sp_app_to_ui_request(app, size);
if(trans)
{
- _sp_transmit_bundle_save_fill(&app->regs, &app->forge, trans, size,
+ _sp_transmit_bundle_save_fill(&app->forge, trans, size,
job->status, job->uri);
_sp_app_to_ui_advance(app, size);
}
diff --git a/bin/synthpod_stat.c b/bin/synthpod_stat.c
index ffea0129..bb2ca4a8 100644
--- a/bin/synthpod_stat.c
+++ b/bin/synthpod_stat.c
@@ -1,3 +1,4 @@
+#include <synthpod_common.h>
#include <synthpod_stat.h>
#include <lilv/lilv.h>
@@ -29,9 +30,17 @@
#include <lv2_extensions.h>
#include <lv2_external_ui.h>
+#include <osc.lv2/osc.h>
+#include <canvas.lv2/canvas.h>
#define NS_ITM(EXT, ID) [EXT ## __ ## ID] = LILV_NS_ ## EXT # ID
#define ITM(ID) [ID] = LV2_ ## ID
+#define SYN(ID) [SYNTHPOD__ ## ID] = SYNTHPOD_PREFIX # ID
+
+#define LV2_CORE__isBitmask LV2_CORE_PREFIX "isBitmask"
+#define LV2_CORE__parameterProperty LV2_CORE_PREFIX "parameterProperty"
+#define LV2_PATCH__Insert LV2_PATCH_PREFIX "Insert"
+#define LV2_INLINEDISPLAY__surface LV2_INLINEDISPLAY_PREFIX "surface"
const char *stat_uris [STAT_URID_MAX] = {
[STAT_URID_INVALID] = NULL,
@@ -40,6 +49,7 @@ const char *stat_uris [STAT_URID_MAX] = {
NS_ITM(RDFS, comment),
NS_ITM(RDFS, range),
NS_ITM(RDFS, subClassOf),
+ NS_ITM(RDFS, seeAlso),
NS_ITM(RDF, type),
NS_ITM(RDF, value),
@@ -180,6 +190,8 @@ const char *stat_uris [STAT_URID_MAX] = {
ITM(CORE__scalePoint),
ITM(CORE__symbol),
ITM(CORE__toggled),
+ ITM(CORE__isBitmask),
+ ITM(CORE__parameterProperty),
[DATA_ACCESS] = LV2_DATA_ACCESS_URI,
@@ -298,6 +310,7 @@ const char *stat_uris [STAT_URID_MAX] = {
ITM(PATCH__Request),
ITM(PATCH__Response),
ITM(PATCH__Set),
+ ITM(PATCH__Insert),
ITM(PATCH__accept),
ITM(PATCH__add),
ITM(PATCH__body),
@@ -361,17 +374,17 @@ const char *stat_uris [STAT_URID_MAX] = {
ITM(PORT_PROPS__supportsStrictBounds),
ITM(PORT_PROPS__trigger),
- ITM(PRESETS__Bank),
+ //ITM(PRESETS__Bank),
ITM(PRESETS__Preset),
ITM(PRESETS__bank),
- ITM(PRESETS__preset),
+ //ITM(PRESETS__preset),
ITM(PRESETS__value),
ITM(RESIZE_PORT__asLargeAs),
ITM(RESIZE_PORT__minimumSize),
ITM(RESIZE_PORT__resize),
- ITM(STATE__State),
+ //ITM(STATE__State),
ITM(STATE__interface),
ITM(STATE__loadDefaultState),
ITM(STATE__freePath),
@@ -402,7 +415,7 @@ const char *stat_uris [STAT_URID_MAX] = {
ITM(UI__PortProtocol),
ITM(UI__Qt4UI),
ITM(UI__Qt5UI),
- ITM(UI__UI),
+ //ITM(UI__UI),
ITM(UI__WindowsUI),
ITM(UI__X11UI),
ITM(UI__binary),
@@ -474,5 +487,74 @@ const char *stat_uris [STAT_URID_MAX] = {
ITM(EXTERNAL_UI__Widget),
ITM(INLINEDISPLAY__interface),
- ITM(INLINEDISPLAY__queue_draw)
+ ITM(INLINEDISPLAY__queue_draw),
+ ITM(INLINEDISPLAY__surface),
+
+ ITM(OSC__Message),
+ ITM(OSC__messagePath),
+
+ [CVAS__graph] = CANVAS__graph,
+
+ [SYNTHPOD__state] = "state.ttl",
+ [SYNTHPOD__null] = "",
+ SYN(payload),
+ SYN(graph),
+ SYN(stereo),
+ SYN(monoatom),
+ SYN(moduleList),
+ SYN(moduleSupported),
+ SYN(moduleAdd),
+ SYN(moduleDel),
+ SYN(moduleMove),
+ SYN(modulePresetLoad),
+ SYN(modulePresetSave),
+ SYN(moduleVisible),
+ SYN(moduleDisabled),
+ SYN(moduleProfiling),
+ SYN(modulePositionX),
+ SYN(modulePositionY),
+ SYN(moduleAlias),
+ SYN(moduleReinstantiate),
+ SYN(moduleCreated),
+ SYN(nodePositionX),
+ SYN(nodePositionY),
+ SYN(graphPositionX),
+ SYN(graphPositionY),
+ SYN(columnEnabled),
+ SYN(rowEnabled),
+ SYN(portRefresh),
+ SYN(bundleLoad),
+ SYN(bundleSave),
+ SYN(pathGet),
+ SYN(DSPProfiling),
+ SYN(CPUsAvailable),
+ SYN(CPUsUsed),
+ SYN(periodSize),
+ SYN(numPeriods),
+ SYN(quit),
+ SYN(systemPorts),
+ SYN(ControlPort),
+ SYN(AudioPort),
+ SYN(CVPort),
+ SYN(MIDIPort),
+ SYN(OSCPort),
+ SYN(ComPort),
+ SYN(connectionList),
+ SYN(nodeList),
+ SYN(subscriptionList),
+ SYN(notificationList),
+ SYN(automationList),
+ SYN(sourceModule),
+ SYN(sourceSymbol),
+ SYN(sinkModule),
+ SYN(sinkSymbol),
+ SYN(sourceMinimum),
+ SYN(sourceMaximum),
+ SYN(sinkMinimum),
+ SYN(sinkMaximum),
+ SYN(sourceEnabled),
+ SYN(sinkEnabled),
+ SYN(learning),
+ SYN(placeholder),
+ SYN(visibility),
};
diff --git a/include/synthpod_patcher.h b/include/synthpod_patcher.h
index 3bce8b2b..50ec25bf 100644
--- a/include/synthpod_patcher.h
+++ b/include/synthpod_patcher.h
@@ -19,9 +19,10 @@
#define _SYNTHPOD_PATCHER_H
#include <synthpod_private.h>
+#include <synthpod_stat.h>
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_object(reg_t *regs, LV2_Atom_Forge *forge,
+_synthpod_patcher_internal_object(LV2_Atom_Forge *forge,
LV2_Atom_Forge_Frame *frame, LV2_URID otype, LV2_URID subject, int32_t seqn)
{
LV2_Atom_Forge_Ref ref = lv2_atom_forge_object(forge, frame, 0, otype);
@@ -29,7 +30,7 @@ _synthpod_patcher_internal_object(reg_t *regs, LV2_Atom_Forge *forge,
if(subject)
{
if(ref)
- ref = lv2_atom_forge_key(forge, regs->patch.subject.urid);
+ ref = lv2_atom_forge_key(forge, PATCH__subject);
if(ref)
ref = lv2_atom_forge_urid(forge, subject);
}
@@ -37,7 +38,7 @@ _synthpod_patcher_internal_object(reg_t *regs, LV2_Atom_Forge *forge,
if(seqn)
{
if(ref)
- ref = lv2_atom_forge_key(forge, regs->patch.sequence_number.urid);
+ ref = lv2_atom_forge_key(forge, PATCH__sequenceNumber);
if(ref)
ref = lv2_atom_forge_int(forge, seqn);
}
@@ -46,10 +47,10 @@ _synthpod_patcher_internal_object(reg_t *regs, LV2_Atom_Forge *forge,
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_property(reg_t *regs, LV2_Atom_Forge *forge,
+_synthpod_patcher_internal_property(LV2_Atom_Forge *forge,
LV2_URID property)
{
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(forge, regs->patch.property.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(forge, PATCH__property);
if(ref)
ref = lv2_atom_forge_urid(forge, property);
@@ -57,10 +58,10 @@ _synthpod_patcher_internal_property(reg_t *regs, LV2_Atom_Forge *forge,
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_destination(reg_t *regs, LV2_Atom_Forge *forge,
+_synthpod_patcher_internal_destination(LV2_Atom_Forge *forge,
LV2_URID destination)
{
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(forge, regs->patch.destination.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(forge, PATCH__destination);
if(ref)
ref = lv2_atom_forge_urid(forge, destination);
@@ -68,31 +69,31 @@ _synthpod_patcher_internal_destination(reg_t *regs, LV2_Atom_Forge *forge,
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_body(reg_t *regs, LV2_Atom_Forge *forge)
+_synthpod_patcher_internal_body(LV2_Atom_Forge *forge)
{
- return lv2_atom_forge_key(forge, regs->patch.body.urid);
+ return lv2_atom_forge_key(forge, PATCH__body);
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_add(reg_t *regs, LV2_Atom_Forge *forge)
+_synthpod_patcher_internal_add(LV2_Atom_Forge *forge)
{
- return lv2_atom_forge_key(forge, regs->patch.add.urid);
+ return lv2_atom_forge_key(forge, PATCH__add);
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_remove(reg_t *regs, LV2_Atom_Forge *forge)
+_synthpod_patcher_internal_remove(LV2_Atom_Forge *forge)
{
- return lv2_atom_forge_key(forge, regs->patch.remove.urid);
+ return lv2_atom_forge_key(forge, PATCH__remove);
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_value(reg_t *regs, LV2_Atom_Forge *forge)
+_synthpod_patcher_internal_value(LV2_Atom_Forge *forge)
{
- return lv2_atom_forge_key(forge, regs->patch.value.urid);
+ return lv2_atom_forge_key(forge, PATCH__value);
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_raw(reg_t *regs, LV2_Atom_Forge *forge,
+_synthpod_patcher_internal_raw(LV2_Atom_Forge *forge,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Ref ref = lv2_atom_forge_atom(forge, size, type);
@@ -103,7 +104,7 @@ _synthpod_patcher_internal_raw(reg_t *regs, LV2_Atom_Forge *forge,
}
static inline LV2_Atom_Forge_Ref
-_synthpod_patcher_internal_atom(reg_t *regs, LV2_Atom_Forge *forge,
+_synthpod_patcher_internal_atom(LV2_Atom_Forge *forge,
const LV2_Atom *atom)
{
return lv2_atom_forge_write(forge, atom, lv2_atom_total_size(atom));
@@ -121,15 +122,15 @@ synthpod_patcher_pop(LV2_Atom_Forge *forge,
// patch:Copy
static LV2_Atom_Forge_Ref
-synthpod_patcher_copy(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_copy(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID destination)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.copy.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Copy, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_destination(regs, forge, destination);
+ ref = _synthpod_patcher_internal_destination(forge, destination);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -138,13 +139,13 @@ synthpod_patcher_copy(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Delete
static LV2_Atom_Forge_Ref
-synthpod_patcher_delete(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_delete(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.delete.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Delete, subject, seqn);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -153,15 +154,15 @@ synthpod_patcher_delete(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Get
static LV2_Atom_Forge_Ref
-synthpod_patcher_get(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_get(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.get.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Get, subject, seqn);
if(property && ref)
- ref = _synthpod_patcher_internal_property(regs, forge, property);
+ ref = _synthpod_patcher_internal_property(forge, property);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -170,28 +171,28 @@ synthpod_patcher_get(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Insert
static LV2_Atom_Forge_Ref
-synthpod_patcher_insert_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
+synthpod_patcher_insert_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
LV2_URID subject, int32_t seqn)
{
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.insert.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Insert, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_body(regs, forge);
+ ref = _synthpod_patcher_internal_body(forge);
return ref;
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_insert(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_insert(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_insert_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_insert_object(forge, frame,
subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_raw(regs, forge, size, type, body);
+ ref = _synthpod_patcher_internal_raw(forge, size, type, body);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -199,16 +200,16 @@ synthpod_patcher_insert(reg_t *regs, LV2_Atom_Forge *forge,
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_insert_atom(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_insert_atom(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn,
const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_insert_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_insert_object(forge, frame,
subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_atom(regs, forge, atom);
+ ref = _synthpod_patcher_internal_atom(forge, atom);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -217,20 +218,20 @@ synthpod_patcher_insert_atom(reg_t *regs, LV2_Atom_Forge *forge,
// patch:remove aka patch:Patch
static LV2_Atom_Forge_Ref
-synthpod_patcher_remove_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
+synthpod_patcher_remove_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
LV2_URID subject, int32_t seqn, LV2_URID property)
{
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.patch.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Patch, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_add(regs, forge);
+ ref = _synthpod_patcher_internal_add(forge);
if(ref)
ref = lv2_atom_forge_object(forge, &frame[1], 0, 0);
// add nothing
if(ref)
lv2_atom_forge_pop(forge, &frame[1]);
if(ref)
- ref = _synthpod_patcher_internal_remove(regs, forge);
+ ref = _synthpod_patcher_internal_remove(forge);
if(ref)
ref = lv2_atom_forge_object(forge, &frame[1], 0, 0);
if(ref)
@@ -240,16 +241,16 @@ synthpod_patcher_remove_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forg
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_remove(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_remove(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Frame frame [2];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_raw(regs, forge, size, type, body);
+ ref = _synthpod_patcher_internal_raw(forge, size, type, body);
if(ref)
synthpod_patcher_pop(forge, frame, 2);
@@ -257,16 +258,16 @@ synthpod_patcher_remove(reg_t *regs, LV2_Atom_Forge *forge,
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_remove_atom(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_remove_atom(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [2];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_remove_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_atom(regs, forge, atom);
+ ref = _synthpod_patcher_internal_atom(forge, atom);
if(ref)
synthpod_patcher_pop(forge, frame, 2);
@@ -275,20 +276,20 @@ synthpod_patcher_remove_atom(reg_t *regs, LV2_Atom_Forge *forge,
// patch:add aka patch:Patch
static LV2_Atom_Forge_Ref
-synthpod_patcher_add_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
+synthpod_patcher_add_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
LV2_URID subject, int32_t seqn, LV2_URID property) //FIXME add removal flag
{
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.patch.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Patch, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_remove(regs, forge);
+ ref = _synthpod_patcher_internal_remove(forge);
if(ref)
ref = lv2_atom_forge_object(forge, &frame[1], 0, 0);
// add nothing
if(ref)
lv2_atom_forge_pop(forge, &frame[1]);
if(ref)
- ref = _synthpod_patcher_internal_add(regs, forge);
+ ref = _synthpod_patcher_internal_add(forge);
if(ref)
ref = lv2_atom_forge_object(forge, &frame[1], 0, 0);
if(ref)
@@ -298,16 +299,16 @@ synthpod_patcher_add_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_F
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_add(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_add(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Frame frame [2];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_raw(regs, forge, size, type, body);
+ ref = _synthpod_patcher_internal_raw(forge, size, type, body);
if(ref)
synthpod_patcher_pop(forge, frame, 2);
@@ -315,16 +316,16 @@ synthpod_patcher_add(reg_t *regs, LV2_Atom_Forge *forge,
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_add_atom(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_add_atom(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [2];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_add_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_atom(regs, forge, atom);
+ ref = _synthpod_patcher_internal_atom(forge, atom);
if(ref)
synthpod_patcher_pop(forge, frame, 2);
@@ -333,16 +334,16 @@ synthpod_patcher_add_atom(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Move
static LV2_Atom_Forge_Ref
-synthpod_patcher_move(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_move(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn,
LV2_URID destination)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.move.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Move, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_destination(regs, forge, destination);
+ ref = _synthpod_patcher_internal_destination(forge, destination);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -355,28 +356,28 @@ synthpod_patcher_move(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Put
static LV2_Atom_Forge_Ref
-synthpod_patcher_put_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
+synthpod_patcher_put_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
LV2_URID subject, int32_t seqn)
{
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.put.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Put, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_body(regs, forge);
+ ref = _synthpod_patcher_internal_body(forge);
return ref;
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_put(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_put(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_put_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_put_object(forge, frame,
subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_raw(regs, forge, size, type, body);
+ ref = _synthpod_patcher_internal_raw(forge, size, type, body);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -384,16 +385,16 @@ synthpod_patcher_put(reg_t *regs, LV2_Atom_Forge *forge,
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_put_atom(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_put_atom(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn,
const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_put_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_put_object(forge, frame,
subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_atom(regs, forge, atom);
+ ref = _synthpod_patcher_internal_atom(forge, atom);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -402,29 +403,29 @@ synthpod_patcher_put_atom(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Set
static LV2_Atom_Forge_Ref
-synthpod_patcher_set_object(reg_t *regs, LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
+synthpod_patcher_set_object(LV2_Atom_Forge *forge, LV2_Atom_Forge_Frame *frame,
LV2_URID subject, int32_t seqn, LV2_URID property)
{
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.set.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Set, subject, seqn);
if(ref)
- ref = _synthpod_patcher_internal_property(regs, forge, property);
+ ref = _synthpod_patcher_internal_property(forge, property);
if(ref)
- ref = _synthpod_patcher_internal_value(regs, forge);
+ ref = _synthpod_patcher_internal_value(forge);
return ref;
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_set(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_set(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
uint32_t size, LV2_URID type, const void *body)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_raw(regs, forge, size, type, body);
+ ref = _synthpod_patcher_internal_raw(forge, size, type, body);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -432,16 +433,16 @@ synthpod_patcher_set(reg_t *regs, LV2_Atom_Forge *forge,
}
static LV2_Atom_Forge_Ref
-synthpod_patcher_set_atom(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_set_atom(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn, LV2_URID property,
const LV2_Atom *atom)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(regs, forge, frame,
+ LV2_Atom_Forge_Ref ref = synthpod_patcher_set_object(forge, frame,
subject, seqn, property);
if(ref)
- ref = _synthpod_patcher_internal_atom(regs, forge, atom);
+ ref = _synthpod_patcher_internal_atom(forge, atom);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -450,13 +451,13 @@ synthpod_patcher_set_atom(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Ack
static LV2_Atom_Forge_Ref
-synthpod_patcher_ack(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_ack(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.ack.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Ack, subject, seqn);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
@@ -465,13 +466,13 @@ synthpod_patcher_ack(reg_t *regs, LV2_Atom_Forge *forge,
// patch:Error
static LV2_Atom_Forge_Ref
-synthpod_patcher_error(reg_t *regs, LV2_Atom_Forge *forge,
+synthpod_patcher_error(LV2_Atom_Forge *forge,
LV2_URID subject, int32_t seqn)
{
LV2_Atom_Forge_Frame frame [1];
- LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(regs, forge, frame,
- regs->patch.error.urid, subject, seqn);
+ LV2_Atom_Forge_Ref ref = _synthpod_patcher_internal_object(forge, frame,
+ PATCH__Error, subject, seqn);
if(ref)
synthpod_patcher_pop(forge, frame, 1);
diff --git a/include/synthpod_private.h b/include/synthpod_private.h
index 867e9239..adcda07f 100644
--- a/include/synthpod_private.h
+++ b/include/synthpod_private.h
@@ -52,6 +52,8 @@
#include <osc.lv2/osc.h>
#include <canvas.lv2/canvas.h>
+#include <synthpod_stat.h>
+
typedef enum _port_type_t port_type_t;
typedef enum _port_atom_type_t port_atom_type_t;
typedef enum _port_buffer_type_t port_buffer_type_t;
@@ -100,1901 +102,42 @@ enum _port_protocol_t {
PORT_PROTOCOL_NUM
}; //TODO use this
-typedef int32_t u_id_t;
-typedef struct _reg_item_t reg_item_t;
-typedef struct _reg_t reg_t;
-
-struct _reg_item_t {
- LilvNode *node;
- LV2_URID urid;
-};
-
-struct _reg_t {
- struct {
- reg_item_t input;
- reg_item_t output;
-
- reg_item_t control;
- reg_item_t audio;
- reg_item_t cv;
- reg_item_t atom;
-
- // atom buffer type
- reg_item_t sequence;
-
- // atom sequence event types
- reg_item_t midi;
- reg_item_t osc_event;
- reg_item_t time_position;
-
- // control port property
- reg_item_t integer;
- reg_item_t enumeration;
- reg_item_t toggled;
- reg_item_t is_bitmask;
-
- // port protocols
- reg_item_t float_protocol;
- reg_item_t peak_protocol;
- reg_item_t atom_transfer;
- reg_item_t event_transfer;
-
- reg_item_t notification;
- reg_item_t minimum_size;
-
- // properties
- reg_item_t logarithmic;
- } port;
-
- struct {
- reg_item_t message;
- reg_item_t path;
- } osc;
-
- struct {
- reg_item_t property;
- } parameter;
-
- struct {
- reg_item_t schedule;
- } work;
-
- struct {
- reg_item_t entry;
- reg_item_t error;
- reg_item_t note;
- reg_item_t trace;
- reg_item_t warning;
- } log;
-
- struct {
- reg_item_t window_title;
- reg_item_t show_interface;
- reg_item_t idle_interface;
- reg_item_t kx_widget;
- reg_item_t external;
- reg_item_t x11;
- reg_item_t gtk2;
- reg_item_t gtk3;
- reg_item_t qt4;
- reg_item_t qt5;
- reg_item_t plugin;
- reg_item_t protocol;
- reg_item_t period_start;
- reg_item_t period_size;
- reg_item_t peak;
- reg_item_t port_subscribe;
- reg_item_t port_index;
- reg_item_t update_rate;
- reg_item_t instance_access;
- reg_item_t data_access;
- reg_item_t ui;
- } ui;
-
- struct {
- reg_item_t preset;
- reg_item_t preset_bank;
- reg_item_t bank;
- } pset;
-
- struct {
- reg_item_t value;
- reg_item_t type;
- reg_item_t subject;
- } rdf;
-
- struct {
- reg_item_t label;
- reg_item_t range;
- reg_item_t comment;
- reg_item_t see_also;
- } rdfs;
-
- struct {
- reg_item_t license;
- reg_item_t name;
- } doap;
-
- struct {
- reg_item_t optional_feature;
- reg_item_t required_feature;
- reg_item_t name;
- reg_item_t minor_version;
- reg_item_t micro_version;
- reg_item_t extension_data;
- reg_item_t control;
- reg_item_t symbol;
- reg_item_t index;
- reg_item_t minimum;
- reg_item_t maximum;
- reg_item_t scale_point;
- reg_item_t port;
- reg_item_t Port;
- reg_item_t plugin;
- reg_item_t applies_to;
- reg_item_t designation;
- } core;
-
- struct {
- reg_item_t sample_rate;
- reg_item_t gain;
- } param;
-
- struct {
- reg_item_t nominal_block_length;
- reg_item_t max_block_length;
- reg_item_t min_block_length;
- reg_item_t sequence_size;
- } bufsz;
-
- struct {
- reg_item_t writable;
- reg_item_t readable;
- reg_item_t message;
- reg_item_t set;
- reg_item_t get;
- reg_item_t subject;
- reg_item_t body;
- reg_item_t property;
- reg_item_t value;
- reg_item_t wildcard;
- reg_item_t patch;
- reg_item_t add;
- reg_item_t remove;
- reg_item_t put;
- reg_item_t insert;
- reg_item_t delete;
- reg_item_t destination;
- reg_item_t copy;
- reg_item_t move;
- reg_item_t sequence_number;
- reg_item_t error;
- reg_item_t ack;
- } patch;
-
- struct {
- reg_item_t message;
- } xpress;
-
- struct {
- reg_item_t graph;
- } canvas;
-
- struct {
- reg_item_t group;
- reg_item_t left;
- reg_item_t right;
- reg_item_t center;
- reg_item_t side;
- reg_item_t center_left;
- reg_item_t center_right;
- reg_item_t side_left;
- reg_item_t side_right;
- reg_item_t rear_left;
- reg_item_t rear_right;
- reg_item_t rear_center;
- reg_item_t low_frequency_effects;
- } group;
-
- struct {
- // properties
- reg_item_t conversion;
- reg_item_t prefixConversion;
- reg_item_t render;
- reg_item_t symbol;
- reg_item_t unit;
- reg_item_t Unit;
-
- // instances;
- reg_item_t bar;
- reg_item_t beat;
- reg_item_t bpm;
- reg_item_t cent;
- reg_item_t cm;
- reg_item_t coef;
- reg_item_t db;
- reg_item_t degree;
- reg_item_t frame;
- reg_item_t hz;
- reg_item_t inch;
- reg_item_t khz;
- reg_item_t km;
- reg_item_t m;
- reg_item_t mhz;
- reg_item_t midiNote;
- reg_item_t midiController;
- reg_item_t mile;
- reg_item_t min;
- reg_item_t mm;
- reg_item_t ms;
- reg_item_t oct;
- reg_item_t pc;
- reg_item_t s;
- reg_item_t semitone12TET;
- } units;
-
- struct {
- reg_item_t state;
- reg_item_t load_default_state;
- reg_item_t thread_safe_restore;
- } state;
-
- struct {
- reg_item_t payload;
- reg_item_t state;
- reg_item_t graph;
- reg_item_t null;
- reg_item_t stereo;
- reg_item_t monoatom;
-
- reg_item_t module_list;
- reg_item_t module_supported;
- reg_item_t module_add;
- reg_item_t module_del;
- reg_item_t module_move;
- reg_item_t module_preset_load;
- reg_item_t module_preset_save;
- reg_item_t module_visible;
- reg_item_t module_disabled;
- reg_item_t module_profiling;
- reg_item_t module_position_x;
- reg_item_t module_position_y;
- reg_item_t module_alias;
- reg_item_t module_reinstantiate;
- reg_item_t module_created;
- reg_item_t node_position_x;
- reg_item_t node_position_y;
- reg_item_t graph_position_x;
- reg_item_t graph_position_y;
- reg_item_t column_enabled;
- reg_item_t row_enabled;
- reg_item_t port_refresh;
- reg_item_t bundle_load;
- reg_item_t bundle_save;
- reg_item_t path_get;
- reg_item_t dsp_profiling;
- reg_item_t cpus_available;
- reg_item_t cpus_used;
- reg_item_t period_size;
- reg_item_t num_periods;
- reg_item_t quit;
-
- reg_item_t system_ports;
- reg_item_t control_port;
- reg_item_t audio_port;
- reg_item_t cv_port;
- reg_item_t midi_port;
- reg_item_t osc_port;
- reg_item_t com_port;
-
- reg_item_t subscription_list;
- reg_item_t notification_list;
- reg_item_t automation_list;
- reg_item_t connection_list;
- reg_item_t node_list;
-
- reg_item_t source_module;
- reg_item_t source_symbol;
- reg_item_t sink_module;
- reg_item_t sink_symbol;
-
- reg_item_t source_min;
- reg_item_t source_max;
- reg_item_t sink_min;
- reg_item_t sink_max;
-
- reg_item_t source_enabled;
- reg_item_t sink_enabled;
- reg_item_t learning;
-
- reg_item_t placeholder;
- reg_item_t visibility;
- } synthpod;
-
- struct {
- reg_item_t Controller;
- reg_item_t channel;
- reg_item_t controller_number;
- } midi;
-
- struct {
- reg_item_t surface;
- } idisp;
-};
-
-static inline void
-_register(reg_item_t *itm, LilvWorld *world, LV2_URID_Map *map, const char *uri)
-{
- itm->node = lilv_new_uri(world, uri);
- itm->urid = map->map(map->handle, uri);
-}
-
-static inline void
-_register_string(reg_item_t *itm, LilvWorld *world, LV2_URID_Map *map, const char *uri)
-{
- itm->node = lilv_new_string(world, uri);
- itm->urid = map->map(map->handle, uri);
-}
-
-static inline void
-_unregister(reg_item_t *itm)
-{
- if(itm->node)
- lilv_node_free(itm->node);
-}
-
-static inline void
-sp_regs_init(reg_t *regs, LilvWorld *world, LV2_URID_Map *map)
-{
- _register(&regs->port.input, world, map, LV2_CORE__InputPort);
- _register(&regs->port.output, world, map, LV2_CORE__OutputPort);
-
- _register(&regs->port.control, world, map, LV2_CORE__ControlPort);
- _register(&regs->port.audio, world, map, LV2_CORE__AudioPort);
- _register(&regs->port.cv, world, map, LV2_CORE__CVPort);
- _register(&regs->port.atom, world, map, LV2_ATOM__AtomPort);
-
- _register(&regs->port.sequence, world, map, LV2_ATOM__Sequence);
- _register(&regs->port.midi, world, map, LV2_MIDI__MidiEvent);
- _register(&regs->port.osc_event, world, map, LV2_OSC__Event);
- _register(&regs->port.time_position, world, map, LV2_TIME__Position);
-
- _register(&regs->port.integer, world, map, LV2_CORE__integer);
- _register(&regs->port.enumeration, world, map, LV2_CORE__enumeration);
- _register(&regs->port.toggled, world, map, LV2_CORE__toggled);
- _register(&regs->port.is_bitmask, world, map, LV2_CORE_PREFIX"isBitmask");
-
- _register(&regs->port.float_protocol, world, map, LV2_UI_PREFIX"floatProtocol");
- _register(&regs->port.peak_protocol, world, map, LV2_UI_PREFIX"peakProtocol");
- _register(&regs->port.atom_transfer, world, map, LV2_ATOM__atomTransfer);
- _register(&regs->port.event_transfer, world, map, LV2_ATOM__eventTransfer);
- _register(&regs->port.notification, world, map, LV2_UI__portNotification);
-
- _register(&regs->port.minimum_size, world, map, LV2_RESIZE_PORT__minimumSize);
-
- _register(&regs->port.logarithmic, world, map, LV2_PORT_PROPS__logarithmic);
-
- _register(&regs->parameter.property, world, map, LV2_CORE_PREFIX"parameterProperty");
-
- _register(&regs->osc.message, world, map, LV2_OSC__Message);
- _register(&regs->osc.path, world, map, LV2_OSC__messagePath);
-
- _register(&regs->work.schedule, world, map, LV2_WORKER__schedule);
-
- _register(&regs->log.entry, world, map, LV2_LOG__Entry);
- _register(&regs->log.error, world, map, LV2_LOG__Error);
- _register(&regs->log.note, world, map, LV2_LOG__Note);
- _register(&regs->log.trace, world, map, LV2_LOG__Trace);
- _register(&regs->log.warning, world, map, LV2_LOG__Warning);
-
- _register(&regs->ui.window_title, world, map, LV2_UI__windowTitle);
- _register(&regs->ui.show_interface, world, map, LV2_UI__showInterface);
- _register(&regs->ui.idle_interface, world, map, LV2_UI__idleInterface);
- _register(&regs->ui.kx_widget, world, map, LV2_EXTERNAL_UI__Widget);
- _register(&regs->ui.external, world, map, LV2_EXTERNAL_UI_DEPRECATED_URI);
- _register(&regs->ui.x11, world, map, LV2_UI__X11UI);
- _register(&regs->ui.gtk2, world, map, LV2_UI__GtkUI);
- _register(&regs->ui.gtk3, world, map, LV2_UI__Gtk3UI);
- _register(&regs->ui.qt4, world, map, LV2_UI__Qt4UI);
- _register(&regs->ui.qt5, world, map, LV2_UI_PREFIX"Qt5UI");
- _register(&regs->ui.plugin, world, map, LV2_UI__plugin);
- _register(&regs->ui.protocol, world, map, LV2_UI_PREFIX"protocol");
- _register(&regs->ui.period_start, world, map, LV2_UI_PREFIX"periodStart");
- _register(&regs->ui.period_size, world, map, LV2_UI_PREFIX"periodSize");
- _register(&regs->ui.peak, world, map, LV2_UI_PREFIX"peak");
- _register(&regs->ui.port_subscribe, world, map, LV2_UI__portSubscribe);
- _register(&regs->ui.port_index, world, map, LV2_UI__portIndex);
- _register(&regs->ui.update_rate, world, map, LV2_UI__updateRate);
- _register(&regs->ui.instance_access, world, map, LV2_INSTANCE_ACCESS_URI);
- _register(&regs->ui.data_access, world, map, LV2_DATA_ACCESS_URI);
- _register(&regs->ui.ui, world, map, LV2_UI__ui);
-
-#ifndef LV2_PRESETS__bank
-# define LV2_PRESETS__bank LV2_PRESETS_PREFIX "bank"
-#endif
-#ifndef LV2_PRESETS__Bank
-# define LV2_PRESETS__Bank LV2_PRESETS_PREFIX "Bank"
-#endif
- _register(&regs->pset.preset, world, map, LV2_PRESETS__Preset);
- _register(&regs->pset.preset_bank, world, map, LV2_PRESETS__bank);
- _register(&regs->pset.bank, world, map, LV2_PRESETS__Bank);
-
- _register(&regs->rdf.value, world, map, LILV_NS_RDF"value");
- _register(&regs->rdf.type, world, map, LILV_NS_RDF"type");
- _register(&regs->rdf.subject, world, map, LILV_NS_RDF"subject");
-
- _register(&regs->rdfs.label, world, map, LILV_NS_RDFS"label");
- _register(&regs->rdfs.range, world, map, LILV_NS_RDFS"range");
- _register(&regs->rdfs.comment, world, map, LILV_NS_RDFS"comment");
- _register(&regs->rdfs.see_also, world, map, LILV_NS_RDFS"seeAlso");
-
- _register(&regs->doap.license, world, map, LILV_NS_DOAP"license");
- _register(&regs->doap.name, world, map, LILV_NS_DOAP"name");
-
- _register(&regs->core.optional_feature, world, map, LV2_CORE__optionalFeature);
- _register(&regs->core.required_feature, world, map, LV2_CORE__requiredFeature);
- _register(&regs->core.name, world, map, LV2_CORE__name);
- _register(&regs->core.minor_version, world, map, LV2_CORE__minorVersion);
- _register(&regs->core.micro_version, world, map, LV2_CORE__microVersion);
- _register(&regs->core.extension_data, world, map, LV2_CORE__extensionData);
- _register(&regs->core.control, world, map, LV2_CORE__control);
- _register(&regs->core.symbol, world, map, LV2_CORE__symbol);
- _register(&regs->core.index, world, map, LV2_CORE__index);
- _register(&regs->core.minimum, world, map, LV2_CORE__minimum);
- _register(&regs->core.maximum, world, map, LV2_CORE__maximum);
- _register(&regs->core.scale_point, world, map, LV2_CORE__scalePoint);
- _register(&regs->core.port, world, map, LV2_CORE__port);
- _register(&regs->core.Port, world, map, LV2_CORE__Port);
- _register(&regs->core.plugin, world, map, LV2_CORE__Plugin);
- _register(&regs->core.applies_to, world, map, LV2_CORE__appliesTo);
- _register(&regs->core.designation, world, map, LV2_CORE__designation);
-
- _register(&regs->param.sample_rate, world, map, LV2_PARAMETERS__sampleRate);
- _register(&regs->param.gain, world, map, LV2_PARAMETERS__gain);
-
- _register(&regs->bufsz.nominal_block_length, world, map, LV2_BUF_SIZE_PREFIX "nominalBlockLength");
- _register(&regs->bufsz.max_block_length, world, map, LV2_BUF_SIZE__maxBlockLength);
- _register(&regs->bufsz.min_block_length, world, map, LV2_BUF_SIZE__minBlockLength);
- _register(&regs->bufsz.sequence_size, world, map, LV2_BUF_SIZE__sequenceSize);
-
- _register(&regs->patch.writable, world, map, LV2_PATCH__writable);
- _register(&regs->patch.readable, world, map, LV2_PATCH__readable);
- _register(&regs->patch.message, world, map, LV2_PATCH__Message);
- _register(&regs->patch.set, world, map, LV2_PATCH__Set);
- _register(&regs->patch.get, world, map, LV2_PATCH__Get);
- _register(&regs->patch.subject, world, map, LV2_PATCH__subject);
- _register(&regs->patch.body, world, map, LV2_PATCH__body);
- _register(&regs->patch.property, world, map, LV2_PATCH__property);
- _register(&regs->patch.value, world, map, LV2_PATCH__value);
- _register(&regs->patch.wildcard, world, map, LV2_PATCH__wildcard);
- _register(&regs->patch.patch, world, map, LV2_PATCH__Patch);
- _register(&regs->patch.add, world, map, LV2_PATCH__add);
- _register(&regs->patch.remove, world, map, LV2_PATCH__remove);
- _register(&regs->patch.put, world, map, LV2_PATCH__Put);
- _register(&regs->patch.insert, world, map, LV2_PATCH_PREFIX "Insert");
- _register(&regs->patch.delete, world, map, LV2_PATCH_PREFIX "Delete");
- _register(&regs->patch.destination, world, map, LV2_PATCH__destination);
- _register(&regs->patch.copy, world, map, LV2_PATCH__Copy);
- _register(&regs->patch.move, world, map, LV2_PATCH__Move);
- _register(&regs->patch.sequence_number, world, map, LV2_PATCH__sequenceNumber);
- _register(&regs->patch.error, world, map, LV2_PATCH__Error);
- _register(&regs->patch.ack, world, map, LV2_PATCH__Ack);
-
- _register(&regs->xpress.message, world, map, "http://open-music-kontrollers.ch/lv2/xpress#Message");
-
- _register(&regs->canvas.graph, world, map, CANVAS__graph);
-
- _register(&regs->group.group, world, map, LV2_PORT_GROUPS__group);
- _register(&regs->group.left, world, map, LV2_PORT_GROUPS__left);
- _register(&regs->group.right, world, map, LV2_PORT_GROUPS__right);
- _register(&regs->group.center, world, map, LV2_PORT_GROUPS__center);
- _register(&regs->group.side, world, map, LV2_PORT_GROUPS__side);
- _register(&regs->group.center_left, world, map, LV2_PORT_GROUPS__centerLeft);
- _register(&regs->group.center_right, world, map, LV2_PORT_GROUPS__centerRight);
- _register(&regs->group.side_left, world, map, LV2_PORT_GROUPS__sideLeft);
- _register(&regs->group.side_right, world, map, LV2_PORT_GROUPS__sideRight);
- _register(&regs->group.rear_left, world, map, LV2_PORT_GROUPS__rearLeft);
- _register(&regs->group.rear_right, world, map, LV2_PORT_GROUPS__rearRight);
- _register(&regs->group.rear_center, world, map, LV2_PORT_GROUPS__rearCenter);
- _register(&regs->group.low_frequency_effects, world, map, LV2_PORT_GROUPS__lowFrequencyEffects);
-
- _register(&regs->units.conversion, world, map, LV2_UNITS__conversion);
- _register(&regs->units.prefixConversion, world, map, LV2_UNITS__prefixConversion);
- _register(&regs->units.render, world, map, LV2_UNITS__render);
- _register(&regs->units.symbol, world, map, LV2_UNITS__symbol);
- _register(&regs->units.unit, world, map, LV2_UNITS__unit);
- _register(&regs->units.Unit, world, map, LV2_UNITS__Unit);
- _register(&regs->units.bar, world, map, LV2_UNITS__bar);
- _register(&regs->units.beat, world, map, LV2_UNITS__beat);
- _register(&regs->units.bpm, world, map, LV2_UNITS__bpm);
- _register(&regs->units.cent, world, map, LV2_UNITS__cent);
- _register(&regs->units.cm, world, map, LV2_UNITS__cm);
- _register(&regs->units.coef, world, map, LV2_UNITS__coef);
- _register(&regs->units.db, world, map, LV2_UNITS__db);
- _register(&regs->units.degree, world, map, LV2_UNITS__degree);
- _register(&regs->units.frame, world, map, LV2_UNITS__frame);
- _register(&regs->units.hz, world, map, LV2_UNITS__hz);
- _register(&regs->units.inch, world, map, LV2_UNITS__inch);
- _register(&regs->units.khz, world, map, LV2_UNITS__khz);
- _register(&regs->units.km, world, map, LV2_UNITS__km);
- _register(&regs->units.m, world, map, LV2_UNITS__m);
- _register(&regs->units.mhz, world, map, LV2_UNITS__mhz);
- _register(&regs->units.midiNote, world, map, LV2_UNITS__midiNote);
- _register(&regs->units.midiController, world, map, LV2_UNITS_PREFIX"midiController");
- _register(&regs->units.mile, world, map, LV2_UNITS__mile);
- _register(&regs->units.min, world, map, LV2_UNITS__min);
- _register(&regs->units.mm, world, map, LV2_UNITS__mm);
- _register(&regs->units.ms, world, map, LV2_UNITS__ms);
- _register(&regs->units.oct, world, map, LV2_UNITS__oct);
- _register(&regs->units.pc, world, map, LV2_UNITS__pc);
- _register(&regs->units.s, world, map, LV2_UNITS__s);
- _register(&regs->units.semitone12TET, world, map, LV2_UNITS__semitone12TET);
-
- _register(&regs->state.state, world, map, LV2_STATE__state);
- _register(&regs->state.load_default_state, world, map, LV2_STATE__loadDefaultState);
-#ifndef LV2_STATE__threadSafeRestore
-# define LV2_STATE__threadSafeRestore LV2_STATE_PREFIX "threadSafeRestore"
-#endif
- _register(&regs->state.thread_safe_restore, world, map, LV2_STATE__threadSafeRestore);
-
- _register(&regs->synthpod.payload, world, map, SYNTHPOD_PREFIX"payload");
- _register_string(&regs->synthpod.state, world, map, "state.ttl");
- _register(&regs->synthpod.graph, world, map, SYNTHPOD_PREFIX"graph");
- _register_string(&regs->synthpod.null, world, map, "");
- _register(&regs->synthpod.stereo, world, map, SYNTHPOD_PREFIX"stereo");
- _register(&regs->synthpod.monoatom, world, map, SYNTHPOD_PREFIX"monoatom");
- _register(&regs->synthpod.module_list, world, map, SYNTHPOD_PREFIX"moduleList");
- _register(&regs->synthpod.module_supported, world, map, SYNTHPOD_PREFIX"moduleSupported");
- _register(&regs->synthpod.module_add, world, map, SYNTHPOD_PREFIX"moduleAdd");
- _register(&regs->synthpod.module_del, world, map, SYNTHPOD_PREFIX"moduleDel");
- _register(&regs->synthpod.module_move, world, map, SYNTHPOD_PREFIX"moduleMove");
- _register(&regs->synthpod.module_preset_load, world, map, SYNTHPOD_PREFIX"modulePresetLoad");
- _register(&regs->synthpod.module_preset_save, world, map, SYNTHPOD_PREFIX"modulePresetSave");
- _register(&regs->synthpod.module_visible, world, map, SYNTHPOD_PREFIX"moduleVisible");
- _register(&regs->synthpod.module_disabled, world, map, SYNTHPOD_PREFIX"moduleDisabled");
- _register(&regs->synthpod.module_profiling, world, map, SYNTHPOD_PREFIX"moduleProfiling");
- _register(&regs->synthpod.module_position_x, world, map, SYNTHPOD_PREFIX"modulePositionX");
- _register(&regs->synthpod.module_position_y, world, map, SYNTHPOD_PREFIX"modulePositionY");
- _register(&regs->synthpod.module_alias, world, map, SYNTHPOD_PREFIX"moduleAlias");
- _register(&regs->synthpod.module_reinstantiate, world, map, SYNTHPOD_PREFIX"moduleReinstantiate");
- _register(&regs->synthpod.module_created, world, map, SYNTHPOD_PREFIX"moduleCreated");
- _register(&regs->synthpod.node_position_x, world, map, SYNTHPOD_PREFIX"nodePositionX");
- _register(&regs->synthpod.node_position_y, world, map, SYNTHPOD_PREFIX"nodePositionY");
- _register(&regs->synthpod.graph_position_x, world, map, SYNTHPOD_PREFIX"graphPositionX");
- _register(&regs->synthpod.graph_position_y, world, map, SYNTHPOD_PREFIX"graphPositionY");
- _register(&regs->synthpod.column_enabled, world, map, SYNTHPOD_PREFIX"columnEnabled");
- _register(&regs->synthpod.row_enabled, world, map, SYNTHPOD_PREFIX"rowEnabled");
- _register(&regs->synthpod.port_refresh, world, map, SYNTHPOD_PREFIX"portRefresh");
- _register(&regs->synthpod.bundle_load, world, map, SYNTHPOD_PREFIX"bundleLoad");
- _register(&regs->synthpod.bundle_save, world, map, SYNTHPOD_PREFIX"bundleSave");
- _register(&regs->synthpod.path_get, world, map, SYNTHPOD_PREFIX"pathGet");
- _register(&regs->synthpod.dsp_profiling, world, map, SYNTHPOD_PREFIX"DSPProfiling");
- _register(&regs->synthpod.cpus_available, world, map, SYNTHPOD_PREFIX"CPUsAvailable");
- _register(&regs->synthpod.cpus_used, world, map, SYNTHPOD_PREFIX"CPUsUsed");
- _register(&regs->synthpod.period_size, world, map, SYNTHPOD_PREFIX"periodSize");
- _register(&regs->synthpod.num_periods, world, map, SYNTHPOD_PREFIX"numPeriods");
- _register(&regs->synthpod.quit, world, map, SYNTHPOD_PREFIX"quit");
-
- _register(&regs->synthpod.system_ports, world, map, SYNTHPOD_PREFIX"systemPorts");
- _register(&regs->synthpod.control_port, world, map, SYNTHPOD_PREFIX"ControlPort");
- _register(&regs->synthpod.audio_port, world, map, SYNTHPOD_PREFIX"AudioPort");
- _register(&regs->synthpod.cv_port, world, map, SYNTHPOD_PREFIX"CVPort");
- _register(&regs->synthpod.midi_port, world, map, SYNTHPOD_PREFIX"MIDIPort");
- _register(&regs->synthpod.osc_port, world, map, SYNTHPOD_PREFIX"OSCPort");
- _register(&regs->synthpod.com_port, world, map, SYNTHPOD_PREFIX"ComPort");
-
- _register(&regs->synthpod.connection_list, world, map, SYNTHPOD_PREFIX"connectionList");
- _register(&regs->synthpod.node_list, world, map, SYNTHPOD_PREFIX"nodeList");
- _register(&regs->synthpod.subscription_list, world, map, SYNTHPOD_PREFIX"subscriptionList");
- _register(&regs->synthpod.notification_list, world, map, SYNTHPOD_PREFIX"notificationList");
- _register(&regs->synthpod.automation_list, world, map, SYNTHPOD_PREFIX"automationList");
-
- _register(&regs->synthpod.source_module, world, map, SYNTHPOD_PREFIX"sourceModule");
- _register(&regs->synthpod.source_symbol, world, map, SYNTHPOD_PREFIX"sourceSymbol");
- _register(&regs->synthpod.sink_module, world, map, SYNTHPOD_PREFIX"sinkModule");
- _register(&regs->synthpod.sink_symbol, world, map, SYNTHPOD_PREFIX"sinkSymbol");
-
- _register(&regs->synthpod.source_min, world, map, SYNTHPOD_PREFIX"sourceMinimum");
- _register(&regs->synthpod.source_max, world, map, SYNTHPOD_PREFIX"sourceMaximum");
- _register(&regs->synthpod.sink_min, world, map, SYNTHPOD_PREFIX"sinkMinimum");
- _register(&regs->synthpod.sink_max, world, map, SYNTHPOD_PREFIX"sinkMaximum");
-
- _register(&regs->synthpod.source_enabled, world, map, SYNTHPOD_PREFIX"sourceEnabled");
- _register(&regs->synthpod.sink_enabled, world, map, SYNTHPOD_PREFIX"sinkEnabled");
- _register(&regs->synthpod.learning, world, map, SYNTHPOD_PREFIX"learning");
-
- _register(&regs->synthpod.placeholder, world, map, SYNTHPOD_PREFIX"placeholder");
- _register(&regs->synthpod.visibility, world, map, SYNTHPOD_PREFIX"visibility");
-
- _register(&regs->midi.Controller, world, map, LV2_MIDI__Controller);
- _register(&regs->midi.channel, world, map, LV2_MIDI__channel);
- _register(&regs->midi.controller_number, world, map, LV2_MIDI__controllerNumber);
-
- _register(&regs->idisp.surface, world, map, LV2_INLINEDISPLAY_PREFIX"surface");
-}
+typedef int32_t u_id_t;
static inline void
-sp_regs_deinit(reg_t *regs)
+sp_regs_init(LilvNode **nodes, LilvWorld *world)
{
- _unregister(&regs->port.input);
- _unregister(&regs->port.output);
-
- _unregister(&regs->port.control);
- _unregister(&regs->port.audio);
- _unregister(&regs->port.cv);
- _unregister(&regs->port.atom);
-
- _unregister(&regs->port.sequence);
- _unregister(&regs->port.midi);
- _unregister(&regs->port.osc_event);
- _unregister(&regs->port.time_position);
-
- _unregister(&regs->port.integer);
- _unregister(&regs->port.enumeration);
- _unregister(&regs->port.toggled);
- _unregister(&regs->port.is_bitmask);
-
- _unregister(&regs->port.float_protocol);
- _unregister(&regs->port.peak_protocol);
- _unregister(&regs->port.atom_transfer);
- _unregister(&regs->port.event_transfer);
- _unregister(&regs->port.notification);
-
- _unregister(&regs->port.minimum_size);
-
- _unregister(&regs->port.logarithmic);
-
- _unregister(&regs->parameter.property);
-
- _unregister(&regs->osc.message);
- _unregister(&regs->osc.path);
-
- _unregister(&regs->work.schedule);
-
- _unregister(&regs->log.entry);
- _unregister(&regs->log.error);
- _unregister(&regs->log.note);
- _unregister(&regs->log.trace);
- _unregister(&regs->log.warning);
-
- _unregister(&regs->ui.window_title);
- _unregister(&regs->ui.show_interface);
- _unregister(&regs->ui.idle_interface);
- _unregister(&regs->ui.kx_widget);
- _unregister(&regs->ui.external);
- _unregister(&regs->ui.x11);
- _unregister(&regs->ui.gtk2);
- _unregister(&regs->ui.gtk3);
- _unregister(&regs->ui.qt4);
- _unregister(&regs->ui.qt5);
- _unregister(&regs->ui.plugin);
- _unregister(&regs->ui.protocol);
- _unregister(&regs->ui.period_start);
- _unregister(&regs->ui.period_size);
- _unregister(&regs->ui.peak);
- _unregister(&regs->ui.port_subscribe);
- _unregister(&regs->ui.port_index);
- _unregister(&regs->ui.update_rate);
- _unregister(&regs->ui.instance_access);
- _unregister(&regs->ui.data_access);
- _unregister(&regs->ui.ui);
-
- _unregister(&regs->pset.preset);
- _unregister(&regs->pset.preset_bank);
- _unregister(&regs->pset.bank);
-
- _unregister(&regs->rdf.value);
- _unregister(&regs->rdf.type);
- _unregister(&regs->rdf.subject);
-
- _unregister(&regs->rdfs.label);
- _unregister(&regs->rdfs.range);
- _unregister(&regs->rdfs.comment);
- _unregister(&regs->rdfs.see_also);
-
- _unregister(&regs->doap.license);
- _unregister(&regs->doap.name);
-
- _unregister(&regs->core.optional_feature);
- _unregister(&regs->core.required_feature);
- _unregister(&regs->core.name);
- _unregister(&regs->core.minor_version);
- _unregister(&regs->core.micro_version);
- _unregister(&regs->core.extension_data);
- _unregister(&regs->core.control);
- _unregister(&regs->core.symbol);
- _unregister(&regs->core.index);
- _unregister(&regs->core.minimum);
- _unregister(&regs->core.maximum);
- _unregister(&regs->core.scale_point);
- _unregister(&regs->core.port);
- _unregister(&regs->core.Port);
- _unregister(&regs->core.plugin);
- _unregister(&regs->core.applies_to);
- _unregister(&regs->core.designation);
-
- _unregister(&regs->param.sample_rate);
- _unregister(&regs->param.gain);
-
- _unregister(&regs->bufsz.nominal_block_length);
- _unregister(&regs->bufsz.max_block_length);
- _unregister(&regs->bufsz.min_block_length);
- _unregister(&regs->bufsz.sequence_size);
-
- _unregister(&regs->patch.writable);
- _unregister(&regs->patch.readable);
- _unregister(&regs->patch.message);
- _unregister(&regs->patch.set);
- _unregister(&regs->patch.get);
- _unregister(&regs->patch.subject);
- _unregister(&regs->patch.body);
- _unregister(&regs->patch.property);
- _unregister(&regs->patch.value);
- _unregister(&regs->patch.wildcard);
- _unregister(&regs->patch.patch);
- _unregister(&regs->patch.add);
- _unregister(&regs->patch.remove);
- _unregister(&regs->patch.put);
- _unregister(&regs->patch.insert);
- _unregister(&regs->patch.delete);
- _unregister(&regs->patch.destination);
- _unregister(&regs->patch.copy);
- _unregister(&regs->patch.move);
- _unregister(&regs->patch.sequence_number);
- _unregister(&regs->patch.error);
- _unregister(&regs->patch.ack);
-
- _unregister(&regs->xpress.message);
-
- _unregister(&regs->canvas.graph);
-
- _unregister(&regs->group.group);
- _unregister(&regs->group.left);
- _unregister(&regs->group.right);
- _unregister(&regs->group.center);
- _unregister(&regs->group.side);
- _unregister(&regs->group.center_left);
- _unregister(&regs->group.center_right);
- _unregister(&regs->group.side_left);
- _unregister(&regs->group.side_right);
- _unregister(&regs->group.rear_left);
- _unregister(&regs->group.rear_right);
- _unregister(&regs->group.rear_center);
- _unregister(&regs->group.low_frequency_effects);
-
- _unregister(&regs->units.conversion);
- _unregister(&regs->units.prefixConversion);
- _unregister(&regs->units.render);
- _unregister(&regs->units.symbol);
- _unregister(&regs->units.unit);
- _unregister(&regs->units.Unit);
- _unregister(&regs->units.bar);
- _unregister(&regs->units.beat);
- _unregister(&regs->units.bpm);
- _unregister(&regs->units.cent);
- _unregister(&regs->units.cm);
- _unregister(&regs->units.coef);
- _unregister(&regs->units.db);
- _unregister(&regs->units.degree);
- _unregister(&regs->units.frame);
- _unregister(&regs->units.hz);
- _unregister(&regs->units.inch);
- _unregister(&regs->units.khz);
- _unregister(&regs->units.km);
- _unregister(&regs->units.m);
- _unregister(&regs->units.mhz);
- _unregister(&regs->units.midiNote);
- _unregister(&regs->units.midiController);
- _unregister(&regs->units.mile);
- _unregister(&regs->units.min);
- _unregister(&regs->units.mm);
- _unregister(&regs->units.ms);
- _unregister(&regs->units.oct);
- _unregister(&regs->units.pc);
- _unregister(&regs->units.s);
- _unregister(&regs->units.semitone12TET);
-
- _unregister(&regs->state.state);
- _unregister(&regs->state.load_default_state);
- _unregister(&regs->state.thread_safe_restore);
-
- _unregister(&regs->synthpod.payload);
- _unregister(&regs->synthpod.state);
- _unregister(&regs->synthpod.graph);
- _unregister(&regs->synthpod.null);
- _unregister(&regs->synthpod.stereo);
- _unregister(&regs->synthpod.monoatom);
- _unregister(&regs->synthpod.module_list);
- _unregister(&regs->synthpod.module_supported);
- _unregister(&regs->synthpod.module_add);
- _unregister(&regs->synthpod.module_del);
- _unregister(&regs->synthpod.module_move);
- _unregister(&regs->synthpod.module_preset_load);
- _unregister(&regs->synthpod.module_preset_save);
- _unregister(&regs->synthpod.module_visible);
- _unregister(&regs->synthpod.module_disabled);
- _unregister(&regs->synthpod.module_profiling);
- _unregister(&regs->synthpod.module_position_x);
- _unregister(&regs->synthpod.module_position_y);
- _unregister(&regs->synthpod.module_alias);
- _unregister(&regs->synthpod.module_reinstantiate);
- _unregister(&regs->synthpod.module_created);
- _unregister(&regs->synthpod.node_position_x);
- _unregister(&regs->synthpod.node_position_y);
- _unregister(&regs->synthpod.graph_position_x);
- _unregister(&regs->synthpod.graph_position_y);
- _unregister(&regs->synthpod.column_enabled);
- _unregister(&regs->synthpod.row_enabled);
- _unregister(&regs->synthpod.port_refresh);
- _unregister(&regs->synthpod.bundle_load);
- _unregister(&regs->synthpod.bundle_save);
- _unregister(&regs->synthpod.path_get);
- _unregister(&regs->synthpod.dsp_profiling);
- _unregister(&regs->synthpod.cpus_available);
- _unregister(&regs->synthpod.cpus_used);
- _unregister(&regs->synthpod.period_size);
- _unregister(&regs->synthpod.num_periods);
- _unregister(&regs->synthpod.quit);
-
- _unregister(&regs->synthpod.system_ports);
- _unregister(&regs->synthpod.control_port);
- _unregister(&regs->synthpod.audio_port);
- _unregister(&regs->synthpod.cv_port);
- _unregister(&regs->synthpod.midi_port);
- _unregister(&regs->synthpod.osc_port);
- _unregister(&regs->synthpod.com_port);
-
- _unregister(&regs->synthpod.connection_list);
- _unregister(&regs->synthpod.node_list);
- _unregister(&regs->synthpod.subscription_list);
- _unregister(&regs->synthpod.notification_list);
- _unregister(&regs->synthpod.automation_list);
-
- _unregister(&regs->synthpod.source_module);
- _unregister(&regs->synthpod.source_symbol);
- _unregister(&regs->synthpod.sink_module);
- _unregister(&regs->synthpod.sink_symbol);
-
- _unregister(&regs->synthpod.source_min);
- _unregister(&regs->synthpod.source_max);
- _unregister(&regs->synthpod.sink_min);
- _unregister(&regs->synthpod.sink_max);
-
- _unregister(&regs->synthpod.source_enabled);
- _unregister(&regs->synthpod.sink_enabled);
- _unregister(&regs->synthpod.learning);
-
- _unregister(&regs->synthpod.placeholder);
- _unregister(&regs->synthpod.visibility);
-
- _unregister(&regs->midi.Controller);
- _unregister(&regs->midi.channel);
- _unregister(&regs->midi.controller_number);
-
- _unregister(&regs->idisp.surface);
-}
-
-#if 0
-#define _ATOM_ALIGNED __attribute__((aligned(8)))
-
-// app <-> ui communication for module/port manipulations
-typedef struct _transmit_t transmit_t;
-typedef struct _transmit_module_list_t transmit_module_list_t;
-typedef struct _transmit_module_supported_t transmit_module_supported_t;
-typedef struct _transmit_module_add_t transmit_module_add_t;
-typedef struct _transmit_module_del_t transmit_module_del_t;
-typedef struct _transmit_module_move_t transmit_module_move_t;
-typedef struct _transmit_module_preset_load_t transmit_module_preset_load_t;
-typedef struct _transmit_module_preset_save_t transmit_module_preset_save_t;
-typedef struct _transmit_module_selected_t transmit_module_selected_t;
-typedef struct _transmit_module_embedded_t transmit_module_embedded_t;
-typedef struct _transmit_module_visible_t transmit_module_visible_t;
-typedef struct _transmit_module_disabled_t transmit_module_disabled_t;
-typedef struct _transmit_module_profiling_t transmit_module_profiling_t;
-typedef struct _transmit_port_connected_t transmit_port_connected_t;
-typedef struct _transmit_port_subscribed_t transmit_port_subscribed_t;
-typedef struct _transmit_port_monitored_t transmit_port_monitored_t;
-typedef struct _transmit_port_refresh_t transmit_port_refresh_t;
-typedef struct _transmit_port_selected_t transmit_port_selected_t;
-typedef struct _transmit_bundle_load_t transmit_bundle_load_t;
-typedef struct _transmit_bundle_save_t transmit_bundle_save_t;
-typedef struct _transmit_path_get_t transmit_path_get_t;
-typedef struct _transmit_dsp_profiling_t transmit_dsp_profiling_t;
-typedef struct _transmit_grid_cols_t transmit_grid_cols_t;
-typedef struct _transmit_grid_rows_t transmit_grid_rows_t;
-typedef struct _transmit_pane_left_t transmit_pane_left_t;
-typedef struct _transmit_quit_t transmit_quit_t;
-
-struct _transmit_t {
- LV2_Atom_Object obj _ATOM_ALIGNED;
- LV2_Atom_Property_Body prop _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_list_t {
- transmit_t transmit _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_supported_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
- LV2_Atom_String uri _ATOM_ALIGNED;
- char uri_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_add_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_String uri _ATOM_ALIGNED;
- char uri_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_del_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_move_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int prev _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_preset_load_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_String uri _ATOM_ALIGNED;
- char uri_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_preset_save_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_String label _ATOM_ALIGNED;
- char label_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_selected_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_embedded_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_visible_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
- LV2_Atom_URID urid _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_disabled_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_module_profiling_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Float min _ATOM_ALIGNED;
- LV2_Atom_Float avg _ATOM_ALIGNED;
- LV2_Atom_Float max _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_port_connected_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int src_uid _ATOM_ALIGNED;
- LV2_Atom_Int src_port _ATOM_ALIGNED;
- LV2_Atom_Int snk_uid _ATOM_ALIGNED;
- LV2_Atom_Int snk_port _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
- LV2_Atom_Int indirect _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_port_subscribed_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int port _ATOM_ALIGNED;
- LV2_Atom_URID prot _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_port_monitored_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int port _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_port_refresh_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int port _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_port_selected_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int port _ATOM_ALIGNED;
- LV2_Atom_Int state _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_bundle_load_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int status _ATOM_ALIGNED;
- LV2_Atom_String path _ATOM_ALIGNED;
- char path_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_bundle_save_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int status _ATOM_ALIGNED;
- LV2_Atom_String path _ATOM_ALIGNED;
- char path_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_path_get_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_String path _ATOM_ALIGNED;
- char path_str [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_dsp_profiling_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Float min _ATOM_ALIGNED;
- LV2_Atom_Float avg _ATOM_ALIGNED;
- LV2_Atom_Float max _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_grid_cols_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int cols _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_grid_rows_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int rows _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_pane_left_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Float left _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transmit_quit_t {
- transmit_t transmit _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-// app <-> ui communication for port notifications
-typedef struct _transfer_t transfer_t;
-typedef struct _transfer_float_t transfer_float_t;
-typedef struct _transfer_peak_t transfer_peak_t;
-typedef struct _transfer_atom_t transfer_atom_t;
-typedef struct _transfer_patch_set_obj_t transfer_patch_set_obj_t;
-typedef struct _transfer_patch_get_t transfer_patch_get_t;
-typedef struct _transfer_patch_get_all_t transfer_patch_get_all_t;
-
-struct _transfer_t {
- transmit_t transmit _ATOM_ALIGNED;
- LV2_Atom_Int uid _ATOM_ALIGNED;
- LV2_Atom_Int port _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_float_t {
- transfer_t transfer _ATOM_ALIGNED;
- LV2_Atom_Float value _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_peak_t {
- transfer_t transfer _ATOM_ALIGNED;
- LV2_Atom_Int period_start _ATOM_ALIGNED;
- LV2_Atom_Int period_size _ATOM_ALIGNED;
- LV2_Atom_Float peak _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_atom_t {
- transfer_t transfer _ATOM_ALIGNED;
- LV2_Atom atom [0] _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_patch_set_obj_t {
- LV2_Atom_Object obj _ATOM_ALIGNED;
- LV2_Atom_Property_Body subj _ATOM_ALIGNED;
- LV2_URID subj_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body seq _ATOM_ALIGNED;
- int32_t seq_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body prop _ATOM_ALIGNED;
- LV2_URID prop_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body dest _ATOM_ALIGNED;
- LV2_URID dest_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body val _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_patch_get_t {
- transfer_t transfer _ATOM_ALIGNED;
- LV2_Atom_Object obj _ATOM_ALIGNED;
- LV2_Atom_Property_Body subj _ATOM_ALIGNED;
- LV2_URID subj_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body seq _ATOM_ALIGNED;
- int32_t seq_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body prop _ATOM_ALIGNED;
- LV2_URID prop_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body dest _ATOM_ALIGNED;
- LV2_URID dest_val _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-struct _transfer_patch_get_all_t {
- transfer_t transfer _ATOM_ALIGNED;
- LV2_Atom_Object obj _ATOM_ALIGNED;
- LV2_Atom_Property_Body subj _ATOM_ALIGNED;
- LV2_URID subj_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body seq _ATOM_ALIGNED;
- int32_t seq_val _ATOM_ALIGNED;
- LV2_Atom_Property_Body dest _ATOM_ALIGNED;
- LV2_URID dest_val _ATOM_ALIGNED;
-} _ATOM_ALIGNED;
-
-static inline void
-_sp_transmit_fill(reg_t *regs, LV2_Atom_Forge *forge, transmit_t *trans, uint32_t size,
- LV2_URID protocol)
-{
- trans = ASSUME_ALIGNED(trans);
-
- trans->obj.atom.size = size - sizeof(LV2_Atom);
- trans->obj.atom.type = forge->Object;
- trans->obj.body.id = 0;
- trans->obj.body.otype = protocol;
-
- trans->prop.key = regs->synthpod.payload.urid;
- trans->prop.context = 0;
- trans->prop.value.size = size - sizeof(transmit_t);
- trans->prop.value.type = forge->Tuple;
-}
-
-static inline void
-_sp_transmit_module_list_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_list_t *trans, uint32_t size)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_list.urid);
-}
-
-static inline void
-_sp_transmit_module_supported_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_supported_t *trans, uint32_t size,
- int32_t state, const char *module_uri)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_supported.urid);
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-
- if(module_uri)
+ for(unsigned i = 1; i < STAT_URID_MAX; i++)
{
- trans->uri.atom.size = strlen(module_uri) + 1;
- strcpy(trans->uri_str, module_uri);
+ switch(i)
+ {
+ case SYNTHPOD__state:
+ // fall-through
+ case SYNTHPOD__null:
+ {
+ nodes[i] = lilv_new_string(world, stat_uris[i]);
+ } break;
+
+ default:
+ {
+ nodes[i] = lilv_new_uri(world, stat_uris[i]);
+ } break;
+ }
}
- else
- trans->uri.atom.size = 0;
- trans->uri.atom.type = forge->String;
}
static inline void
-_sp_transmit_module_add_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_add_t *trans, uint32_t size,
- u_id_t module_uid, const char *module_uri)
+sp_regs_deinit(LilvNode **nodes)
{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_add.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- if(module_uri)
+ for(unsigned i = 1; i < STAT_URID_MAX; i++)
{
- trans->uri.atom.size = strlen(module_uri) + 1;
- strcpy(trans->uri_str, module_uri);
+ lilv_node_free(nodes[i]);
}
- else
- trans->uri.atom.size = 0;
- trans->uri.atom.type = forge->String;
-}
-
-static inline void
-_sp_transmit_module_del_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_del_t *trans, uint32_t size, u_id_t module_uid)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_del.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-}
-
-static inline void
-_sp_transmit_module_move_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_move_t *trans, uint32_t size, u_id_t module_uid, u_id_t prev_uid)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_move.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->prev.atom.size = sizeof(int32_t);
- trans->prev.atom.type = forge->Int;
- trans->prev.body = prev_uid;
-}
-
-static inline void
-_sp_transmit_module_preset_load_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_preset_load_t *trans, uint32_t size, u_id_t module_uid, const char *uri)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_preset_load.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->uri.atom.size = uri
- ? strlen(uri) + 1
- : 0;
- trans->uri.atom.type = forge->String;
-
- if(uri)
- strcpy(trans->uri_str, uri);
}
-static inline void
-_sp_transmit_module_preset_save_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_preset_save_t *trans, uint32_t size, u_id_t module_uid, const char *label)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_preset_save.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->label.atom.size = label
- ? strlen(label) + 1
- : 0;
- trans->label.atom.type = forge->String;
-
- if(label)
- strcpy(trans->label_str, label);
-}
-
-static inline void
-_sp_transmit_module_selected_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_selected_t *trans, uint32_t size, u_id_t module_uid, int state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_selected.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-}
-
-static inline void
-_sp_transmit_module_embedded_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_embedded_t *trans, uint32_t size, u_id_t module_uid, int state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_embedded.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-}
-
-static inline void
-_sp_transmit_module_visible_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_visible_t *trans, uint32_t size, u_id_t module_uid,
- int state, LV2_URID urid)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_visible.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-
- trans->urid.atom.size = sizeof(uint32_t);
- trans->urid.atom.type = forge->URID;
- trans->urid.body = urid;
-}
-
-static inline void
-_sp_transmit_module_disabled_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_disabled_t *trans, uint32_t size, u_id_t module_uid, int state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_disabled.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-}
-
-static inline void
-_sp_transmit_module_profiling_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_module_profiling_t *trans, uint32_t size, u_id_t module_uid,
- float min, float avg, float max)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.module_profiling.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->min.atom.size = sizeof(float);
- trans->min.atom.type = forge->Float;
- trans->min.body = min;
-
- trans->avg.atom.size = sizeof(float);
- trans->avg.atom.type = forge->Float;
- trans->avg.body = avg;
-
- trans->max.atom.size = sizeof(float);
- trans->max.atom.type = forge->Float;
- trans->max.body = max;
-}
-
-static inline void
-_sp_transmit_port_connected_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_port_connected_t *trans, uint32_t size, u_id_t src_uid,
- uint32_t src_port, u_id_t snk_uid, uint32_t snk_port, int32_t state, int32_t indirect)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.port_connected.urid);
-
- trans->src_uid.atom.size = sizeof(int32_t);
- trans->src_uid.atom.type = forge->Int;
- trans->src_uid.body = src_uid;
-
- trans->src_port.atom.size = sizeof(int32_t);
- trans->src_port.atom.type = forge->Int;
- trans->src_port.body = src_port;
-
- trans->snk_uid.atom.size = sizeof(int32_t);
- trans->snk_uid.atom.type = forge->Int;
- trans->snk_uid.body = snk_uid;
-
- trans->snk_port.atom.size = sizeof(int32_t);
- trans->snk_port.atom.type = forge->Int;
- trans->snk_port.body = snk_port;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state; // -1 (query), 0 (disconnected), 1 (connected)
-
- trans->indirect.atom.size = sizeof(int32_t);
- trans->indirect.atom.type = forge->Int;
- trans->indirect.body = indirect; // -1 (feedback), 0 (direct), 1 (indirect)
-}
-
-static inline void
-_sp_transmit_port_subscribed_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_port_subscribed_t *trans, uint32_t size,
- u_id_t module_uid, uint32_t port_index, LV2_URID prot, int32_t state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.port_subscribed.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->port.atom.size = sizeof(int32_t);
- trans->port.atom.type = forge->Int;
- trans->port.body = port_index;
-
- trans->prot.atom.size = sizeof(LV2_URID);
- trans->prot.atom.type = forge->URID;
- trans->prot.body = prot;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state; // -1 (query), 0 (disconnected), 1 (connected)
-}
-
-static inline void
-_sp_transmit_port_monitored_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_port_monitored_t *trans, uint32_t size,
- u_id_t module_uid, uint32_t port_index, int32_t state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.port_monitored.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->port.atom.size = sizeof(int32_t);
- trans->port.atom.type = forge->Int;
- trans->port.body = port_index;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state; // -1 (query), 0 (not monitored), 1 (monitored)
-}
-
-static inline void
-_sp_transmit_port_refresh_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_port_refresh_t *trans, uint32_t size,
- u_id_t module_uid, uint32_t port_index)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.port_refresh.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->port.atom.size = sizeof(int32_t);
- trans->port.atom.type = forge->Int;
- trans->port.body = port_index;
-}
-
-static inline void
-_sp_transmit_port_selected_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_port_selected_t *trans, uint32_t size,
- u_id_t module_uid, uint32_t port_index, int32_t state)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.port_selected.urid);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->port.atom.size = sizeof(int32_t);
- trans->port.atom.type = forge->Int;
- trans->port.body = port_index;
-
- trans->state.atom.size = sizeof(int32_t);
- trans->state.atom.type = forge->Int;
- trans->state.body = state;
-}
-
-static inline void
-_sp_transmit_bundle_load_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_bundle_load_t *trans, uint32_t size,
- int32_t status, const char *bundle_path)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.bundle_load.urid);
-
- trans->status.atom.size = sizeof(int32_t);
- trans->status.atom.type = forge->Int;
- trans->status.body = status;
-
- trans->path.atom.size = bundle_path
- ? strlen(bundle_path) + 1
- : 0;
- trans->path.atom.type = forge->String;
-
- if(bundle_path)
- strcpy(trans->path_str, bundle_path);
-}
-
-static inline void
-_sp_transmit_bundle_save_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_bundle_save_t *trans, uint32_t size,
- int32_t status, const char *bundle_path)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.bundle_save.urid);
-
- trans->status.atom.size = sizeof(int32_t);
- trans->status.atom.type = forge->Int;
- trans->status.body = status;
-
- trans->path.atom.size = bundle_path
- ? strlen(bundle_path) + 1
- : 0;
- trans->path.atom.type = forge->String;
-
- if(bundle_path)
- strcpy(trans->path_str, bundle_path);
-}
-
-static inline void
-_sp_transmit_path_get_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_path_get_t *trans, uint32_t size,
- const char *bundle_path)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.path_get.urid);
-
- trans->path.atom.size = bundle_path
- ? strlen(bundle_path) + 1
- : 0;
- trans->path.atom.type = forge->String;
-
- if(bundle_path)
- strcpy(trans->path_str, bundle_path);
-}
-
-static inline void
-_sp_transmit_dsp_profiling_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_dsp_profiling_t *trans, uint32_t size,
- float min, float avg, float max)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.dsp_profiling.urid);
-
- trans->min.atom.size = sizeof(float);
- trans->min.atom.type = forge->Float;
- trans->min.body = min;
-
- trans->avg.atom.size = sizeof(float);
- trans->avg.atom.type = forge->Float;
- trans->avg.body = avg;
-
- trans->max.atom.size = sizeof(float);
- trans->max.atom.type = forge->Float;
- trans->max.body = max;
-}
-
-static inline void
-_sp_transmit_grid_cols_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_grid_cols_t *trans, uint32_t size, int32_t cols)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.grid_cols.urid);
-
- trans->cols.atom.size = sizeof(int32_t);
- trans->cols.atom.type = forge->Int;
- trans->cols.body = cols;
-}
-
-static inline void
-_sp_transmit_grid_rows_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_grid_rows_t *trans, uint32_t size, int32_t rows)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.grid_rows.urid);
-
- trans->rows.atom.size = sizeof(int32_t);
- trans->rows.atom.type = forge->Int;
- trans->rows.body = rows;
-}
-
-static inline void
-_sp_transmit_pane_left_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_pane_left_t *trans, uint32_t size, float left)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.pane_left.urid);
-
- trans->left.atom.size = sizeof(float);
- trans->left.atom.type = forge->Float;
- trans->left.body = left;
-}
-
-static inline void
-_sp_transmit_quit_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transmit_quit_t *trans, uint32_t size)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- regs->synthpod.quit.urid);
-}
-
-static inline void
-_sp_transfer_fill(reg_t *regs, LV2_Atom_Forge *forge, transfer_t *trans, uint32_t size,
- LV2_URID protocol, u_id_t module_uid, uint32_t port_index)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transmit_fill(regs, forge, &trans->transmit, size,
- protocol);
-
- trans->uid.atom.size = sizeof(int32_t);
- trans->uid.atom.type = forge->Int;
- trans->uid.body = module_uid;
-
- trans->port.atom.size = sizeof(int32_t);
- trans->port.atom.type = forge->Int;
- trans->port.body = port_index;
-}
-
-static inline void
-_sp_transfer_float_fill(reg_t *regs, LV2_Atom_Forge *forge, transfer_float_t *trans,
- u_id_t module_uid, uint32_t port_index, const float *value)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transfer_fill(regs, forge, &trans->transfer, sizeof(transfer_float_t),
- regs->port.float_protocol.urid, module_uid, port_index);
-
- trans->value.atom.size = sizeof(float);
- trans->value.atom.type = forge->Float;
- trans->value.body = *value;
-}
-
-static inline void
-_sp_transfer_peak_fill(reg_t *regs, LV2_Atom_Forge *forge, transfer_peak_t *trans,
- u_id_t module_uid, uint32_t port_index, const LV2UI_Peak_Data *data)
-{
- trans = ASSUME_ALIGNED(trans);
-
- _sp_transfer_fill(regs, forge, &trans->transfer, sizeof(transfer_peak_t),
- regs->port.peak_protocol.urid, module_uid, port_index);
-
- trans->period_start.atom.size = sizeof(uint32_t);
- trans->period_start.atom.type = forge->Int;
- trans->period_start.body = data->period_start;
-
- trans->period_size.atom.size = sizeof(uint32_t);
- trans->period_size.atom.type = forge->Int;
- trans->period_size.body = data->period_size;
-
- trans->peak.atom.size = sizeof(float);
- trans->peak.atom.type = forge->Float;
- trans->peak.body = data->peak;
-}
-
-static inline LV2_Atom *
-_sp_transfer_atom_fill(reg_t *regs, LV2_Atom_Forge *forge, transfer_atom_t *trans,
- u_id_t module_uid, uint32_t port_index, uint32_t atom_size, const LV2_Atom *atom)
-{
- trans = ASSUME_ALIGNED(trans);
- //TODO atom aligned, too?
-
- _sp_transfer_fill(regs, forge, &trans->transfer, sizeof(transfer_atom_t)
- + lv2_atom_pad_size(atom_size),
- regs->port.atom_transfer.urid, module_uid, port_index);
-
- if(atom)
- memcpy(trans->atom, atom, atom_size);
-
- return trans->atom;
-}
-
-static inline LV2_Atom *
-_sp_transfer_event_fill(reg_t *regs, LV2_Atom_Forge *forge, transfer_atom_t *trans,
- u_id_t module_uid, uint32_t port_index, uint32_t atom_size, const LV2_Atom *atom)
-{
- trans = ASSUME_ALIGNED(trans);
- //TODO atom aligned, too?
-
- _sp_transfer_fill(regs, forge, &trans->transfer, sizeof(transfer_atom_t)
- + lv2_atom_pad_size(atom_size),
- regs->port.event_transfer.urid, module_uid, port_index);
-
- if(atom)
- memcpy(trans->atom, atom, atom_size);
-
- return trans->atom;
-}
-
-static inline LV2_Atom *
-_sp_transfer_patch_set_obj_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transfer_patch_set_obj_t *trans,
- uint32_t body_size, LV2_URID subject,
- LV2_URID property, LV2_URID type,
- int32_t sequence_number)
-{
- trans = ASSUME_ALIGNED(trans);
-
- uint32_t obj_size = sizeof(transfer_patch_set_obj_t) + body_size - sizeof(LV2_Atom);
-
- trans->obj.atom.size = obj_size;
- trans->obj.atom.type = forge->Object;
- trans->obj.body.id = 0;
- trans->obj.body.otype = regs->patch.set.urid;
-
- trans->subj.key = regs->patch.subject.urid;
- trans->subj.context = 0;
- trans->subj.value.size = sizeof(LV2_URID);
- trans->subj.value.type = forge->URID;
-
- trans->subj_val = subject;
-
- trans->seq.key = regs->patch.sequence_number.urid;
- trans->seq.context = 0;
- trans->seq.value.size = sizeof(int32_t);
- trans->seq.value.type = forge->Int;
-
- trans->seq_val = sequence_number;
-
- trans->prop.key = regs->patch.property.urid;
- trans->prop.context = 0;
- trans->prop.value.size = sizeof(LV2_URID);
- trans->prop.value.type = forge->URID;
-
- trans->prop_val = property;
-
- trans->dest.key = regs->patch.destination.urid;
- trans->dest.context = 0;
- trans->dest.value.size = sizeof(LV2_URID);
- trans->dest.value.type = forge->URID;
-
- trans->dest_val = regs->core.plugin.urid;
-
- trans->val.key = regs->patch.value.urid;
- trans->val.context = 0;
- trans->val.value.size = body_size;
- trans->val.value.type = type;
-
- //return LV2_ATOM_BODY(&trans->val.value);
- return &trans->val.value;
-}
-
-static inline void
-_sp_transfer_patch_get_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transfer_patch_get_t *trans, u_id_t module_uid, uint32_t port_index,
- LV2_URID subject, LV2_URID property, int32_t sequence_number)
-{
- trans = ASSUME_ALIGNED(trans);
-
- uint32_t trans_size = sizeof(transfer_patch_get_t);
- uint32_t obj_size = trans_size
- - offsetof(transfer_patch_get_t, obj.body);
-
- _sp_transfer_fill(regs, forge, &trans->transfer, trans_size,
- regs->port.event_transfer.urid, module_uid, port_index);
-
- trans->obj.atom.size = obj_size;
- trans->obj.atom.type = forge->Object;
- trans->obj.body.id = 0;
- trans->obj.body.otype = regs->patch.get.urid;
-
- trans->subj.key = regs->patch.subject.urid;
- trans->subj.context = 0;
- trans->subj.value.size = sizeof(LV2_URID);
- trans->subj.value.type = forge->URID;
-
- trans->subj_val = subject;
-
- trans->seq.key = regs->patch.sequence_number.urid;
- trans->seq.context = 0;
- trans->seq.value.size = sizeof(int32_t);
- trans->seq.value.type = forge->Int;
-
- trans->seq_val = sequence_number;
-
- trans->prop.key = regs->patch.property.urid;
- trans->prop.context = 0;
- trans->prop.value.size = sizeof(LV2_URID);
- trans->prop.value.type = forge->URID;
-
- trans->prop_val = property;
-
- trans->dest.key = regs->patch.destination.urid;
- trans->dest.context = 0;
- trans->dest.value.size = sizeof(LV2_URID);
- trans->dest.value.type = forge->URID;
-
- trans->dest_val = regs->core.plugin.urid;
-}
-
-static inline void
-_sp_transfer_patch_get_all_fill(reg_t *regs, LV2_Atom_Forge *forge,
- transfer_patch_get_all_t *trans, u_id_t module_uid, uint32_t port_index,
- LV2_URID subject, int32_t sequence_number)
-{
- trans = ASSUME_ALIGNED(trans);
-
- uint32_t trans_size = sizeof(transfer_patch_get_all_t);
- uint32_t obj_size = trans_size
- - offsetof(transfer_patch_get_all_t, obj.body);
-
- _sp_transfer_fill(regs, forge, &trans->transfer, trans_size,
- regs->port.event_transfer.urid, module_uid, port_index);
-
- trans->obj.atom.size = obj_size;
- trans->obj.atom.type = forge->Object;
- trans->obj.body.id = 0;
- trans->obj.body.otype = regs->patch.get.urid;
-
- trans->subj.key = regs->patch.subject.urid;
- trans->subj.context = 0;
- trans->subj.value.size = sizeof(LV2_URID);
- trans->subj.value.type = forge->URID;
-
- trans->subj_val = subject;
-
- trans->seq.key = regs->patch.sequence_number.urid;
- trans->seq.context = 0;
- trans->seq.value.size = sizeof(int32_t);
- trans->seq.value.type = forge->Int;
-
- trans->seq_val = sequence_number;
-
- trans->dest.key = regs->patch.destination.urid;
- trans->dest.context = 0;
- trans->dest.value.size = sizeof(LV2_URID);
- trans->dest.value.type = forge->URID;
-
- trans->dest_val = regs->core.plugin.urid;
-}
-#endif
-
// non-rt
static LilvNodes *
-_preset_reload(LilvWorld *world, reg_t *regs, const LilvPlugin *plugin,
+_preset_reload(LilvWorld *world, LilvNode *nodes[], const LilvPlugin *plugin,
LilvNodes *presets, const char *bndl)
{
if(presets)
@@ -2023,7 +166,7 @@ _preset_reload(LilvWorld *world, reg_t *regs, const LilvPlugin *plugin,
}
// discover presets for this module
- presets = lilv_plugin_get_related(plugin, regs->pset.preset.node);
+ presets = lilv_plugin_get_related(plugin, nodes[PRESETS__Preset]);
// load resources for this module's presets
LILV_FOREACH(nodes, itr, presets)
diff --git a/include/synthpod_stat.h b/include/synthpod_stat.h
index 7d743181..5d66d252 100644
--- a/include/synthpod_stat.h
+++ b/include/synthpod_stat.h
@@ -8,6 +8,7 @@ typedef enum _stat_urid_t {
RDFS__comment,
RDFS__range,
RDFS__subClassOf,
+ RDFS__seeAlso,
RDF__type,
RDF__value,
@@ -148,6 +149,8 @@ typedef enum _stat_urid_t {
CORE__scalePoint,
CORE__symbol,
CORE__toggled,
+ CORE__isBitmask,
+ CORE__parameterProperty,
DATA_ACCESS,
@@ -266,6 +269,7 @@ typedef enum _stat_urid_t {
PATCH__Request,
PATCH__Response,
PATCH__Set,
+ PATCH__Insert,
PATCH__accept,
PATCH__add,
PATCH__body,
@@ -329,17 +333,17 @@ typedef enum _stat_urid_t {
PORT_PROPS__supportsStrictBounds,
PORT_PROPS__trigger,
- PRESETS__Bank,
+ //PRESETS__Bank,
PRESETS__Preset,
PRESETS__bank,
- PRESETS__preset,
+ //PRESETS__preset,
PRESETS__value,
RESIZE_PORT__asLargeAs,
RESIZE_PORT__minimumSize,
RESIZE_PORT__resize,
- STATE__State,
+ //STATE__State,
STATE__interface,
STATE__loadDefaultState,
STATE__freePath,
@@ -370,7 +374,7 @@ typedef enum _stat_urid_t {
UI__PortProtocol,
UI__Qt4UI,
UI__Qt5UI,
- UI__UI,
+ //UI__UI,
UI__WindowsUI,
UI__X11UI,
UI__binary,
@@ -443,6 +447,75 @@ typedef enum _stat_urid_t {
INLINEDISPLAY__interface,
INLINEDISPLAY__queue_draw,
+ INLINEDISPLAY__surface,
+
+ OSC__Message,
+ OSC__messagePath,
+
+ CVAS__graph,
+
+ SYNTHPOD__state,
+ SYNTHPOD__null,
+ SYNTHPOD__payload,
+ SYNTHPOD__graph,
+ SYNTHPOD__stereo,
+ SYNTHPOD__monoatom,
+ SYNTHPOD__moduleList,
+ SYNTHPOD__moduleSupported,
+ SYNTHPOD__moduleAdd,
+ SYNTHPOD__moduleDel,
+ SYNTHPOD__moduleMove,
+ SYNTHPOD__modulePresetLoad,
+ SYNTHPOD__modulePresetSave,
+ SYNTHPOD__moduleVisible,
+ SYNTHPOD__moduleDisabled,
+ SYNTHPOD__moduleProfiling,
+ SYNTHPOD__modulePositionX,
+ SYNTHPOD__modulePositionY,
+ SYNTHPOD__moduleAlias,
+ SYNTHPOD__moduleReinstantiate,
+ SYNTHPOD__moduleCreated,
+ SYNTHPOD__nodePositionX,
+ SYNTHPOD__nodePositionY,
+ SYNTHPOD__graphPositionX,
+ SYNTHPOD__graphPositionY,
+ SYNTHPOD__columnEnabled,
+ SYNTHPOD__rowEnabled,
+ SYNTHPOD__portRefresh,
+ SYNTHPOD__bundleLoad,
+ SYNTHPOD__bundleSave,
+ SYNTHPOD__pathGet,
+ SYNTHPOD__DSPProfiling,
+ SYNTHPOD__CPUsAvailable,
+ SYNTHPOD__CPUsUsed,
+ SYNTHPOD__periodSize,
+ SYNTHPOD__numPeriods,
+ SYNTHPOD__quit,
+ SYNTHPOD__systemPorts,
+ SYNTHPOD__ControlPort,
+ SYNTHPOD__AudioPort,
+ SYNTHPOD__CVPort,
+ SYNTHPOD__MIDIPort,
+ SYNTHPOD__OSCPort,
+ SYNTHPOD__ComPort,
+ SYNTHPOD__connectionList,
+ SYNTHPOD__nodeList,
+ SYNTHPOD__subscriptionList,
+ SYNTHPOD__notificationList,
+ SYNTHPOD__automationList,
+ SYNTHPOD__sourceModule,
+ SYNTHPOD__sourceSymbol,
+ SYNTHPOD__sinkModule,
+ SYNTHPOD__sinkSymbol,
+ SYNTHPOD__sourceMinimum,
+ SYNTHPOD__sourceMaximum,
+ SYNTHPOD__sinkMinimum,
+ SYNTHPOD__sinkMaximum,
+ SYNTHPOD__sourceEnabled,
+ SYNTHPOD__sinkEnabled,
+ SYNTHPOD__learning,
+ SYNTHPOD__placeholder,
+ SYNTHPOD__visibility,
STAT_URID_MAX
} stat_urid_t;
diff --git a/plugins/synthpod_common_d2tk.c b/plugins/synthpod_common_d2tk.c
index 2a80791c..2d9d4f45 100644
--- a/plugins/synthpod_common_d2tk.c
+++ b/plugins/synthpod_common_d2tk.c
@@ -117,7 +117,9 @@ struct _mod_t {
struct _plughandle_t {
LilvWorld *world;
- reg_t regs;
+
+ LilvNode *regs [STAT_URID_MAX];
+
union {
LV2_Atom atom;
uint8_t buf [ATOM_BUF_MAX];
@@ -203,7 +205,7 @@ _message_write(plughandle_t *handle)
{
DBG;
handle->writer(handle->controller, CONTROL, lv2_atom_total_size(&handle->atom),
- handle->regs.port.event_transfer.urid, &handle->atom);
+ ATOM__eventTransfer, &handle->atom);
}
static inline void
@@ -1015,7 +1017,7 @@ cleanup(LV2UI_Handle instance)
d2tk_frontend_free(handle->dpugl);
- sp_regs_deinit(&handle->regs);
+ sp_regs_deinit(handle->regs);
free(handle->lplugs);
@@ -1129,7 +1131,7 @@ _add_mod(plughandle_t *handle, const LV2_Atom_URID *urn)
// get information for each of those, FIXME only if not already available
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
+ && synthpod_patcher_get(&handle->forge,
urn->body, 0, 0) )
{
_message_write(handle);
@@ -1170,32 +1172,32 @@ _port_event_set_module_list(plughandle_t *handle, const LV2_Atom_Tuple *tup)
// patch:Get [patch:property spod:connectionList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.connection_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__connectionList) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:nodeList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.node_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__nodeList) )
{
_message_write(handle);
}
// patch:Get [patch:property pset:preset]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.pset.preset.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, PRESETS__Preset) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:automationList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.automation_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__automationList) )
{
_message_write(handle);
}
@@ -1231,9 +1233,9 @@ _port_event_set(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom *value = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.property.urid, &property,
- handle->regs.patch.value.urid, &value,
+ PATCH__subject, &subject,
+ PATCH__property, &property,
+ PATCH__value, &value,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -1248,32 +1250,32 @@ _port_event_set(plughandle_t *handle, const LV2_Atom_Object *obj)
return;
}
- if( (prop == handle->regs.synthpod.module_list.urid)
+ if( (prop == SYNTHPOD__moduleList)
&& (value->type == ATOM__Tuple) )
{
_port_event_set_module_list(handle, (const LV2_Atom_Tuple *)value);
}
- else if( (prop == handle->regs.synthpod.connection_list.urid)
+ else if( (prop == SYNTHPOD__connectionList)
&& (value->type == ATOM__Tuple) )
{
_port_event_set_connection_list(handle, (const LV2_Atom_Tuple *)value);
}
- else if( (prop == handle->regs.synthpod.node_list.urid)
+ else if( (prop == SYNTHPOD__nodeList)
&& (value->type == ATOM__Tuple) )
{
_port_event_set_node_list(handle, (const LV2_Atom_Tuple *)value);
}
- else if( (prop == handle->regs.synthpod.automation_list.urid)
+ else if( (prop == SYNTHPOD__automationList)
&& (value->type == ATOM__Tuple) )
{
_port_event_set_automation_list(handle, (const LV2_Atom_Tuple *)value);
}
- else if( (prop == handle->regs.pset.preset.urid)
+ else if( (prop == PRESETS__Preset)
&& (value->type == ATOM__URID) )
{
//FIXME
}
- else if( (prop == handle->regs.synthpod.dsp_profiling.urid)
+ else if( (prop == SYNTHPOD__DSPProfiling)
&& (value->type == ATOM__Vector) )
{
const float *f32 = LV2_ATOM_CONTENTS_CONST(LV2_Atom_Vector, value);
@@ -1284,61 +1286,61 @@ _port_event_set(plughandle_t *handle, const LV2_Atom_Object *obj)
_status_labels_update(handle);
}
- else if( (prop == handle->regs.synthpod.module_profiling.urid)
+ else if( (prop == SYNTHPOD__moduleProfiling)
&& (value->type == ATOM__Vector)
&& subj )
{
//FIXME
}
- else if( (prop == handle->regs.synthpod.graph_position_x.urid)
+ else if( (prop == SYNTHPOD__graphPositionX)
&& (value->type == ATOM__Float) )
{
//FIXME
}
- else if( (prop == handle->regs.synthpod.graph_position_y.urid)
+ else if( (prop == SYNTHPOD__graphPositionY)
&& (value->type == ATOM__Float) )
{
}
- else if( (prop == handle->regs.synthpod.column_enabled.urid)
+ else if( (prop == SYNTHPOD__columnEnabled)
&& (value->type == ATOM__Bool) )
{
//FIXME
}
- else if( (prop == handle->regs.synthpod.row_enabled.urid)
+ else if( (prop == SYNTHPOD__rowEnabled)
&& (value->type == ATOM__Bool) )
{
//FIXME
}
- else if( (prop == handle->regs.synthpod.cpus_used.urid)
+ else if( (prop == SYNTHPOD__CPUsUsed)
&& (value->type == ATOM__Int) )
{
handle->status.cpus_used = ATOM_INT_VAL(value);
_status_labels_update(handle);
}
- else if( (prop == handle->regs.synthpod.cpus_available.urid)
+ else if( (prop == SYNTHPOD__CPUsAvailable)
&& (value->type == ATOM__Int) )
{
handle->status.cpus_available = ATOM_INT_VAL(value);
_status_labels_update(handle);
}
- else if( (prop == handle->regs.synthpod.period_size.urid)
+ else if( (prop == SYNTHPOD__periodSize)
&& (value->type == ATOM__Int) )
{
handle->status.period_size = ATOM_INT_VAL(value);
_status_labels_update(handle);
}
- else if( (prop == handle->regs.synthpod.num_periods.urid)
+ else if( (prop == SYNTHPOD__numPeriods)
&& (value->type == ATOM__Int) )
{
handle->status.num_periods = ATOM_INT_VAL(value);
_status_labels_update(handle);
}
- else if( (prop == handle->regs.idisp.surface.urid)
+ else if( (prop == INLINEDISPLAY__surface)
&& (value->type == ATOM__Tuple)
&& subj )
{
@@ -1457,8 +1459,8 @@ DBG;
const LV2_Atom_Object *body = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.body.urid, &body,
+ PATCH__subject, &subject,
+ PATCH__body, &body,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -1479,11 +1481,11 @@ DBG;
const LV2_Atom_URID *ui_uri = NULL;
lv2_atom_object_get(body,
- handle->regs.core.plugin.urid, &plugin,
- handle->regs.synthpod.module_position_x.urid, &mod_pos_x,
- handle->regs.synthpod.module_position_y.urid, &mod_pos_y,
- handle->regs.synthpod.module_alias.urid, &mod_alias,
- handle->regs.ui.ui.urid, &ui_uri, //FIXME use this
+ CORE__Plugin, &plugin,
+ SYNTHPOD__modulePositionX, &mod_pos_x,
+ SYNTHPOD__modulePositionY, &mod_pos_y,
+ SYNTHPOD__moduleAlias, &mod_alias,
+ UI__ui, &ui_uri, //FIXME use this
0); //FIXME query more
const LV2_URID urid = plugin
@@ -1533,8 +1535,8 @@ DBG;
needs_filtering = true;
}
else if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_x.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionX,
sizeof(float), ATOM__Float, &mod->pos.x) )
{
_message_write(handle);
@@ -1548,8 +1550,8 @@ DBG;
needs_filtering = true;
}
else if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_y.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionY,
sizeof(float), ATOM__Float, &mod->pos.y) )
{
_message_write(handle);
@@ -1616,7 +1618,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
return;
}
- if(format != handle->regs.port.event_transfer.urid)
+ if(format != ATOM__eventTransfer)
{
return;
}
@@ -1627,19 +1629,19 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
return;
}
- if(obj->body.otype == handle->regs.patch.set.urid)
+ if(obj->body.otype == PATCH__Set)
{
_port_event_set(handle, obj);
}
- else if(obj->body.otype == handle->regs.patch.put.urid)
+ else if(obj->body.otype == PATCH__Put)
{
_port_event_put(handle, obj);
}
- else if(obj->body.otype == handle->regs.patch.patch.urid)
+ else if(obj->body.otype == PATCH__Patch)
{
_port_event_patch(handle, obj);
}
- else if(obj->body.otype == handle->regs.patch.copy.urid)
+ else if(obj->body.otype == PATCH__Copy)
{
_port_event_copy(handle, obj);
}
@@ -1677,76 +1679,76 @@ _init(plughandle_t *handle)
const unsigned nplugs = lilv_plugins_size(handle->plugs);
handle->lplugs = calloc(1, nplugs * sizeof(entry_t));
- sp_regs_init(&handle->regs, handle->world, handle->map);
+ sp_regs_init(handle->regs, handle->world);
// patch:Get [patch:property spod:moduleList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.module_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__moduleList) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:CPUsAvailable]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.cpus_available.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__CPUsAvailable) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:CPUsUsed]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.cpus_used.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__CPUsUsed) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:periodSize]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.period_size.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__periodSize) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:numPeriods]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.num_periods.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__numPeriods) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:graphPositionX]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.graph_position_x.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__graphPositionX) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:graphPositionY]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.graph_position_y.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__graphPositionY) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:columnEnabled]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.column_enabled.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__columnEnabled) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:rowEnabled]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.row_enabled.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__rowEnabled) )
{
_message_write(handle);
}
diff --git a/plugins/synthpod_common_nk.c b/plugins/synthpod_common_nk.c
index 419b9604..a07080f5 100644
--- a/plugins/synthpod_common_nk.c
+++ b/plugins/synthpod_common_nk.c
@@ -64,6 +64,7 @@
#define SPLINE_BEND 25.f
#define ALIAS_MAX 32
#define DEFAULT_PSET_LABEL "DEFAULT"
+#define NODE(KEY) handle->regs[KEY]
#ifdef Bool
# undef Bool // interferes with atom forge
@@ -476,7 +477,8 @@ struct _plughandle_t {
struct nk_vec2 from;
} box;
- reg_t regs;
+ LilvNode *regs [STAT_URID_MAX];
+
union {
LV2_Atom atom;
uint8_t buf [ATOM_BUF_MAX];
@@ -770,7 +772,7 @@ _message_write(plughandle_t *handle)
{
DBG;
handle->writer(handle->controller, CONTROL, lv2_atom_total_size(&handle->atom),
- handle->regs.port.event_transfer.urid, &handle->atom);
+ ATOM__eventTransfer, &handle->atom);
}
static size_t
@@ -993,27 +995,27 @@ static LV2_Atom_Forge_Ref
_patch_connection_internal(plughandle_t *handle, port_t *source_port, port_t *sink_port, float gain)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, sink_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, sink_port->symbol, strlen(sink_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.param.gain.urid);
+ ref = lv2_atom_forge_key(&handle->forge, PARAMETERS__gain);
if(ref)
ref = lv2_atom_forge_float(&handle->forge, gain);
@@ -1027,8 +1029,8 @@ _patch_connection_add(plughandle_t *handle, port_t *source_port, port_t *sink_po
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.connection_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__connectionList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_connection_internal(handle, source_port, sink_port, gain) )
{
@@ -1046,8 +1048,8 @@ _patch_connection_remove(plughandle_t *handle, port_t *source_port, port_t *sink
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_remove_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.connection_list.urid) //TODO subject
+ && synthpod_patcher_remove_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__connectionList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_connection_internal(handle, source_port, sink_port, 0.f) )
{
@@ -1063,19 +1065,19 @@ _patch_node_internal(plughandle_t *handle, mod_t *source_mod, mod_t *sink_mod,
float x, float y)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, sink_mod->urn);
if(x != 0.f)
{
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.node_position_x.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__nodePositionX);
if(ref)
ref = lv2_atom_forge_float(&handle->forge, x);
}
@@ -1083,7 +1085,7 @@ _patch_node_internal(plughandle_t *handle, mod_t *source_mod, mod_t *sink_mod,
if(y != 0.f)
{
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.node_position_y.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__nodePositionY);
if(ref)
ref = lv2_atom_forge_float(&handle->forge, y);
}
@@ -1099,8 +1101,8 @@ _patch_node_add(plughandle_t *handle, mod_t *source_mod, mod_t *sink_mod,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.node_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__nodeList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_node_internal(handle, source_mod, sink_mod, x, y) )
{
@@ -1116,8 +1118,8 @@ _patch_node_remove(plughandle_t *handle, mod_t *source_mod, mod_t *sink_mod)
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_remove_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.node_list.urid) //TODO subject
+ && synthpod_patcher_remove_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__nodeList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_node_internal(handle, source_mod, sink_mod, 0.f, 0.f) )
{
@@ -1130,12 +1132,12 @@ static LV2_Atom_Forge_Ref
_patch_subscription_internal(plughandle_t *handle, port_t *source_port)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
@@ -1149,8 +1151,8 @@ _patch_subscription_add(plughandle_t *handle, port_t *source_port)
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.subscription_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__subscriptionList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_subscription_internal(handle, source_port) )
{
@@ -1166,8 +1168,8 @@ _patch_subscription_remove(plughandle_t *handle, port_t *source_port)
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_remove_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.subscription_list.urid) //TODO subject
+ && synthpod_patcher_remove_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__subscriptionList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_subscription_internal(handle, source_port) )
{
@@ -1272,17 +1274,17 @@ _patch_notification_internal(plughandle_t *handle, port_t *source_port,
uint32_t size, LV2_URID type, const void *body)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.rdf.value.urid);
+ ref = lv2_atom_forge_key(&handle->forge, RDF__value);
if(ref)
ref = lv2_atom_forge_atom(&handle->forge, size, type);
if(ref)
@@ -1299,8 +1301,8 @@ _patch_notification_add(plughandle_t *handle, port_t *source_port,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.notification_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__notificationList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, proto)
&& _patch_notification_internal(handle, source_port, size, type, body) )
{
@@ -1315,19 +1317,19 @@ _patch_notification_patch_set_internal(plughandle_t *handle, port_t *source_port
uint32_t size, LV2_URID type, const void *body)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.rdf.value.urid);
+ ref = lv2_atom_forge_key(&handle->forge, RDF__value);
if(ref)
- ref = synthpod_patcher_set(&handle->regs, &handle->forge,
+ ref = synthpod_patcher_set(&handle->forge,
subject, seqn, property, size, type, body);
return ref;
@@ -1348,10 +1350,10 @@ _patch_notification_add_patch_set(plughandle_t *handle, mod_t *mod,
if(!(port->type & PROPERTY_TYPE_PATCH))
continue;
- //FIXME set patch:destination to handle->regs.core.plugin.urid to omit feedback
+ //FIXME set patch:destination to CORE__Plugin to omit feedback
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.notification_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__notificationList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, proto)
&& _patch_notification_patch_set_internal(handle, port,
subject, seqn, property, size, type, body) )
@@ -1367,19 +1369,19 @@ _patch_notification_patch_get_internal(plughandle_t *handle, port_t *source_port
LV2_URID subject, int32_t seqn, LV2_URID property)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.rdf.value.urid);
+ ref = lv2_atom_forge_key(&handle->forge, RDF__value);
if(ref)
- ref = synthpod_patcher_get(&handle->regs, &handle->forge,
+ ref = synthpod_patcher_get(&handle->forge,
subject, seqn, property);
return ref;
@@ -1399,10 +1401,10 @@ _patch_notification_add_patch_get(plughandle_t *handle, mod_t *mod,
if(!(port->type & PROPERTY_TYPE_PATCH))
continue;
- //FIXME set patch:destination to handle->regs.core.plugin.urid to omit feedback
+ //FIXME set patch:destination to CORE__Plugin to omit feedback
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.notification_list.urid) //TODO subject
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__notificationList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, proto)
&& _patch_notification_patch_get_internal(handle, port,
subject, seqn, property) ) // property == 0 -> get all
@@ -1417,12 +1419,12 @@ static LV2_Atom_Forge_Ref
_patch_port_automation_internal(plughandle_t *handle, port_t *source_port)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_port->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_symbol.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkSymbol);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, source_port->symbol, strlen(source_port->symbol));
@@ -1433,17 +1435,17 @@ static LV2_Atom_Forge_Ref
_patch_param_automation_internal(plughandle_t *handle, param_t *source_param)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_module.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkModule);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_param->mod->urn);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.patch.property.urid);
+ ref = lv2_atom_forge_key(&handle->forge, PATCH__property);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_param->property);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.rdfs.range.urid);
+ ref = lv2_atom_forge_key(&handle->forge, RDFS__range);
if(ref)
ref = lv2_atom_forge_urid(&handle->forge, source_param->range);
@@ -1454,47 +1456,47 @@ static LV2_Atom_Forge_Ref
_patch_midi_automation_internal(plughandle_t *handle, auto_t *automation)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.midi.channel.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, MIDI__channel);
if(ref)
ref = lv2_atom_forge_int(&handle->forge, automation->midi.channel);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.midi.controller_number.urid);
+ ref = lv2_atom_forge_key(&handle->forge, MIDI__controllerNumber);
if(ref)
ref = lv2_atom_forge_int(&handle->forge, automation->midi.controller);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_min.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceMinimum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->midi.a);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_max.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceMaximum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->midi.b);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_min.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkMinimum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->c);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_max.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkMaximum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->d);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_enabled.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceEnabled);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->src_enabled);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_enabled.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkEnabled);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->snk_enabled);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.learning.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__learning);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->learning);
@@ -1505,42 +1507,42 @@ static LV2_Atom_Forge_Ref
_patch_osc_automation_internal(plughandle_t *handle, auto_t *automation)
{
DBG;
- LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, handle->regs.osc.path.urid);
+ LV2_Atom_Forge_Ref ref = lv2_atom_forge_key(&handle->forge, OSC__messagePath);
if(ref)
ref = lv2_atom_forge_string(&handle->forge, automation->osc.path, strlen(automation->osc.path));
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_min.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceMinimum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->osc.a);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_max.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceMaximum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->osc.b);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_min.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkMinimum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->c);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_max.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkMaximum);
if(ref)
ref = lv2_atom_forge_double(&handle->forge, automation->d);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.source_enabled.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sourceEnabled);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->src_enabled);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.sink_enabled.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__sinkEnabled);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->snk_enabled);
if(ref)
- ref = lv2_atom_forge_key(&handle->forge, handle->regs.synthpod.learning.urid);
+ ref = lv2_atom_forge_key(&handle->forge, SYNTHPOD__learning);
if(ref)
ref = lv2_atom_forge_bool(&handle->forge, automation->learning);
@@ -1555,9 +1557,9 @@ _patch_port_midi_automation_add(plughandle_t *handle, port_t *source_port,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
- && lv2_atom_forge_object(&handle->forge, &frame[2], 0, handle->regs.midi.Controller.urid)
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
+ && lv2_atom_forge_object(&handle->forge, &frame[2], 0, MIDI__Controller)
&& _patch_port_automation_internal(handle, source_port)
&& _patch_midi_automation_internal(handle, automation) )
{
@@ -1573,8 +1575,8 @@ _patch_port_automation_remove(plughandle_t *handle, port_t *source_port)
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_remove_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
+ && synthpod_patcher_remove_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_port_automation_internal(handle, source_port) )
{
@@ -1591,9 +1593,9 @@ _patch_port_osc_automation_add(plughandle_t *handle, port_t *source_port,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
- && lv2_atom_forge_object(&handle->forge, &frame[2], 0, handle->regs.osc.message.urid)
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
+ && lv2_atom_forge_object(&handle->forge, &frame[2], 0, OSC__Message)
&& _patch_port_automation_internal(handle, source_port)
&& _patch_osc_automation_internal(handle, automation) )
{
@@ -1630,9 +1632,9 @@ _patch_param_midi_automation_add(plughandle_t *handle, param_t *source_param,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
- && lv2_atom_forge_object(&handle->forge, &frame[2], 0, handle->regs.midi.Controller.urid)
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
+ && lv2_atom_forge_object(&handle->forge, &frame[2], 0, MIDI__Controller)
&& _patch_param_automation_internal(handle, source_param)
&& _patch_midi_automation_internal(handle, automation) )
{
@@ -1649,9 +1651,9 @@ _patch_param_osc_automation_add(plughandle_t *handle, param_t *source_param,
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_add_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
- && lv2_atom_forge_object(&handle->forge, &frame[2], 0, handle->regs.osc.message.urid)
+ && synthpod_patcher_add_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
+ && lv2_atom_forge_object(&handle->forge, &frame[2], 0, OSC__Message)
&& _patch_param_automation_internal(handle, source_param)
&& _patch_osc_automation_internal(handle, automation) )
{
@@ -1667,8 +1669,8 @@ _patch_param_automation_remove(plughandle_t *handle, param_t *source_param)
LV2_Atom_Forge_Frame frame [3];
if( _message_request(handle)
- && synthpod_patcher_remove_object(&handle->regs, &handle->forge, &frame[0],
- 0, 0, handle->regs.synthpod.automation_list.urid) //TODO subject
+ && synthpod_patcher_remove_object(&handle->forge, &frame[0],
+ 0, 0, SYNTHPOD__automationList) //TODO subject
&& lv2_atom_forge_object(&handle->forge, &frame[2], 0, 0)
&& _patch_param_automation_internal(handle, source_param) )
{
@@ -1982,7 +1984,7 @@ _unit_symbol_obj(plughandle_t *handle, LilvNode *units_unit)
DBG;
char *symbol = NULL;
- LilvNode *units_symbol = lilv_world_get(handle->world, units_unit, handle->regs.units.symbol.node, NULL);
+ LilvNode *units_symbol = lilv_world_get(handle->world, units_unit, NODE(UNITS__symbol), NULL);
if(units_symbol)
{
if(lilv_node_is_string(units_symbol))
@@ -2102,7 +2104,7 @@ _param_fill(plughandle_t *handle, param_t *param, const LilvNode *param_node)
_param_update_span(handle, param);
}
- LilvNode *label = lilv_world_get(handle->world, param_node, handle->regs.rdfs.label.node, NULL);
+ LilvNode *label = lilv_world_get(handle->world, param_node, NODE(RDFS__label), NULL);
if(label)
{
if(lilv_node_is_string(label))
@@ -2110,7 +2112,7 @@ _param_fill(plughandle_t *handle, param_t *param, const LilvNode *param_node)
lilv_node_free(label);
}
- LilvNode *comment = lilv_world_get(handle->world, param_node, handle->regs.rdfs.comment.node, NULL);
+ LilvNode *comment = lilv_world_get(handle->world, param_node, NODE(RDFS__comment), NULL);
if(comment)
{
if(lilv_node_is_string(comment))
@@ -2118,14 +2120,14 @@ _param_fill(plughandle_t *handle, param_t *param, const LilvNode *param_node)
lilv_node_free(comment);
}
- LilvNode *units_unit = lilv_world_get(handle->world, param_node, handle->regs.units.unit.node, NULL);
+ LilvNode *units_unit = lilv_world_get(handle->world, param_node, NODE(UNITS__unit), NULL);
if(units_unit)
{
if(lilv_node_is_uri(units_unit))
{
param->units_symbol = _unit_symbol(handle, lilv_node_as_uri(units_unit));
}
- else if(lilv_world_ask(handle->world, units_unit, handle->regs.rdf.type.node, handle->regs.units.Unit.node))
+ else if(lilv_world_ask(handle->world, units_unit, NODE(RDF__type), NODE(UNITS__Unit)))
{
param->units_symbol = _unit_symbol_obj(handle, units_unit);
}
@@ -2133,30 +2135,32 @@ _param_fill(plughandle_t *handle, param_t *param, const LilvNode *param_node)
lilv_node_free(units_unit);
}
- LilvNodes *param_properties = lilv_world_find_nodes(handle->world, param_node, handle->regs.parameter.property.node, NULL);
+ LilvNodes *param_properties = lilv_world_find_nodes(handle->world, param_node,
+ NODE(CORE__parameterProperty), NULL);
if(param_properties)
{
LILV_FOREACH(nodes, i, param_properties)
{
const LilvNode *param_property = lilv_nodes_get(param_properties, i);
- if(lilv_node_equals(param_property, handle->regs.port.is_bitmask.node))
+ if(lilv_node_equals(param_property, NODE(CORE__isBitmask)))
param->is_bitmask = true;
- else if(lilv_node_equals(param_property, handle->regs.port.logarithmic.node))
+ else if(lilv_node_equals(param_property, NODE(PORT_PROPS__logarithmic)))
param->is_logarithmic = true;
}
lilv_nodes_free(param_properties);
}
- LilvNodes *lv2_scale_points = lilv_world_find_nodes(handle->world, param_node, handle->regs.core.scale_point.node, NULL);
+ LilvNodes *lv2_scale_points = lilv_world_find_nodes(handle->world, param_node,
+ NODE(CORE__scalePoint), NULL);
if(lv2_scale_points)
{
LILV_FOREACH(nodes, i, lv2_scale_points)
{
const LilvNode *port_point = lilv_nodes_get(lv2_scale_points, i);
- LilvNode *label_node = lilv_world_get(handle->world, port_point, handle->regs.rdfs.label.node, NULL);
- LilvNode *value_node = lilv_world_get(handle->world, port_point, handle->regs.rdf.value.node, NULL);
+ LilvNode *label_node = lilv_world_get(handle->world, port_point, NODE(RDFS__label), NULL);
+ LilvNode *value_node = lilv_world_get(handle->world, port_point, NODE(RDF__value), NULL);
if(label_node && value_node)
{
@@ -2523,7 +2527,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
uint32_t src_proto, const LV2_Atom *src_value, bool route_to_ui)
{
DBG;
- if( (src_proto == handle->regs.port.float_protocol.urid)
+ if( (src_proto == UI__floatProtocol)
&& (src_value->type == ATOM__Float)
&& (src_port->type & PROPERTY_TYPE_CONTROL) )
{
@@ -2540,7 +2544,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
_mod_uis_send(src_mod, src_port->index, sizeof(float), 0, &f32);
}
}
- else if( (src_proto == handle->regs.port.peak_protocol.urid)
+ else if( (src_proto == UI__peakProtocol)
&& (src_value->type == ATOM__Tuple)
&& (src_port->type & PROPERTY_TYPE_AUDIO || src_port->type & PROPERTY_TYPE_CV) )
{
@@ -2562,17 +2566,17 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
};
_mod_uis_send(src_mod, src_port->index, sizeof(LV2UI_Peak_Data),
- handle->regs.port.peak_protocol.urid, &pdata);
+ UI__peakProtocol, &pdata);
}
}
- else if( (src_proto == handle->regs.port.event_transfer.urid)
+ else if( (src_proto == ATOM__eventTransfer)
&& (src_port->type & PROPERTY_TYPE_ATOM) )
{
const LV2_Atom_Object *pobj = (const LV2_Atom_Object *)src_value;
if(pobj->atom.type == ATOM__Object)
{
- if(pobj->body.otype == handle->regs.patch.set.urid)
+ if(pobj->body.otype == PATCH__Set)
{
//printf("got patch:Set notification\n");
const LV2_Atom_URID *subject = NULL;
@@ -2580,9 +2584,9 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
const LV2_Atom *value = NULL;
lv2_atom_object_get(pobj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.property.urid, &property,
- handle->regs.patch.value.urid, &value,
+ PATCH__subject, &subject,
+ PATCH__property, &property,
+ PATCH__value, &value,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -2601,15 +2605,15 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
}
}
}
- else if(pobj->body.otype == handle->regs.patch.put.urid)
+ else if(pobj->body.otype == PATCH__Put)
{
//printf("got patch:Put notification\n");
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_Object *body = NULL;
lv2_atom_object_get(pobj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.body.urid, &body,
+ PATCH__subject, &subject,
+ PATCH__body, &body,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -2625,7 +2629,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
}
}
}
- else if(pobj->body.otype == handle->regs.patch.patch.urid)
+ else if(pobj->body.otype == PATCH__Patch)
{
//printf("got patch:Patch notification\n");
const LV2_Atom_URID *subject = NULL;
@@ -2633,9 +2637,9 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
const LV2_Atom_Object *add = NULL;
lv2_atom_object_get(pobj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.remove.urid, &rem,
- handle->regs.patch.add.urid, &add,
+ PATCH__subject, &subject,
+ PATCH__remove, &rem,
+ PATCH__add, &add,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -2647,12 +2651,12 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
{
LV2_ATOM_OBJECT_FOREACH(rem, prop)
{
- if( (prop->key == handle->regs.patch.writable.urid)
+ if( (prop->key == PATCH__writable)
&& (prop->value.type == ATOM__URID) )
{
const LV2_URID property = ((const LV2_Atom_URID *)&prop->value)->body;
- if(property == handle->regs.patch.wildcard.urid)
+ if(property == PATCH__wildcard)
{
HASH_FREE(&src_mod->dynams, param_ptr)
{
@@ -2670,12 +2674,12 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
}
}
}
- else if( (prop->key == handle->regs.patch.readable.urid)
+ else if( (prop->key == PATCH__readable)
&& (prop->value.type == ATOM__URID) )
{
const LV2_URID property = ((const LV2_Atom_URID *)&prop->value)->body;
- if(property == handle->regs.patch.wildcard.urid)
+ if(property == PATCH__wildcard)
{
HASH_FREE(&src_mod->dynams, param_ptr)
{
@@ -2698,33 +2702,33 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
param_t *param = _mod_dynam_find_by_property(src_mod, subj);
if(param)
{
- if(prop->key == handle->regs.rdfs.range.urid)
+ if(prop->key == RDFS__range)
{
param->range = 0;
}
- else if(prop->key == handle->regs.rdfs.label.urid)
+ else if(prop->key == RDFS__label)
{
free(param->label);
param->label = NULL;
}
- else if(prop->key == handle->regs.rdfs.comment.urid)
+ else if(prop->key == RDFS__comment)
{
free(param->comment);
param->comment= NULL;
}
- else if(prop->key == handle->regs.core.minimum.urid)
+ else if(prop->key == CORE__minimum)
{
param->min.i = 0;
}
- else if(prop->key == handle->regs.core.maximum.urid)
+ else if(prop->key == CORE__maximum)
{
param->max.i = 0;
}
- else if(prop->key == handle->regs.units.unit.urid)
+ else if(prop->key == UNITS__unit)
{
//FIXME
}
- else if(prop->key == handle->regs.units.symbol.urid)
+ else if(prop->key == UNITS__symbol)
{
free(param->units_symbol);
param->units_symbol = NULL;
@@ -2735,7 +2739,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
LV2_ATOM_OBJECT_FOREACH(add, prop)
{
- if( (prop->key == handle->regs.patch.writable.urid)
+ if( (prop->key == PATCH__writable)
&& (prop->value.type == ATOM__URID) )
{
const LV2_URID property = ((const LV2_Atom_URID *)&prop->value)->body;
@@ -2749,10 +2753,10 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
// patch:Get [patch:property property]
_patch_notification_add_patch_get(handle, src_mod,
- handle->regs.port.event_transfer.urid, src_mod->subj, 0, property);
+ ATOM__eventTransfer, src_mod->subj, 0, property);
}
}
- else if( (prop->key == handle->regs.patch.readable.urid)
+ else if( (prop->key == PATCH__readable)
&& (prop->value.type == ATOM__URID) )
{
const LV2_URID property = ((const LV2_Atom_URID *)&prop->value)->body;
@@ -2766,7 +2770,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
// patch:Get [patch:property property]
_patch_notification_add_patch_get(handle, src_mod,
- handle->regs.port.event_transfer.urid, src_mod->subj, 0, property);
+ ATOM__eventTransfer, src_mod->subj, 0, property);
}
}
else if(subj)
@@ -2774,7 +2778,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
param_t *param = _mod_dynam_find_by_property(src_mod, subj);
if(param)
{
- if( (prop->key == handle->regs.rdfs.range.urid)
+ if( (prop->key == RDFS__range)
&& (prop->value.type == ATOM__URID) )
{
param->range = ((const LV2_Atom_URID *)&prop->value)->body;
@@ -2790,7 +2794,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
param->min.b = 1;
}
}
- else if( (prop->key == handle->regs.rdfs.label.urid)
+ else if( (prop->key == RDFS__label)
&& (prop->value.type == ATOM__String) )
{
free(param->label);
@@ -2799,13 +2803,13 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
_refresh_main_dynam_list(handle, src_mod);
_hash_sort(&src_mod->dynams, _sort_param_name);
}
- else if( (prop->key == handle->regs.rdfs.comment.urid)
+ else if( (prop->key == RDFS__comment)
&& (prop->value.type == ATOM__String) )
{
free(param->comment);
param->comment = strdup(LV2_ATOM_BODY_CONST(&prop->value));
}
- else if( (prop->key == handle->regs.core.minimum.urid)
+ else if( (prop->key == CORE__minimum)
&& (prop->value.type == param->range) )
{
if(param->range == ATOM__Int)
@@ -2822,7 +2826,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
_param_update_span(handle, param);
}
- else if( (prop->key == handle->regs.core.maximum.urid)
+ else if( (prop->key == CORE__maximum)
&& (prop->value.type == param->range) )
{
if(param->range == ATOM__Int)
@@ -2839,20 +2843,20 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
_param_update_span(handle, param);
}
- else if( (prop->key == handle->regs.units.unit.urid)
+ else if( (prop->key == UNITS__unit)
&& (prop->value.type == ATOM__URID) )
{
const LV2_URID units_unit = ((const LV2_Atom_URID *)&prop->value)->body;
param->units_symbol = _unit_symbol(handle,
handle->unmap->unmap(handle->unmap->handle, units_unit));
}
- else if( (prop->key == handle->regs.units.symbol.urid)
+ else if( (prop->key == UNITS__symbol)
&& (prop->value.type == ATOM__String) )
{
free(param->units_symbol);
param->units_symbol = strdup(LV2_ATOM_BODY_CONST(&prop->value));
}
- else if( (prop->key == handle->regs.core.scale_point.urid)
+ else if( (prop->key == CORE__scalePoint)
&& (prop->value.type == ATOM__Tuple) )
{
const LV2_Atom_Tuple *tup = (const LV2_Atom_Tuple *)&prop->value;
@@ -2867,8 +2871,8 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
const LV2_Atom *value = NULL;
lv2_atom_object_get(obj,
- handle->regs.rdfs.label.urid, &label,
- handle->regs.rdf.value.urid, &value,
+ RDFS__label, &label,
+ RDF__value, &value,
NULL);
if( !label || (label->type != ATOM__String)
@@ -2906,10 +2910,10 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
if(route_to_ui)
{
_mod_uis_send(src_mod, src_port->index, lv2_atom_total_size(src_value),
- handle->regs.port.event_transfer.urid, src_value);
+ ATOM__eventTransfer, src_value);
}
}
- else if( (src_proto == handle->regs.port.atom_transfer.urid)
+ else if( (src_proto == ATOM__atomTransfer)
&& (src_port->type & PROPERTY_TYPE_ATOM) )
{
//FIXME rarely (never) sent by any plugin
@@ -2917,7 +2921,7 @@ _mod_nk_write_function(plughandle_t *handle, mod_t *src_mod, port_t *src_port,
if(route_to_ui)
{
_mod_uis_send(src_mod, src_port->index, lv2_atom_total_size(src_value),
- handle->regs.port.atom_transfer.urid, src_value);
+ ATOM__atomTransfer, src_value);
}
}
@@ -2934,14 +2938,14 @@ _mod_ui_write_function(LV2UI_Controller controller, uint32_t index,
plughandle_t *handle = mod->handle;
if(protocol == 0)
- protocol = handle->regs.port.float_protocol.urid;
+ protocol = UI__floatProtocol;
//printf("_mod_ui_write_function: %u %u %u\n", index, size, protocol);
port_t *port = _mod_port_find_by_index(mod, index);
if(port)
{
- if(protocol == handle->regs.port.float_protocol.urid)
+ if(protocol == UI__floatProtocol)
{
// route to dsp
_patch_notification_add(handle, port, protocol,
@@ -2957,8 +2961,8 @@ _mod_ui_write_function(LV2UI_Controller controller, uint32_t index,
};
_mod_nk_write_function(handle, mod, port, protocol, &flt.atom, false);
}
- else if( (protocol == handle->regs.port.event_transfer.urid)
- || (protocol == handle->regs.port.atom_transfer.urid) )
+ else if( (protocol == ATOM__eventTransfer)
+ || (protocol == ATOM__atomTransfer) )
{
const LV2_Atom *atom = buffer;
@@ -3002,19 +3006,20 @@ _mod_ui_add(plughandle_t *handle, mod_t *mod, const LilvUI *ui, bool threaded)
lilv_world_load_resource(handle->world, ui_node);
bool supported = false;
- if(handle->supports_x11 && lilv_ui_is_a(ui, handle->regs.ui.x11.node))
+ if(handle->supports_x11 && lilv_ui_is_a(ui, NODE(UI__X11UI)))
supported = true;
- else if(handle->supports_gtk2 && lilv_ui_is_a(ui, handle->regs.ui.gtk2.node))
+ else if(handle->supports_gtk2 && lilv_ui_is_a(ui, NODE(UI__GtkUI)))
supported = true;
- else if(handle->supports_gtk3 && lilv_ui_is_a(ui, handle->regs.ui.gtk3.node))
+ else if(handle->supports_gtk3 && lilv_ui_is_a(ui, NODE(UI__Gtk3UI)))
supported = true;
- else if(handle->supports_qt4 && lilv_ui_is_a(ui, handle->regs.ui.qt4.node))
+ else if(handle->supports_qt4 && lilv_ui_is_a(ui, NODE(UI__Qt4UI)))
supported = true;
- else if(handle->supports_qt5 && lilv_ui_is_a(ui, handle->regs.ui.qt5.node))
+ else if(handle->supports_qt5 && lilv_ui_is_a(ui, NODE(UI__Qt5UI)))
supported = true;
- else if(handle->supports_kx && lilv_ui_is_a(ui, handle->regs.ui.kx_widget.node))
+ else if(handle->supports_kx && lilv_ui_is_a(ui, NODE(EXTERNAL_UI__Widget)))
supported = true;
- else if(handle->supports_show && lilv_world_ask(handle->world, ui_node, handle->regs.core.extension_data.node, handle->regs.ui.show_interface.node))
+ else if(handle->supports_show && lilv_world_ask(handle->world, ui_node,
+ NODE(CORE__extensionData), NODE(UI__showInterface)))
supported = true;
if(!supported)
@@ -3139,31 +3144,32 @@ _mod_ui_run(mod_ui_t *mod_ui, bool sync)
const char *plugin_urn = handle->unmap->unmap(handle->unmap->handle, mod_ui->mod->urn);
const char *exec_uri = NULL;
- if(lilv_ui_is_a(ui, handle->regs.ui.x11.node))
+ if(lilv_ui_is_a(ui, NODE(UI__X11UI)))
{
exec_uri = "synthpod_sandbox_x11";
}
- else if(lilv_ui_is_a(ui, handle->regs.ui.gtk2.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__GtkUI)))
{
exec_uri = "synthpod_sandbox_gtk2";
}
- else if(lilv_ui_is_a(ui, handle->regs.ui.gtk3.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Gtk3UI)))
{
exec_uri = "synthpod_sandbox_gtk3";
}
- else if(lilv_ui_is_a(ui, handle->regs.ui.qt4.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Qt4UI)))
{
exec_uri = "synthpod_sandbox_qt4";
}
- else if(lilv_ui_is_a(ui, handle->regs.ui.qt5.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Qt4UI)))
{
exec_uri = "synthpod_sandbox_qt5";
}
- else if(lilv_ui_is_a(ui, handle->regs.ui.kx_widget.node))
+ else if(lilv_ui_is_a(ui, NODE(EXTERNAL_UI__Widget)))
{
exec_uri = "synthpod_sandbox_kx";
}
- else if(lilv_world_ask(handle->world, ui_node, handle->regs.core.extension_data.node, handle->regs.ui.show_interface.node))
+ else if(lilv_world_ask(handle->world, ui_node,
+ NODE(CORE__extensionData), NODE(UI__showInterface)))
{
exec_uri = "synthpod_sandbox_show";
}
@@ -3253,13 +3259,13 @@ _mod_ui_run(mod_ui_t *mod_ui, bool sync)
_mod_subscribe_all(handle, mod);
_patch_notification_add_patch_get(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, 0); // patch:Get []
+ ATOM__eventTransfer, mod->subj, 0, 0); // patch:Get []
if(sync)
{
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.ui.ui.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, UI__ui,
sizeof(uint32_t), ATOM__URID, &mod_ui->urn) )
{
_message_write(handle);
@@ -3315,8 +3321,8 @@ _mod_ui_stop(mod_ui_t *mod_ui, bool sync)
{
const uint32_t dummy = 0;
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge, //FIXME or patcher_del ?
- mod->urn, 0, handle->regs.ui.ui.urid,
+ && synthpod_patcher_set(&handle->forge, //FIXME or patcher_del ?
+ mod->urn, 0, UI__ui,
sizeof(uint32_t), ATOM__URID, &dummy) )
{
_message_write(handle);
@@ -3498,8 +3504,8 @@ _patch_mod_add(plughandle_t *handle, const LilvPlugin *plug)
const LV2_URID urid = handle->map->map(handle->map->handle, uri);
if( _message_request(handle)
- && synthpod_patcher_add(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.module_list.urid, //TODO subject
+ && synthpod_patcher_add(&handle->forge,
+ 0, 0, SYNTHPOD__moduleList, //TODO subject
sizeof(uint32_t), ATOM__URID, &urid) )
{
_message_write(handle);
@@ -3511,8 +3517,8 @@ _patch_mod_remove(plughandle_t *handle, mod_t *mod)
{
DBG;
if( _message_request(handle)
- && synthpod_patcher_remove(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.module_list.urid, //TODO subject
+ && synthpod_patcher_remove(&handle->forge,
+ 0, 0, SYNTHPOD__moduleList, //TODO subject
sizeof(uint32_t), ATOM__URID, &mod->urn) )
{
_message_write(handle);
@@ -3527,8 +3533,8 @@ _patch_mod_preset_set(plughandle_t *handle, mod_t *mod, const LilvNode *preset)
const LV2_URID preset_urid = handle->map->map(handle->map->handle, preset_uri);;
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.pset.preset.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, PRESETS__Preset,
sizeof(uint32_t), ATOM__URID, &preset_urid) )
{
_message_write(handle);
@@ -3553,8 +3559,8 @@ _patch_mod_reinstantiate_set(plughandle_t *handle, mod_t *mod, int32_t state)
mod->dsp_instance = NULL;
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_reinstantiate.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__moduleReinstantiate,
sizeof(int32_t), ATOM__Bool, &state) )
{
_message_write(handle);
@@ -3601,7 +3607,7 @@ _patch_mod_preset_save(plughandle_t *handle)
const LV2_URID preset_urid = handle->map->map(handle->map->handle, preset_path);
if( _message_request(handle)
- && synthpod_patcher_copy(&handle->regs, &handle->forge,
+ && synthpod_patcher_copy(&handle->forge,
mod->urn, 0, preset_urid) )
{
_message_write(handle);
@@ -3707,8 +3713,8 @@ _set_module_idisp_subscription(plughandle_t *handle, mod_t *mod, int32_t state)
{
DBG;
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.idisp.surface.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, INLINEDISPLAY__surface,
sizeof(int32_t), ATOM__Bool, &state) )
{
_message_write(handle);
@@ -3808,7 +3814,7 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
control->is_readonly = is_output;
control->is_int = lilv_port_has_property(plug, port->port, handle->node.lv2_integer);
control->is_bool = lilv_port_has_property(plug, port->port, handle->node.lv2_toggled);
- control->is_logarithmic = lilv_port_has_property(plug, port->port, handle->regs.port.logarithmic.node);
+ control->is_logarithmic = lilv_port_has_property(plug, port->port, NODE(PORT_PROPS__logarithmic));
LilvNode *val = NULL;
LilvNode *min = NULL;
@@ -3870,14 +3876,15 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
control->is_bool = true;
}
- LilvNode *units_unit = lilv_port_get(plug, port->port, handle->regs.units.unit.node);
+ LilvNode *units_unit = lilv_port_get(plug, port->port, NODE(UNITS__unit));
if(units_unit)
{
if(lilv_node_is_uri(units_unit))
{
control->units_symbol = _unit_symbol(handle, lilv_node_as_uri(units_unit));
}
- else if(lilv_world_ask(handle->world, units_unit, handle->regs.rdf.type.node, handle->regs.units.Unit.node))
+ else if(lilv_world_ask(handle->world, units_unit,
+ NODE(RDF__type), NODE(UNITS__Unit)))
{
control->units_symbol = _unit_symbol_obj(handle, units_unit);
}
@@ -3942,7 +3949,7 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
port->type |= PROPERTY_TYPE_XPRESS;
- LilvNode *min_size= lilv_port_get(plug, port->port, handle->regs.port.minimum_size.node);
+ LilvNode *min_size= lilv_port_get(plug, port->port, NODE(RESIZE_PORT__minimumSize));
if(min_size)
{
mod->minimum += sizeof(LV2_Atom_Property) + sizeof(LV2_Atom) + lilv_node_as_int(min_size);
@@ -4158,12 +4165,12 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
const LilvUI *ui = lilv_uis_get(mod->ui_nodes, itr);
const LilvNode *ui_uri = lilv_ui_get_uri(ui);
bool threaded = false;
- const bool x11ui = lilv_ui_is_a(ui, handle->regs.ui.x11.node);
+ const bool x11ui = lilv_ui_is_a(ui, NODE(UI__X11UI));
const bool wants_instance_access = lilv_world_ask(handle->world, ui_uri,
- handle->regs.core.required_feature.node, handle->regs.ui.instance_access.node)
+ NODE(CORE__requiredFeature), NODE(INSTANCE_ACCESS))
|| lilv_world_ask(handle->world, ui_uri,
- handle->regs.core.optional_feature.node, handle->regs.ui.instance_access.node);
+ NODE(CORE__optionalFeature), NODE(INSTANCE_ACCESS));
if(wants_instance_access)
{
if(x11ui && handle->dsp_instance)
@@ -4182,9 +4189,9 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
}
const bool wants_data_access = lilv_world_ask(handle->world, ui_uri,
- handle->regs.core.required_feature.node, handle->regs.ui.data_access.node)
+ NODE(CORE__requiredFeature), NODE(DATA_ACCESS))
|| lilv_world_ask(handle->world, ui_uri,
- handle->regs.core.optional_feature.node, handle->regs.ui.data_access.node);
+ NODE(CORE__optionalFeature), NODE(DATA_ACCESS));
if(wants_data_access)
{
if(x11ui && handle->dsp_instance)
@@ -4211,7 +4218,7 @@ _mod_init(plughandle_t *handle, mod_t *mod, const LilvPlugin *plug)
_mod_subscribe_persistent(handle, mod); // e.g. canvas:graph
_patch_notification_add_patch_get(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, 0); // patch:Get []
+ ATOM__eventTransfer, mod->subj, 0, 0); // patch:Get []
nk_pugl_post_redisplay(&handle->win); //FIXME
}
@@ -4471,7 +4478,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
if(_toolbar_button(ctx, 'n', handle->icon.plus, "New"))
{
if( _message_request(handle)
- && synthpod_patcher_copy(&handle->regs, &handle->forge,
+ && synthpod_patcher_copy(&handle->forge,
handle->self_urn, 0, 0) )
{
_message_write(handle);
@@ -4481,7 +4488,7 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
if(_toolbar_button(ctx, 's', handle->icon.download, "Save"))
{
if( _message_request(handle)
- && synthpod_patcher_copy(&handle->regs, &handle->forge,
+ && synthpod_patcher_copy(&handle->forge,
0, 0, handle->bundle_urn) )
{
_message_write(handle);
@@ -4533,8 +4540,8 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
const LV2_URID subj = 0; // aka host
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- subj, 0, handle->regs.synthpod.row_enabled.urid,
+ && synthpod_patcher_set(&handle->forge,
+ subj, 0, SYNTHPOD__rowEnabled,
sizeof(int32_t), ATOM__Bool, &handle->show_bottombar) )
{
_message_write(handle);
@@ -4549,8 +4556,8 @@ _expose_main_header(plughandle_t *handle, struct nk_context *ctx, float dy)
const LV2_URID subj = 0; // aka host
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- subj, 0, handle->regs.synthpod.column_enabled.urid,
+ && synthpod_patcher_set(&handle->forge,
+ subj, 0, SYNTHPOD__columnEnabled,
sizeof(int32_t), ATOM__Bool, &handle->show_sidebar) )
{
_message_write(handle);
@@ -5663,7 +5670,7 @@ _expose_port(struct nk_context *ctx, mod_t *mod, port_t *port, float DY, float d
? port->control.val.i
: port->control.val.f;
- _patch_notification_add(handle, port, handle->regs.port.float_protocol.urid,
+ _patch_notification_add(handle, port, UI__floatProtocol,
sizeof(float), ATOM__Float, &val);
// route to ui
@@ -5985,31 +5992,31 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
if(param->range == ATOM__Int)
{
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(int32_t), ATOM__Int, &param->val.i);
}
else if(param->range == ATOM__Bool)
{
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(int32_t), ATOM__Bool, &param->val.i);
}
else if(param->range == ATOM__Long)
{
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(int64_t), ATOM__Long, &param->val.h);
}
else if(param->range == ATOM__Float)
{
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(float), ATOM__Float, &param->val.f);
}
else if(param->range == ATOM__Double)
{
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(double), ATOM__Double, &param->val.d);
}
else if(param->range == ATOM__String)
@@ -6018,7 +6025,7 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
const uint32_t sz= nk_str_len_char(&param->val.editor.string) + 1;
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sz, ATOM__String, str);
}
else if(param->range == ATOM__Path)
@@ -6027,7 +6034,7 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
const uint32_t sz= nk_str_len_char(&param->val.editor.string) + 1;
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sz, ATOM__Path, str);
}
else if(param->range == ATOM__URI)
@@ -6036,7 +6043,7 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
const uint32_t sz= nk_str_len_char(&param->val.editor.string) + 1;
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sz, ATOM__URI, str);
}
else if(param->range == ATOM__URID)
@@ -6049,7 +6056,7 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
const uint32_t urid = handle->map->map(handle->map->handle, uri);
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
sizeof(uint32_t), ATOM__URID, &urid);
}
else if(param->range == ATOM__Chunk)
@@ -6057,7 +6064,7 @@ _param_notification_add(plughandle_t *handle, mod_t *mod, param_t *param)
chunk_t *chunk = &param->val.chunk;
_patch_notification_add_patch_set(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, param->property,
+ ATOM__eventTransfer, mod->subj, 0, param->property,
chunk->size, ATOM__Chunk, chunk->body);
}
//FIXME handle remaining types
@@ -6318,7 +6325,7 @@ _set_module_selector(plughandle_t *handle, mod_t *mod)
_mod_subscribe_all(handle, mod);
_patch_notification_add_patch_get(handle, mod,
- handle->regs.port.event_transfer.urid, mod->subj, 0, 0); // patch:Get []
+ ATOM__eventTransfer, mod->subj, 0, 0); // patch:Get []
}
handle->module_selector = mod;
@@ -6734,16 +6741,16 @@ _mod_moveable(plughandle_t *handle, struct nk_context *ctx, mod_t *mod,
}
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_x.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionX,
sizeof(float), ATOM__Float, &mod->pos.x) )
{
_message_write(handle);
}
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_y.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionY,
sizeof(float), ATOM__Float, &mod->pos.y) )
{
_message_write(handle);
@@ -7533,7 +7540,7 @@ _mod_randomize(plughandle_t *handle, mod_t *mod)
const float val = port->control.is_bool || port->control.is_int
? port->control.val.i
: port->control.val.f;
- _patch_notification_add(handle, port, handle->regs.port.float_protocol.urid,
+ _patch_notification_add(handle, port, UI__floatProtocol,
sizeof(float), ATOM__Float, &val);
}
}
@@ -7599,16 +7606,16 @@ _expose_main_body(plughandle_t *handle, struct nk_context *ctx, float dh, float
const LV2_URID subj = 0; // aka host
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- subj, 0, handle->regs.synthpod.graph_position_x.urid,
+ && synthpod_patcher_set(&handle->forge,
+ subj, 0, SYNTHPOD__graphPositionX,
sizeof(float), ATOM__Float, &handle->scrolling.x) )
{
_message_write(handle);
}
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- subj, 0, handle->regs.synthpod.graph_position_y.urid,
+ && synthpod_patcher_set(&handle->forge,
+ subj, 0, SYNTHPOD__graphPositionY,
sizeof(float), ATOM__Float, &handle->scrolling.y) )
{
_message_write(handle);
@@ -8077,8 +8084,8 @@ _expose_main_body(plughandle_t *handle, struct nk_context *ctx, float dh, float
if( (flags & NK_EDIT_COMMITED) || (old_len != strlen(mod->alias)) )
{
if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_alias.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__moduleAlias,
strlen(mod->alias) + 1, ATOM__String, mod->alias) )
{
_message_write(handle);
@@ -8105,19 +8112,20 @@ _expose_main_body(plughandle_t *handle, struct nk_context *ctx, float dh, float
if(!single_ui)
{
- if(lilv_ui_is_a(ui, handle->regs.ui.x11.node))
+ if(lilv_ui_is_a(ui, NODE(UI__X11UI)))
label = "X11";
- else if(lilv_ui_is_a(ui, handle->regs.ui.gtk2.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__GtkUI)))
label = "Gtk2";
- else if(lilv_ui_is_a(ui, handle->regs.ui.gtk3.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Gtk3UI)))
label = "Gtk3";
- else if(lilv_ui_is_a(ui, handle->regs.ui.qt4.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Qt4UI)))
label = "Qt4";
- else if(lilv_ui_is_a(ui, handle->regs.ui.qt5.node))
+ else if(lilv_ui_is_a(ui, NODE(UI__Qt5UI)))
label = "Qt5";
- else if(lilv_ui_is_a(ui, handle->regs.ui.kx_widget.node))
+ else if(lilv_ui_is_a(ui, NODE(EXTERNAL_UI__Widget)))
label = "KX";
- else if(lilv_world_ask(handle->world, ui_node, handle->regs.core.extension_data.node, handle->regs.ui.show_interface.node))
+ else if(lilv_world_ask(handle->world, ui_node,
+ NODE(CORE__extensionData), NODE(UI__showInterface)))
label = "Show";
}
@@ -8254,76 +8262,76 @@ _init(plughandle_t *handle)
_discover_bundles(handle);
- sp_regs_init(&handle->regs, handle->world, handle->map);
+ sp_regs_init(handle->regs, handle->world);
// patch:Get [patch:property spod:moduleList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.module_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__moduleList) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:CPUsAvailable]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.cpus_available.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__CPUsAvailable) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:CPUsUsed]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.cpus_used.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__CPUsUsed) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:periodSize]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.period_size.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__periodSize) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:numPeriods]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.num_periods.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__numPeriods) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:graphPositionX]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.graph_position_x.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__graphPositionX) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:graphPositionY]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.graph_position_y.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__graphPositionY) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:columnEnabled]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.column_enabled.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__columnEnabled) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:rowEnabled]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.row_enabled.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__rowEnabled) )
{
_message_write(handle);
}
@@ -8335,33 +8343,7 @@ _deinit(plughandle_t *handle)
DBG;
if(handle->world)
{
- sp_regs_deinit(&handle->regs);
-
- lilv_node_free(handle->node.pg_group);
- lilv_node_free(handle->node.lv2_integer);
- lilv_node_free(handle->node.lv2_toggled);
- lilv_node_free(handle->node.lv2_minimum);
- lilv_node_free(handle->node.lv2_maximum);
- lilv_node_free(handle->node.lv2_default);
- lilv_node_free(handle->node.pset_Preset);
- lilv_node_free(handle->node.pset_bank);
- lilv_node_free(handle->node.rdfs_comment);
- lilv_node_free(handle->node.rdfs_range);
- lilv_node_free(handle->node.doap_name);
- lilv_node_free(handle->node.lv2_minorVersion);
- lilv_node_free(handle->node.lv2_microVersion);
- lilv_node_free(handle->node.doap_license);
- lilv_node_free(handle->node.rdfs_label);
- lilv_node_free(handle->node.lv2_name);
- lilv_node_free(handle->node.lv2_OutputPort);
- lilv_node_free(handle->node.lv2_AudioPort);
- lilv_node_free(handle->node.lv2_CVPort);
- lilv_node_free(handle->node.lv2_ControlPort);
- lilv_node_free(handle->node.atom_AtomPort);
- lilv_node_free(handle->node.patch_readable);
- lilv_node_free(handle->node.patch_writable);
- lilv_node_free(handle->node.rdf_type);
- lilv_node_free(handle->node.lv2_Plugin);
+ sp_regs_deinit(handle->regs);
_undiscover_bundles(handle);
@@ -8720,11 +8702,11 @@ _add_connection(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom_Float *link_gain = NULL;
lv2_atom_object_get(obj,
- handle->regs.synthpod.source_module.urid, &src_module,
- handle->regs.synthpod.source_symbol.urid, &src_symbol,
- handle->regs.synthpod.sink_module.urid, &snk_module,
- handle->regs.synthpod.sink_symbol.urid, &snk_symbol,
- handle->regs.param.gain.urid, &link_gain,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sourceSymbol, &src_symbol,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__sinkSymbol, &snk_symbol,
+ PARAMETERS__gain, &link_gain,
0);
const LV2_URID src_urn = src_module
@@ -8776,10 +8758,10 @@ _rem_connection(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom *snk_symbol = NULL;
lv2_atom_object_get(obj,
- handle->regs.synthpod.source_module.urid, &src_module,
- handle->regs.synthpod.source_symbol.urid, &src_symbol,
- handle->regs.synthpod.sink_module.urid, &snk_module,
- handle->regs.synthpod.sink_symbol.urid, &snk_symbol,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sourceSymbol, &src_symbol,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__sinkSymbol, &snk_symbol,
0);
const LV2_URID src_urn = src_module
@@ -8825,10 +8807,10 @@ _add_node(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom_Float *pos_y = NULL;
lv2_atom_object_get(obj,
- handle->regs.synthpod.source_module.urid, &src_module,
- handle->regs.synthpod.sink_module.urid, &snk_module,
- handle->regs.synthpod.node_position_x.urid, &pos_x,
- handle->regs.synthpod.node_position_y.urid, &pos_y,
+ SYNTHPOD__sourceModule, &src_module,
+ SYNTHPOD__sinkModule, &snk_module,
+ SYNTHPOD__nodePositionX, &pos_x,
+ SYNTHPOD__nodePositionY, &pos_y,
0);
const LV2_URID src_urn = src_module
@@ -8879,18 +8861,18 @@ _add_automation(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom_Bool *snk_enabled = NULL;
lv2_atom_object_get(obj,
- handle->regs.synthpod.sink_module.urid, &src_module,
- handle->regs.synthpod.sink_symbol.urid, &src_symbol,
- handle->regs.patch.property.urid, &src_property,
- handle->regs.midi.channel.urid, &midi_channel,
- handle->regs.midi.controller_number.urid, &midi_controller,
- handle->regs.osc.path.urid, &osc_path,
- handle->regs.synthpod.source_min.urid, &src_min,
- handle->regs.synthpod.source_max.urid, &src_max,
- handle->regs.synthpod.sink_min.urid, &snk_min,
- handle->regs.synthpod.sink_max.urid, &snk_max,
- handle->regs.synthpod.source_enabled.urid, &src_enabled,
- handle->regs.synthpod.sink_enabled.urid, &snk_enabled,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
+ PATCH__property, &src_property,
+ MIDI__channel, &midi_channel,
+ MIDI__controllerNumber, &midi_controller,
+ OSC__messagePath, &osc_path,
+ SYNTHPOD__sourceMinimum, &src_min,
+ SYNTHPOD__sourceMaximum, &src_max,
+ SYNTHPOD__sinkMinimum, &snk_min,
+ SYNTHPOD__sinkMaximum, &snk_max,
+ SYNTHPOD__sourceEnabled, &src_enabled,
+ SYNTHPOD__sinkEnabled, &snk_enabled,
0);
const LV2_URID src_urn = src_module
@@ -8941,7 +8923,7 @@ _add_automation(plughandle_t *handle, const LV2_Atom_Object *obj)
automation->c = snk_min ? snk_min->body : 0.0; //FIXME
automation->d = snk_max ? snk_max->body : 0.0; //FIXME
- if(obj->body.otype == handle->regs.midi.Controller.urid)
+ if(obj->body.otype == MIDI__Controller)
{
automation->type = AUTO_MIDI;
midi_auto_t *mauto = &automation->midi;
@@ -8952,7 +8934,7 @@ _add_automation(plughandle_t *handle, const LV2_Atom_Object *obj)
mauto->channel = midi_channel ? midi_channel->body : -1;
mauto->controller = midi_controller ? midi_controller->body : -1;
}
- else if(obj->body.otype == handle->regs.osc.message.urid)
+ else if(obj->body.otype == OSC__Message)
{
automation->type = AUTO_OSC;
osc_auto_t *oauto = &automation->osc;
@@ -8974,9 +8956,9 @@ _add_notification(plughandle_t *handle, const LV2_Atom_Object *obj)
const LV2_Atom *src_value = NULL;
lv2_atom_object_get(obj,
- handle->regs.synthpod.sink_module.urid, &src_module,
- handle->regs.synthpod.sink_symbol.urid, &src_symbol,
- handle->regs.rdf.value.urid, &src_value,
+ SYNTHPOD__sinkModule, &src_module,
+ SYNTHPOD__sinkSymbol, &src_symbol,
+ RDF__value, &src_value,
0);
const LV2_URID src_urn = src_module
@@ -9011,7 +8993,7 @@ _add_mod(plughandle_t *handle, const LV2_Atom_URID *urn)
// get information for each of those, FIXME only if not already available
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
+ && synthpod_patcher_get(&handle->forge,
urn->body, 0, 0) )
{
_message_write(handle);
@@ -9042,22 +9024,22 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
if(port_index == 15) // notify
{
- if(format == handle->regs.port.event_transfer.urid)
+ if(format == ATOM__eventTransfer)
{
const LV2_Atom_Object *obj = buffer;
if(lv2_atom_forge_is_object_type(&handle->forge, obj->atom.type))
{
- if(obj->body.otype == handle->regs.patch.set.urid)
+ if(obj->body.otype == PATCH__Set)
{
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_URID *property = NULL;
const LV2_Atom *value = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.property.urid, &property,
- handle->regs.patch.value.urid, &value,
+ PATCH__subject, &subject,
+ PATCH__property, &property,
+ PATCH__value, &value,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -9071,7 +9053,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
{
//printf("got patch:Set: %s\n", handle->unmap->unmap(handle->unmap->handle, prop));
- if( (prop == handle->regs.synthpod.module_list.urid)
+ if( (prop == SYNTHPOD__moduleList)
&& (value->type == ATOM__Tuple) )
{
const LV2_Atom_Tuple *tup = (const LV2_Atom_Tuple *)value;
@@ -9090,37 +9072,37 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
// patch:Get [patch:property spod:connectionList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.connection_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__connectionList) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:nodeList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.node_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__nodeList) )
{
_message_write(handle);
}
// patch:Get [patch:property pset:preset]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.pset.preset.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, PRESETS__Preset) )
{
_message_write(handle);
}
// patch:Get [patch:property spod:automationList]
if( _message_request(handle)
- && synthpod_patcher_get(&handle->regs, &handle->forge,
- 0, 0, handle->regs.synthpod.automation_list.urid) )
+ && synthpod_patcher_get(&handle->forge,
+ 0, 0, SYNTHPOD__automationList) )
{
_message_write(handle);
}
}
- else if( (prop == handle->regs.synthpod.connection_list.urid)
+ else if( (prop == SYNTHPOD__connectionList)
&& (value->type == ATOM__Tuple) )
{
const LV2_Atom_Tuple *tup = (const LV2_Atom_Tuple *)value;
@@ -9136,7 +9118,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
_add_connection(handle, (const LV2_Atom_Object *)itm);
}
}
- else if( (prop == handle->regs.synthpod.node_list.urid)
+ else if( (prop == SYNTHPOD__nodeList)
&& (value->type == ATOM__Tuple) )
{
const LV2_Atom_Tuple *tup = (const LV2_Atom_Tuple *)value;
@@ -9146,14 +9128,14 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
_add_node(handle, (const LV2_Atom_Object *)itm);
}
}
- else if( (prop == handle->regs.pset.preset.urid)
+ else if( (prop == PRESETS__Preset)
&& (value->type == ATOM__URID) )
{
const LV2_Atom_URID *urid = (const LV2_Atom_URID *)value;
handle->bundle_urn = urid->body;
}
- else if( (prop == handle->regs.synthpod.automation_list.urid)
+ else if( (prop == SYNTHPOD__automationList)
&& (value->type == ATOM__Tuple) )
{
const LV2_Atom_Tuple *tup = (const LV2_Atom_Tuple *)value;
@@ -9163,7 +9145,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
_add_automation(handle, (const LV2_Atom_Object *)itm);
}
}
- else if( (prop == handle->regs.synthpod.dsp_profiling.urid)
+ else if( (prop == SYNTHPOD__DSPProfiling)
&& (value->type == ATOM__Vector) )
{
const LV2_Atom_Vector *vec = (const LV2_Atom_Vector *)value;
@@ -9175,7 +9157,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.module_profiling.urid)
+ else if( (prop == SYNTHPOD__moduleProfiling)
&& (value->type == ATOM__Vector)
&& subj )
{
@@ -9192,7 +9174,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
}
- else if( (prop == handle->regs.ui.instance_access.urid)
+ else if( (prop == INSTANCE_ACCESS)
&& (value->type == ATOM__Long)
&& subj )
{
@@ -9204,7 +9186,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
mod->dsp_instance = (LilvInstance *)ptr->body;
}
}
- else if( (prop == handle->regs.synthpod.graph_position_x.urid)
+ else if( (prop == SYNTHPOD__graphPositionX)
&& (value->type == ATOM__Float) )
{
const LV2_Atom_Float *graph_position_x = (const LV2_Atom_Float *)value;
@@ -9213,7 +9195,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.graph_position_y.urid)
+ else if( (prop == SYNTHPOD__graphPositionY)
&& (value->type == ATOM__Float) )
{
const LV2_Atom_Float *graph_position_y = (const LV2_Atom_Float *)value;
@@ -9222,7 +9204,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.column_enabled.urid)
+ else if( (prop == SYNTHPOD__columnEnabled)
&& (value->type == ATOM__Bool) )
{
const LV2_Atom_Bool *column_enabled = (const LV2_Atom_Bool *)value;
@@ -9231,7 +9213,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.row_enabled.urid)
+ else if( (prop == SYNTHPOD__rowEnabled)
&& (value->type == ATOM__Bool) )
{
const LV2_Atom_Bool *row_enabled = (const LV2_Atom_Bool *)value;
@@ -9240,7 +9222,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.cpus_used.urid)
+ else if( (prop == SYNTHPOD__CPUsUsed)
&& (value->type == ATOM__Int) )
{
const LV2_Atom_Int *cpus_used = (const LV2_Atom_Int *)value;
@@ -9249,7 +9231,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.cpus_available.urid)
+ else if( (prop == SYNTHPOD__CPUsAvailable)
&& (value->type == ATOM__Int) )
{
const LV2_Atom_Int *cpus_available = (const LV2_Atom_Int *)value;
@@ -9258,7 +9240,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.period_size.urid)
+ else if( (prop == SYNTHPOD__periodSize)
&& (value->type == ATOM__Int) )
{
const LV2_Atom_Int *period_size = (const LV2_Atom_Int *)value;
@@ -9267,7 +9249,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.synthpod.num_periods.urid)
+ else if( (prop == SYNTHPOD__numPeriods)
&& (value->type == ATOM__Int) )
{
const LV2_Atom_Int *num_periods = (const LV2_Atom_Int *)value;
@@ -9276,7 +9258,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
nk_pugl_post_redisplay(&handle->win);
}
- else if( (prop == handle->regs.idisp.surface.urid)
+ else if( (prop == INLINEDISPLAY__surface)
&& (value->type == ATOM__Tuple)
&& subj )
{
@@ -9308,14 +9290,14 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
}
}
}
- else if(obj->body.otype == handle->regs.patch.put.urid)
+ else if(obj->body.otype == PATCH__Put)
{
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_Object *body = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.body.urid, &body,
+ PATCH__subject, &subject,
+ PATCH__body, &body,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -9334,12 +9316,12 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
const LV2_Atom_Long *instance_access = NULL;
lv2_atom_object_get(body,
- handle->regs.core.plugin.urid, &plugin,
- handle->regs.synthpod.module_position_x.urid, &mod_pos_x,
- handle->regs.synthpod.module_position_y.urid, &mod_pos_y,
- handle->regs.synthpod.module_alias.urid, &mod_alias,
- handle->regs.ui.ui.urid, &ui_uri, //FIXME use this
- handle->regs.ui.instance_access.urid, &instance_access,
+ CORE__Plugin, &plugin,
+ SYNTHPOD__modulePositionX, &mod_pos_x,
+ SYNTHPOD__modulePositionY, &mod_pos_y,
+ SYNTHPOD__moduleAlias, &mod_alias,
+ UI__ui, &ui_uri, //FIXME use this
+ INSTANCE_ACCESS, &instance_access,
0); //FIXME query more
const LV2_URID urid = plugin
@@ -9378,8 +9360,8 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
mod->pos.x = mod_pos_x->body;
}
else if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_x.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionX,
sizeof(float), ATOM__Float, &mod->pos.x) )
{
_message_write(handle);
@@ -9390,8 +9372,8 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
mod->pos.y = mod_pos_y->body;
}
else if( _message_request(handle)
- && synthpod_patcher_set(&handle->regs, &handle->forge,
- mod->urn, 0, handle->regs.synthpod.module_position_y.urid,
+ && synthpod_patcher_set(&handle->forge,
+ mod->urn, 0, SYNTHPOD__modulePositionY,
sizeof(float), ATOM__Float, &mod->pos.y) )
{
_message_write(handle);
@@ -9429,16 +9411,16 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
}
//TODO
}
- else if(obj->body.otype == handle->regs.patch.patch.urid)
+ else if(obj->body.otype == PATCH__Patch)
{
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_Object *add = NULL;
const LV2_Atom_Object *rem = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.add.urid, &add,
- handle->regs.patch.remove.urid, &rem,
+ PATCH__subject, &subject,
+ PATCH__add, &add,
+ PATCH__remove, &rem,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -9453,27 +9435,27 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
//_log_note(handle, "%s: got patch:remove for <%s>\n", __func__,
// handle->unmap->unmap(handle->unmap->handle, prop->key));
- if( (prop->key == handle->regs.synthpod.connection_list.urid)
+ if( (prop->key == SYNTHPOD__connectionList)
&& (prop->value.type == ATOM__Object) )
{
_rem_connection(handle, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.node_list.urid)
+ else if( (prop->key == SYNTHPOD__nodeList)
&& (prop->value.type == ATOM__Object) )
{
//FIXME never reached
}
- else if( (prop->key == handle->regs.synthpod.notification_list.urid)
+ else if( (prop->key == SYNTHPOD__notificationList)
&& (prop->value.type == ATOM__Object) )
{
//FIXME never reached
}
- else if( (prop->key == handle->regs.synthpod.module_list.urid)
+ else if( (prop->key == SYNTHPOD__moduleList)
&& (prop->value.type == ATOM__URID) )
{
_rem_mod(handle, (const LV2_Atom_URID *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.automation_list.urid)
+ else if( (prop->key == SYNTHPOD__automationList)
&& (prop->value.type == ATOM__URID) )
{
//FIXME implement
@@ -9485,27 +9467,27 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
//_log_note(handle, "%s: got patch:add for <%s>\n", __func__,
// handle->unmap->unmap(handle->unmap->handle, prop->key));
- if( (prop->key == handle->regs.synthpod.connection_list.urid)
+ if( (prop->key == SYNTHPOD__connectionList)
&& (prop->value.type == ATOM__Object) )
{
_add_connection(handle, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.node_list.urid)
+ else if( (prop->key == SYNTHPOD__nodeList)
&& (prop->value.type == ATOM__Object) )
{
_add_node(handle, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.notification_list.urid)
+ else if( (prop->key == SYNTHPOD__notificationList)
&& (prop->value.type == ATOM__Object) )
{
_add_notification(handle, (const LV2_Atom_Object *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.module_list.urid)
+ else if( (prop->key == SYNTHPOD__moduleList)
&& (prop->value.type == ATOM__URID) )
{
_add_mod(handle, (const LV2_Atom_URID *)&prop->value);
}
- else if( (prop->key == handle->regs.synthpod.automation_list.urid)
+ else if( (prop->key == SYNTHPOD__automationList)
&& (prop->value.type == ATOM__Object) )
{
_add_automation(handle, (const LV2_Atom_Object *)&prop->value);
@@ -9513,14 +9495,14 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
}
}
}
- else if(obj->body.otype == handle->regs.patch.copy.urid)
+ else if(obj->body.otype == PATCH__Copy)
{
const LV2_Atom_URID *subject = NULL;
const LV2_Atom_URID *destination = NULL;
lv2_atom_object_get(obj,
- handle->regs.patch.subject.urid, &subject,
- handle->regs.patch.destination.urid, &destination,
+ PATCH__subject, &subject,
+ PATCH__destination, &destination,
0);
const LV2_URID subj = subject && (subject->atom.type == ATOM__URID)
@@ -9541,7 +9523,7 @@ port_event(LV2UI_Handle instance, uint32_t port_index, uint32_t size,
: bndl;
// reload presets for this module
- mod->presets = _preset_reload(handle->world, &handle->regs, mod->plug,
+ mod->presets = _preset_reload(handle->world, handle->regs, mod->plug,
mod->presets, bndl);
}
}
diff --git a/sandbox_ui.lv2/meson.build b/sandbox_ui.lv2/meson.build
index eead1bb2..48c3563e 100644
--- a/sandbox_ui.lv2/meson.build
+++ b/sandbox_ui.lv2/meson.build
@@ -6,6 +6,6 @@ sbox_master = static_library('sbox_master',
sbox_slave = static_library('sbox_slave',
['sandbox_slave.c', '../bin/synthpod_stat.c'], #FIXME
- include_directories : [inc_incs, ardour_incs, varchunk_incs, mapper_incs, netatom_incs, xpress_incs, extui_incs],
+ include_directories : [inc_incs, ardour_incs, varchunk_incs, mapper_incs, netatom_incs, xpress_incs, extui_incs, osc_incs, canvas_incs],
c_args : c_args,
dependencies : [lv2_dep, lilv_dep])