Tuesday, 2015-05-26

*** HarryHaaren has quit IRC00:09
*** Magnus_RM has quit IRC02:53
*** tytel has joined #lv203:59
*** tytel has quit IRC05:29
*** tytel has joined #lv205:29
*** falktx has joined #lv206:25
*** tytel_ has joined #lv207:19
*** tytel_ has quit IRC07:20
*** tytel has quit IRC07:22
*** ricardocrudo has joined #lv207:39
*** tytel has joined #lv207:47
*** edogawa has joined #lv207:55
*** ventosus has joined #lv208:08
*** edogawa has quit IRC08:08
*** edogawa has joined #lv208:18
*** tytel has quit IRC09:25
*** tytel has joined #lv209:26
*** tytel has quit IRC09:31
*** tytel has joined #lv210:26
*** ricardocrudo has quit IRC11:15
*** ricardocrudo has joined #lv211:50
falktxsomeone did lv2 UIs using elementary13:18
falktxhttp://openmusickontrollers.github.io/lv2/about/13:18
*** tytel has quit IRC13:26
*** tytel has joined #lv213:26
*** gianMOD has joined #lv213:27
*** tytel has quit IRC13:30
ventosusfalktx: s/someone/ventosus13:31
falktxnice13:32
falktxventosus: does elementary support embedding ?13:32
ventosusfor emedding as X11UI you need libelementary >= 1.13.0, so yes13:33
ventosusI use a wrapper header13:34
ventosushttps://github.com/OpenMusicKontrollers/eo_ui.lv213:34
ventosusAnd you can embed a X11UI plugin into an elemetary host13:37
ventosusGtk embedding should be possible, too, not yet tried though13:39
falktxI meant having elementary UIs embeded in other stuff. via X11 handle13:40
falktxI see that you did all the work already, nice13:41
ventosusfalktx: yes, with the wrapper ^^, tested in jalv.gtkmm, ingen, ardour4, works nicely13:41
falktxgot a screenshot of the embed working?13:41
* ventosus will take a screenshot13:42
*** ddom has joined #lv213:44
ventosushttp://ibin.co/233tsfsDf2E313:47
falktxnice13:53
falktxso now we need a lv2 ui elementary type :)13:53
falktxventosus: your synthpod.lv2 link on page http://openmusickontrollers.github.io/lv2/synthpod/ gives 40414:00
falktxthere's an extra ".lv2" suffix that is not correct14:00
ventosusarg, thanks.14:02
falktxventosus: trying to build it now, I don't have libuv >= 1.0 in the latest debian...14:11
falktxso probably neither would ubuntu14:11
*** edogawa_ has joined #lv214:24
*** edogawa has quit IRC14:27
ventosusfalktx: libuv <1.0 is not API-compatible with >= 1.0, iirc14:30
ventosusI'm at 1.5.0 (ArchLinux)14:31
ventosusI will eventually get rid of it (libuv) and base everything on libecore (elementary's main loop)14:32
*** sigma6 has joined #lv215:03
*** gianMOD has quit IRC15:31
*** edogawa_ is now known as edogawa15:31
*** gianMOD has joined #lv215:31
*** gianMOD has quit IRC15:36
*** sigma6 has quit IRC16:09
*** ddom has quit IRC16:22
*** gianMOD has joined #lv216:32
*** gianMOD has quit IRC16:38
*** ricardocrudo has quit IRC16:59
*** gianMOD has joined #lv217:35
falktxventosus: got an error when trying to build your code17:38
falktxerror: ‘for’ loop initial declarations are only allowed in C99 mode17:38
*** gianMOD has quit IRC17:41
ventosusfalktx: cmake -DCMAKE_C_FLAGS="-std=gnu99" or "-std=gnu11"17:49
falktxyes, but you should have those on the cmakefile17:49
drobillaShiny atom debugger, cool17:51
ventosusah, building with clang 3.6 which doesn't complain, will add it to the script though, thanks17:52
drobillaAh, EFL.  I was wondering what that was...17:52
falktxthe first few lines in sp_ui_new() seem to require an extra include17:54
falktxalso, I'm not able to show any UIs17:54
falktxventosus: I get these errors http://kxstudio.sourceforge.net/Paste/repo/CnuaS17:54
ventosusfalktx: is "elementary_test" running?17:57
falktxof course not17:57
falktxI don't have that in my system17:57
ventosushave you configured elementary with "elementary_config" (software x11 vs opengl)17:57
falktxI have done nothing regarding elementary17:58
falktxI just installed some basic libs now to build your plugin17:58
ventosusyou may need to configure it first (e.g. which graphics engine it should use, etc.)17:59
falktxthats... not good18:00
falktxI have no idea how to do that. I don't have any elem* binaries here18:01
falktxI just want to run the app or plugin18:01
falktxa toolkit that doesn't work without some configuration first sounds really really bad. why can't it have sane defaults?18:02
falktxgtk has an ugly default theme, but it will still work18:02
falktxventosus: trying to run the jack app results in this http://kxstudio.sourceforge.net/Paste/repo/IUIdX18:02
falktxah, damn debian18:04
ventosus"Software X11 engine creation failed", that doesn't sound good18:05
falktxneed to install libevas1-engines-x18:05
falktxventosus: probably something for the readme. on debian/ubuntu make sure libevas1-engines-x is installed18:05
ventosusah yes, debian tends to split everything18:06
falktxventosus: you have /usr/local/share/synthpod/synthpod.edj hardcoded. not very nice, but can be fixed in packaging18:06
ventosusthere's probably other things in there that's hardcoded, too ;-)18:07
falktxcrashes when trying to load it18:07
falktx#0  __strcasestr_sse2 (haystack_start=0x0, needle_start=0x7ffff6f2b723 "") at ../string/strcasestr.c:7618:07
falktx#1  0x00007ffff6f017c8 in _pluglist_populate () from /home/falktx/FOSS/GIT-other/synthpod/lib/libsynthpod_ui.so18:07
falktxsimple thing18:08
falktxconst char *name_str = lilv_node_as_string(name_node);18:09
falktxname_str can be null, you need to check for that18:09
*** ricardocrudo has joined #lv218:14
drobillaname_node can be null.  All nodes should have a string, though.18:18
drobilla(it's the one universal lilv_node_as_*)18:19
falktxventosus: how stable do you consider these plugins right now? I'm thinking of packaging them...18:22
falktx(on kxstudio)18:22
ventosusI'd consider 'midi_matrix.lv2' stable, but it's of no big use, it was just my first test plugin18:24
ventosusi've put 'moony.lv2' in beta, needs some more testing, I guess18:25
ventosusI'm not yet happy with 'sherlock.lv2', needs some more tweeking18:25
ventosus... and synthpod is in early stage of course18:26
*** gianMOD has joined #lv218:37
*** gianMOD_ has joined #lv218:40
*** gianMOD has quit IRC18:40
*** curlymorphic has joined #lv218:47
*** rncbc has joined #lv218:55
*** artfwo has quit IRC19:04
ssj71sanity check: the worker thread create an object, then the response saves the object handle, and puts the handle of the old object in another pointer then schedules the worker. the worker always check this pointer and deletes it and sets to null if its not already  null. Threadsafe or not?19:08
*** ricardocrudo has quit IRC19:16
rgareusssj71: work response is called in the same thread as run. you can swap pointer to handles there.19:21
rgareusssj71: the worker itself is decoupled by ringbuffers. pass non-pod data (ie pointers) at your own risk19:21
falktxssj71: don't use allocated pointers in worker. use data from stack19:23
ssj71falktx: so don't call malloc?19:23
falktxyou don't need to19:24
falktxthe data passed into worker is copied, not referenced19:24
falktxif you call malloc, you'll have to call free after calling worker stuff19:24
falktx(in the same function)19:24
ssj71right, thats why the worker response shceduled more work19:25
ssj71to free the old struct19:25
ssj71but, I suppose its doable using static instances, then just copy the data19:25
falktxyou don't one or the other19:26
falktxuse variables on the stack19:26
falktxsomething like:19:26
ssj71ah, so just use pointers to stack stuff, I19:26
falktxyeah19:26
falktxthe size param is there so the host safely copies the full thing19:27
ssj71but you still have to copy the data then19:27
falktxthe host does that. it copies the data you provide it into a local ringbuffer (or similar)19:27
ssj71ok, so the worker response already has the copy and its ok to just save a pointer to it?19:28
falktxwhy do you want a pointer?19:28
ssj71so I don't have to copy every member of the stuct manually to the plugin instance. Maybe I'm still not getting it19:29
falktxyou have some data. you call worker to get that data to some other context19:30
falktxyour data only needs to be valid when calling worker stuff19:30
falktxthe host will handle everything else19:30
ssj71worker generates the data, and yes, I want to get that data to the plugin for the audio thread, I pass it to the worker response which executes in the audio thread19:31
falktxworker is just usually a ring buffer + thread implemented by the host19:31
ssj71so I should do a deep copy of the struct in the worker response.19:33
*** gianMOD_ has quit IRC19:33
*** gianMOD has joined #lv219:34
falktxdata must be POD19:34
falktxno classes or functions19:34
ssj71It is19:34
falktxthen just pass that struct into worker19:34
falktxand on the response cast the data into your struct type19:34
falktxyou don't need to do any copying19:35
ssj71the struct is in constant use in the audio thread. So I have to make a second struct, pass it to the worker. Worker loads it up, the the response casts it back to the struct and swaps the old and new struct19:36
ssj71sound right?19:36
ssj71second strucy will still be on stack, not malloc'd19:37
falktxnot sure why you need a 2nd struct there19:37
rgareusssj71: convo.lv2 is doing pretty much what you describe.19:37
ssj71falktx: because the worker and audio thread would both be manipulating the same data19:37
rgareusssj71: using the worker to re-init a background instance then swap instances on the fly (and scheduling another work request to free the old instance)19:37
falktxssj71: NO, the worker does NOT manipulate your data19:38
*** gianMOD has quit IRC19:38
falktxssj71: it copies it, that's it19:38
ssj71ok, then when you say "pass that struct into the worker" its confusing19:39
falktxI said *cast*19:39
falktxwell, errm, sorry19:39
falktxyou pass the structure data, not the structure itself19:39
ssj71no worries, I just want to make sure I'm doing it right19:39
falktxinternally the host will just copy that data to a temp place, and give it back to you later19:40
ssj71falktx: but the host's copy is still temporary19:40
falktx"temporary" in the same way all ringbuffer data is19:41
ssj71rgareus: I've been looking at convolv2 and eg_sampler, but was trying to make it simpler through the whole "garbage" pointer thing19:41
falktxthere's no "garbage" here19:42
ssj71falktx: so theres the secret I need to review the details of ringbuffers19:42
rgareusssj71: I suggest to keep all data (objects and state) inside the /real/ lv2 handle and only pass simple commands to the worker.19:42
*** gianMOD has joined #lv219:42
falktxssj71: the simplest example possible is passing a string into worker19:42
rgareusan integer19:43
rgareusor char19:43
falktxstrings are nicer to print and test it's really working :)19:43
falktxMETACODE: const char* mystr = "hello"; worker.run(mystr, strlen(mystr));19:43
falktxthe plugin will get that data later. there is no allocation or garbage collection here19:44
rgareusfalktx: I like   switch() .   with strings you have to strcmp()19:45
falktxswitch doesn't work with variables in the case X: fields19:45
ssj71falktx: the issue is not how to pass something to the worker, but from. if I malloc each time a new file is loaded, then I have to delete. Both should be done in the worker thread. I recognize I don't have to malloc, but it was my first approach19:46
falktxyou can do anything in the worker thread afaik19:46
ssj71sure, but when you are using the data generated there you need to be able to safely switch from old and new data19:47
ssj71basically I'm loading impulse responses in an alternative format19:47
falktxthen maybe pointers are needed :P19:48
falktxpass a pointer to run, make run pass the pointer back to worker when swap is over19:48
falktxor something like that19:48
ssj71ah, that would be a better approach19:50
falktxyou can do a pointer swap in run, and give the old pointer to delete later on the worker thread19:50
ssj71yes, if I pass the pointer to the worker its safer than having an old pointer member in the plugin instance19:51
ssj71I'll do that19:51
*** curlymorphic has quit IRC19:52
ssj71erm... well, I'll do a bit more homework to make sure I know what I'm doing. Thanks falktx and rgareus too19:52
falktxI hope I didn't confuse you more than before... :S19:53
*** gianMOD has quit IRC19:58
ssj71no, if nothing else, you helped me find a design I liked better.20:00
*** ricardocrudo has joined #lv220:04
ssj71rgareus: in convolv2 would it be possible for 2 files to be loaded in rapid succession such that the second is allocated before the old clv_offline gets freed?20:08
rgareusssj71: no.20:08
ssj71thats the tree that ends in LV2_ERR_NO_SPACE?20:09
rgareusssj71: the first requests  sets  self->clv_offline20:09
rgareusssj71: and as long as that's not NULL. all further requests are ignored20:10
ssj71ok. I'm trying to get the gist without a full code tracethrough :\20:11
rgareusssj71: the code is a bit messy. It was my first lv2 plugin.20:11
ssj71lol. That was your first?! you used most of the extensions. I have to approach them 1 by 1 and it still is taking forever to get it20:12
ssj71I like your approach of passing ints to the worker as well20:13
rgareusssj71: well, I wanted to learn to use them all :)  the convolution code itself was there earlier (which adds to the mess).20:15
ssj71rgareus: not really. It keeps everything lv2 in lv2.c I'm doing a similar thing since the rakarrack modules are relatively self contained20:16
rgareusssj71: the mess here is mainly about state save/load.  convolution.cc has its own serializer.  not very LV2ey.20:17
ssj71ok. State is the next hurdle. Maybe I'll use eg_sampler more for that20:20
*** tytel has joined #lv220:35
*** Magnus_RM has joined #lv220:50
*** edogawa has quit IRC20:58
*** ventosus has left #lv221:13
*** aombk3 has joined #lv221:41
*** aombk2 has quit IRC21:44
*** rncbc has quit IRC21:50
*** ricardocrudo has quit IRC22:09
ssj71state is necessary for having presets with files, right? the host can't just serialize the patch:value?22:16
*** falktx has quit IRC22:58
*** gianMOD has joined #lv223:27
*** tytel has quit IRC23:47
*** NickSB has quit IRC23:59

Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!