Tuesday, 2014-06-03

*** falktx has joined #lv201:44
*** zth has joined #lv205:34
*** zth has quit IRC06:47
*** edogawa has joined #lv207:59
falktxhmm, error when building lv2 with -Wl,-no-undefined08:01
falktx[42/59] cshlib: build/plugins/eg03-metro.lv2/metro.c.3.o -> build/plugins/eg03-metro.lv2/eg-metro.lv2/metro.so08:01
falktxplugins/eg03-metro.lv2/metro.c.3.o: In function `instantiate':08:01
falktxmetro.c:(.text+0x870): undefined reference to `sin'08:01
*** edogawa has quit IRC08:24
*** rachidori has joined #lv208:45
*** edogawa has joined #lv208:55
*** edogawa has quit IRC09:29
*** edogawa has joined #lv209:32
*** edogawa has quit IRC09:34
*** edogawa has joined #lv209:39
*** HarryHaaren has joined #lv209:40
*** rachidori has quit IRC10:27
*** rachidori has joined #lv210:32
*** edogawa has quit IRC10:41
*** zth has joined #lv211:29
*** bgribble has quit IRC11:30
*** rncbc_jolla has joined #lv211:46
*** NickSB2 has quit IRC11:50
*** falktx has quit IRC11:55
*** falktx has joined #lv211:57
*** rncbc_jolla has quit IRC12:50
*** ricardocrudo has joined #lv213:06
*** zth has quit IRC13:15
*** ricardocrudo has quit IRC13:17
*** ricardocrudo has joined #lv213:18
*** rncbc has joined #lv213:34
*** Anchakor has joined #lv213:59
*** falktx has quit IRC14:47
*** magnetophon has joined #lv215:24
*** rncbc is now known as rncbc|AFK16:53
*** rncbc|AFK has quit IRC16:55
*** rachidori has quit IRC16:58
*** rachidori has joined #lv217:01
*** NickSB_ has joined #lv217:56
*** NickSB_ has quit IRC18:08
*** zth has joined #lv218:44
HarryHaarenrgareus, have a minute? I'm confused a little while writing Lv2 Atoms, its probably a small thing, but I don't get it19:29
HarryHaarenthis is the code, and the output from jalv -d    http://pastebin.com/0DURWDZf19:29
HarryHaarenthe [  and  ] need to be around the rest: but I don't know how to make that happen in the LV2 atom forge code :/19:30
rgareusHarryHaaren: hang on sec19:30
HarryHaarensure19:31
rgareusHarryHaaren: that is in the GUI, right?19:31
HarryHaarenindeed yes19:31
* HarryHaaren notes this is to support a routing matrix presented in a (custom) UI19:32
rgareusHarryHaaren: it looks fine.19:32
HarryHaarenhmm, ok. I don't fully understand why I have a "frame" and a "blank"19:32
HarryHaarenI didn't figure out how to write the frame without the blank, but I think one of the two is redundant?19:32
rgareusHarryHaaren: the 'frame' is just an internal representation pointer here  (for later lv2_atom_forge_pop()19:33
HarryHaarenok, so the "blank" is the [ and ]?19:34
HarryHaarenwriting the data is fine: but decoding it in the DSP side is where things aren't going as I expected19:34
rgareusHarryHaaren: yes, I think drobilla changed that in LV1.8    lv2_atom_forge_blank() should be deprecated19:34
rgareusit confused a lot of people19:35
HarryHaarenyeah, objects == blank right?19:35
rgareusor maybe it's only SVN after LV1.819:35
rgareusHarryHaaren:  yes blank is  the []19:35
HarryHaarensomething yeah. I'll look into decoding a bit, then maybe ping you in a while if I can't figure it out?19:36
rgareusHarryHaaren: and that's a "generic object"19:36
HarryHaarensure :)19:36
HarryHaareneverything is generic in Lv2 land :D19:36
rgareusHarryHaaren: You're on the right track19:36
* HarryHaaren goes checking code19:36
*** falktx has joined #lv219:39
HarryHaarenrgareus, got it, thanks: i wasn't casting to lv2 object in checking the event type: this (from your lv2/book example code)  http://pastebin.com/cHKxa4yd19:41
HarryHaarencheers!19:41
rgareusHarryHaaren: usual case of:  all you have to do to find the problem yourself is explain it to someone.19:45
falktxquite a few things get auto-solved like that :)19:46
HarryHaarenheh yeah pretty much. Still though, a listening ear is needed, thanks for that!19:48
* HarryHaaren high-fives falktx , how's things?19:48
falktxgood, thanks19:51
falktxdoing some latency stuff in Carla now. either I'm wrong or plugins are :S19:51
HarryHaarenhaha, don't use my plugins anyway :D19:53
falktxafaik latency in plugins is done via output control port designated for latency19:55
falktxthe value is integer, >= 019:55
falktxthe latency means the # of samples I need to "delay" the input if I mix it with something else19:56
falktxright^ ?19:56
falktx(I currenly use this only for dry/wet)19:57
HarryHaarenfalktx, i think you need "anti-latency" to get it right, so you should A) delay the audio to all *other* tracks of audio19:58
HarryHaarenor B) "forward" the audio into the track with the latency-causing plugin19:58
falktxHarryHaaren: yes, but since this is carla, a modular host, I don't have tracks19:58
falktxI just need to adjust latency for dry/wet and jack-latency API19:58
HarryHaarenright, so you get to have more fun than the rest of us :D19:59
falktxwell, I would, if this was working19:59
magnetophonHarryHaaren: I made a nice compressor/expander in faust that you might wanna work you gui magic on: https://github.com/magnetophon/qompander19:59
HarryHaareni don't understand what dry/wet has to do with latency19:59
magnetophonHarryHaaren: oh, and hi!19:59
magnetophon:)19:59
HarryHaarenmagnetophon, checking it out, thanks for the link! ( hoi! )19:59
falktxHarryHaaren: the output signal is delayed compared to input19:59
falktxHarryHaaren: so I have to delay the input as well for dry/wet mixing19:59
magnetophonHarryHaaren: It's a translation of a pd-external into faust.20:00
falktxHarryHaaren: "delay input" = store the last x latency samples in a buffer, in case that wasn't clear :)20:00
*** zth has quit IRC20:02
HarryHaarenmagnetophon, does it cause much latency?20:02
HarryHaarenfalktx, yeah i get that part :) I don't see how the dry/wet thing changes things that's all20:03
magnetophonHarryHaaren: none afaik. haven't formally tested though20:03
falktxHarryHaaren: well, it's not working as it should :P20:03
HarryHaarenhah k, well good luck anyway :D20:03
* falktx needs to find a good known working latency plugin20:03
falktxlv2 needs an example plugin for this!20:03
HarryHaarenartificial-latency probably gets it right, falktx20:03
falktxHarryHaaren: I think that one is broken, I can never get it to work20:04
HarryHaarenah ok... i havent tried it actually, so no experience here20:04
falktxit's from swh-plugins, right?20:04
HarryHaarenmagnetophon, generally compression / limiting / expanding has a "look-ahead" of X ms, which is how it reacts (amplifiying or attenuating the signal without causing loads of distortion)20:05
magnetophonHarryHaaren: actually I can answer that better: No it does not: 0 samples. It does mess with the phase of the signal though, so you can't easily use it for paralel compression20:05
HarryHaarenah ok.. strange: and very interesting. I'll certainly check it out20:05
Anchakor_falktx: well you are not doing any internal routing in carla are you? then you are just translating APIs: jack-latency -> lv2-latency -> jack-latency20:06
rgareusfalktx: https://github.com/x42/nodelay.lv220:06
magnetophonHarryHaaren: it's all explained in a lot of detail here: http://www.katjaas.nl/compander/compander.html20:06
HarryHaareni checked that yup, reading now20:06
falktxAnchakor_: not even that yet. I'm only doing audio input -> run -> mix input/output for dry/wet -> out20:07
Anchakor_yeah so it is now just jack-latency-in -> jack-latency-out20:08
falktxAnchakor_: I don't use the jack-latency api yet, none of it20:08
magnetophonHarryHaaren: I'm also working on a translation of my voice synth into faust: https://github.com/magnetophon/VoiceOfFaust20:09
falktxrgareus: that seems useful, and readable code too, thanks!20:09
Anchakor_I dunno what you are doing then :)20:09
falktxrgareus: I don't think swh-plugs have readable code...20:09
Anchakor_anyway the ir.lv2 plugin has latency reporting support20:10
falktxyes, and that one seems "broken" too20:10
Anchakor_(versions 1.3.x)20:10
rgareusfalktx: yes swh uses some fancy homemade xml spec from which the actual code is generated.20:10
rgareusfalktx: for testing I used 2 channels.  one has the nodelay.lv2 , the other a phase inverter.20:12
rgareusfalktx: if the LV2 hosts compensates the latency correctly, the output when mixing the channels is 020:12
falktxthat is something I have to try when I get into jack-latency api20:12
falktxlast time I tried it I couldn't make sense of it. but that was perhaps because my latency code was broken20:13
rgareusfalktx: so far this is for plugins only  (not jack related)20:13
rgareusfalktx: the plugin-host - in my case ardour - has additional delaylines to sync things up in the case of busses or effect chains..20:14
falktxdealing with jack-latency will probably not be very fun...20:14
rgareus... and special logic to read-ahead on tracks20:14
rgareusfalktx: jack-latecy API itself is simple, just 2 numbers.20:15
rgareusdoing something with those numbers is the hard part.20:15
falktxyeah20:15
falktxI imagine I'll have to do some extra compensation to ensure 2 plugin-clients output that get fed into a new plugin are aligned20:18
Anchakor_but you are not doing any complex routing in carla so you will be spared of most of the horros20:18
Anchakor_horrors*20:18
Anchakor_ah you can do that in carla? then you will not be spared I guess :)20:19
falktxit can probably be done at the engine level, without the plugin knowing, ...hopefully20:20
Anchakor_well there is no other way is there, you will have to set up buffering to sync the 2 plugins outputs20:22
falktxdamn latency, it shouldn't exist!20:22
Anchakor_plugins just report their latency, host does the work :)20:22
Anchakor_would be neat if there was some C library wrapping the host stuff to allow arbitrary directed-acyclic graph data flows with proper latency handling :)20:24
falktxcarla is close, the exposed API is C compatible20:25
Anchakor_I thought you were just going for straight buses and leaving the 2 plugins going into 1 plugin mixing for jack20:26
Anchakor_that would be much simpler20:26
falktxthat one plugin that receives the output from the 2 plugins needs to have audio aligned20:27
falktxjack-latency api also only reports latency values, it doesn't do any work :P20:27
Anchakor_well jack has to do that work, because jack clients recieve single input buffer no matter how many connections are routed into it20:28
falktxhmm right20:29
Anchakor_(it = port)20:29
falktxif that's true, then all I'll have to do is report the plugin latency value to jack20:29
Anchakor_afaik thats how qtractor does it - just simple plugin pipes, for mixing use jack and make more tracks/buses20:30
Anchakor_(though qtractor GUI makes this workflow quite tedious)20:31
Anchakor_yeah, just report input jack-lacency + sum of the latencies of the plugins in the pipeline20:31
falktxnice20:32
falktxthe less work the better!20:32
Anchakor_as long as it is a pipline - you are not doing any mixing with other pipelines (aka its not a graph) you are fine20:32
Anchakor_though dry/wet mixing... that actually is a problem20:34
Anchakor_maybe you could get lazy and outsource even that to jack, paying a price of more littered jack connection graph20:35
falktxnot possible20:35
falktxthis is not hard to do anyway, I have 90% of the work done already20:36
Anchakor_I think it would be possible - for each plugin pipeline you would have an extra ghost pipeline with some internal simple mixer plugin with inputs: the clean input + the real pipeline output20:38
Anchakor_all jack IO so jack does the latency compensation20:39
*** NickSB2 has joined #lv220:41
Anchakor_actually I think the internal mixer plugin would have to do the compensation anyway so never mind me :)20:42
falktxthat's overcomplicating things20:44
falktxtomorrow I'll try to sort this latency thing 100%20:44
rgareusjack does *not* delay the input at the end.20:49
rgareusjack only passes around numbers20:49
*** edogawa has joined #lv220:49
falktxrgareus: what if 2 outputs have different latencies, connected to 1 input port?20:51
rgareusfalktx: that's why jack has a min and max latency for each port in every direction20:51
falktxrgareus: but the client of that 1 input port has no way to compensate latencies20:52
rgareusfalktx: jack will set the 'min' to the the smaller one of the two ports and 'max' to the larger one20:52
falktxthe 2 outs signal come joined20:52
rgareusfalktx: correct20:52
falktxanyway, talk later20:52
falktxreally need to go, bbl20:52
*** falktx has quit IRC20:52
rgareusfalktx: if the user makes odd jack connections, there's nothing the app can do.20:52
Anchakor_oh thats bad20:52
Anchakor_anyway one of things in which lv2 can be proven as much better approach20:53
rgareusAnchakor_: why?  it's not really up to jack to tell you what is "right".20:53
rgareusjack is a mechanism - not policy20:53
rgareusAnchakor_: lv2 is just the same.  it's up to the host to get this right.20:54
Anchakor_ok, you have option to set up mixer jack clients which deal with it20:54
rgareusAnchakor_: just as with jack it's up to the client20:54
Anchakor_I take that back that it's bad20:54
Anchakor_it's just bad for common users who want good audio renders without unnecessary delay without complicated setup :)20:55
rgareusAnchakor_: jack tells the clients about connections and sends a callback to the clients20:55
rgareuswhen the port latency changes20:55
rgareusAnchakor_: the clients should handle it, update its port latency and the situation where min != max is resolved20:56
Anchakor_when min != max the client can't do anything as the signals were already mixed20:57
rgareusAnchakor_: it's the client that does set the value in the first place20:57
Anchakor_I don't think so, you get it by jack_port_get_latency_range() and you can't do anything with it20:58
rgareusit's not jackd that sets these numbers,  it's every jack-client.20:59
Anchakor_the jack client doesn't have access to the output ports connected to its input port does it?20:59
rgareusbut if the client does not have an explict jack_set_port_latency function a default implementation is used20:59
rgareusand that default implementation does the min/max thing20:59
*** timbyr has quit IRC20:59
rgareusAnchakor_: yes it does have access to it21:00
rgareusAnchakor_: jack calls all clients in the flow of signal direction.21:00
rgareusAnchakor_: twice, first upstream, then downstream21:00
rgareusthat's all jackd does.21:00
rgareusthe port-latencies are set by every jack application, only that most developers don't care and simply use the default21:01
*** timbyr has joined #lv221:01
rgareusfunction that only does the min/max thing21:01
Anchakor_so in my jack client I can for all input ports enumerate their connections and then set up the latency compensation, mixing the values of my input ports myself?21:01
rgareusAnchakor_: correct21:01
Anchakor_s/enumerate/interate/21:02
rgareusAnchakor_: jackd calls the latency_callback  for every port in your app21:02
Anchakor_ah ok, thought you were just given the input buffers and deal with it21:02
rgareusAnchakor_: that, too :)21:02
rgareushttps://jackaudio.github.io/api/group__ClientCallbacks.html#ga70a38fb1e74c5e9df9f1305c695c58bf21:03
Anchakor_so basically for mixer jack app I have responsibility to correctly latency compensate the mixing of all its input ports and then the mixing app itself21:04
rgareusAnchakor_: yes21:04
rgareusAnchakor_: the API doc makes it clear that the 'default' function is only good for certain cases.21:05
Anchakor_is there some default implemenation for this? :)21:05
rgareusAnchakor_: there is a default somewhere in libjack21:07
Anchakor_anyway based on what you said the first of the 4 items in the list "have only input ports" is wrong no?21:08
Anchakor_even a plugin with 1 input can recieve multiple signals with various latencies into it21:08
Anchakor_so it needs to compensate this and mix them properly, no?21:09
Anchakor_s/plugin/client/21:09
rgareusAnchakor_: but that's not up to the jack-client that has the input21:09
rgareusAnchakor_: if they're already mixed. then it's too late21:09
Anchakor_well thats what I was talking about21:09
rgareusAnchakor_: the apps before that will see that they go into a common place. and one of them will need to delay itself21:10
Anchakor_thats why if you just have a value and range what the latency might be in, then you are done, it's too late21:10
Anchakor_rgareus: who then does the delaying?21:10
rgareusAnchakor_: the app with the shorter latency21:10
Anchakor_I thought in that the jack server handles this21:11
rgareusAnchakor_: then when it added a delayline to itself, it updates its port latency..21:11
rgareusAnchakor_: jackd does not do anything21:11
rgareusAnchakor_: it passes around numbers21:11
rgareusor memory blocks21:11
rgareusand it can mix21:12
rgareusand keep track of connections21:12
Anchakor_ok, so tell me, hypothetically I am writing 3 clients A, B, C, each introducing latency 10ms, 20ms and 30ms respectively21:12
rgareusbut that's basically it - apart from hardware I/O21:12
Anchakor_A and B each have 1 output port and are connected to a single input port of client C21:13
rgareusAnchakor_: too bad, jackaudio.org is down at the moment21:13
Anchakor_so on that input port of C the latency can be in range 10..2021:13
rgareusAnchakor_: there a nice picture there21:13
Anchakor_google cache?21:14
Anchakor_who then compensates for the latency? A, B, C or jack server?21:14
rgareusAnchakor_: the server does nothin. just pass around information.21:15
rgareushttp://manual.ardour.org/ardour/manual/html/diagrams/jack-latency-excerpt.png is part of it21:15
rgareusthe orignal image shows a 2nd chain and explains algorithms21:15
* rgareus searches google images by image similarity21:16
Anchakor_if jack server just passes around information then probably only C has information to do the compensation and mixing21:18
rgareusAnchakor_: every client could21:18
Anchakor_unless there is global connection graph knowledge, but then it would also not make much sense as C is the one with the input port21:19
rgareusAnchakor_: jack calls every client and provides the requires graph knowledge for every port21:19
Anchakor_there could be other stuff done with the mixing - like deciding what kind of mixing should be done21:19
*** falktx has joined #lv221:20
Anchakor_so am I right that the plugins with the input ports have the responsibility to do the proper latency compensation and mixing of their input port?21:21
Anchakor_(each of their plugin ports)21:21
falktxwhat have I missed?21:21
rgareusAnchakor_: way-back machine http://jackaudio.org/files/jack-latency.png21:21
Anchakor_falktx: it's confusing, seems like jack doesn't do jack shit ;)21:22
rgareusAnchakor_: https://web.archive.org/web/20120411032518/http://jackaudio.org/files/jack-latency.png21:22
falktxthat graph is too simplistic21:22
rgareusAnchakor_: jack cannot do anything about it21:22
falktxI want to know about this:21:23
falktxclient A has 1 output port, no latency21:23
Anchakor_yeah that graph doesn't deal with the case I talked about21:23
rgareusAnchakor_: Only the client knows what the right thing to do is.21:23
falktxclient B has 1 output port, 612 frames latency21:23
Anchakor_"hypothetically I am writing 3 clients A, B, C, each introducing latency 10ms, 20ms and 30ms respectively"21:23
falktxclient C has 1 input port, no latency21:23
Anchakor_"A and B each have 1 output port and are connected to a single input port of client C"21:23
falktxclient A and B connect to C21:23
rgareusAnchakor_: same thing really.21:23
Anchakor_yeah, same thing really21:23
falktxsince the audio sent to C is mixed/joined by jack, it can't compensate latencies21:24
rgareusAnchakor_: A gets told what that it feeds C and the downstrea latency from C onwards. B gets the same21:24
Anchakor_we were discussing what client is responsible for the mixing and latency compensation of the outputs connected to the input port of C21:24
rgareusAnchakor_: then A realizes it's too early21:24
rgareusAnchakor_: then A delays its signal 10ms more21:24
Anchakor_that is a pretty strange design21:25
rgareusAnchakor_: I don't think it can be designed any other way21:26
rgareusAnchakor_: jack cannot know what the right way to delay the signal is21:26
falktxwell, it could at least make a way to compensate for clients that don't implement latency21:26
Anchakor_why doesn't the client which has the input port do the mixing and compensation?21:27
rgareusAnchakor_: because it's the only component in the system that know how to do it right for the case at hand21:27
rgareussame with plugin bypass.21:27
Anchakor_why are you agreeing with me when you just described that it's done differently? ;)21:28
rgareusdepending what DSP the client does. the correct way to bypass or delay the signal can be very different21:28
Anchakor_ok, so it is done this way to enable auto-bypassing21:29
Anchakor_that makes sense21:29
rgareusAnchakor_: I don't follow.21:30
rgareusAnchakor_: the 'plugin-bypass' was a reference to plugin-hosts that do the bypassing (which is wrong).21:31
rgareusAnchakor_: 'bypass' should be a function of every plugin.21:31
rgareusjust like latency-compenstion is a function of every jack-clients21:31
Anchakor_I thought you said that jack is designed so the output-port-clients do the delaying so the input-port-clients could be bypassed21:32
Anchakor_because otherwise I would make it (based on intuition) that the input-port-clients are responsible for the mixing and latency compensation21:33
rgareusAnchakor_: it does both ways.21:33
falktxrgareus: did we got any consensus about bypass on lv2?21:33
rgareusAnchakor_: there are separate values for input and output latency per port21:33
rgareusfalktx: almost. So far we agree we need an API for it21:34
falktxrgareus: would a control input port suffice?21:35
rgareusfalktx: that was my first idea as well.21:35
falktxdesignated port, host sets it to 1 when wants bypass21:35
rgareusfalktx: and a reply port.  bypass completed21:35
falktxhm?21:36
Anchakor_rgareus: btw that image you linked seems to deal with measuring latency, not with reporting and dealing with it21:36
rgareusfalktx: the latter is reason why an Atom port would be more suitable21:36
falktxrgareus: why do we need bypass complete status?21:36
rgareusfalktx: to allow safe clickless removal and insertion21:36
falktxhm, I wouldn't call that bypass then21:37
falktxmore like "safe-cleanup"21:37
rgareusfalktx: it's the sae API really.21:37
falktxsure, but calling it bypass is a bit misleading21:37
rgareusfalktx: if we now add a bypass port, and then in 1 year a second API that does the same and more...21:37
rgareusfalktx: then we'll invoke the wrath of many21:38
falktxrgareus: so if I would remove a plugin that has this "bypass completetion", I would have to wait for it to finish, right?21:38
rgareusfalktx: the idea is:  add plugin in bypassed state, make connections, unbypass plugin.21:38
rgareusfalktx: and  for removal:   bypass plugin, wait until it's bypassed , remove it21:38
falktxrgareus: what if the plugin takes too long?21:39
rgareusfalktx: too long for what?21:39
falktxto complete bypass21:39
rgareusfalktx: you just wait.21:39
falktxlike 10x 512 buffer cycles21:39
rgareusfalktx: if that's what it takes, then yes21:39
falktxwhat if it doesn't send bypass complete? :P21:40
rgareusfalktx: then the plugin is broken21:40
rgareusfalktx: if a plugin says it supports "bypassFeature" it should do that21:40
falktxmaybe it needs 100 seconds21:40
rgareusunlikly21:41
rgareusfalktx: you could add a 'force remove - beware of clicks' options21:41
falktxdon't underestimate how broken plugins can be ;)21:42
rgareusto provide context: http://lists.lv2plug.in/pipermail/devel-lv2plug.in/2014-May/001397.html21:42
rgareusfalktx: just don't use those broken plugins21:42
falktxrgareus: so this would be like a reverb effect waiting for the "tail" to stop ?21:42
rgareusfalktx: the reverb would not wait but fade out21:43
rgareusfalktx: same with an amp. that would just fade to 0dB21:43
rgareusfade-out != x-fade with original (the latter would introduce comb-filtering)21:44
falktxhmm, but that can be done by the host too21:44
rgareusfalktx: the host does not know the proper thing to do21:44
falktxfade-out for 1sec21:44
rgareusfalktx: a x-fade on some effect with latency will act like a bad eq.21:45
rgareusfalktx: fade-out in context of a reverb only affects the wet signal21:45
falktxnot x-fade, fade out the output21:45
falktxyes, only to wet signal21:45
falktxplugin remove, fade-out; plugin added, fade-in21:46
rgareusfalktx: if the reverb has an internal dry/wet  and also a pre-delay. the host cannot do it21:46
falktxoh, if the audio keeps playing it would be a bit tricky21:46
*** edogawa has quit IRC21:46
falktxbut carla always has dry/wet if possible21:46
falktxI don't like plugin-side dry/wet21:47
rgareusfalktx: that's really hard to do host side. the host has too little info to do this21:47
falktxit only needs to know the input, output and latency21:47
falktxthat's what I'm doing in carla right now21:48
rgareusfalktx: that works for many cases21:48
rgareusfalktx: but for stereo-phasers or cabinet simulation. there should not be a dry bypass to start with21:49
falktxhehe, stereo phasers could have a weird effect, yes21:50
falktxwe need an lv2 hint to say "this plugin cannot be used for dry/wet"21:51
rgareusfalktx: I think your premise "the host can do everything" is wrong.21:53
rgareusfalktx: it's the same with jack + latency. yes there could be delayline in jackd itself to align things...21:54
rgareus.. and yes they'd be right i many cases.21:54
rgareusbut no they won't be right in all cases21:54
falktxbut it will be broken in most of them21:56
rgareusfalktx: then file bug reports or don't use those apps21:58
falktxno, I mean the A + B => C situation21:58
falktxA client has latency, B has not21:59
falktxboth connect to C21:59
rgareusfalktx: if B does not copensate properly, don't use "B"21:59
falktxB cannot compensate anything21:59
falktxB only outputs21:59
rgareusthen it makes no difference22:00
rgareusit does not matter how B aligns at al22:00
falktx?22:00
falktxit does matter how C gets the input audio22:00
falktxjack does the port mixing internally22:01
rgareusbut if B is just a player (and not uses jack-transport)22:01
rgareusthen it makes no differnce if it's early relative to A22:01
falktxlet's say A and B are synths22:02
falktxno input, just output22:02
falktxbut A has output latency22:02
rgareusthey have MIDI in puts I suppose22:02
falktxprobably yes, I'm just trying to think of the simplest example22:03
falktxA and B are assumed to be in sync22:03
falktxbut A has latency > B (which has none)22:03
falktxif both connect to something, the audio will not be in sync because of A's latency22:04
rgareusthen 1) either B's input or B's output needs to be delayed.22:04
rgareusor 2) if "A" gets is input from disk (midi-file) it should read-ahead22:05
falktxwhy can't jack just do the latency compensation in this case?22:05
rgareusfalktx: it could, in this case22:05
rgareusfalktx: except for the initial delay.22:06
rgareusfalktx: the right way here would be to delay the midi-data to B22:06
rgareusfalktx: and not the audio output of B22:06
rgareusfalktx: jack does not know this.22:06
rgareusfalktx: but "B" does22:06
falktxthat can get overly complex too soon22:07
rgareusfalktx: it's very simple in every client itself22:07
falktxie, if a extra A2 client is added in the mix with a different latency value22:07
rgareusfalktx: it's only complex if jack tried to do this22:07
falktxthen A(1) needs to compensate too22:07
rgareusfalktx: right22:08
falktxbut then, what if they connect to an input port that also has latency?22:08
Anchakor_so if you have 10 output clients routed into a single input port of some plugin, then all 10 output clients have to find which of them has the highest latency and delay their signals?22:09
rgareusfalktx: in that case it makes you confused :)22:09
Anchakor_seems much easier if the input client did that22:09
Anchakor_s/plugin/client/22:10
falktxor jack22:10
rgareusfalktx: just look at every individual client only. it does not care where it connects to or how many other clients also feed the same output22:10
rgareusfalktx: all everything client needs to know is "how long has it been since the signal arrived at the edge of the jack-graph"22:11
falktxI think this overcomplicates things for regular jack clients22:11
rgareusfalktx: and "how long will it take until it hits the outputend"22:11
falktxa simple FX plugin will need to always implement latency22:11
falktxs/plugin/jack app/22:11
rgareusfalktx: it's a simple as possible. without making compromises22:11
rgareusevery other implementation would compromise something.22:12
Anchakor_what would they compromise?22:12
rgareusfalktx: qtractor and ardour can compensate by read-ahead for example.22:12
falktxbut if the fx output connects to some port that some latency-apps also connect, then this simple fx has to compensate22:12
rgareusfalktx: ardour can also write-behind to compensate latency22:13
rgareusnon-daw probably can do, too. but I don't know22:13
rgareusin those cases jack adding some delayline would be wrong - because it'd increase the total latency...22:13
falktxafaik this makes 99% of jack fx clients broken right now22:14
rgareus... when in fact there are better ways22:14
rgareusfalktx: probably 95% or so22:14
falktxsimple client should NOT have to deal with this22:14
rgareusas side story, that's why I don't use calf-plugins nor carla. they're just toys unsuitable for pro-audio in their current state.22:14
rgareusfalktx: a 'simple client' should just use pulsaudio then22:15
rgareusjack is a tool for professional audio.22:15
Anchakor_rgareus: but proper latency reporting makes read-ahead and write-behind possible22:16
rgareusAnchakor_: yes22:16
falktxso almost all jack-standalone effects are broken right now22:16
Anchakor_delay lines are inevitable and are fine when reported22:16
rgareusAnchakor_: sadly only the minority of plugins and jack-clients do report their latency correctly or handle this22:17
rgareuseven if jack did delay the audio. it'd be broken in 95% of all cases simply because the client does not report it22:18
magnetophonfalktx: I'm looking for a multi-platform UI framework for a synth I'm writing. HarryHaaren just recommended DISTRHO, but also said it's not great for plugins whit many parameters. Mine has many dozens of parameters. What are your thoughts?22:18
falktxmagnetophon: DPF should be able to handle just fine22:18
falktxmagnetophon: too many params is an issue for hosts, not the plugin22:18
falktxhosts just have to deal with it22:18
rgareusmagnetophon: dozens of parameters?  I think it's Harrys's well beyond the thousands :)22:19
falktxmagnetophon: see https://github.com/DISTRHO/DPF, there's some already made plugins with this framework on that README22:19
Anchakor_rgareus: well jack would only delay it if it was reported22:19
HarryHaarenbackground info, yes, I have a matrix of dials, which scales *very* badly in terms of control-ports22:20
falktxhm, need to update that, DPF now exports JACK standalones too :)22:20
HarryHaareneven adding 1 new input to the matrix would mean I have to code another 40/50 control ports (including names, default values / ranges etc)22:20
HarryHaarenand I hope to add lots more inputs & outputs :/22:21
falktxHarryHaaren: macros to the rescue!22:21
HarryHaarenor Lv2:Atom's ;)22:21
falktxwe need to automate atoms22:21
rgareusHarryHaaren: it could be a single atom port22:22
rgareusHarryHaaren: that only reports what has changed22:22
rgareusHarryHaaren: rather than  n^2 parameters every cycle22:22
magnetophonfalktx: which of HarryHaaren's plugins has that many?22:22
HarryHaarenmagnetophon, ninja would have a ridiculous amount of ports if they were all control ports22:23
falktxmagnetophon: an upcoming one, not release yet afaik22:23
HarryHaarenrgareus, all matrix events now as Atoms, so yes one Atom port, done22:23
HarryHaarenindeed it updates only onChanged(), and not all the time!22:24
rgareusmagnetophon: I think fabla has a lot, but Harry will know for sure22:24
HarryHaaren120 or something22:25
HarryHaarenbut hard-coding that in TTL was enough to put me off doing it again :D22:25
rgareusHarryHaaren: only 120? did you simplify it ?22:25
rgareus:)22:25
falktxrgareus: ok, my latency code is officially wrong22:26
falktxtested with nodelay.lv222:26
falktxit's doing exactly *nothing* :P22:26
HarryHaarennope, its 16 pads * 7 controls, with some others like master volume / compression etc. 122, just checked lv2info22:27
falktxweird how I can write quite some code and then it turns out it does nothing! ;)22:27
HarryHaarenif ( false ) {  <code> }  ??22:27
rgareusfalktx: wait.22:27
rgareusfalktx: if your latency code is working.  nodelay  is not a delay22:28
rgareusfalktx: if your latency code is broken. you'll hear a delay22:28
falktxdoesn't nodelay do latency?22:28
rgareusfalktx: it delays the audio signal by N samples  and then tells the host it has N samples delay22:28
falktxthat's a proper latency plugin then, right?22:29
rgareusfalktx: (the later is a toggle checkbox)22:29
rgareusfalktx: It's a tool to test if latency compensation is working22:29
falktxyes, that's exactly what I need it for22:30
falktxnow just need to get it working22:30
rgareus(and if you set the 'report latency to host' checkbox to off, it's a delayline with sample-accuracy)22:30
falktxrgareus: btw, how does ardour handle latency changes? afaik the plugin doesn't report the max latency value or does it?22:30
falktxie, when latency gets bigger, we need a bigger buffer22:31
rgareusfalktx: there's a pre-allocated memory pool that can be used.22:31
magnetophonSomething I've been wondering: do faust plugins report their latency to the host correctly?22:31
rgareusfalktx: IIRC up to 3 seconds or maybe 522:31
falktxrgareus: what happens when the plugin wants latency bigger than that?22:32
rgareusmagnetophon: not yet. I'm discussing FAUST latency compensation behind the scenese with Yann, Julius and Albert22:32
rgareusfalktx: nothing yet.22:33
falktxhmm, nodelay sets latency max value, nice :)22:33
rgareusfalktx: I'm working on that in Ardour's latcomp+cc branch.22:33
magnetophonrgareus: that sounds promising. Do they see the value in it too?22:33
rgareusmagnetophon: too much actually, JoS events wants to feature sub-sample latency22:34
rgareusmagnetophon: some of the faust2XXX tools already create code to announce the latency of the effect22:34
magnetophonrgareus: which ones?22:35
falktxrgareus: do you know if lv2 plugins' latency port are required to set maximum value?22:35
rgareusmagnetophon: I think you need    declare latency "1"; // samples22:36
rgareusmagnetophon: this will then translate into C++  m->declare("latency", "1");22:36
rgareusmagnetophon: and 'faust2au' picks that up already22:37
magnetophonrgareus: hmm, I don't have a mac...22:37
magnetophonrgareus: I understand how sub-sample delay time values can be useful within a dsp algo, but what would it do for latency compensation?22:38
Anchakor_rgareus: I need answers to this http://i.imgur.com/dsHyi1z.png :)22:38
rgareusfalktx: one DSP item can only have _one_ latency at any given time.  there's no min/max per effect22:38
* magnetophon likes the thorough way of designing @ grame :D 22:39
falktxrgareus: I mean max latency value. nodelay has it. "lv2:maximum 192000 ;"22:39
rgareusAnchakor_: the way to get to the answer is the same.22:40
rgareusfalktx: aah. ok.22:40
Anchakor_rgareus: that means nothing there will be inconsistencies and no compensation22:41
rgareusAnchakor_: unless "client A" or "client B" do something about it22:41
Anchakor_yeah but they don't know about each other do they22:42
Anchakor_I gtg, will read backlog22:44
rgareusfalktx: it's a lv2:ControlPort lv2:OutputPort (that also lv2:reportsLatency ), no having min/max range would not validate it. and the plugin spec would be incorrect22:44
falktxrgareus: afaik out controls don't need mix/max/default set22:45
rgareusfalktx: they don't need default22:45
falktxor min/max22:45
falktxwell, they should have, but I don't think it's required in lv222:45
rgareusthat's probably an oversight in the specs22:46
rgareusI can't think of a reason where one would have an unbound range or a changing range22:46
rgareuss/reason/use-cae/22:47
rgareususe-case, even.22:47
rgareusthere might be one. but I cannot think of one.22:47
falktxcalf plugins don't set in/out range I think22:47
falktxerr, min/max22:47
rgareusand the reason for that is?22:48
falktxhmm they do set it22:48
falktxI know there's some plugin(s) that do not set it, don't remember which one(s)22:49
rgareusbut the range is probably finite.22:49
rgareusjust not given in the .ttl22:49
falktxmax: +inf; :D22:49
rgareusfalktx: that's a valid range22:49
rgareusat least you know what to expect22:50
falktxbut how do I represent that in a slider?22:50
rgareusfalktx: the same way calf does internally22:50
falktxcalf knows what's the "biggest" value22:50
falktxa host does not22:50
*** ricardocrudo has quit IRC22:53
*** ricardocrudo has joined #lv222:54
*** HarryHaaren has quit IRC22:54
falktxhmm, my line "if (k < pData->latency)" is being ignored...22:56
*** crudo has joined #lv222:56
*** crudo is now known as Guest5545522:57
*** ricardocrudo has quit IRC22:59
*** rachidori has quit IRC23:03
falktxfffffffffffffffffffffuuuuuuuuuuuuuuuuuuuuu23:08
falktxdamn this23:08
falktxI had a line of code from when I didn't handle latency still in there23:08
falktx*after* the latency code, overriding the value23:08
falktxaaaaaarrr23:08
falktxhttps://github.com/falkTX/Carla/commit/0a2270353930b69f423a9df13dd00d617de5fdd9 lol23:12
rgareusfalktx: we've all been there.23:14
rgareusfalktx: my recent favorite is https://github.com/Ardour/ardour/commit/bf4819a23:14
falktxheh23:16
falktxnow I need to find a way to safely recreate the buffer when latency changes23:16
rgareusfalktx: you could re-use the code from nodelay itself (which x-fades)23:17
falktxno xfades, hard-cut in there23:17
falktxchanging latency should not be a thing plugins do regularly23:18
*** Guest55455 has quit IRC23:19
falktxrgareus: that plugin is the most useful thing I could ask for in this case, many thanks!23:29
rgareusfalktx: y/w23:30
rgareusfalktx: i wrote it to test Ardour's latency compensation.23:32
rgareusfalktx: if you want to 'see' what's going on https://github.com/x42/sisco.lv2 will come in handy as well23:32
falktxok, confirmed working with ir.lv2 latency too23:42
rgareuswooha. carla is getting better every day.23:43
falktxI patched ir.lv2 to work with showInterface23:43
falktxnow it shows the UI in carla :)23:43
falktxcalf stuff too, which was accepted upstream already23:44
rgareusfalktx: what's the difference between externalUI and showInterface ?23:44
falktxone of official :P23:44
falktx*is23:44
falktxrgareus: we're using windowTitle option instead of human_name, and using idle23:45
rgareusfalktx: nothing else? just differnt URIs?23:45
falktxto be honest I prefer the new official way23:45
falktxit's more extensible23:46
rgareusfalktx: is there some doc about that on lv2plug.in?23:46
falktxnot updated afaik, but the headers have the info as usual23:46
rgareusLAbot: google lv2 showInterface23:46
LAbotrgareus: Cisco IOS Interface and Hardware Component Command Reference: <http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/interface/command/ir-cr-book/ir-s4.html>; Configuring IS-IS for IP on Cisco Routers - Cisco: <http://www.cisco.com/c/en/us/support/docs/ip/integrated-intermediate-system-to-intermediate-system-is-is/13795-is-is-ip-config.html>; Calf Studio Gear - Audio Plugin Pack | Free (2 more messages)23:46
falktxrgareus: I'm thinking of using kx-extui and then implement showInterface for that. jalv will be able to load this unpatched23:47
falktxso will ingen, someday23:47
falktxie, kx-extui as UI type, but providing showInterface as fallback23:47
falktxif the UI must be external, that is23:48
rgareusfalktx: so there is no doc how I could change my plugins, yet.23:48
rgareusfalktx: except some example code in calf git23:48
falktxlet me upload the patch23:48
falktxrgareus: eg-sampler has showinterface too23:49
falktxbut a very simple one23:49
falktxrgareus: http://kxstudio.sourceforge.net/Paste/repo/k5uNI23:49
rgareusfalktx: aah just an extension_data method23:50
falktxrgareus: it's very clean. it even re-uses idle23:50
falktxqtractor supports it in latest svn I think23:51
falktxjalv (CLI) supports this too in svn23:51
*** NickSB has quit IRC23:51
falktxrgareus: for ardour this is currently not of much use. but I needed it in carla23:52
rgareusfalktx: ardour does not care at this level. it's delegated to libsuil which handles that23:52
*** NickSB has joined #lv223:53
falktxlibsuil can't handle external uis23:53
rgareusfalktx: no, it it takes care of showInterface, does it not?23:53
falktxno23:53
falktxwell, not that I know, I don't use suil23:54
rgareusmmh I wonder how ardour displays the eg-sampler GUI then. there isn't any reference to showInterface in A3's lv2 code23:54
falktxeg-sampler has the gtk2 ui by default23:55
falktxshowinterface is for hosts that can't do embed23:55
rgareusfalktx: I'm pretty sure there are people using calf-git with ardour3. Does calf also fall back to gtk?23:55
falktxit always did, it's gtk2 uis23:56
falktxmy issue with calf was instance-data23:56
falktxI don't want to use gtk code in my backend directly, or qt even23:56
rgareusfalktx: quite understandable23:56
falktxso now the plugin takes care of showing the UI, which is the important thing23:57
falktxsince I don't care about embed, it's all good23:57

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