Thursday, 2015-02-26

rgareusSocapex: when run returns, the plugin is done with processing the buffer..00:07
Socapexrgareus: run is blocking?00:08
rgareusSocapex: no never. it must be realtime safe00:08
rgareusSocapex: it processes the given data and returns.00:08
rgareusit's intened to run in an audio-process callback00:08
Socapexrgareus: Uhm, how do I know it is done? You mean it will just continue the process after?00:08
Socapexah ok00:09
SocapexSo I can hook it up to my readFile callback to fill00:09
Socapexthen I'm kinda clueless where to go from there. Expecting many plugins to be hooked through callbacks together etc00:09
rgareuswell it is 'blocking' in the sense that it won't return until the data is processed..00:10
Socapexyes thats actually perfect then00:10
rgareusSocapex: you call it periodically.   read some data into buffer -> call run() ; repeat00:10
SocapexI'll just hook up either output or next plugin00:10
rgareusexactly00:11
Socapexso readfile (512) -> run(512) -> output or plugin2in00:11
Socapexall in its nice little isolated thread00:11
Socapex^_^00:11
rgareusyep00:11
rgareusBTW,  input buffer can be the same as output buffer  - most plugins can process in-place.00:11
Socapexoh thats great info! ty00:12
rgareusif they can't they must specify  in-place-broken00:12
rgareushttp://lv2plug.in/ns/lv2core/#inPlaceBroken00:12
Socapexhmmm, maybe I'll just make it general and have 2 buffers. Somehow it makes more "visual" sense that way for me00:12
SocapexAll LV2 instances derive from a main plugin class which only has 2 buffers for now00:13
SocapexI'll probably make output a plugin, a bit like CoreAudio does I guess00:13
rgareusVST and AU deprecated non-inplace.  all new plugins must support in-place.  and most DAWs ignore plugins that can't do it. So it's just a few edge-case things that don't support it.00:14
rgareusbut yes..  if the host provides different buffers.. all will work anyway.00:15
rgareusSocapex: if I may ask.  what host are you working on?00:15
rgareusre suil  - that's for custom plugin GUIs.00:16
rgareuseg a plugin GUI is written in Cocoa  but your host is GTK  or    X11 and QT...   suil provides bridges00:17
Socapexrgareus: I'm currently just working on a prototype to get accustomed to LV2. The plan is to integrate plugin suport in open broadcaster software (so not a DAW but live stuff). Though sometimes my wishes are not aligned with theirs, I'm pretty sure the guy wont be able to resist a plugin/mixer pull request :D00:17
Socapexrgareus: So I'm working in Qt right now, I want suil then. Downloading it right now00:18
rgareusSocapex: the bad news... the QT stuff there is a bit half-baked..  most of us don't use QT :(00:18
rgareusfalktx promised some QT updates to suil.  but that has not yet happened00:18
SocapexWell, if I run Qt, then I only have to provide other contexes, not the Qt one since I'm shipping with it? Or am I misunderstanding?00:19
rgareusyes00:19
rgareusqt in qt is a noop00:19
Socapex:)00:20
falktxrgareus: I gave up, can't make qt5+suil in a way that I'll be happy00:20
SocapexSo then I;m covered, but making the plugins qith Qt5 would be a no-no :/00:20
rgareusthere are very few lv2 plugins with a QT gui though. I know know rui's vee-one suite00:20
rgareuss/know know/only know/00:20
SocapexI plan on making some (the basics you would need for voice). We want to ship cross-plateform with out-of-the-box plugins00:21
rgareusSocapex:  gtk2 + gtk3  has the same issue00:21
rgareusSocapex: the trend is to go to a lower level, openGL + native window system.00:21
rgareusthe big toolkits don't provide much for most plugin UIs anyway.00:22
Socapexrgareus: yes, I actually have a friend that made his own visual library with openGL just for VSTs. I'll probably revert to that then00:22
SocapexAnd its neat since everything runs on GPU, which is perfect for audio processing00:22
SocapexBy that I mean, it frees up CPU. Qt is a CPU hog00:23
rgareusie eventually you only need    "X11 in Qt",   "Cocoa (well really quartz) in QT"  and  "Win in Qt"00:23
rgareuswith X11 maybe becoming wayland or sth - though the underlying context to a openGL view + events is not unsimilar00:24
SocapexSo how do I go about trying to display the UI?00:24
SocapexI'm reading up lilv doc right now, but nothing pops up00:24
rgareussuil_instance_new00:25
rgareusthe long story  e.g. https://github.com/Ardour/ardour/blob/master/gtk2_ardour/lv2_plugin_ui.cc00:25
Socapexlol I'll read that :) Thank you very much00:25
rgareusthouhg better just read the  jalv source00:25
rgareusexcept I can't find a direct link to it..  it is still somewhere hiding in SVN00:26
SocapexYes I do have those. I'm going to take a look00:26
SocapexThey hae been very helpfull00:26
rgareushttp://svn.drobilla.net/lad/trunk/jalv/src/jalv_qt4.cpp00:26
rgareusnice and short  jalv_open_ui   there00:26
rgareusthough the heavy lifiting is done by jalv_ui_instantiate00:27
Socapexallright, sounds like a good place to start at least :)00:30
rgareusjalv is really nice - a good reference implementation00:30
rgareusdrobilla: is jalv going to be included in the libs+tools that will eventually migrate to lv2plug.in ?00:32
SocapexI hope to release my prototype as an extra reference for ppl. I'll let you know when it's working so you can point out some wrong code etc00:32
drobillargareus: Probably.  That and a take on lv2file to serve as simpler example00:44
drobillaI fear actually doing this, but svn sure is getting annoying00:47
SocapexWow suil is hardcore :O01:11
rgareushow so?01:11
rgareusdo you mean using suil?  or writing libsuil wrappers itself?01:12
Socapexusing it... This is some crazy stuff. Not that I don't like a challenge and learning new stuff. But everything that has to do with pure C does make me uneasy01:13
Socapexand the whole turtle stuff, and protocoles and and and :)01:13
* rgareus just feels the other way 'round.01:13
rgareusgive me pure C every day01:14
Socapexhehe, I know I'm the oddball around here01:14
rgareuswell using it in C++ should be really straight forward.01:14
SocapexSo, uhm, atom events are an extension? And how does this whole protocole communication work? For example, I have to setup some methods for writing to ports, or reading etc... but to what end?01:15
drobilla?  Basically none of these mentioned things are related to suil01:15
SocapexWow I'm a bit overwhelmed by all this UI stuff.01:15
rgareusplugin <> GUI communication.01:16
rgareusplugin calls write functions  -> host writes it into a ringbuffer.  <- all realtime safe01:17
drobillaWell, sure, "related" some extremely vague sense...01:17
drobillaSocapex: "protocol" is just the word we used for "way to send thing to port"01:17
rgareus...later GUI thread comes around  -> reads from ringbuffer and tells the UI about it01:17
drobillaThere's basically only two: the control port one (set a float), and the event/sequence one (send an event)01:17
drobillaUnless you are writing a network transparent host, you don't have to care about the actual content of the events at all.  Just memcpy them.01:18
drobilla(via a ring as rgareus says)01:18
Socapexrgareus: So I just need to store it in a ring buffer and provide it to suil later? Sounds reasonable01:18
rgareusSocapex: yep.  the same is also true for MIDI. in case you worry about that.  that's also an "Event sequence"01:19
Socapexrgareus: And the atom stuff is a protocol I would imagine? I'll look into that later I guess. I'll stick to just getting control port things working for now :)01:21
drobillaIn the general sense, yes, in the UI extension sense, no.01:21
drobillaEvents of any type are done the same way.01:22
drobillai.e. (again assuming a monolithic non-network host) if MIDI works, whatever else (including atoms) will, too.01:22
Socapexok01:23
rgareusSocapex: yes. disregard atoms at first.01:23
SocapexI shall happily do so01:23
rgareusdrobilla: BTW, I've completed latency-compensation for my little LV2 host, but only audio so far.  Input ports are delayed to sync them according to the jack capture port latency.01:25
rgareusdrobilla: I'd love to port this to jalv.  but I already hear you  saying  that the delayline code is too large.01:25
drobillargareus: Can you blame me? :)01:27
drobillargareus: What's large?01:27
rgareusdrobilla: no, not really01:27
drobillaI don't know, with a simpler example the need for Jalv to stay "simple" will be lessened somewhat01:27
rgareusaudio only is about 80 lines + headers01:28
drobillaIf it can be somewhat reasonably isolated into its own .c that's easy to ignore if you don't care, it's considerably better01:28
drobilla(I should probably do this with Jack itself)01:28
rgareusjust for the dealayline. then maybe 50 or so to calculate things and interact with jack01:28
rgareusjack is just a mechanism.01:28
rgareusit should never delay audio01:28
drobillaI meant isolate the code related to Jack itself, instead of jalv.c.  Nevermind.01:29
rgareusaah right01:29
rgareusyes that makes sense for jalv.01:29
rgareuswould allow to also add a coreaudio in/out or whatever.01:29
rgareusdrobilla: btw what does the "li"  in lilv stand for?01:30
drobillargareus: Well, go for it, I guess.01:30
drobillargareus: Seems like some pretty fancy shit for what's a pretty simple host at the end of the day, but I guess it should be as good a host as possible and Jack forces hosts to deal with this01:31
drobillaFor what I'm sure are valid reasons but I don't like it just the same :)01:31
drobillargareus: LIghtweight LV201:31
rgareuslost in lv201:33
drobillaI think suil (Simple UI Library) is the only one that's actually an acronym and not a sort of fuzzy portmenteau designed to be pronounceable01:34
Socapexhmm, so the data port structure seems not that bad now that I am over with my little heart-attack. Basically you guys have a ControlChange info thing + data after.01:34
drobillaI did find the "yalv" pronunciation many euros gravitate to most entertaining :)01:35
drobillaSocapex: Well, the problem in general is "I have a change in the UI thread I need applied in the audio thread".  A ring with a header to say what the change applies to followed by the data is the obvious solution.01:38
drobillaI can't even think of another one, actually.01:38
SocapexIt seems really reasonable and elegant to me.01:39
drobillaor some kind of queue, anyway.  Ring is just handy because it's inherently thread-safe and you don't have to deal with deletion (at the cost of a bounded limit on how much stuff you can cram in there)01:40
* drobilla => laptop01:41
Socapexring buffer is also nice cause if you ever did any type of audio stuff, your users are going to know about it01:42
drobillaWell, yep.  This is why forcing the comm to go through the host is a good idea.01:47
drobillaPlenty of plugin authors clearly don't know their ass from their elbow when it comes to RT/multi-threaded anything, but anyone capable of writing a halfway decent host is going to grok ringbuffering stuff01:48
*** NickSB has quit IRC01:50
Socapexwell see about that ;) Right now I'm thinking where I want to do all the suil instantiation. Since I will have multiple plugins running at the same time, it is tempting to make it a per object thing.01:50
rgareusdrobilla: it's funny that people here are prefactly capable of pronouncing Jack like "check"  but fail with jalv.01:50
*** NickSB has joined #lv201:53
Socapexdrobilla: Do you mind if I copy paste some stuff from jalv?01:56
rgareusSocapex: it's very liberally licensed for exactly that purpose.01:56
Socapexrgareus: :) There are a few things in there that just seem stupid to do differenty01:57
Socapexty though01:57
rgareusPermission to use, copy, modify, and/or distribute this software for any purpose....  see the header01:57
Socapexyes, but I meant, like does he doesn't like it etc.01:59
SocapexI dunno, just felt like I had to ask. I dont like copy pasting stuff01:59
rgareuswell, I'll let him answer it01:59
rgareusSocapex: yeah it's nice to ask, indeed01:59
*** falktx has quit IRC02:15
drobillaSocapex: Feel free.  As rgarus says, license is that way for precisely that reason02:34
drobillaSocapex: Thanks for asking02:34
drobillaSocapex: For trivial bits of a few lines here and there don't worry about copyright.  For considerable chunks, license applies.02:36
Socapexdrobilla: No problem. If I ever get my thing in a release state its public domain03:42
drobillaPublic domain can be problematic or even impossible depending on country.  Check out "unlicense" if you're into that sort of thing04:13
* rgareus recommends http://www.wtfpl.net/ 04:17
SocapexI just thought that dwtfyw license wasnt very pro for a "tutorial" like project05:01
*** drobilla has quit IRC07:14
*** Socapex has quit IRC08:08
*** ricardocrudo has joined #lv209:59
*** falktx has joined #lv211:27
*** drobilla has joined #lv211:56
*** ricardocrudo has quit IRC12:23
*** ricardocrudo has joined #lv212:50
*** gianMOD has joined #lv213:29
*** NickSB2 has quit IRC14:40
*** gianMOD has quit IRC14:45
*** gianMOD has joined #lv214:47
*** gianMOD has quit IRC15:24
*** edogawa_ has joined #lv215:27
*** edogawa has quit IRC15:31
*** gianMOD has joined #lv215:43
*** edogawa_ is now known as edogawa15:44
*** falktx has quit IRC16:57
*** rncbc has joined #lv217:27
*** falktx has joined #lv217:28
*** gianMOD has quit IRC17:33
*** ricardocrudo has quit IRC17:43
*** aombk2 has joined #lv218:00
*** aombk has quit IRC18:03
*** rncbc has quit IRC18:12
*** rncbc has joined #lv218:39
*** gianMOD has joined #lv218:41
*** gianMOD has quit IRC18:49
*** NickSB2 has joined #lv218:53
*** rncbc has quit IRC19:23
*** ssj71 has joined #lv219:50
ssj71does anyone have an example of the options extension in a plugin's instantiate?19:51
ssj71ok, maybe I'm getting it19:54
badosussj71: I always return NULL. but there are some19:58
ssj71badosu: I actually need one of the options19:59
ssj71but I think I've got it. We'll see once it compiles though20:00
ssj71can anyone teach me the difference between using urid:map vs just strcmp?20:01
badosussj71: drobilla would be your man, but I guess he's busy/away20:05
drobillaYou need me to teach you the difference between strings and integers? ;)20:06
ssj71apparently :)20:25
ssj71ok I'll go RTFM some more20:26
drobillaIf you're asking why we map them at all, two reasons: performance and memory management20:33
drobillaIf events were typed by strings, then you'd be doing a strcmp of a lengthy string ever single e.g. MIDI event, which is way too slow20:33
drobillaand someone has to be responsible for freeing that string20:33
*** ssj71 has quit IRC20:44
*** ssj71 has joined #lv220:45
*** ssj71 has quit IRC20:48
*** ssj71 has joined #lv220:48
*** gianMOD has joined #lv220:52
*** ssj71 has quit IRC21:06
*** ssj71 has joined #lv221:07
*** ssj71 has joined #lv221:08
*** ricardocrudo has joined #lv221:25
*** gianMOD has quit IRC21:30
*** gianMOD has joined #lv221:31
*** gianMOD has quit IRC21:45
*** gianMOD has joined #lv221:58
badosudrobilla: just submitted a proposal for this year's FISL on introducing LV2, hope gets accepted22:04
*** gianMOD has quit IRC22:15
*** gianMOD has joined #lv222:17
*** falktx has quit IRC22:19
*** ssj71 has quit IRC22:22
*** gianMOD has quit IRC22:31
*** ricardocrudo has quit IRC23:44

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