Monday, 2015-07-27

*** edogawa has quit IRC00:10
*** falktx_ has quit IRC02:12
*** youki has joined #lv207:55
*** ricardocrudo has joined #lv208:32
*** tytel has joined #lv209:21
*** tytel has quit IRC09:29
*** tytel has joined #lv209:50
*** tytel has quit IRC09:54
*** aombk2 has joined #lv211:07
*** aombk has quit IRC11:09
*** aombk has joined #lv211:19
*** aombk2 has quit IRC11:20
*** falktx has joined #lv212:03
*** falktx has quit IRC15:04
*** falktx has joined #lv215:05
*** drobilla has joined #lv215:24
*** frinknet has joined #lv215:46
*** deva has joined #lv215:54
*** artfwo has joined #lv215:55
*** aombk has quit IRC16:22
*** aombk has joined #lv216:23
devaCan anybody here help me understand how the freewheel property works?16:24
falktxyes16:25
falktxit's a port designation16:25
falktxhttp://lv2plug.in/ns/lv2core/#designation16:25
falktxdeva: the best example is the BPM one16:26
devaDon't think I looked at that one16:26
falktxdeva: on certain hosts designation time:bpm will make the port hidden, and automatically set to bpm16:26
falktxdeva: there's a bunch of these properties16:27
falktxdeva: you just apply that rule to http://lv2plug.in/ns/lv2core/#freeWheeling16:27
devaSo I get data on a specific port number whenver the host changes one of the properties?16:27
falktxdeva: you'll have 1 control input port designated to something. the host will hide that port from the user and set the value internally16:28
devaok, so the port indices wont be screwed up if I add a control port?16:28
falktxport indexes are never screwed in lv216:28
devathe audio/midi port indices i mean16:28
falktxyou can add as many ports as you want16:28
falktxlv2 uses symbols, not indexes16:28
falktxonly bad hosts use indexes (*cough* qtractor *cough*)16:29
devathe bpm example is that the one called metro.c ?16:30
devaaka this one: http://lv2plug.in/book/#_metronome16:30
falktxno16:31
falktxdeva: here's what you need16:32
falktx1. add a new control input port in your ttl and code16:32
falktxmake that port 0 min, 1, max, 0 default16:32
falktxproperty toggled16:32
falktxdesignation freewheel16:33
falktx2. at the beginning of your run() check the value of that port16:33
falktxif (value > 0.5f) { /* we're freewheeling! */ } else { /* normal operation */ }16:34
falktxdeva: simple?16:34
devaaah, so I get the boolean value through floats :-)16:34
devaI guess thaty are the same bitsize anyway :-p16:34
devaI 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
falktxdeva: it needs an index, but can be any16:36
falktxdeva: as I said, lv2 uses symbols, not indexes16:36
devahmm.. currently the midi input port is 0 and tha audio ports are numbered from 1 upwards16:36
falktxyou can change the indexes of those ports (don't forget the code too) and the host won't notice16:37
devaI 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
falktxno16:37
devaor do they have to be in a row?16:37
falktxyes, sequential16:37
falktxdeva: but you don't need to worry about indexes!16:37
falktxdeva: they are only used for hosts during initialization. saving and restoring state uses symbols16:38
devaCurrently myt connect_port function uses indices...16:39
devahttp://pastebin.com/GetMDHgt16:39
devaSo I need to translate those into the actual ports?16:39
falktxconnect_port uses indexes, that's fine16:39
devaaah, so even if I add port16:40
falktxyou're assumed to have the c/c++ code synced with the ttl16:40
deva0 as a new control port, my midi port will still be 0?16:40
falktxyour midi port will be 116:40
devaI can enum myself out of it I guess16:41
devaI'll give it a go. Thanks for the input :-)16:41
falktxrgareus: does ardour4.1 hide the freewheel port in the generic UI yet?16:42
ssj71deva: enums are your friend for keeping code and ttl data sync'd16:42
rgareusfalktx: let me check16:42
rgareusfalktx: yes, it does16:43
falktxgood16:44
devafalktx, Before I start renumbering all 16 channels; is there a way to create multiple ports with the same properties?16:44
falktxdeva: maybe drobilla knows16:44
rgareusfalktx: actually that change was done in 2013  https://github.com/Ardour/ardour/commit/12584b716:44
falktxI don't write ttls manually, I use scripts for it16:44
rgareushidden since Ardour-3.316:44
falktxdeva: then you should be able to test this in ardour then16:46
devagreat16:46
rgareusfalktx: on the downside, I don't see that port being set16:47
falktx:(16:47
rgareusmaybe it's elsewhere.16:47
falktxsee jack freewheel callback16:47
rgareusaah it is16:48
rgareus_freewheel_control_port16:48
rgareusgets assigned a bool.16:48
rgareusso 0 and non-zero16:48
rgareusdunno how C++ casts bool to float. probably also -116:49
falktxcasting bool seems incorrect16:51
falktxit should set the port max values16:51
falktx*value16:51
rgareusit's an easy fix    ? 0 : 1;     or    ? port_min : port_max;16:52
falktxthe 2nd one seems better16:52
rgareusdo the specs say anything about this?16:53
falktxI don't think so16:53
falktxbut freewheel is obviously a toggle16:53
falktxhttp://lv2plug.in/ns/lv2core/#toggled16:53
rgareushttp://lv2plug.in/ns/lv2core/#freeWheeling  mentions "true".  in C,C++,  all non zero values are true16:53
rgareustoggle says "data above zero"16:54
rgareusbut below :(16:54
rgareusbut not below :(16:54
falktxI'd consider "true" in a toggle port to be its max value16:54
falktxand "false" to be its min value16:54
falktxlv2 is too generic here16:55
*** flexus has joined #lv216:55
rgareusfalktx: http://lv2plug.in/ns/lv2core/#toggled is explicit   <=0 means false,   > 0 true16:57
rgareusin most cases plugins will have min,max  0,116:57
*** edogawa has joined #lv216:59
falktxwhat if I have min 1, max 2 ?17:00
falktxit's a toggle for something that is not on/off17:00
falktxlike changing the channel output17:00
drobillaIt'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
drobillafalktx: Not a lv2:toggled, then.  enumeration.17:06
falktxok, but I don't like it :P17:07
devaArdour seem to use 0 and 1 regardless of the max and min values I hve in my ttl file17:08
devaStrictly 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 time17:09
falktxthe same happens with the latency port17:10
drobillaardour uses 0 and 1 for toggle ports regardless, yes (other things no doubt do as well).  that's basically what they are for17:12
*** NickSB has quit IRC17:20
*** NickSB has joined #lv217:21
*** tytel has joined #lv217:34
*** tytel has quit IRC17:36
*** tytel has joined #lv217:39
*** drobilla has quit IRC18:08
*** edogawa has quit IRC18:13
*** edogawa has joined #lv218:15
*** tytel has quit IRC18:15
*** deva has quit IRC18:56
*** edogawa has quit IRC18:58
*** edogawa has joined #lv219:02

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