Friday, 2017-06-30

*** artfwo has quit IRC01:29
*** artfwo has joined #lv201:30
*** artfwo has quit IRC01:59
*** chaot4 has quit IRC02:01
*** chaot4 has joined #lv202:02
*** trebmuh has quit IRC04:00
*** oofus_lt has joined #lv206:52
*** Anchakor has quit IRC08:45
*** ssam2 has joined #lv209:15
*** Yruama_Lairba has joined #lv209:23
*** trebmuh has joined #lv209:40
*** yann-kaelig has joined #lv209:47
*** NickSB2 has quit IRC10:21
*** NickSB2 has joined #lv210:27
*** edo_pc has joined #lv211:27
*** artfwo has joined #lv212:31
*** yann-kaelig has quit IRC12:50
*** NickSB2 has quit IRC13:42
*** m4l3z has joined #lv214:07
*** m4l3z has quit IRC14:44
*** oofus_lt has quit IRC14:58
*** edo_pc has quit IRC15:12
*** m4l3z has joined #lv216:30
*** deva has joined #lv217:03
*** ssam2 has quit IRC17:06
*** rncbc has joined #lv218:00
*** rncbc has quit IRC18:19
*** rncbc has joined #lv218:55
*** NickSB2 has joined #lv219:16
*** _FrnchFrgg_ has joined #lv219: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:State19:55
ssj71good idea19:55
_FrnchFrgg_I think I got the gist of it, but I'm not completely sure how to map the float* array to LV2:Vector19:55
ssj71ah, I haven't done that19: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
ssj71well I'm sure you could save it as a file and save the path, but thats not likely to be the best way19: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
ssj71all my lv2:state experience so far was with single numbers or file paths19: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 IIUC19:59
_FrnchFrgg_Maybe setBfree, but rgareus said it has so many parameters that it's terrifying ;)20:00
ssj71have you tried just treating the array the same way as the numbers but calling it an lv2:vector?20:01
ssj71unless someone knowledgable chimes in here I'd post to the lv2dev mailing list20:01
*** m4l3z has quit IRC20:02
ssj71its slow but you usually get an answer20:02
* rgareus tries to recall which of his plugins do use an array20:04
rgareushttps://github.com/x42/sisco.lv2/blob/master/src/sisco.c#L345-L466  a bit on the verbose side though20:09
rgareushttps://github.com/x42/meters.lv2/blob/master/src/goniometerlv2.c#L198-L254  is a bit better20:10
ssj71The 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:Vector20:11
ssj71rgareus: 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 first20: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 LV220:13
_FrnchFrgg_rgareus: I know the reasons. That doesn't make it enticing to me...20:13
_FrnchFrgg_;-)20:13
rgareusperfectly understandable20:13
rgareusconvo.lv2 is likewise ugly (it started as setBfree's convolver)20:14
rgareusssj71: in case of the goniometer, I think as learning experience.20:15
ssj71rgareus: it actually is more readable I think20:15
rgareusssj71: and it is nicer than calling store() recall() 20 times20:15
ssj71yep. Even 4 gets a bit wordy: https://github.com/ssj71/reMID.lv2/blob/master/src/reMID_lv2.c#L15920:16
* ssj71 thinks he sees a bug in his code20:17
rgareusssj71: and that's also without verifying size and type20:17
ssj71yep20:17
rgareuswhich is probably fine.  if the URI matches, they must be right20:18
rgareusunless a host is trying to play tricks on you :)20:18
rgareus_FrnchFrgg_: nice that you followed up.20:19
ssj71blurg I just realize I don't actually use the values. They're stored in local vars and then I don't do anything with them20:19
rgareusssj71: file a bug report :)20:20
ssj71oh, ok I just needed to scroll down.20:20
ssj71its been a while since i read this code20: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 sense20:33
rgareus_FrnchFrgg_: you can also change the state's URI later in case it's not compatible20: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)/220: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
rgareusMTR_URI in my case is a #define'ed URI prefix used for all meters.lv2 plugins21:13
rgareus  NS_MY, no idea.21:13
rgareusaah I found it in  https://github.com/lucianodato/noise-repellent/blob/master/nrepel.c#L3121:15
_FrnchFrgg_rgareus: Ah. I noped it would be a macro defined by lv2core.h that automagically prepended the plugin URI or something like that21: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.in21:15
_FrnchFrgg_rgareus: Yeah, understood now21:16
rgareusyeah  example.org classic21: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 there21:17
rgareus_FrnchFrgg_:  LV2_STATE_IS_POD21:17
rgareusLV2_STATE_IS_PORTABLE is not what it seems21: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
rgareusI 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, anyway21:19
_FrnchFrgg_rgareus: LV2_STATE_IS_PORTABLE21: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
rgareusI think network byte order or something21:20
_FrnchFrgg_http://lv2plug.in/doc/html/group__state.html#gga7f0856234c1a4b2a61b0531aefe7d13aab58be92bf542b837fcb05c1d6fd3702e21:20
rgareuswhile  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 portable21:23
rgareuse.g. the array saved by meters.lv2 goniometer looks like https://pastebin.com/rXftsjKT21:25
_FrnchFrgg_rgareus: I read those21:25
_FrnchFrgg_rgareus: But in goniometer LV2_STATE_IS_PORTABLE is commented out21:26
rgareusyeah, because it really makes no difference at all.21:26
rgareusthe flag is not even saved with the .ttl21:26
rgareusand I think that was the bug,  you specifiy it on save, but on restore it's not set21:27
rgareusyou can transmit LV2 atoms over the network  (not state related) in which case it can make a difference21:27
rgareusand the flags are preserved21:27
*** JMFerrele has joined #lv221:34
rgareusOK. 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
rgareusthat was fixed 9 months ago:  http://dev.drobilla.net/ticket/114521: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 elements21:36
rgareusventosus: really?21:36
rgareusventosus: when was that fixed?21:37
ventosuslet me check...21:38
rgareusventosus: the goniometer.cc uses float cfg[9];  since Sept/2013  w/o issues21:39
rgareusventosus: f75d7c69bfc "Fix out of bounds array indexing." May/2011 ?21:41
JMFerreleHello. 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.html21:42
JMFerreleBut I have never seen anything about "revisions" of LV2. So this has me confused.21:42
JMFerreleCould someone point me where to read about this? I've googled it, but I just get things about basic level math.21:43
ventosuss/libserd/libsratom21:43
ventosusrgareus: http://git.drobilla.net/cgit.cgi/sratom.git/commit/?id=bb2fdc70a61751d289f84b48dd016a68b045a50f21:43
rgareusJMFerrele: hmm ll-plugins, I thought they're EOL and no longer maintained21:43
JMFerreleThey sure look like it.21:43
rgareusventosus: which is probably why I didn't use lv2_atom_forge_vector_head() :)21:44
JMFerreleWell, 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
rgareusssj71: didn't you port ams to LV2?21:45
ventosusrgareus: probably :)21:46
rgareusaah no that was  https://github.com/blablack/ams-lv2/21:46
rgareusJMFerrele: ^^21:46
rgareusventosus: but state serialization would use that internally, won't it?21:47
ventosusrgareus: liblilv uses libsratom to de/serialize, yes21:47
rgareusventosus: maybe I just got lucky WRT padding somehow21:48
JMFerreleThank 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 struct21:50
ventosusyes, there was some padding missing in the broken deserialization code21:50
rgareusJMFerrele: for control-port maths (not CV)  https://github.com/x42/controlfilter.lv221:50
*** deva has quit IRC21:50
JMFerreleThank you very much. I appreciate it.21:50
ventosus_FrnchFrgg_: yes, if something follows the wrongly padded vector, it'll be garbage21: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
ventosusconst 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 *.ttl22:10
_FrnchFrgg_ventosus: Thanks.22:32
ventosus_FrnchFrgg_: y/w22:36
_FrnchFrgg_So, it compiles, but doesn't seem to save anything22:58
JMFerreleBy 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 extension23:15
_FrnchFrgg_I expected to crash or write garbage, but to not have anything produced...23:15
_FrnchFrgg_rgareus: Did that23:15
rgareuslv2:extensionData state:interface ;23:15
rgareushmm23:15
_FrnchFrgg_(unless the makefile doesn't update the target... let me check)23:16
_FrnchFrgg_That's it23:16
_FrnchFrgg_grr23:16
rgareusand a "@prefix state ..." in the .ttl boilerplate, but you probably have that already23:17
_FrnchFrgg_rgareus: I had to add it23: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 plugin23:18
_FrnchFrgg_Maybe it works far better now ? ;-)23:19
_FrnchFrgg_It's translated...23:19
rgareusinto French? Italian?23:19
_FrnchFrgg_Into french23:20
_FrnchFrgg_It works !!!!23:20
_FrnchFrgg_(It saves, anyway)23:20
rgareusdoes Ardour pick up the translation?23:20
_FrnchFrgg_rgareus: Yes23:20
rgareusnot bad23:20
rgareus_FrnchFrgg_: does ot load/restore as well?23:21
_FrnchFrgg_My wife came back from her party, so I didn't check yet23:22
rgareusI'm holding my breath to say "party"!23:23
_FrnchFrgg_The new versions filters noise better it seems23:23
_FrnchFrgg_And it restores correctly on session load23:24
rgareusparty!23:24
rgareusdoes it filter-out party noise?23:26
_FrnchFrgg_I don't know23:26
_FrnchFrgg_I'll have to test, but now is night time23: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 thought23:28
rgareusnext time only 90mins :)23:29
*** _FrnchFrgg_ has quit IRC23:33
*** _FrnchFrgg_ has joined #lv223:51
*** rncbc has quit IRC23:54
JMFerreleI'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
JMFerreleI'm not sure what to do after this point. I am not a programmer, or very savvy with this.23:56
JMFerreleI can go, by the way. I know you don't want me sitting in here asking ignorant questions.23:56
JMFerreleAll 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!