*** edogawa has quit IRC | 00:10 | |
*** falktx_ has quit IRC | 02:12 | |
*** youki has joined #lv2 | 07:55 | |
*** ricardocrudo has joined #lv2 | 08:32 | |
*** tytel has joined #lv2 | 09:21 | |
*** tytel has quit IRC | 09:29 | |
*** tytel has joined #lv2 | 09:50 | |
*** tytel has quit IRC | 09:54 | |
*** aombk2 has joined #lv2 | 11:07 | |
*** aombk has quit IRC | 11:09 | |
*** aombk has joined #lv2 | 11:19 | |
*** aombk2 has quit IRC | 11:20 | |
*** falktx has joined #lv2 | 12:03 | |
*** falktx has quit IRC | 15:04 | |
*** falktx has joined #lv2 | 15:05 | |
*** drobilla has joined #lv2 | 15:24 | |
*** frinknet has joined #lv2 | 15:46 | |
*** deva has joined #lv2 | 15:54 | |
*** artfwo has joined #lv2 | 15:55 | |
*** aombk has quit IRC | 16:22 | |
*** aombk has joined #lv2 | 16:23 | |
deva | Can anybody here help me understand how the freewheel property works? | 16:24 |
---|---|---|
falktx | yes | 16:25 |
falktx | it's a port designation | 16:25 |
falktx | http://lv2plug.in/ns/lv2core/#designation | 16:25 |
falktx | deva: the best example is the BPM one | 16:26 |
deva | Don't think I looked at that one | 16:26 |
falktx | deva: on certain hosts designation time:bpm will make the port hidden, and automatically set to bpm | 16:26 |
falktx | deva: there's a bunch of these properties | 16:27 |
falktx | deva: you just apply that rule to http://lv2plug.in/ns/lv2core/#freeWheeling | 16:27 |
deva | So I get data on a specific port number whenver the host changes one of the properties? | 16:27 |
falktx | deva: you'll have 1 control input port designated to something. the host will hide that port from the user and set the value internally | 16:28 |
deva | ok, so the port indices wont be screwed up if I add a control port? | 16:28 |
falktx | port indexes are never screwed in lv2 | 16:28 |
deva | the audio/midi port indices i mean | 16:28 |
falktx | you can add as many ports as you want | 16:28 |
falktx | lv2 uses symbols, not indexes | 16:28 |
falktx | only bad hosts use indexes (*cough* qtractor *cough*) | 16:29 |
deva | the bpm example is that the one called metro.c ? | 16:30 |
deva | aka this one: http://lv2plug.in/book/#_metronome | 16:30 |
falktx | no | 16:31 |
falktx | deva: here's what you need | 16:32 |
falktx | 1. add a new control input port in your ttl and code | 16:32 |
falktx | make that port 0 min, 1, max, 0 default | 16:32 |
falktx | property toggled | 16:32 |
falktx | designation freewheel | 16:33 |
falktx | 2. at the beginning of your run() check the value of that port | 16:33 |
falktx | if (value > 0.5f) { /* we're freewheeling! */ } else { /* normal operation */ } | 16:34 |
falktx | deva: simple? | 16:34 |
deva | aah, so I get the boolean value through floats :-) | 16:34 |
deva | I guess thaty are the same bitsize anyway :-p | 16:34 |
deva | I have currently all of my ports assigned with a lv2:index, what will happen if I just add this new port without assigning it an index? | 16:35 |
falktx | deva: it needs an index, but can be any | 16:36 |
falktx | deva: as I said, lv2 uses symbols, not indexes | 16:36 |
deva | hmm.. currently the midi input port is 0 and tha audio ports are numbered from 1 upwards | 16:36 |
falktx | you can change the indexes of those ports (don't forget the code too) and the host won't notice | 16:37 |
deva | I am not sure how many audio ports I will end up having in the plugin, so would it be ok to assign the control ports indices from say 100 and up? | 16:37 |
falktx | no | 16:37 |
deva | or do they have to be in a row? | 16:37 |
falktx | yes, sequential | 16:37 |
falktx | deva: but you don't need to worry about indexes! | 16:37 |
falktx | deva: they are only used for hosts during initialization. saving and restoring state uses symbols | 16:38 |
deva | Currently myt connect_port function uses indices... | 16:39 |
deva | http://pastebin.com/GetMDHgt | 16:39 |
deva | So I need to translate those into the actual ports? | 16:39 |
falktx | connect_port uses indexes, that's fine | 16:39 |
deva | aah, so even if I add port | 16:40 |
falktx | you're assumed to have the c/c++ code synced with the ttl | 16:40 |
deva | 0 as a new control port, my midi port will still be 0? | 16:40 |
falktx | your midi port will be 1 | 16:40 |
deva | I can enum myself out of it I guess | 16:41 |
deva | I'll give it a go. Thanks for the input :-) | 16:41 |
falktx | rgareus: does ardour4.1 hide the freewheel port in the generic UI yet? | 16:42 |
ssj71 | deva: enums are your friend for keeping code and ttl data sync'd | 16:42 |
rgareus | falktx: let me check | 16:42 |
rgareus | falktx: yes, it does | 16:43 |
falktx | good | 16:44 |
deva | falktx, Before I start renumbering all 16 channels; is there a way to create multiple ports with the same properties? | 16:44 |
falktx | deva: maybe drobilla knows | 16:44 |
rgareus | falktx: actually that change was done in 2013 https://github.com/Ardour/ardour/commit/12584b7 | 16:44 |
falktx | I don't write ttls manually, I use scripts for it | 16:44 |
rgareus | hidden since Ardour-3.3 | 16:44 |
falktx | deva: then you should be able to test this in ardour then | 16:46 |
deva | great | 16:46 |
rgareus | falktx: on the downside, I don't see that port being set | 16:47 |
falktx | :( | 16:47 |
rgareus | maybe it's elsewhere. | 16:47 |
falktx | see jack freewheel callback | 16:47 |
rgareus | aah it is | 16:48 |
rgareus | _freewheel_control_port | 16:48 |
rgareus | gets assigned a bool. | 16:48 |
rgareus | so 0 and non-zero | 16:48 |
rgareus | dunno how C++ casts bool to float. probably also -1 | 16:49 |
falktx | casting bool seems incorrect | 16:51 |
falktx | it should set the port max values | 16:51 |
falktx | *value | 16:51 |
rgareus | it's an easy fix ? 0 : 1; or ? port_min : port_max; | 16:52 |
falktx | the 2nd one seems better | 16:52 |
rgareus | do the specs say anything about this? | 16:53 |
falktx | I don't think so | 16:53 |
falktx | but freewheel is obviously a toggle | 16:53 |
falktx | http://lv2plug.in/ns/lv2core/#toggled | 16:53 |
rgareus | http://lv2plug.in/ns/lv2core/#freeWheeling mentions "true". in C,C++, all non zero values are true | 16:53 |
rgareus | toggle says "data above zero" | 16:54 |
rgareus | but below :( | 16:54 |
rgareus | but not below :( | 16:54 |
falktx | I'd consider "true" in a toggle port to be its max value | 16:54 |
falktx | and "false" to be its min value | 16:54 |
falktx | lv2 is too generic here | 16:55 |
*** flexus has joined #lv2 | 16:55 | |
rgareus | falktx: http://lv2plug.in/ns/lv2core/#toggled is explicit <=0 means false, > 0 true | 16:57 |
rgareus | in most cases plugins will have min,max 0,1 | 16:57 |
*** edogawa has joined #lv2 | 16:59 | |
falktx | what if I have min 1, max 2 ? | 17:00 |
falktx | it's a toggle for something that is not on/off | 17:00 |
falktx | like changing the channel output | 17:00 |
drobilla | It's slightly annoying for C but a bit more audioish, arguably (like when mapped to MIDI CC, for example, it's >= mid = on) | 17:06 |
drobilla | falktx: Not a lv2:toggled, then. enumeration. | 17:06 |
falktx | ok, but I don't like it :P | 17:07 |
deva | Ardour seem to use 0 and 1 regardless of the max and min values I hve in my ttl file | 17:08 |
deva | Strictly speaking it seems a bit overkill to have an input port for this value, since it will change very rarely and is relatively expensive to test all the time | 17:09 |
falktx | the same happens with the latency port | 17:10 |
drobilla | ardour uses 0 and 1 for toggle ports regardless, yes (other things no doubt do as well). that's basically what they are for | 17:12 |
*** NickSB has quit IRC | 17:20 | |
*** NickSB has joined #lv2 | 17:21 | |
*** tytel has joined #lv2 | 17:34 | |
*** tytel has quit IRC | 17:36 | |
*** tytel has joined #lv2 | 17:39 | |
*** drobilla has quit IRC | 18:08 | |
*** edogawa has quit IRC | 18:13 | |
*** edogawa has joined #lv2 | 18:15 | |
*** tytel has quit IRC | 18:15 | |
*** deva has quit IRC | 18:56 | |
*** edogawa has quit IRC | 18:58 | |
*** edogawa has joined #lv2 | 19:02 |
Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!