*** ricardocrudo has quit IRC | 00:33 | |
*** falktx has quit IRC | 01:16 | |
*** edogawa_ has quit IRC | 02:03 | |
*** triune has quit IRC | 02:40 | |
*** triune has joined #lv2 | 02:42 | |
*** damo22 has joined #lv2 | 09:00 | |
*** damo22 has quit IRC | 09:36 | |
*** damo22 has joined #lv2 | 09:36 | |
*** damo22 has quit IRC | 09:38 | |
*** damo22 has joined #lv2 | 09:39 | |
*** damo22 has quit IRC | 09:39 | |
*** damo22 has joined #lv2 | 09:40 | |
*** damo22 has quit IRC | 09:47 | |
*** damo22 has joined #lv2 | 09:47 | |
*** damo22 has quit IRC | 10:02 | |
*** damo22 has joined #lv2 | 10:02 | |
*** damo22 has quit IRC | 10:05 | |
*** damo22 has joined #lv2 | 10:06 | |
*** damo22 has quit IRC | 10:06 | |
*** damo22 has joined #lv2 | 10:06 | |
*** edogawa has joined #lv2 | 10:46 | |
*** damo22 has quit IRC | 10:53 | |
*** falktx has joined #lv2 | 11:05 | |
*** ricardocrudo has joined #lv2 | 13:04 | |
*** falktx has quit IRC | 15:45 | |
*** falktx has joined #lv2 | 15:46 | |
*** bgribble has joined #lv2 | 17:51 | |
bgribble | hey lv2ers. I'm trying something a bit nonstandard with an lv2 plug and I'm a bit stymied. My app is a puredata-type patching system. I have added a "save as LV2" option which saves a patch file, TTL file, and .so in an LV2 dir. The LV2 implementation is generic and loads the saved patch file in the normal app engine at instantiation time. | 17:58 |
---|---|---|
bgribble | this mostly works. | 17:58 |
bgribble | the problem is that the .so has to return an appropriate unique URI in its descriptor function, where the URI of the plugin is basically the name of the patch file, which the .so does not know at compile time | 17:59 |
bgribble | and no information gets passed in to the descriptor function that would let the .so know what plugin the host is looking for | 18:00 |
falktx | linux has ways the know the current running shared lib name | 18:00 |
falktx | bgribble: a file:/// path is a valid URI, you could use that | 18:01 |
bgribble | I have kludged this into working by saving, in the LV2 dir of the plugin, a symlink to the .so where the name of the symlink includes the patch file name (i.e. the actual implementation is libmfpdsp.so, but in saved plugin mfp_stereo2param.lv2 the symlink will be called libmfp_stereo2param_lv2.so) | 18:01 |
falktx | if this is not meant to be shared across users, you can use local filepaths | 18:02 |
bgribble | then I can use dladdr() to get the name of the library and work backwards to figure out what URI is being queried for | 18:02 |
bgribble | falktx: not sure I understand | 18:03 |
falktx | you can use "<>" as URI in the ttl, which resolves to its current path | 18:04 |
falktx | say file:///home/me/bundle.lv2/this.ttl | 18:04 |
falktx | the shared lib could look for the ttl and match that URI | 18:04 |
* bgribble perks up ears | 18:04 | |
bgribble | ah, ok. but I didn't mention tha last part of the problem, which is still a problem: | 18:05 |
bgribble | my solution (basically the same as yours, but using a different strategy to get the URI) works fine for the first plugin implemented by the library that is loaded by the host | 18:05 |
bgribble | but when you want to load a second saved patch in the same host, dladdr() "intelligently" sees that the .so is actually the same even though it was found by different names, and returns the first path that was used to load it | 18:06 |
Anchakor | bgribble: your solution is quite ugly hack | 18:08 |
bgribble | anchakor: thank you! I agree | 18:08 |
Anchakor | 1) it has this problem which it wouldn't have if you used <> | 18:08 |
Anchakor | 2) it is not crossplatform | 18:08 |
bgribble | anchakor: I don't see how <> would help. I'm willing to use it if it does! | 18:09 |
Anchakor | btw Ingen also does this (saving patches as lv2 plugins) so you might look into its code | 18:09 |
bgribble | ok, I'll have a look | 18:10 |
Anchakor | <> would help because file:///home/me/bundle.lv2/patch1.ttl is different from file:///home/me/bundle.lv2/patch2.ttl | 18:10 |
bgribble | ok, but what would the descriptor function return? how would it know what plugin the host is trying to instantiate? | 18:11 |
*** edogawa_ has joined #lv2 | 18:12 | |
bgribble | I don't really have a problem coming up with unique URIs, which is why I didn't think <> would help... the problem is that the library can instantiate basically a wildcarded URI with any value at the tail | 18:12 |
Anchakor | yeah, look into ingen code how it manages returning the valid URI | 18:14 |
*** edogawa has quit IRC | 18:15 | |
*** edogawa_ is now known as edogawa | 18:15 | |
Anchakor | bgribble: I might have misunderstood your problem, but wouldn't it be easiest to make the generic .so look for a manifest.ttl in the dir they both are and get the URI from it on load? | 18:34 |
bgribble | anchakor: yep, that's what I do, the problem is that the only way I know to find the path is dladdr() and it always returns the same thing (wherever the .so was when first loaded) | 18:36 |
bgribble | maybe if I copy rather than symlinking the library it will work, I'll try that | 18:37 |
Anchakor | yeah, you need to copy the .so around | 18:37 |
bgribble | anyway thatnks for the ingen tip I'll look at it | 18:37 |
Anchakor | I'd stick with the copied-.so solution if it works, seriously doubt ingen is doing something else (maybe baking it's own .so for each patch?) | 18:39 |
edogawa | hm i think ingen just saves ttl files, at least when i tried back in februauy it saved just a manifest.ttl and another ttl named after that patch | 19:13 |
Anchakor | yeah but it the plugin itself needs to know the URI to return in the descriptor | 19:14 |
edogawa | you surely know details better than me, no idea really | 19:14 |
bgribble | anchakor, edogawa: it looks like this is all just me failing to find something in the lv2 dox... there appears to be a "new" descriptor-function signature that includes the bundle_path, which is all I need. not sure if it is what I need but it looks like it. | 19:47 |
bgribble | the "lv2_lib_descriptor()" signature. | 19:52 |
Anchakor | yeah I saw that, but I thought you still had to have the other one too | 19:52 |
falktx | ingen only uses the new one | 19:56 |
Anchakor | bgribble: btw is there anywhere when we can track your progress on your plugin? would be great to have another modular/semi-modular synth | 20:05 |
bgribble | anchakor: http://github.com/bgribble/mfp | 20:30 |
falktx | needs some screenshots | 20:36 |
bgribble | there are a few in the LAC paper in doc/ | 20:39 |
*** drobilla has joined #lv2 | 21:43 | |
*** bgribble has quit IRC | 21:55 | |
*** edogawa has quit IRC | 23:09 | |
*** edogawa has joined #lv2 | 23:16 | |
*** edogawa has quit IRC | 23:17 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!