Controled messages to [counter] to have specific outputs (ie. 3, 7, 11, etc)
Why is this not working? I am trying at some elegance and falling short. I have several video planes being called to be displayed. Each [jit.gl.videoplane] has a timer that can be altered thus when that timer expires I want the video to change. This [counter] is selecting which video to play next from a [umenu] ([counter] returns 0, play 0th and so on).
I cannot just directly bang the [counter] as I want these videos in order (say I have 4 videoplanes, I would like each [counter] to have a global count but only produce the correct number when that particular video’s time is up. I.e. a specific videoplane will play videos 2, 6, 10, etc while another videoplane will play videos 3, 7, 11, etc)
----------begin_max5_patcher---------- 604.3oc2W1ziZCCDF9bxuBKeNMxNemdiV0VUosn8PuUUEYRbAuJ3fhMTZWs+ 2qsCARoraXARNzCfjGal4UOYl2Xdz1BNqZKU.AuE7Mfk0i1VVlP5.V6VaAWR 1lWRDliA4zeVM6AnSyVR5VoIbMXy8kDNMqRtfV+9p0bIsVj8tIS+T6YqVKKo R4uVQapGDB99ts9QEWJX+1rA1yEsKLe8RFW8aLUtMHqvTPkHdiWjGrSF3jkl L.mTyHks6rhHyWv3yypo4xlJmfCcSBRhCCc.dAwXWObZZL1AfiSTEG3gbQ60 lRDMJ2nBrN3S115ubtdjc2joeH69JASxp32w3zOx3LwBZggbYBTv.RuvzKid AQt96oW5A5oP4.PukTgfLm9O3iwyuQrw6TrI45YSnpfsrw2yUEBm7e.ZBBt9 gtAGM8YSk23P8Ex1rOO8qC2PFNH9xnUbTWZ0whJDMDVTqWNiV+rXfwkPG.bF gO+0QD7IHRH9FPD+CDoWf3sOo0phodpmQ4jYklxhtgic9oC2TGN5Bm5PnCFR QnD2jTLF62RswYpa2vF.AvHDputr1O5kuJrEdByJ+KyGONLnSyVTpaXTBFqs oBv8zsEzgali.KUuW+n6XYJoN9eCSQ0557Vbr29.bnTETgjwI5aKz8T5QpNm ZAqnfx65HUvD5N9hmuk+bUj4NW8pHyKIFKEouGS+JR+F8QSQImihz8l.+wQQ G873kTj23nH+ygQFaO.dTTzwSQuDiBt.E0XFPVsZi5eFsKoFwn7PenpVuLxw rjwaVZxHrltg0d9Dac1dx9O.2fMJCB -----------end_max5_patcher-----------
add coll or table after the counter ?
@Stephane, I dont think I am following you. I dont want the counter to be spitting out numbers except at specific points in time and to be giving are specific numbers. I dont see how an array would work towards that as its function is namely for recording / assembling data to be shipped off to other programs
No max on this computer for now so it seems I misunderstood your problem just by reading your post.
Question: why doesnt this work?
Expectations: by incrementing (inc) the starting value at these inlets of [counter], shouldnt one only output a value while the other’s result is internal. Thus I can be counting away (banging the desired inc message) and have [counter] output numbers only at specific values (when I choose to bang the correct inc message. The max of [counter] will be set high enough and is immaterial.
Reality: it seems like sending inc to any part of [counter] works just like a bang on the first inlet (boob of a wrapper for getting my hopes up). Are there get arounds to this?
[b]does this work?[/b] :( bum of a forum for having no formatting. but the line break (br) tag works? wtf
im not looking for the obvious that i know but rather practical solution. I dont really want to define [mycounter] but I can if I have to. I just assume cycling 74 has made an object for most occasions, and they would have if I could inc specific inlets with the desire change that aspect. I have to assume an object has more than 1x i/o so that something useful can be done of these.
[i]is this valid[/i] still no formatting
As Nicholas states, the inc message only controls the count itself, not any other internal parameters of counter. It’s not clear to me what you are trying to accomplish from your patch.
My output needs to be an int to select an item from the [umenu]. How this int is determined is on the following:
•I have 4 of the same functions. A given function is playing a video ([jit.gl.videoplane]). That video has a timer for how long it will play once the timer expires, the function will call the next video in order.
•I have a list of 100 some videos that I want them played in order. function0 will start with video0, a few seconds later video1 will be played with function1 and so on. Once video0 is finished then function0 will select the next video that has not been played. This is where the above segment of code would be enabled. Each video will be played only once thus I need some global connection between each call of [jit.gl.videoplane].
Is there a way of not writing out my own version of [counter]? I would prefer to stay away from a solution relaying copious amounts of math. Even though the logic would be fun on some level, I foresee this project to be expanded so making the math flexible per n instances of [jit.gl.videoplane] is something I do not have time / patients for.
Maybe if you can ask more specific questions as I am running out of ways of explaining what isnt working here :(
Maybe an approach like this would work for you?
----------begin_max5_patcher---------- 1457.3oc2Z0sipaCD9Z3ovhqZk1FE6jPHm65E8myEUsRsp2rc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vAyWnKPjkW gTRTJCQEPYhJciJVAnPlNTrYnwkxYH0TF51Ef3VbmG5GkKgN3UlI.+kqC..J .KW2Bd7B8nGKKJjKA54C+g3e+6+4inozGYnPjbr41U.ohFW+7HUdnuEMg+HS rpKsjlWP+DH.DUWDKSh9paefq7lT3YZB2Uvt6q8P+1TppdDSoUvnU7YrR..k no.RKjfH3JzRdQgQj.ByXFPXGH6o4bHs6MVX2r9lgmQgK5taJkFVCt.IKyYk dqqWTTAGp3FTNruOpRBJmYz.6pQ2GQKoZxcJvmZHnYpFwrZI8sqYkhVpQqZp UDfKDEMlsDrKYRAXuJn.cauG1NEv7UKUyzZDHFrg4.X.E1C8yZk1JPM2NlK3 USgY.XR7JHX8.1PwMZhlgERnFQFLM6hps.ZmgJzxorRKyRSk.qTwln8.0zRl LmgVJWTjqQqMYALyuilUqlapIRQwJK0hJfA0NqVlcRyWqmPvrFqTlZoFPLs3 LFMXIeCuEulMCEf2pIZgYin+Y98oZS7FUWQ1P6CHQbvoCrdXAivLJ1FeroFD o6+kwJpjKJyZhAV+cq.3ZElxgGgjKLUht1fB8gA8LvmxyyYh0Yqbdkw1t8JA NH73uG7Djzc3IoM3It6vSTavynNCOjVYuvcG+PZCd5P+YbavCoawy91uGDzc 9Ogs.OjgcKd1m8hD0c3oM62Icn8pM9yaPhmS7fiaAdvcW7m1jt.2clKbaLWI cKb12tcbGFctErS7EEZ5tHOsIP3w5HaKakNe9irxpZQZ.B7vrOHK0MGdioIW XaZj3fR1i7lwG2WKsuz++.z084FB -----------end_max5_patcher-----------
I think it is working out. I am trying a variation. I forgot about how initializing videos where going to update my values so I am just using s/r but I think it will sort itself nicely.
I did have the code distilled to 6 lines (if it was done in processing but with the max lib. Thanks for your spark and driving direction though!
Nicolas! Merci beaucoup! Maintenant, cela semble être une meilleure solution. Il semble plus facile à mettre en œuvre.
Community! thank you very much, I think I am sorted now. Thanks again for your ideas. I am still trying to get my head around max (coming only from HMTL, scheme, other similar cmd line environments, Java, css web styling, Ben Fry’s Processing)