*** artfwo has quit IRC | 01:29 | |
*** artfwo has joined #lv2 | 01:30 | |
*** artfwo has quit IRC | 01:59 | |
*** chaot4 has quit IRC | 02:01 | |
*** chaot4 has joined #lv2 | 02:02 | |
*** trebmuh has quit IRC | 04:00 | |
*** oofus_lt has joined #lv2 | 06:52 | |
*** Anchakor has quit IRC | 08:45 | |
*** ssam2 has joined #lv2 | 09:15 | |
*** Yruama_Lairba has joined #lv2 | 09:23 | |
*** trebmuh has joined #lv2 | 09:40 | |
*** yann-kaelig has joined #lv2 | 09:47 | |
*** NickSB2 has quit IRC | 10:21 | |
*** NickSB2 has joined #lv2 | 10:27 | |
*** edo_pc has joined #lv2 | 11:27 | |
*** artfwo has joined #lv2 | 12:31 | |
*** yann-kaelig has quit IRC | 12:50 | |
*** NickSB2 has quit IRC | 13:42 | |
*** m4l3z has joined #lv2 | 14:07 | |
*** m4l3z has quit IRC | 14:44 | |
*** oofus_lt has quit IRC | 14:58 | |
*** edo_pc has quit IRC | 15:12 | |
*** m4l3z has joined #lv2 | 16:30 | |
*** deva has joined #lv2 | 17:03 | |
*** ssam2 has quit IRC | 17:06 | |
*** rncbc has joined #lv2 | 18:00 | |
*** rncbc has quit IRC | 18:19 | |
*** rncbc has joined #lv2 | 18:55 | |
*** NickSB2 has joined #lv2 | 19:16 | |
*** _FrnchFrgg_ has joined #lv2 | 19:53 | |
_FrnchFrgg_ | Hi. I'm hoping to be able to add noise print saving to Noise Repellent (https://github.com/lucianodato/noise-repellent) using LV2:State | 19:55 |
---|---|---|
ssj71 | good idea | 19:55 |
_FrnchFrgg_ | I think I got the gist of it, but I'm not completely sure how to map the float* array to LV2:Vector | 19:55 |
ssj71 | ah, I haven't done that | 19:56 |
_FrnchFrgg_ | I'll search again for a bit (I'm a complete newbie about the LV2 spec) | 19:56 |
_FrnchFrgg_ | ssj71: You mean there's another way to save a table of 1024 floats ? | 19:57 |
ssj71 | well I'm sure you could save it as a file and save the path, but thats not likely to be the best way | 19:57 |
_FrnchFrgg_ | (the number of floats is a compile-time option, but I intend to save it with the state and check if it matches before loading the noise profile) | 19:57 |
ssj71 | all my lv2:state experience so far was with single numbers or file paths | 19:58 |
_FrnchFrgg_ | It's the number of FFT buckets. | 19:58 |
_FrnchFrgg_ | ssj71: Yes, single numbers looks like it's very easy. | 19:58 |
_FrnchFrgg_ | I somehow hoped that convolv2 by rgareus would have an example of array (for the IR), but he saves the path to the audio file IIUC | 19:59 |
_FrnchFrgg_ | Maybe setBfree, but rgareus said it has so many parameters that it's terrifying ;) | 20:00 |
ssj71 | have you tried just treating the array the same way as the numbers but calling it an lv2:vector? | 20:01 |
ssj71 | unless someone knowledgable chimes in here I'd post to the lv2dev mailing list | 20:01 |
*** m4l3z has quit IRC | 20:02 | |
ssj71 | its slow but you usually get an answer | 20:02 |
* rgareus tries to recall which of his plugins do use an array | 20:04 | |
rgareus | https://github.com/x42/sisco.lv2/blob/master/src/sisco.c#L345-L466 a bit on the verbose side though | 20:09 |
rgareus | https://github.com/x42/meters.lv2/blob/master/src/goniometerlv2.c#L198-L254 is a bit better | 20:10 |
ssj71 | The example in the docs for atom:Vector give a nice example. Once you have that I think you can just save/read the state with type atom:Vector | 20:11 |
ssj71 | rgareus: did you do a vector rather than a bunch of individual state variables for code cleanliness? or are there other factors? | 20:12 |
_FrnchFrgg_ | rgareus: Thanks. Because the whole "serialize into a temp var with a memset file then save that string" of setBfree wasn't very enticing. | 20:12 |
rgareus | _FrnchFrgg_: setBfree was a jack app at first | 20:13 |
rgareus | _FrnchFrgg_: and I went to some length to be able to re-use the same .cfg .pgm format that has existed 10 years before there was LV2 | 20:13 |
_FrnchFrgg_ | rgareus: I know the reasons. That doesn't make it enticing to me... | 20:13 |
_FrnchFrgg_ | ;-) | 20:13 |
rgareus | perfectly understandable | 20:13 |
rgareus | convo.lv2 is likewise ugly (it started as setBfree's convolver) | 20:14 |
rgareus | ssj71: in case of the goniometer, I think as learning experience. | 20:15 |
ssj71 | rgareus: it actually is more readable I think | 20:15 |
rgareus | ssj71: and it is nicer than calling store() recall() 20 times | 20:15 |
ssj71 | yep. Even 4 gets a bit wordy: https://github.com/ssj71/reMID.lv2/blob/master/src/reMID_lv2.c#L159 | 20:16 |
* ssj71 thinks he sees a bug in his code | 20:17 | |
rgareus | ssj71: and that's also without verifying size and type | 20:17 |
ssj71 | yep | 20:17 |
rgareus | which is probably fine. if the URI matches, they must be right | 20:18 |
rgareus | unless a host is trying to play tricks on you :) | 20:18 |
rgareus | _FrnchFrgg_: nice that you followed up. | 20:19 |
ssj71 | blurg I just realize I don't actually use the values. They're stored in local vars and then I don't do anything with them | 20:19 |
rgareus | ssj71: file a bug report :) | 20:20 |
ssj71 | oh, ok I just needed to scroll down. | 20:20 |
ssj71 | its been a while since i read this code | 20:20 |
_FrnchFrgg_ | rgareus: the FFT size is easily changeable in the plugin code, and I'm not sure that it won't be changed only if the plugin URI is changed also. I'm also unsure of what the plugin does if garbage is put in the fft bins (I hope not a loud noise since it's only substracting) | 20:33 |
_FrnchFrgg_ | So I'll be on the safe side and store a fft_len variable into the state. | 20:33 |
rgareus | _FrnchFrgg_: makes sense | 20:33 |
rgareus | _FrnchFrgg_: you can also change the state's URI later in case it's not compatible | 20:34 |
_FrnchFrgg_ | Anyway, the idea is more to do the difficult part of figuring out the system and give Luciano ready-to-use boilerplate. | 20:35 |
_FrnchFrgg_ | Maybe he'll adapt it. In particular, I'm pretty sure the magnitude bins are computable from the gain ones or something like that. | 20:35 |
_FrnchFrgg_ | But I'll save both, because Luciano does a running additive mean for both, and I'm pretty sure that an additive mean for one is equivalent to a geometric (multiplicative) one for the other. | 20:37 |
_FrnchFrgg_ | As in M = sqrt(xy) rather than M = (x + y)/2 | 20:37 |
_FrnchFrgg_ | So I'll do the KISS thing and save/restore both. | 20:37 |
_FrnchFrgg_ | I didn't try to understand the papers behind the plugin anyway. | 20:39 |
_FrnchFrgg_ | What's the difference between NS_MY and MTR_URI ? | 21:11 |
rgareus | MTR_URI in my case is a #define'ed URI prefix used for all meters.lv2 plugins | 21:13 |
rgareus | NS_MY, no idea. | 21:13 |
rgareus | aah I found it in https://github.com/lucianodato/noise-repellent/blob/master/nrepel.c#L31 | 21:15 |
_FrnchFrgg_ | rgareus: Ah. I noped it would be a macro defined by lv2core.h that automagically prepended the plugin URI or something like that | 21:15 |
rgareus | _FrnchFrgg_: I think you do want to use NREPEL_URI "#fftstate" | 21:15 |
_FrnchFrgg_ | rgareus: NS_MY is in the examples of LV2.in | 21:15 |
_FrnchFrgg_ | rgareus: Yeah, understood now | 21:16 |
rgareus | yeah example.org classic | 21:16 |
_FrnchFrgg_ | rgareus: And are floats portable or pod only ? | 21:16 |
_FrnchFrgg_ | I mean, is there an endianness problem with floats or only doubles ? | 21:16 |
rgareus | _FrnchFrgg_: looks like you also need a uri-map feature in there | 21:17 |
rgareus | _FrnchFrgg_: LV2_STATE_IS_POD | 21:17 |
rgareus | LV2_STATE_IS_PORTABLE is not what it seems | 21:17 |
_FrnchFrgg_ | rgareus: Yes, that's what I did for the most part (apart from getting my children to *really* sleep) | 21:18 |
_FrnchFrgg_ | rgareus: There was no uri-map, no extension_data (only a return NULL shim) | 21:19 |
rgareus | I try to remember what LV2_STATE_IS_PORTABLE was about. I do recall there was a bug concerning it and no host really checks for it, anyway | 21:19 |
_FrnchFrgg_ | rgareus: LV2_STATE_IS_PORTABLE | 21:19 |
_FrnchFrgg_ | Portable (architecture independent) data. | 21:19 |
_FrnchFrgg_ | Values with this flag are in a format that is usable on any architecture. A portable value saved on one machine can be restored on another machine regardless of architecture. The format of portable values MUST NOT depend on architecture-specific properties like endianness or alignment. | 21:19 |
rgareus | I think network byte order or something | 21:20 |
_FrnchFrgg_ | http://lv2plug.in/doc/html/group__state.html#gga7f0856234c1a4b2a61b0531aefe7d13aab58be92bf542b837fcb05c1d6fd3702e | 21:20 |
rgareus | while lv2/lv2plug.in/ns/ext/state/state.ttl header says "For disk or network use, LV2_STATE_IS_PORTABLE must also be checked. " | 21:21 |
rgareus | _FrnchFrgg_: arrays are serialized into .ttl files which are portable | 21:23 |
rgareus | e.g. the array saved by meters.lv2 goniometer looks like https://pastebin.com/rXftsjKT | 21:25 |
_FrnchFrgg_ | rgareus: I read those | 21:25 |
_FrnchFrgg_ | rgareus: But in goniometer LV2_STATE_IS_PORTABLE is commented out | 21:26 |
rgareus | yeah, because it really makes no difference at all. | 21:26 |
rgareus | the flag is not even saved with the .ttl | 21:26 |
rgareus | and I think that was the bug, you specifiy it on save, but on restore it's not set | 21:27 |
rgareus | you can transmit LV2 atoms over the network (not state related) in which case it can make a difference | 21:27 |
rgareus | and the flags are preserved | 21:27 |
*** JMFerrele has joined #lv2 | 21:34 | |
rgareus | OK. after some digging, I do remember why I've commented it out. liblilv's state-restore doesn't restore the flag. and hence even for an identical state lilv_state_equals() returned false (flags differed). Ardour kept saving the state over and over again. | 21:35 |
rgareus | that was fixed 9 months ago: http://dev.drobilla.net/ticket/1145 | 21:35 |
ventosus | _FrnchFrgg_: save an even number of float elements into your vector, hosts linking to an old libserd have problems serializing odd 32-bit vector elements | 21:36 |
rgareus | ventosus: really? | 21:36 |
rgareus | ventosus: when was that fixed? | 21:37 |
ventosus | let me check... | 21:38 |
rgareus | ventosus: the goniometer.cc uses float cfg[9]; since Sept/2013 w/o issues | 21:39 |
rgareus | ventosus: f75d7c69bfc "Fix out of bounds array indexing." May/2011 ? | 21:41 |
JMFerrele | Hello. I'm terribly sorry to bother any of you, but I'd just like a pointer on where to find a bit of information. I am interested in installing the plugins on this site, and the link here shows me to one of the dependencies. http://ll-plugins.nongnu.org/hacking.html | 21:42 |
JMFerrele | But I have never seen anything about "revisions" of LV2. So this has me confused. | 21:42 |
JMFerrele | Could someone point me where to read about this? I've googled it, but I just get things about basic level math. | 21:43 |
ventosus | s/libserd/libsratom | 21:43 |
ventosus | rgareus: http://git.drobilla.net/cgit.cgi/sratom.git/commit/?id=bb2fdc70a61751d289f84b48dd016a68b045a50f | 21:43 |
rgareus | JMFerrele: hmm ll-plugins, I thought they're EOL and no longer maintained | 21:43 |
JMFerrele | They sure look like it. | 21:43 |
rgareus | ventosus: which is probably why I didn't use lv2_atom_forge_vector_head() :) | 21:44 |
JMFerrele | Well, if that's the case, are there any other modular math bits I could use in ingen? I'm sorry to be bothering anyone. I'm just having such a hard time finding up to date plugins for arch that are useful. | 21:44 |
rgareus | ssj71: didn't you port ams to LV2? | 21:45 |
ventosus | rgareus: probably :) | 21:46 |
rgareus | aah no that was https://github.com/blablack/ams-lv2/ | 21:46 |
rgareus | JMFerrele: ^^ | 21:46 |
rgareus | ventosus: but state serialization would use that internally, won't it? | 21:47 |
ventosus | rgareus: liblilv uses libsratom to de/serialize, yes | 21:47 |
rgareus | ventosus: maybe I just got lucky WRT padding somehow | 21:48 |
JMFerrele | Thank you. This was on my list of things to install. I don't see any of the same level of math modules like those in the ll plugins, but I guess I'll check and see once it's installed. Thank you very much for your time and patience. | 21:48 |
_FrnchFrgg_ | rgareus, ventosus: If the odd-sized array is the last in the structure, there is no problem, if I understand the problem correctly ? | 21:49 |
_FrnchFrgg_ | I'm not even sure there is a problem if the vector is not put in a bigger struct | 21:50 |
ventosus | yes, there was some padding missing in the broken deserialization code | 21:50 |
rgareus | JMFerrele: for control-port maths (not CV) https://github.com/x42/controlfilter.lv2 | 21:50 |
*** deva has quit IRC | 21:50 | |
JMFerrele | Thank you very much. I appreciate it. | 21:50 |
ventosus | _FrnchFrgg_: yes, if something follows the wrongly padded vector, it'll be garbage | 21:52 |
_FrnchFrgg_ | ventosus: So I'm in the clear; nothing follows it in my case. | 21:58 |
_FrnchFrgg_ | ;-) | 21:58 |
_FrnchFrgg_ | So now I'm trying to guess how retrieving an int works. | 22:00 |
_FrnchFrgg_ | Retrieving a Vector is a bit complicated (checking the size, casting with removal of the header with LV2_ATOM_BODY). According to the docs, for a string we get a const char* back, but for int ? | 22:01 |
_FrnchFrgg_ | Do we get an int*, an int, something else ? | 22:02 |
_FrnchFrgg_ | According to the spec, it should be an int* | 22:03 |
ventosus | const int32_t *i32 = LV2_ATOM_CONTENTS_CONST(LV2_Atom_Vector, my_atom) | 22:06 |
ventosus | _FrnchFrgg_: if your odd vector is last in the *.ttl, you're fine, but can you force it to be last? user/script may manually add/reorder properties in *.ttl | 22:10 |
_FrnchFrgg_ | ventosus: Thanks. | 22:32 |
ventosus | _FrnchFrgg_: y/w | 22:36 |
_FrnchFrgg_ | So, it compiles, but doesn't seem to save anything | 22:58 |
JMFerrele | By the way, is there any particular reason why ams-lv2 uses lvtk1 and not lvtk2? Someone has a patch to change that it seems, but before I go installing it I guess I'm a little curious whether that would be a mistake or not. | 22:58 |
_FrnchFrgg_ | I'm completely at a loss as to why the plugin doesn't save anything. | 23:14 |
_FrnchFrgg_ | I must have understood the spec incorrectly somewhere... I don't see what I do differently from the goniometer. | 23:15 |
rgareus | _FrnchFrgg_: the .ttl file needs to mention the state extension | 23:15 |
_FrnchFrgg_ | I expected to crash or write garbage, but to not have anything produced... | 23:15 |
_FrnchFrgg_ | rgareus: Did that | 23:15 |
rgareus | lv2:extensionData state:interface ; | 23:15 |
rgareus | hmm | 23:15 |
_FrnchFrgg_ | (unless the makefile doesn't update the target... let me check) | 23:16 |
_FrnchFrgg_ | That's it | 23:16 |
_FrnchFrgg_ | grr | 23:16 |
rgareus | and a "@prefix state ..." in the .ttl boilerplate, but you probably have that already | 23:17 |
_FrnchFrgg_ | rgareus: I had to add it | 23:18 |
_FrnchFrgg_ | But in fact, Luciano might have changed the build dest at some point, and so my symlink in ~/.lv2 pointed to an old version of the plugin | 23:18 |
_FrnchFrgg_ | Maybe it works far better now ? ;-) | 23:19 |
_FrnchFrgg_ | It's translated... | 23:19 |
rgareus | into French? Italian? | 23:19 |
_FrnchFrgg_ | Into french | 23:20 |
_FrnchFrgg_ | It works !!!! | 23:20 |
_FrnchFrgg_ | (It saves, anyway) | 23:20 |
rgareus | does Ardour pick up the translation? | 23:20 |
_FrnchFrgg_ | rgareus: Yes | 23:20 |
rgareus | not bad | 23:20 |
rgareus | _FrnchFrgg_: does ot load/restore as well? | 23:21 |
_FrnchFrgg_ | My wife came back from her party, so I didn't check yet | 23:22 |
rgareus | I'm holding my breath to say "party"! | 23:23 |
_FrnchFrgg_ | The new versions filters noise better it seems | 23:23 |
_FrnchFrgg_ | And it restores correctly on session load | 23:24 |
rgareus | party! | 23:24 |
rgareus | does it filter-out party noise? | 23:26 |
_FrnchFrgg_ | I don't know | 23:26 |
_FrnchFrgg_ | I'll have to test, but now is night time | 23:26 |
_FrnchFrgg_ | I'll tidy up and send a pull request to Luciano. | 23:27 |
_FrnchFrgg_ | So roughly 3 hours to add that feature. | 23:27 |
_FrnchFrgg_ | It was simpler than I thought | 23:28 |
rgareus | next time only 90mins :) | 23:29 |
*** _FrnchFrgg_ has quit IRC | 23:33 | |
*** _FrnchFrgg_ has joined #lv2 | 23:51 | |
*** rncbc has quit IRC | 23:54 | |
JMFerrele | I'm really sorry to bother you guys again, but, when I execute ./waf configure --prefix=/usr from a fresh git clone of lvtk, it tells me "SyntaxError: Missing parentheses in call to 'print'". I can show the line it's talking about. I added parentheses where I believed they should go. I ran it like that, and it got further, but then it said it "Can't pickle local object 'Context.__init__.<locals>.node_class'" | 23:55 |
JMFerrele | I'm not sure what to do after this point. I am not a programmer, or very savvy with this. | 23:56 |
JMFerrele | I can go, by the way. I know you don't want me sitting in here asking ignorant questions. | 23:56 |
JMFerrele | All the other waf scripts worked for me though. Just not this one. | 23:57 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!