*** edogawa_ has quit IRC | 00:00 | |
rgareus | falktx_: anyway asking drobilla and or the LV2-dev email list is probably a good idea. | 00:01 |
---|---|---|
rgareus | if a host sends regular updates, it won't break existing pluins. | 00:02 |
rgareus | only new plugins that expect it every cycle won't work with old hosts. | 00:02 |
falktx_ | I'm trying to figure out how to get jack-transport like values from lv2 time info | 00:03 |
falktx_ | I'm missing ticks, barStartTick and ticksPerBeat | 00:03 |
rgareus | falktx_: ticksPerBeat is just some arbitrary number, usually something that can be divided by 2,3,5 a couple of times. | 00:08 |
rgareus | falktx_: common values are 1920 and 7680 | 00:08 |
falktx_ | I can read documentation too, thanks :) | 00:09 |
rgareus | falktx_: mmh which doc did you find that in? | 00:09 |
falktx_ | jack1 headers | 00:09 |
rgareus | falktx_: seems to be missing in doxygen. | 00:11 |
rgareus | falktx_: does Carla have functionality to act as timebase master? | 00:11 |
falktx_ | no | 00:12 |
rgareus | i suppose one usually needs a timeline for a tempo-map. - though a simple version "fixed tempo + metrum" could be useful. | 00:13 |
rgareus | sadly, most people do four to the floor at a fixed tempo, these days. | 00:14 |
falktx_ | if I assume a ticksPerBeat value myself, I can get the ticks from barBeat | 00:19 |
falktx_ | hmm so how can I get the "ticksPerBeat" in lv2? | 00:20 |
falktx_ | rgareus: any ideas? | 00:20 |
rgareus | falktx_: just set it to some value, say ticksPerBeat=1920. | 00:21 |
falktx_ | but won't work right... | 00:21 |
falktx_ | I need to advance the ticks value manually | 00:21 |
rgareus | falktx_: then calcuate samplesPerBeat = 60 / BPM * sampleRate | 00:22 |
rgareus | falktx_: then set ticks to (current_sample_pos - sample_pos_of_bar) * samplesPerBeat | 00:23 |
rgareus | / ticksPerBeat | 00:23 |
rgareus | oh sorry, I got this wrong. ticks = (current_sample_pos - sample_pos_of_bar) * ticksPerBeat / samplesPerBeat | 00:24 |
falktx_ | the amount of work needed just to get a simple thing working is monstrous... | 00:27 |
falktx_ | in vst I could just call a function and it would get me all values | 00:27 |
rgareus | falktx_: c'mon. it's just a simple proportion. | 00:27 |
rgareus | falktx_: LV2 provides you with beats (as float) | 00:27 |
rgareus | falktx_: and 1 full beat = <ticksPerBeat> ticks. | 00:28 |
rgareus | falktx_: so, if you're at beat "1.5" -> "beat 1" + "0.5 * ticksPerBeat" | 00:29 |
rgareus | and if ticksPerBeat = 1920, -> beat 1, tick 960 | 00:29 |
rgareus | what's monstrous about that? | 00:29 |
falktx_ | 1 line of code vs having to call and parse atom atuff | 00:30 |
rgareus | that may sound provocative, but I do like that LV2 does not make these things simpler as they should be. | 00:34 |
rgareus | proper DSP is *much* harder and much heavier maths involved. | 00:34 |
rgareus | AFAICT the over-simplicity of the VST API accounts for the huge multitude of substandard VSTs. | 00:35 |
falktx_ | we could say lv2 is worse | 00:35 |
falktx_ | the over-complexity of lv2 makes for all sorts of broken plugins | 00:36 |
rgareus | falktx_: there's some truth to that, too | 00:36 |
*** ricardocrudo has joined #lv2 | 00:39 | |
falktx_ | rgareus: I'm really not used to these calculations. how do I get "sample_pos_of_bar" ? | 00:42 |
falktx_ | hmm, or better, getting ticks per frame | 00:43 |
rgareus | falktx_: "frame" as in audio-sample? | 00:46 |
falktx_ | ticksPerFrame = samplesPerFrame I guess | 00:46 |
rgareus | falktx_: I don't know what you mean by Frame. | 00:47 |
rgareus | falktx_: sometimes people use 'frame' as synonym for 'sample'. | 00:47 |
falktx_ | yes | 00:47 |
falktx_ | I need the "ticks per sample" I guess | 00:47 |
falktx_ | that should be easier to work with | 00:48 |
rgareus | falktx_: wel, if youre frame-rate equals your sample-rate then samplesPerFrame = 1 | 00:48 |
rgareus | falktx_: in one Beat there are samplesPerBeat = 60 / BPM * sampleRate audio-samples. | 00:48 |
falktx_ | ticksPerFrame = ticksPerBeat / samplesPerBeat ? | 00:49 |
rgareus | falktx_: and in one Beat there are tickePerBeat Ticks. | 00:49 |
rgareus | falktx_: yes | 00:49 |
rgareus | falktx_: more correctly: ticksPerSample = ticksPerBeat / samplesPerBeat | 00:49 |
rgareus | (sorry for being pedantic about this) | 00:50 |
falktx_ | np, I think I got it | 00:51 |
rgareus | but it's much more obvious *ticks* / *sample* = *ticks*PerBeat / *samples*PerBeat | 00:52 |
*** unclechu has quit IRC | 01:04 | |
falktx_ | ok, seems to be working | 01:14 |
falktx_ | drifts a bit sometimes it seems, not sure | 01:14 |
falktx_ | this is not right. the drifting increases with time | 01:26 |
rgareus | falktx_: drift of what? bars? ticks? | 01:40 |
rgareus | falktx_: if you do it incrementally and round to integer, it may drift depending on BPM. | 01:41 |
rgareus | falktx_: one way to avoid this: just calculate the current position always relative to the previous info provided by the host (and not relative to the previous cycle). | 01:42 |
rgareus | ie sum up the number of samples that has passed since the last update from the host. | 01:43 |
falktx_ | meh, of course this won't sync | 01:47 |
falktx_ | jalv is not sending the "beat" | 01:47 |
falktx_ | I guess that's because barBeat already includes it. I'll need to adjust the code | 01:48 |
falktx_ | rgareus: this is my current code for syncing after callback, https://github.com/DISTRHO/DPF/blob/master/distrho/src/DistrhoPluginLV2.cpp#L465 | 01:59 |
falktx_ | rgareus: this repo https://github.com/DISTRHO/plugin-examples contains a plugin that shows all that info on screen (Info example plugin) | 02:02 |
rgareus | falktx_: I'm on my way to bed. I'll check it tomorrow | 02:09 |
falktx_ | cool, thanks | 02:10 |
falktx_ | I'll try to handle vst timeinfo completely now... | 02:10 |
*** ricardocrudo has quit IRC | 02:30 | |
*** NickSB2 has quit IRC | 02:55 | |
*** falktx_ has quit IRC | 04:17 | |
*** ddom has quit IRC | 06:30 | |
*** edogawa has joined #lv2 | 07:23 | |
*** ddom has joined #lv2 | 07:42 | |
*** ddom_ has joined #lv2 | 08:40 | |
*** ddom has quit IRC | 08:44 | |
*** NickSB2 has joined #lv2 | 10:22 | |
*** falktx has joined #lv2 | 10:55 | |
*** ricardocrudo has joined #lv2 | 13:03 | |
* falktx is trying to get host-side resize | 13:12 | |
*** ddom_ has quit IRC | 14:56 | |
*** edogawa_ has joined #lv2 | 15:14 | |
*** edogawa has quit IRC | 15:17 | |
*** falktx has quit IRC | 15:39 | |
*** falktx has joined #lv2 | 15:45 | |
*** Anchakor_ has quit IRC | 16:13 | |
*** falktx has quit IRC | 16:29 | |
*** falktx has joined #lv2 | 16:29 | |
*** zth has quit IRC | 16:40 | |
*** zth has joined #lv2 | 16:42 | |
*** zth has quit IRC | 16:56 | |
*** falktx has quit IRC | 17:03 | |
*** zth has joined #lv2 | 17:16 | |
*** falktx has joined #lv2 | 17:56 | |
*** mlpug has joined #lv2 | 18:49 | |
*** NickSB2 has quit IRC | 18:52 | |
*** dharanamrs has joined #lv2 | 19:04 | |
*** unclechu has joined #lv2 | 19:07 | |
*** dharanamrs has quit IRC | 19:27 | |
unclechu | hello. any way to control Jalv parameters in realtime? | 19:29 |
*** mlpug has quit IRC | 19:57 | |
falktx | unclechu: you mean like midi-cc? | 20:05 |
falktx | jalv doesn't support that | 20:05 |
falktx | carla does | 20:05 |
unclechu | falktx, yes | 20:05 |
unclechu | falktx, hm, thanks, will try carla | 20:06 |
falktx | unclechu: you can ask me any question about carla, as I wrote that myself ;) | 20:08 |
unclechu | falktx, that's nice) can I set specific jack-client name by argv? | 20:09 |
falktx | by default carla will create new jack clients and ports for the plugins using their name, but you can rename them | 20:10 |
unclechu | falktx, rename before start? by arguments? | 20:12 |
falktx | try it first, you'll understand | 20:12 |
unclechu | falktx, ok, thanks | 20:12 |
*** unclechu has quit IRC | 20:46 | |
*** zth has quit IRC | 21:49 | |
*** rncbc has joined #lv2 | 21:56 | |
*** ricardocrudo has quit IRC | 22:15 | |
*** ricardocrudo has joined #lv2 | 22:16 | |
*** rncbc has quit IRC | 22:48 | |
*** falktx has quit IRC | 22:55 | |
*** falktx has joined #lv2 | 22:56 | |
*** ricardocrudo has quit IRC | 23:19 | |
*** Anchakor_ has joined #lv2 | 23:50 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!